Timeline



Dec 7, 2016:

11:20 PM Changeset in webkit [209528] by jfbastien@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Cleanup WebAssembly's RETURN_IF_EXCEPTION
https://bugs.webkit.org/show_bug.cgi?id=165595

Reviewed by Filip Pizlo.

  • wasm/js/WebAssemblyCompileErrorConstructor.cpp:

(JSC::constructJSWebAssemblyCompileError):

  • wasm/js/WebAssemblyFunction.cpp:

(JSC::callWebAssemblyFunction):

  • wasm/js/WebAssemblyRuntimeErrorConstructor.cpp:

(JSC::constructJSWebAssemblyRuntimeError):

10:47 PM Changeset in webkit [209527] by hyatt@apple.com
  • 2 edits
    2 deletes in trunk/LayoutTests

[CSS Parser] Remove font test that tests something nobody supports
https://bugs.webkit.org/show_bug.cgi?id=165596

Reviewed by Zalan Bujtas.

Remove this test that thinks "default" should be a special keyword in fonts. No
other browser treat this as special. Our old parser did, but it's just from some
reading of ancient CSS2 specs and not for any real-world reason.

  • TestExpectations:
  • fast/css/font-family-parse-keyword.html: Removed.
  • fast/css/font-family-parse-keyword-expected.html: Removed.
10:29 PM Changeset in webkit [209526] by hyatt@apple.com
  • 7 edits in trunk

REGRESSION: font shorthand parsing is broken
https://bugs.webkit.org/show_bug.cgi?id=165594

Reviewed by Zalan Bujtas.

Source/WebCore:

Unskipping fast/css/font-calculated-value.html.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeFontWeight):
The new parser did not support calc() in the font-weight property.
In order to support a positive integer, add new functions to consume
and handle positive integers without making a CSSPrimitiveValue out of
the number. These correspond to consumeNumberRaw but are limited to positive
integers.

(WebCore::CSSPropertyParser::consumeFont):
The implicit bool was incorrectly set to true when properties were
defined because releaseNonNull() cleared the variables being null
checked. Add separate booleans to avoid this.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::CalcParser::consumePositiveIntegerRaw):
(WebCore::CSSPropertyParserHelpers::consumePositiveIntegerRaw):

  • css/parser/CSSPropertyParserHelpers.h:

Add the new helpers that consume positive integers without creating
CSSPrimitiveValues out of them.

LayoutTests:

10:19 PM Changeset in webkit [209525] by commit-queue@webkit.org
  • 8 edits
    4 adds in trunk

Exit pointer lock when page goes into page cache.
https://bugs.webkit.org/show_bug.cgi?id=165425
rdar://problem/29430834

Patch by Jeremy Jones <jeremyj@apple.com> on 2016-12-07
Reviewed by Jer Noble.

Source/WebCore:

Test: pointer-lock/lock-lost-on-navigation.html

Cancel pointer lock when page goes into page cache and add methods to Internals
so it can be tested.

  • dom/Document.cpp:

(WebCore::Document::setPageCacheState):

  • page/PointerLockController.h:
  • testing/Internals.cpp:

(WebCore::Internals::pageHasPendingPointerLock):
(WebCore::Internals::pageHasPointerLock):

  • testing/Internals.h:
  • testing/Internals.idl:

LayoutTests:

  • platform/mac/TestExpectations:
  • pointer-lock/lock-lost-on-navigation-expected.txt: Added.
  • pointer-lock/lock-lost-on-navigation.html: Added.
  • pointer-lock/resources/lock-lost-on-navigation2.html: Added.
10:14 PM Changeset in webkit [209524] by hyatt@apple.com
  • 12 edits in trunk/LayoutTests

[CSS Parser] Unskip calc() tests
https://bugs.webkit.org/show_bug.cgi?id=165583

Reviewed by Zalan Bujtas.

  • TestExpectations:
  • fast/css/flex-shrink-calculated-value-expected.txt:
  • fast/css/flex-shrink-calculated-value.html:
  • fast/css/negative-calc-values-expected.txt:
  • fast/css/negative-calc-values.html:
  • fast/css/text-shadow-calc-value-expected.txt:
  • fast/css/text-shadow-calc-value.html:
  • fast/css/webkit-line-clamp-calculated-value-expected.txt:
  • fast/css/webkit-line-clamp-calculated-value.html:
  • fast/css/z-index-calculated-value-expected.txt:
  • fast/css/z-index-calculated-value.html:
9:51 PM Changeset in webkit [209523] by commit-queue@webkit.org
  • 5 edits
    4 adds in trunk

[Modern Media Controls] Tracks panel does not display in the right location in fullscreen and cannot be dismissed
https://bugs.webkit.org/show_bug.cgi?id=165575

Patch by Antoine Quint <Antoine Quint> on 2016-12-07
Reviewed by Dean Jackson.

Source/WebCore:

We position the tracks panel programmatically based on the current bounds of the fullscreen button in fullscreen.
This allows for the tracks panel to be shown in the right spot even after dragging the controls bar. We also use
the fullscreen media controls as the target for tracking "mousedown" events when the tracks panel is shown in a
fullscreen presentation.

Tests: media/modern-media-controls/tracks-support/tracks-support-show-panel-after-dragging-controls.html

media/modern-media-controls/tracks-support/tracks-support-show-panel-fullscreen.html

  • Modules/modern-media-controls/controls/macos-fullscreen-media-controls.css:

(.media-controls.mac.fullscreen .scrubber):
(.media-controls.mac.fullscreen .tracks-panel): Deleted.

  • Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js:

(MacOSFullscreenMediaControls.prototype.showTracksPanel):

  • Modules/modern-media-controls/controls/tracks-panel.js:

(TracksPanel.prototype.presentInParent):
(TracksPanel.prototype.hide):
(TracksPanel.prototype.get bottomY):
(TracksPanel.prototype.set bottomY):
(TracksPanel.prototype.commitProperty):
(TracksPanel.prototype._mousedownTarget):

LayoutTests:

Add new tests to check we correctly position the tracks panel in fullscreen, including when we drag the controls bar.

  • media/modern-media-controls/tracks-support/tracks-support-show-panel-after-dragging-controls-expected.txt: Added.
  • media/modern-media-controls/tracks-support/tracks-support-show-panel-after-dragging-controls.html: Added.
  • media/modern-media-controls/tracks-support/tracks-support-show-panel-fullscreen-expected.txt: Added.
  • media/modern-media-controls/tracks-support/tracks-support-show-panel-fullscreen.html: Added.
9:18 PM Changeset in webkit [209522] by jeremyj-wk@apple.com
  • 2 edits in trunk/LayoutTests

pointer-lock/lock-lost-on-esc-in-fullscreen.html timeout on mac-wk1
https://bugs.webkit.org/show_bug.cgi?id=165589

Unreviewed skipping test that is timing out.

  • platform/mac-wk1/TestExpectations:
9:09 PM Changeset in webkit [209521] by Ryan Haddad
  • 1 edit
    1 move in trunk/LayoutTests

Fix the filename for a newly added test expectation file.

Unreviewed test gardening.

  • tiled-drawing/scrolling/scroll-snap/scroll-snap-scrolling-jumps-to-top-expected.txt: Renamed from LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-scrolling-jumps-to-top.txt.
8:46 PM Changeset in webkit [209520] by commit-queue@webkit.org
  • 7 edits
    2 adds in trunk

[Modern Media Controls] Use a small picture-in-picture button in fullscreen
https://bugs.webkit.org/show_bug.cgi?id=165587

Patch by Antoine Quint <Antoine Quint> on 2016-12-07
Reviewed by Dean Jackson.

Source/WebCore:

Use a newer, smaller asset for picture-in-picture in fullscreen.

LayoutTests:

Rebaseline tests to account for the smaller picture-in-picture button in fullscreen.

  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles-expected.txt:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles-expected.txt:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles.html:
8:27 PM Changeset in webkit [209519] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebInspectorUI

REGRESSION(r203912): Web Inspector: Navigation sidebar widths are not saved
https://bugs.webkit.org/show_bug.cgi?id=165496

Patch by Devin Rousso <Devin Rousso> on 2016-12-07
Reviewed by Matt Baker.

  • UserInterface/Views/TabBrowser.js:

(WebInspector.TabBrowser):
(WebInspector.TabBrowser.prototype._sidebarWidthDidChange):
(WebInspector.TabBrowser.prototype._showNavigationSidebarPanelForTabContentView):
(WebInspector.TabBrowser.prototype._sidebarWidthDidChange): Renamed from _detailsSidebarWidthDidChange.
Add event listener for when the navigation sidebar's width is changed.

  • UserInterface/Views/TabContentView.js:

(WebInspector.TabContentView):
(WebInspector.TabContentView.prototype.get navigationSidebarPanel):
(WebInspector.TabContentView.prototype.get navigationSidebarCollapsedSetting):
(WebInspector.TabContentView.prototype.get navigationSidebarWidthSetting):
(WebInspector.TabContentView.prototype.get detailsSidebarPanels):
(WebInspector.TabContentView.prototype.get detailsSidebarCollapsedSetting):
(WebInspector.TabContentView.prototype.get detailsSidebarSelectedPanelSetting):
(WebInspector.TabContentView.prototype.get detailsSidebarWidthSetting):
Add WebInspector.Setting object for the navigation sidebar's width.

7:58 PM Changeset in webkit [209518] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking inspector/debugger/async-stack-trace.html as flaky on macOS.
https://bugs.webkit.org/show_bug.cgi?id=165584

Unreviewed test gardening.

  • platform/mac/TestExpectations:
7:52 PM Changeset in webkit [209517] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking inspector/worker/debugger-scripts.html as flaky on mac-wk2.
https://bugs.webkit.org/show_bug.cgi?id=165582

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
7:26 PM Changeset in webkit [209516] by mark.lam@apple.com
  • 3 edits
    2 deletes in trunk/Tools

DumpRenderTree should stop using CheckedMalloc.
https://bugs.webkit.org/show_bug.cgi?id=165563
<rdar://problem/28945820>

Reviewed by Geoffrey Garen.

  1. WebKitTestRunner does not have equivalent behavior to that which is implemented in CheckedMalloc.
  2. bmalloc does not honor the settings of CheckedMalloc.

The only time CheckedMalloc comes into play is when DRT uses gmalloc or system
malloc. As a result, DRT exhibits different behavior from the normal way we run
our tests. We should obsolete CheckedMalloc and make DRT behave consistently
with WKTR.

  • DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
  • DumpRenderTree/mac/CheckedMalloc.cpp: Removed.
  • DumpRenderTree/mac/CheckedMalloc.h: Removed.
  • DumpRenderTree/mac/DumpRenderTree.mm:

(prepareConsistentTestingEnvironment):

7:22 PM Changeset in webkit [209515] by hyatt@apple.com
  • 10 edits in trunk/LayoutTests

[CSS Parser] Unskip media tests
https://bugs.webkit.org/show_bug.cgi?id=165580

Reviewed by Jon Lee.

The new parser will still create rules for hover/pointer queries with
unknown identifiers. Patch the tests to account for this.

  • TestExpectations:
  • fast/media/mq-any-hover-invalid-expected.txt:
  • fast/media/mq-any-hover-invalid.html:
  • fast/media/mq-any-pointer-invalid-expected.txt:
  • fast/media/mq-any-pointer-invalid.html:
  • fast/media/mq-hover-invalid-expected.txt:
  • fast/media/mq-hover-invalid.html:
  • fast/media/mq-pointer-invalid-expected.txt:
  • fast/media/mq-pointer-invalid.html:
6:53 PM Changeset in webkit [209514] by dino@apple.com
  • 26 edits
    2 deletes in trunk

Remove runtime toggle for pointer-lock
https://bugs.webkit.org/show_bug.cgi?id=165577
<rdar://problems/29566996>

Reviewed by Jon Lee.

Source/WebCore:

Remove any runtime calls to check if pointer-lock is enabled. It's
either compiled in or out.

Covered by existing tests.

  • bindings/generic/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setPointerLockEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::pointerLockEnabled): Deleted.

  • dom/Document.idl:
  • dom/Element.idl:
  • page/Page.h:
  • page/PointerLockController.cpp:

(WebCore::PointerLockController::requestPointerLock):
(WebCore::PointerLockController::requestPointerUnlock):
(WebCore::PointerLockController::requestPointerUnlockAndForceCursorVisible):

Source/WebKit/mac:

Remove any runtime calls to check if pointer-lock is enabled. It's
either compiled in or out.

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(-[WebPreferences pointerLockEnabled]): Deleted.
(-[WebPreferences setPointerLockEnabled:]): Deleted.

  • WebView/WebPreferencesPrivate.h:
  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

Source/WebKit2:

Remove any runtime calls to check if pointer-lock is enabled. It's
either compiled in or out.

  • Shared/WebPreferencesDefinitions.h:
  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetPointerLockEnabled): Deleted.
(WKPreferencesGetPointerLockEnabled): Deleted.

  • UIProcess/API/C/WKPreferencesRefPrivate.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

Tools:

Remove any runtime calls to check if pointer-lock is enabled. It's
either compiled in or out.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(resetWebPreferencesToConsistentValues):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetPreferencesToConsistentValues):

Websites/webkit.org:

No need to have pointer-lock tested.

  • experimental-features.html: Also sort the list alphabetically.

LayoutTests:

Remove any runtime calls to check if pointer-lock is enabled. It's
either compiled in or out.

  • platform/mac/TestExpectations: Enable the pointer-lock tests that should work.
  • pointer-lock/pointer-lock-api.html: Fix a bad DOM call.
  • pointer-lock/pointerlock-interface-disabled-expected.txt: Removed.
  • pointer-lock/pointerlock-interface-disabled.html: Removed.
6:51 PM Changeset in webkit [209513] by bshafiei@apple.com
  • 5 edits in branches/safari-602-branch/Source

Versioning.

6:25 PM Changeset in webkit [209512] by eric.carlson@apple.com
  • 15 edits
    6 adds in trunk

[MediaStream][Mac] Revoke sandbox extensions when capture ends
https://bugs.webkit.org/show_bug.cgi?id=165476

Reviewed by Brady Eidson.
Source/WebKit2:

Track media capture by process so it is possible to revoke the sandbox extensions issued to
a web process when capture stops. Allocate WK2 user media permission manager lazily rather
than every time a page is created as most pages won't need one.

  • CMakeLists.txt: Add new files.
  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::UserMediaPermissionRequestManagerProxy): Register

with process manager.

(WebKit::UserMediaPermissionRequestManagerProxy::~UserMediaPermissionRequestManagerProxy):
(WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted): Move sandbox

extension code to the process manager.

(WebKit::UserMediaPermissionRequestManagerProxy::stopCapture): New.
(WebKit::UserMediaPermissionRequestManagerProxy::startedCaptureSession): New, report state

change to the process manager.

(WebKit::UserMediaPermissionRequestManagerProxy::endedCaptureSession): Ditto.

  • UIProcess/UserMediaPermissionRequestManagerProxy.h:
  • UIProcess/UserMediaProcessManager.cpp: Added.

(WebKit::ProcessState::ProcessState):
(WebKit::ProcessState::managers):
(WebKit::ProcessState::sandboxExtensionsGranted):
(WebKit::ProcessState::setSandboxExtensionsGranted):
(WebKit::stateMap):
(WebKit::processState):
(WebKit::ProcessState::addRequestManager):
(WebKit::ProcessState::removeRequestManager):
(WebKit::UserMediaProcessManager::singleton):
(WebKit::UserMediaProcessManager::addUserMediaPermissionRequestManagerProxy):
(WebKit::UserMediaProcessManager::removeUserMediaPermissionRequestManagerProxy):
(WebKit::UserMediaProcessManager::willCreateMediaStream):
(WebKit::UserMediaProcessManager::startedCaptureSession):
(WebKit::UserMediaProcessManager::endedCaptureSession):

  • UIProcess/UserMediaProcessManager.h: Added.
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::WebPageProxy): Don't allocate m_userMediaPermissionRequestManager.
(WebKit::WebPageProxy::resetState): Set m_userMediaPermissionRequestManager to null.
(WebKit::WebPageProxy::userMediaPermissionRequestManager): Allocate m_userMediaPermissionRequestManager

lazily as most pages don't need it.

(WebKit::WebPageProxy::requestUserMediaPermissionForFrame): Call userMediaPermissionRequestManager().
(WebKit::WebPageProxy::enumerateMediaDevicesForFrame): Ditto.
(WebKit::WebPageProxy::clearUserMediaState): Ditto.
(WebKit::WebPageProxy::isPlayingMediaDidChange): Report capture state changes to the request

manager proxy.

  • UIProcess/WebPageProxy.h:
  • WebKit2.xcodeproj/project.pbxproj: Add new files.
  • WebProcess/MediaStream/MediaDeviceSandboxExtensions.cpp: Added.

(WebKit::MediaDeviceSandboxExtensions::MediaDeviceSandboxExtensions):
(WebKit::MediaDeviceSandboxExtensions::encode):
(WebKit::MediaDeviceSandboxExtensions::decode):
(WebKit::MediaDeviceSandboxExtensions::operator[]):
(WebKit::MediaDeviceSandboxExtensions::size):

  • WebProcess/MediaStream/MediaDeviceSandboxExtensions.h: Added.
  • WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:

(WebKit::UserMediaPermissionRequestManager::~UserMediaPermissionRequestManager): Sandbox extension

is now in a HashMap, not a Vector.

(WebKit::UserMediaPermissionRequestManager::grantUserMediaDeviceSandboxExtensions): Record

IDs with extensions so they can be revoked later.

(WebKit::UserMediaPermissionRequestManager::revokeUserMediaDeviceSandboxExtensions): New.
(WebKit::UserMediaPermissionRequestManager::grantUserMediaDevicesSandboxExtension): Deleted.

  • WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::grantUserMediaDeviceSandboxExtensions):
(WebKit::WebPage::revokeUserMediaDeviceSandboxExtensions):
(WebKit::WebPage::grantUserMediaDevicesSandboxExtension): Deleted.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:

Tools:

Add a test which loads a page that calls navigator.mediaDevices.enumerateDevices, kills the
page, and loads the same page again to ensure that the WK2 UserMediaPermissionRequestManagerProxy
is reset and recreated when a web page exits and is reloaded.

  • TestWebKitAPI/PlatformGTK.cmake:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2/EnumerateMediaDevices.cpp: Added.

(TestWebKitAPI::checkUserMediaPermissionCallback):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit2/enumerateMediaDevices.html: Added.
6:18 PM Changeset in webkit [209511] by hyatt@apple.com
  • 6 edits in trunk/LayoutTests

[CSS Parser] Unskip gradients tests
https://bugs.webkit.org/show_bug.cgi?id=165576

Reviewed by Dean Jackson.

Keywords like left, center, top, right and bottom are preserved when serializing in
the new parser.

  • TestExpectations:
  • fast/gradients/css3-gradient-parsing-expected.txt:
  • fast/gradients/css3-gradient-parsing.html:
  • fast/gradients/unprefixed-gradient-parsing-expected.txt:
  • fast/gradients/unprefixed-gradient-parsing.html:
6:08 PM Changeset in webkit [209510] by wilander@apple.com
  • 4 edits in trunk

Allow commas in Accept, Accept-Language, and Content-Language request headers for simple CORS
https://bugs.webkit.org/show_bug.cgi?id=165566
<rdar://problem/29560983>

Reviewed by Alex Christensen.

Source/WebCore:

Updated the existing tests.

  • platform/network/HTTPParsers.cpp:

(WebCore::isValidAcceptHeaderValue):

Now also accepts ','.

(WebCore::isValidLanguageHeaderValue):

Ditto.

LayoutTests:

  • http/tests/xmlhttprequest/cors-non-standard-safelisted-headers-should-trigger-preflight.html:

Added ',' to the tests as well as two examples from
two sites where we found a regression.

6:01 PM Changeset in webkit [209509] by hyatt@apple.com
  • 8 edits in trunk

[CSS Parser] Stop skipping tests in the css3 LayoutTests subdirectory
https://bugs.webkit.org/show_bug.cgi?id=165574

Reviewed by Dean Jackson.

Source/WebCore:

  • css/CSSGroupingRule.cpp:

(WebCore::CSSGroupingRule::insertRule):
The old parser didn't support the creation of @namespace rules in the
CSS OM, but the new parser does. We need to ensure that just like for
@import rules, that the insertion of a @namespace rule inside a
@supports rule is not allowed. This test passed in the old parser because
the rule just didn't get created, but in the new parser, we need to
add a check along with the @import rule check to ensure it isn't allowed.

LayoutTests:

Stop skipping two tests.

  • css3/font-variant-parsing-expected.txt:
  • css3/font-variant-parsing.html:

Patched to yield the correct results when multiple values are specified for the
same sub-property.

  • css3/supports-cssom-expected.txt:
  • css3/supports-cssom.html:

Patched to account for the new result for @namespace insertion failure (see
corresponding WebCore ChangeLog for explanation), and also patched to get rid
of excess whitespace, since the new parser doesn't preserve whitespace formatting
when serializing @supports.

5:49 PM Changeset in webkit [209508] by jiewen_tan@apple.com
  • 2 edits in trunk/LayoutTests

Unreviewed, Skip imported/w3c/WebCryptoAPI/generateKey/test_failures.html

This is a superset test for all test_failures*.html. No need for it as we run
all the sub tests.

5:49 PM Changeset in webkit [209507] by bshafiei@apple.com
  • 1 copy in tags/Safari-602.4.2

New tag.

5:37 PM Changeset in webkit [209506] by commit-queue@webkit.org
  • 12 edits
    2 deletes in trunk

[Modern Media Controls] Remove aspect ratio button
https://bugs.webkit.org/show_bug.cgi?id=165571

Patch by Antoine Quint <Antoine Quint> on 2016-12-07
Reviewed by Dean Jackson.

Source/WebCore:

Since we do not have a way to toggle letterboxing on an HTMLMediaElement, we remove the
corresponding button in the media controls.

  • Modules/modern-media-controls/controls/aspect-ratio-button.js: Removed.
  • Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js:
  • Modules/modern-media-controls/js-files:

LayoutTests:

We no longer have an AspectRatioButton.

  • media/modern-media-controls/aspect-ratio-button/aspect-ratio-button-expected.txt: Removed.
  • media/modern-media-controls/aspect-ratio-button/aspect-ratio-button.html: Removed.
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles-expected.txt:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles-expected.txt:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor-expected.txt:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-right-container-margin-expected.txt:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-right-container-margin.html:
5:31 PM Changeset in webkit [209505] by ggaren@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Renamed SourceCode members to match their accessor names
https://bugs.webkit.org/show_bug.cgi?id=165573

Reviewed by Keith Miller.

startChar => startOffset
endChar => endOffset

  • parser/UnlinkedSourceCode.h:

(JSC::UnlinkedSourceCode::UnlinkedSourceCode):
(JSC::UnlinkedSourceCode::view):
(JSC::UnlinkedSourceCode::startOffset):
(JSC::UnlinkedSourceCode::endOffset):
(JSC::UnlinkedSourceCode::length):

5:19 PM Changeset in webkit [209504] by commit-queue@webkit.org
  • 9 edits
    2 adds in trunk

One esc to exit fullscreen and pointer lock
https://bugs.webkit.org/show_bug.cgi?id=165416
rdar://problem/29430711

Patch by Jeremy Jones <jeremyj@apple.com> on 2016-12-07
Reviewed by Jer Noble.

Source/WebCore:

Test: pointer-lock/lock-lost-on-esc-in-fullscreen.html

When handling escape, also exit fullscreen on escape.
This also means that escape can exit fullscreen in TestRunner.

  • page/EventHandler.cpp:

(WebCore::EventHandler::keyEvent):

Source/WebKit2:

Fix a crash when didLosePointerLock is not specified.

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetPageUIClient):

Tools:

Implement WKPageUIClientV8 for pointer lock support.
Add "escape" key support in EventSenderProxy.

  • WebKitTestRunner/TestController.cpp:

(WTR::requestPointerLock):
(WTR::TestController::createOtherPage):
(WTR::TestController::createWebViewWithOptions):

  • WebKitTestRunner/mac/EventSenderProxy.mm:

(WTR::EventSenderProxy::keyDown):

LayoutTests:

  • platform/mac-wk2/TestExpectations:
  • pointer-lock/lock-lost-on-esc-in-fullscreen-expected.txt: Added.
  • pointer-lock/lock-lost-on-esc-in-fullscreen.html: Added.
5:13 PM Changeset in webkit [209503] by keith_miller@apple.com
  • 4 edits
    3 adds in trunk

Add more missing trivial wasm ops.
https://bugs.webkit.org/show_bug.cgi?id=165564

JSTests:

Add tests for drop and tee_local.

Reviewed by Geoffrey Garen.

  • wasm/function-tests/drop.js: Added.
  • wasm/function-tests/nop.js: Added.
  • wasm/function-tests/tee-local.js: Added.

Source/JavaScriptCore:

Reviewed by Geoffrey Garen.

This patch adds the nop, drop, and tee_local opcodes.
It also fixes an issue where we were not generating
the proper enums for the grow_memory and current_memory
opcodes.

  • wasm/WasmFunctionParser.h:

(JSC::Wasm::FunctionParser<Context>::parseExpression):

  • wasm/generateWasmOpsHeader.py:
5:08 PM Changeset in webkit [209502] by Nikita Vasilyev
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Control Flow Profiler's event handlers aren't getting removed when ContentView closes
https://bugs.webkit.org/show_bug.cgi?id=165556

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/ScriptContentView.js:

(WebInspector.ScriptContentView.prototype.closed):

  • UserInterface/Views/TextResourceContentView.js:

(WebInspector.TextResourceContentView.prototype.closed):

5:07 PM Changeset in webkit [209501] by ggaren@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Renamed source => parentSource
https://bugs.webkit.org/show_bug.cgi?id=165570

Reviewed by Keith Miller.

For less confuse.

  • bytecode/UnlinkedFunctionExecutable.cpp:

(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):

5:02 PM Changeset in webkit [209500] by Yusuke Suzuki
  • 12 edits in trunk/Source

[JSC] Drop translate phase in module loader
https://bugs.webkit.org/show_bug.cgi?id=164861

Reviewed by Saam Barati.

Source/JavaScriptCore:

Originally, this "translate" phase was introduced to the module loader.
However, recent rework discussion[1] starts dropping this phase.
And this "translate" phase is meaningless in the browser side module loader
since this phase originally mimics the node.js's translation hook (like,
transpiling CoffeeScript source to JavaScript).

This "translate" phase is not necessary for the exposed HTML5
<script type="module"> tag right now. Once the module loader pipeline is
redefined and specified, we need to update the current loader anyway.
So dropping "translate" phase right now is OK.

This a bit simplifies the current module loader pipeline.

[1]: https://github.com/whatwg/loader/issues/147

  • builtins/ModuleLoaderPrototype.js:

(newRegistryEntry):
(fulfillFetch):
(requestFetch):
(requestInstantiate):
(provide):
(fulfillTranslate): Deleted.
(requestTranslate): Deleted.

  • bytecode/BytecodeIntrinsicRegistry.cpp:

(JSC::BytecodeIntrinsicRegistry::BytecodeIntrinsicRegistry):

  • jsc.cpp:
  • runtime/JSGlobalObject.cpp:
  • runtime/JSGlobalObject.h:
  • runtime/JSModuleLoader.cpp:

(JSC::JSModuleLoader::translate): Deleted.

  • runtime/JSModuleLoader.h:
  • runtime/ModuleLoaderPrototype.cpp:

(JSC::moduleLoaderPrototypeInstantiate):
(JSC::moduleLoaderPrototypeTranslate): Deleted.

Source/WebCore:

  • bindings/js/JSDOMWindowBase.cpp:
  • bindings/js/JSWorkerGlobalScopeBase.cpp:
4:50 PM Changeset in webkit [209499] by beidson@apple.com
  • 1 edit
    3 adds in trunk/PerformanceTests

Add IDB perf tests stressing key size.
https://bugs.webkit.org/show_bug.cgi?id=165567

Reviewed by Alex Christensen.

  • IndexedDB/large-array-keys.html: Added.
  • IndexedDB/large-binary-keys.html: Added.
  • IndexedDB/large-string-keys.html: Added.
4:44 PM Changeset in webkit [209498] by Keith Rollin
  • 12 edits
    16 adds in trunk/Source

Network event record/replay
https://bugs.webkit.org/show_bug.cgi?id=164527
<rdar://problem/29168157>

Reviewed by Alex Christensen.

Source/WebCore:

Export parseURLEncodedForm.

No new tests -- no functionality added, changed, or removed.

  • platform/URLParser.h:

Source/WebKit2:

Add WebKit2/NetworkProcess/capture/* for recording the network events
that occur when loading a page and for replaying them later. Update
NetworkLoad to invoke capture facilities. Add preferences for enabling
record or replay.

  • CMakeLists.txt:
  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::NetworkLoad):
(WebKit::NetworkLoad::initializeForRecord):
(WebKit::NetworkLoad::initializeForReplay):
(WebKit::NetworkLoad::initialize):
(WebKit::NetworkLoad::setDefersLoading):
(WebKit::NetworkLoad::continueWillSendRequest):
(WebKit::NetworkLoad::sharedWillSendRedirectedRequest):
(WebKit::NetworkLoad::notifyDidReceiveResponse):
(WebKit::NetworkLoad::didReceiveData):
(WebKit::NetworkLoad::didCompleteWithError):

  • NetworkProcess/NetworkLoad.h:
  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::terminate):

  • NetworkProcess/NetworkProcessCreationParameters.cpp:

(WebKit::NetworkProcessCreationParameters::encode):
(WebKit::NetworkProcessCreationParameters::decode):

  • NetworkProcess/NetworkProcessCreationParameters.h:
  • NetworkProcess/capture/NetworkCaptureEvent.cpp: Added.

(WebKit::NetworkCapture::copyHeaders):
(WebKit::NetworkCapture::KeyValuePair::KeyValuePair):
(WebKit::NetworkCapture::ResourceRequest::ResourceRequest):
(WebKit::NetworkCapture::ResourceRequest::operator WebCore::ResourceRequest):
(WebKit::NetworkCapture::ResourceResponse::ResourceResponse):
(WebKit::NetworkCapture::ResourceResponse::operator WebCore::ResourceResponse):
(WebKit::NetworkCapture::ResourceError::ResourceError):
(WebKit::NetworkCapture::ResourceError::operator WebCore::ResourceError):
(WebKit::NetworkCapture::JSONCoder::encode):
(WebKit::NetworkCapture::JSONCoder::decode):
(WebKit::NetworkCapture::JSONCoder<String>::encode):
(WebKit::NetworkCapture::JSONCoder<String>::decode):
(WebKit::NetworkCapture::JSONCoder<CaptureTimeType>::encode):
(WebKit::NetworkCapture::JSONCoder<CaptureTimeType>::decode):
(WebKit::NetworkCapture::JSONCoder<KeyValuePair>::encode):
(WebKit::NetworkCapture::JSONCoder<KeyValuePair>::decode):
(WebKit::NetworkCapture::JSONCoder<Vector<T>>::encode):
(WebKit::NetworkCapture::JSONCoder<Vector<T>>::decode):
(WebKit::NetworkCapture::JSONCoder<ResourceRequest>::encode):
(WebKit::NetworkCapture::JSONCoder<ResourceRequest>::decode):
(WebKit::NetworkCapture::JSONCoder<ResourceResponse>::encode):
(WebKit::NetworkCapture::JSONCoder<ResourceResponse>::decode):
(WebKit::NetworkCapture::JSONCoder<ResourceError>::encode):
(WebKit::NetworkCapture::JSONCoder<ResourceError>::decode):
(WebKit::NetworkCapture::JSONCoder<WebCore::SharedBuffer>::encode):
(WebKit::NetworkCapture::JSONCoder<WebCore::SharedBuffer>::decode):
(WebKit::NetworkCapture::JSONCoder<RequestSentEvent>::encode):
(WebKit::NetworkCapture::JSONCoder<RequestSentEvent>::decode):
(WebKit::NetworkCapture::JSONCoder<ResponseReceivedEvent>::encode):
(WebKit::NetworkCapture::JSONCoder<ResponseReceivedEvent>::decode):
(WebKit::NetworkCapture::JSONCoder<RedirectReceivedEvent>::encode):
(WebKit::NetworkCapture::JSONCoder<RedirectReceivedEvent>::decode):
(WebKit::NetworkCapture::JSONCoder<RedirectSentEvent>::encode):
(WebKit::NetworkCapture::JSONCoder<RedirectSentEvent>::decode):
(WebKit::NetworkCapture::JSONCoder<DataReceivedEvent>::encode):
(WebKit::NetworkCapture::JSONCoder<DataReceivedEvent>::decode):
(WebKit::NetworkCapture::JSONCoder<FinishedEvent>::encode):
(WebKit::NetworkCapture::JSONCoder<FinishedEvent>::decode):
(WebKit::NetworkCapture::eventToString):
(WebKit::NetworkCapture::stringToEvent):

  • NetworkProcess/capture/NetworkCaptureEvent.h: Added.

(WebKit::NetworkCapture::TimedEvent::TimedEvent):

  • NetworkProcess/capture/NetworkCaptureLogging.h: Added.
  • NetworkProcess/capture/NetworkCaptureManager.cpp: Added.

(WebKit::NetworkCapture::Manager::singleton):
(WebKit::NetworkCapture::Manager::initialize):
(WebKit::NetworkCapture::Manager::terminate):
(WebKit::NetworkCapture::Manager::findMatch):
(WebKit::NetworkCapture::Manager::findExactMatch):
(WebKit::NetworkCapture::Manager::findBestFuzzyMatch):
(WebKit::NetworkCapture::Manager::fuzzyMatchURLs):
(WebKit::NetworkCapture::Manager::loadResources):
(WebKit::NetworkCapture::Manager::reportLoadPath):
(WebKit::NetworkCapture::Manager::reportRecordPath):
(WebKit::NetworkCapture::Manager::reportReplayPath):
(WebKit::NetworkCapture::Manager::requestToPath):
(WebKit::NetworkCapture::Manager::stringToHash):
(WebKit::NetworkCapture::Manager::hashToPath):
(WebKit::NetworkCapture::Manager::logRecordedResource):
(WebKit::NetworkCapture::Manager::logLoadedResource):
(WebKit::NetworkCapture::Manager::logPlayedBackResource):
(WebKit::NetworkCapture::Manager::ensureFileHandle):
(WebKit::NetworkCapture::Manager::openCacheFile):
(WebKit::NetworkCapture::Manager::readFile):
(WebKit::NetworkCapture::Manager::getLine):
(WebKit::NetworkCapture::Manager::getWord):
(WebKit::NetworkCapture::Manager::printToFile):

  • NetworkProcess/capture/NetworkCaptureManager.h: Added.

(WebKit::NetworkCapture::Manager::isRecording):
(WebKit::NetworkCapture::Manager::isReplaying):
(WebKit::NetworkCapture::Manager::mode):

  • NetworkProcess/capture/NetworkCaptureRecorder.cpp: Added.

(WebKit::NetworkCapture::Recorder::recordRequestSent):
(WebKit::NetworkCapture::Recorder::recordResponseReceived):
(WebKit::NetworkCapture::Recorder::recordRedirectReceived):
(WebKit::NetworkCapture::Recorder::recordRedirectSent):
(WebKit::NetworkCapture::Recorder::recordDataReceived):
(WebKit::NetworkCapture::Recorder::recordFinish):
(WebKit::NetworkCapture::Recorder::writeEvents):

  • NetworkProcess/capture/NetworkCaptureRecorder.h: Added.

(WebKit::NetworkCapture::Recorder::recordEvent):

  • NetworkProcess/capture/NetworkCaptureReplayer.cpp: Added.

(WebKit::NetworkCapture::Replayer::replayResource):

  • NetworkProcess/capture/NetworkCaptureReplayer.h: Added.
  • NetworkProcess/capture/NetworkCaptureResource.cpp: Added.

(WebKit::NetworkCapture::Resource::Resource):
(WebKit::NetworkCapture::Resource::url):
(WebKit::NetworkCapture::Resource::baseURL):
(WebKit::NetworkCapture::Resource::queryParameters):
(WebKit::NetworkCapture::Resource::eventStream):
(WebKit::NetworkCapture::Resource::EventStream::EventStream):
(WebKit::NetworkCapture::Resource::EventStream::nextEvent):

  • NetworkProcess/capture/NetworkCaptureResource.h: Added.
  • NetworkProcess/capture/NetworkCaptureTypes.h: Added.

(WebKit::NetworkCapture::TypeHolder::forEachTypeImpl):
(WebKit::NetworkCapture::TypeHolder::forEachType):

  • NetworkProcess/capture/NetworkDataTaskReplay.cpp: Added.

(WebKit::NetworkCapture::NetworkDataTaskReplay::NetworkDataTaskReplay):
(WebKit::NetworkCapture::NetworkDataTaskReplay::~NetworkDataTaskReplay):
(WebKit::NetworkCapture::NetworkDataTaskReplay::resume):
(WebKit::NetworkCapture::NetworkDataTaskReplay::suspend):
(WebKit::NetworkCapture::NetworkDataTaskReplay::cancel):
(WebKit::NetworkCapture::NetworkDataTaskReplay::complete):
(WebKit::NetworkCapture::NetworkDataTaskReplay::invalidateAndCancel):
(WebKit::NetworkCapture::NetworkDataTaskReplay::enqueueEventHandler):
(WebKit::NetworkCapture::NetworkDataTaskReplay::replayRequestSent):
(WebKit::NetworkCapture::NetworkDataTaskReplay::replayResponseReceived):
(WebKit::NetworkCapture::NetworkDataTaskReplay::replayRedirectReceived):
(WebKit::NetworkCapture::NetworkDataTaskReplay::replayRedirectSent):
(WebKit::NetworkCapture::NetworkDataTaskReplay::replayDataReceived):
(WebKit::NetworkCapture::NetworkDataTaskReplay::replayFinished):
(WebKit::NetworkCapture::NetworkDataTaskReplay::didReceiveResponse):
(WebKit::NetworkCapture::NetworkDataTaskReplay::didFinish):

  • NetworkProcess/capture/NetworkDataTaskReplay.h: Added.

(WebKit::NetworkCapture::NetworkDataTaskReplay::create):

  • NetworkProcess/capture/json.hpp: Added.
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeNetworkProcess):

  • WebKit2.xcodeproj/project.pbxproj:
  • config.h:
4:42 PM Changeset in webkit [209497] by hyatt@apple.com
  • 2 edits
    6 deletes in trunk/LayoutTests

[CSS Parser] Remove tests that depend on SVG CSS OM that has been removed
https://bugs.webkit.org/show_bug.cgi?id=165565

Reviewed by Jon Lee.

  • TestExpectations:
  • svg/dom/SVGColor-expected.txt: Removed.
  • svg/dom/SVGColor.html: Removed.
  • svg/dom/SVGPaint-expected.txt: Removed.
  • svg/dom/SVGPaint.html: Removed.
  • svg/dom/rgb-color-parser-expected.txt: Removed.
  • svg/dom/rgb-color-parser.html: Removed.
4:37 PM Changeset in webkit [209496] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking compositing/layer-creation/fixed-overlap-extent-rtl.html as failing on mac-wk1.
https://bugs.webkit.org/show_bug.cgi?id=165541

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
4:34 PM Changeset in webkit [209495] by hyatt@apple.com
  • 13 edits in trunk

[CSS Parser] Consolidate string/ident/url serialization functions
https://bugs.webkit.org/show_bug.cgi?id=165552

Reviewed by Zalan Bujtas.

Source/WebCore:

Right now CSSParser has string, ident and url serialization functions
called quoteCSStringIfNeeded (which actually serializes both strings and
identifiers), as well as quoteCSSURLIfNeeded.

CSSMarkup already has serialization functions that exist outside of the
CSSParser and that handle serialization of strings, idents and URLs. This
patch eliminates the CSSParser functions and consolidates all of the
serialization to use CSSMarkup's functions.

Note that we are not spec-compliant at all here, and so I had to amend
the functions to support our non-spec-compliant serialization. The goal
of this patch is consolidation and not to fix our broken serialization.

Notable changes include parameterizing string serialization so that
both single and double quotes are supported, since in the existing code
we're sometimes spec-compliant (CSSSelectors) and sometimes not
(CSSPrimitiveValue).

We also overload CSS_STRING primitive value type and have it act as both
a string and a custom identifier. This is lame, since the parser should
have made two different types of objects instead, but since our parser
doesn't do that yet, I added a serializeAsStringOrCustomIdent that
preserves our old behavior of "quote the string only if needed." In this
case what that really meant was "Try to guess that we were originally a
custom ident and leave off quotes if so." This function will go away
once we properly create CSSStringValues and CSSCustomIdentValues instead
of turning the latter into strings.

  • css/CSSBasicShapes.cpp:

(WebCore::buildPathString):

  • css/CSSImageValue.cpp:

(WebCore::CSSImageValue::customCSSText):

  • css/CSSMarkup.cpp:

(WebCore::isCSSTokenizerURL):
(WebCore::serializeString):
(WebCore::serializeURL):
(WebCore::serializeAsStringOrCustomIdent):
(WebCore::serializeURI): Deleted.

  • css/CSSMarkup.h:
  • css/CSSPrimitiveValue.cpp:

(WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText):

  • css/CSSSelector.cpp:

(WebCore::CSSSelector::selectorText):

  • css/parser/CSSParser.cpp:

(WebCore::isCSSTokenizerIdent): Deleted.
(WebCore::isCSSTokenizerURL): Deleted.
(WebCore::quoteCSSStringInternal): Deleted.
(WebCore::quoteCSSString): Deleted.
(WebCore::quoteCSSStringIfNeeded): Deleted.
(WebCore::quoteCSSURLIfNeeded): Deleted.

  • css/parser/CSSParser.h:
  • html/HTMLElement.cpp:

(WebCore::HTMLElement::mapLanguageAttributeToLocale):

LayoutTests:

  • fast/css/content-language-only-whitespace-expected.txt:
  • fast/css/content-language-with-whitespace-expected.txt:
4:27 PM Changeset in webkit [209494] by dino@apple.com
  • 4 edits in trunk/Source/WebCore

Expose internal API to detect media documents
https://bugs.webkit.org/show_bug.cgi?id=165559
<rdar://problems/29564054>

Reviewed by Antoine Quint.

Expose via MediaControlsHost whether or not we're in
a MediaDocument.

Since MediaControlsHost is only exposed to our
internal controls, it's not possible to test this
directly. However, a subsequent test for media documents
with audio-only content will cover this change.

  • Modules/mediacontrols/MediaControlsHost.cpp: Add isInMediaDocument and put const on

various methods that should have it.
(WebCore::MediaControlsHost::captionDisplayMode):
(WebCore::MediaControlsHost::supportsFullscreen):
(WebCore::MediaControlsHost::isVideoLayerInline):
(WebCore::MediaControlsHost::isInMediaDocument):

  • Modules/mediacontrols/MediaControlsHost.h:
  • Modules/mediacontrols/MediaControlsHost.idl: Add isInMediaDocument.
4:17 PM Changeset in webkit [209493] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking imported/mathml-in-html5/mathml/presentation-markup/fractions/frac-parameters-1.html as flaky on El Capitan WK2.
https://bugs.webkit.org/show_bug.cgi?id=165392

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
4:04 PM Changeset in webkit [209492] by Joseph Pecoraro
  • 13 edits
    5 adds in trunk

Web Inspector: Add ability to distinguish if a Script was parsed as a module
https://bugs.webkit.org/show_bug.cgi?id=164900
<rdar://problem/29323817>

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

  • inspector/agents/InspectorDebuggerAgent.cpp:

(Inspector::InspectorDebuggerAgent::didParseSource):

  • inspector/protocol/Debugger.json:

Add an optional event parameter to distinguish if a script was a module or not.

Source/WebInspectorUI:

  • UserInterface/Models/Script.js:

(WebInspector.Script.prototype.get sourceType):
New property of Scripts. SourceType is either Program or Module.

  • UserInterface/Controllers/DebuggerManager.js:

(WebInspector.DebuggerManager.prototype.scriptDidParse):

  • UserInterface/Protocol/DebuggerObserver.js:

(WebInspector.DebuggerObserver.prototype.scriptParsed):
Convert incoming module boolean into SourceType when creating new Scripts.

  • UserInterface/Models/ScriptSyntaxTree.js:

(WebInspector.ScriptSyntaxTree):
(WebInspector.ScriptSyntaxTree.prototype._recurse):
(WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
Update the generic AST for new module specific Esprima types.

  • UserInterface/Views/SourceCodeTextEditor.js:

(WebInspector.SourceCodeTextEditor.prototype.textEditorScriptSourceType):

  • UserInterface/Views/TextEditor.js:

(WebInspector.TextEditor.prototype._startWorkerPrettyPrint):
For pretty printing correctly state if this is a module or not for Esprima.

LayoutTests:

  • inspector/model/parse-script-syntax-tree-expected.txt:
  • inspector/model/parse-script-syntax-tree.html:
  • inspector/model/resources/module.js: Added.

(import.string_appeared_here.myModule):

  • inspector/model/resources/other-module.js: Added.

(myOtherModule):

  • inspector/model/resources/program.js: Added.

(myProgram):

  • inspector/model/script-sourceType-expected.txt: Added.
  • inspector/model/script-sourceType.html: Added.
4:04 PM Changeset in webkit [209491] by Joseph Pecoraro
  • 20 edits in trunk

Web Inspector: Update Esprima to support new features / syntax (, async/await, trailing comma)
https://bugs.webkit.org/show_bug.cgi?id=164830
<rdar://problem/29293814>

Reviewed by Timothy Hatcher.

Source/WebInspectorUI:

  • UserInterface/External/Esprima/LICENSE:
  • UserInterface/External/Esprima/esprima.js:

Updated to Esprima@7219731 (4.0.0-dev).

  • UserInterface/Models/ScriptSyntaxTree.js:

(WebInspector.ScriptSyntaxTree.prototype._recurse):
(WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):

  • UserInterface/Workers/Formatter/ESTreeWalker.js:

(ESTreeWalker.prototype._walkChildren):
Add new nodes (AwaitExpression).
Add new states (async boolean property on Functions).
Remove stale properties (defaults is no longer needed, as parameters
with default values are now AssignmentPatterns).
Update MetaProperty where meta/property are now Identifiers not strings.

  • UserInterface/Workers/Formatter/EsprimaFormatter.js:

(EsprimaFormatter.prototype._handleTokenAtNode):
Handle pretty printing of new nodes and identifiers.

  • Controllers/FrameResourceManager.js

Address a console.assert warning for stripping assertions in Production.

LayoutTests:

  • inspector/formatting/resources/javascript-tests/arrow-functions-expected.js:
  • inspector/formatting/resources/javascript-tests/arrow-functions.js:
  • inspector/formatting/resources/javascript-tests/classes-expected.js:
  • inspector/formatting/resources/javascript-tests/classes.js:
  • inspector/formatting/resources/javascript-tests/functions-expected.js:
  • inspector/formatting/resources/javascript-tests/functions.js:
  • inspector/formatting/resources/javascript-tests/other-statements-expected.js:
  • inspector/formatting/resources/javascript-tests/other-statements.js:
  • inspector/formatting/resources/javascript-tests/unary-binary-expressions-expected.js:
  • inspector/formatting/resources/javascript-tests/unary-binary-expressions.js:
  • inspector/model/parse-script-syntax-tree-expected.txt:
  • inspector/model/parse-script-syntax-tree.html:

Coverage for new supported syntax.

3:53 PM Changeset in webkit [209490] by rniwa@webkit.org
  • 7 edits in trunk/LayoutTests

Rebaseline tests after r209486. Also updated media-shadow-manipulation.html now that range is null.

  • fast/shadow-dom/color-input-element-shadow-manipulation-expected.txt:
  • fast/shadow-dom/file-input-element-shadow-manipulation-expected.txt:
  • fast/shadow-dom/media-shadow-manipulation-expected.txt:
  • fast/shadow-dom/media-shadow-manipulation.html:
  • fast/shadow-dom/range-input-element-shadow-manipulation-expected.txt:
  • fast/shadow-dom/textarea-shadow-manipulation-expected.txt:
3:41 PM Changeset in webkit [209489] by Simon Fraser
  • 6 edits in trunk

Add system trace points for JavaScript VM entry/exit
https://bugs.webkit.org/show_bug.cgi?id=165550

Reviewed by Tim Horton.
Source/JavaScriptCore:

Add trace points for entry/exit into/out of the JS VM.

  • runtime/VMEntryScope.cpp:

(JSC::VMEntryScope::VMEntryScope):
(JSC::VMEntryScope::~VMEntryScope):

Source/WTF:

Add trace points for entry/exit into/out of the JS VM.

  • wtf/SystemTracing.h:

Tools:

Add trace points for entry/exit into/out of the JS VM.

  • Tracing/SystemTracePoints.plist:
3:23 PM Changeset in webkit [209488] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Marking two compositing tests as failing.
https://bugs.webkit.org/show_bug.cgi?id=165530

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
  • platform/mac/TestExpectations:
3:21 PM Changeset in webkit [209487] by Alan Bujtas
  • 3 edits
    2 adds in trunk

ASSERTION FAILED: count >= 1 in WebCore::RenderMultiColumnSet::columnCount
https://bugs.webkit.org/show_bug.cgi?id=136365
<rdar://problem/27686727>

Reviewed by Simon Fraser.

Source/WebCore:

Margin value overflow ends up confusing the column count computing logic.

Test: fast/multicol/assert-on-column-count-when-zoomed-in.html

  • css/StyleResolver.cpp:

(WebCore::addIntrinsicMargins):

LayoutTests:

  • fast/multicol/assert-on-column-count-when-zoomed-in-expected.txt: Added.
  • fast/multicol/assert-on-column-count-when-zoomed-in.html: Added.
2:51 PM Changeset in webkit [209486] by rniwa@webkit.org
  • 3 edits
    2 adds in trunk

document.caretRangeFromPoint doesn't retarget the resultant Range correctly.
https://bugs.webkit.org/show_bug.cgi?id=165146

Reviewed by Sam Weinig.

Source/WebCore:

The bug was caused by caretRangeFromPoint not retargeting the resultant Range correctly.
Namely, it's possible for RenderObject::positionForPoint to move across shadow boundary
even if node was identically equal to ancestorInThisScope(node).

Fixed the bug by directly retargeting the range's container node and its offset as done
for elementFromPoint in r206795.

Test: fast/shadow-dom/caret-range-from-point-in-shadow-tree.html

  • dom/Document.cpp:

(WebCore::Document::caretRangeFromPoint):

LayoutTests:

Added a regression test for caretRangeFromPoint retargeting the result.

  • fast/shadow-dom/caret-range-from-point-in-shadow-tree-expected.txt: Added.
  • fast/shadow-dom/caret-range-from-point-in-shadow-tree.html: Added.
2:51 PM Changeset in webkit [209485] by Simon Fraser
  • 5 edits in trunk

Fix use of enum in a WK2 C SPI header.
rdar://problem/28725583

Followup to correctly prefix the enum values.

Source/WebKit2:

  • WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:

(WKBundlePageSetEventThrottlingBehaviorOverride):

  • WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:

Tools:

  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:

(WTR::InjectedBundlePage::prepare):

2:47 PM Changeset in webkit [209484] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

[Modern Media Controls] Entering fullscreen and returning to inline shows fullscreen controls
https://bugs.webkit.org/show_bug.cgi?id=165536

Patch by Antoine Quint <Antoine Quint> on 2016-12-07
Reviewed by Tim Horton.

Source/WebCore:

We regressed when we implemented the fix for webkit.org/b/165494 and we started to rely solely
on the "webkitpresentationmodechanged" event to identify presention mode changes. As it turns out,
when the "webkitpresentationmodechanged" event is dispatched when exiting fullscreen and returning
to the inline presentation mode, querying the "webkitPresentationMode" property says "inline" while
"webkitDisplayingFullscreen" still returns true (raised as webkit.org/b/165538).

We now use the "webkitPresentationMode" property when that property is supported and we're using the
"webkitpresentationmodechanged" event, and we use the "webkitDisplayingFullscreen" property otherwise.

Test: media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline.html

  • Modules/modern-media-controls/media/media-controller.js:

(MediaController.prototype.get layoutTraits):

LayoutTests:

Add a new test that checks we're using the right media controls presentation as we enter and exit fullscreen.

  • media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline-expected.txt: Added.
  • media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline.html: Added.
2:44 PM Changeset in webkit [209483] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit2

Fix build.

  • Platform/IPC/mac/ConnectionMac.mm:

(IPC::Connection::open):

2:36 PM Changeset in webkit [209482] by ChangSeok Oh
  • 2 edits
    1 add in trunk/Tools

[GTK] Cannot build GTK+ with CUPS 2.* versions
https://bugs.webkit.org/show_bug.cgi?id=163591

Reviewed by Michael Catanzaro.

GTK+ build has failed on the system which CUPS 2.x is installed in. GTK+ 3.16.4
does not assume to use the recent CUPS thus it fails to detect the CUPS in configuration.
GTK+ upstream fixed this issue but it is not easy to apply the original patch to our
old gtk+ since it requires not only bumping up glib accordingly and its consequence
causes many printing test failures. So, I propose to fix the configuration issue by
applying the change to the configure file directly. By doing this, we don't need to
upgrade glib and worry about any test failures as a consequence of the upgraded glib.

  • gtk/jhbuild.modules:
  • gtk/patches/gtk+-configure-fix-detecting-CUPS-2.x.patch: Added.
2:30 PM Changeset in webkit [209481] by andersca@apple.com
  • 3 edits in trunk/Source/WebKit2

Rename the connection sources to better indicate what data direction they are used for
https://bugs.webkit.org/show_bug.cgi?id=165548

Reviewed by Tim Horton.

  • Platform/IPC/Connection.h:
  • Platform/IPC/mac/ConnectionMac.mm:

(IPC::Connection::platformInvalidate):
(IPC::Connection::platformInitialize):
(IPC::createReceiveSource):
(IPC::Connection::initializeSendSource):
(IPC::Connection::receiveSourceEventHandler):
(IPC::createDataAvailableSource): Deleted.
(IPC::Connection::initializeDeadNameSource): Deleted.
Rename m_deadNameSource to m_sendSource, and m_receivePortDataAvailableSource to m_receiveSource.

(IPC::Connection::open):
Initialize the send source before we attempt to send a first message.

2:28 PM Changeset in webkit [209480] by achristensen@apple.com
  • 11 edits
    2 adds in trunk/Source/ThirdParty/ANGLE

Build more of ANGLE on Mac and Windows
https://bugs.webkit.org/show_bug.cgi?id=165543

Reviewed by Dean Jackson.

We will need to compile these files to use ANGLE's GLESv2 implementation instead of
using OpenGL directly. No functional change.

  • ANGLE.xcodeproj/project.pbxproj:
  • CMakeLists.txt:

Move platform-specific files to Platform*.cmake.

  • PlatformMac.cmake: Added.
  • PlatformWin.cmake: Added.
  • src/libANGLE/renderer/Format.cpp:
  • src/libANGLE/renderer/Format_autogen.cpp:

(angle::Format::Get):

  • src/libANGLE/renderer/gl/PathGL.cpp:
  • src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.h:
  • src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm:

Rename SwapLayer to WebSwapLayer. Otherwise, WebCore complains about improperly named ObjC classes.
Since this is the only one, let's just rename it instead of adding an exception.
(rx::WindowSurfaceCGL::initialize):
(-[SwapLayer initWithSharedState:withContext:withFunctions:]): Deleted.

  • src/libANGLE/renderer/gl/formatutilsgl.cpp:

(rx::nativegl::GetInternalFormatMap):
(rx::nativegl::GetInternalFormatInfo):

  • src/libANGLE/renderer/renderer_utils.cpp:

(rx::GetColorWriteFunction):

  • src/libGLESv2/entry_points_egl.cpp:

(egl::GetProcAddress):

2:21 PM Changeset in webkit [209479] by Simon Fraser
  • 5 edits in trunk

Fix use of enum in a WK2 C SPI header.
rdar://problem/28725583

Reviewed by Dan Bernstein.

Use correct enum style for a C SPI header and fix the callers.

Source/WebKit2:

  • WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:

(WKBundlePageSetEventThrottlingBehaviorOverride):

  • WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:

Tools:

  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:

(WTR::InjectedBundlePage::prepare):

2:02 PM Changeset in webkit [209478] by mitz@apple.com
  • 8 copies
    1 add in releases/Apple/Safari Technology Preview 19

Added a tag for Safari Technology Preview release 19.

1:50 PM Changeset in webkit [209477] by Wenson Hsieh
  • 4 edits
    2 adds in trunk

Scroll position jumps to the origin when scrolling without momentum at the end of a scroll snapping container
https://bugs.webkit.org/show_bug.cgi?id=165474
<rdar://problem/29534305>

Reviewed by Simon Fraser.

Source/WebCore:

When initializing an AppKit _NSScrollingMomentumCalculator, if the initial and target positions are the same and
the initial velocity is (0, 0), the momentum calculator will output (0, 0) as the animated scroll position when
animating. This causes the scroll position to jump to the top left in some cases when scrolling in scroll snap
containers. To fix this, we teach the ScrollingMomentumCalculatorMac to return an animation duration of 0 and
an animated scroll position equal to the final scroll position when this is the case.

Test: tiled-drawing/scrolling/scroll-snap/scrolling-jumps-to-top.html

  • page/scrolling/mac/ScrollingMomentumCalculatorMac.h:
  • page/scrolling/mac/ScrollingMomentumCalculatorMac.mm:

(WebCore::ScrollingMomentumCalculatorMac::ScrollingMomentumCalculatorMac):
(WebCore::ScrollingMomentumCalculatorMac::scrollOffsetAfterElapsedTime):
(WebCore::ScrollingMomentumCalculatorMac::animationDuration):

LayoutTests:

Added a new test verifying that if a scroll gesture ends without momentum at the bottom of a scroll snapping
container, the scroll position won't jump to the top.

  • tiled-drawing/scrolling/scroll-snap/scrolling-jumps-to-top-expected.txt: Added.
  • tiled-drawing/scrolling/scroll-snap/scrolling-jumps-to-top.html: Added.
1:43 PM Changeset in webkit [209476] by keith_miller@apple.com
  • 8 edits
    8 adds in trunk

Add support for truncation operators
https://bugs.webkit.org/show_bug.cgi?id=165519

Reviewed by Geoffrey Garen.

JSTests:

  • wasm/function-tests/i32-trunc-s-f32.js: Added.
  • wasm/function-tests/i32-trunc-s-f64.js: Added.
  • wasm/function-tests/i32-trunc-u-f32.js: Added.
  • wasm/function-tests/i32-trunc-u-f64.js: Added.
  • wasm/function-tests/i64-trunc-s-f32.js: Added.
  • wasm/function-tests/i64-trunc-s-f64.js: Added.
  • wasm/function-tests/i64-trunc-u-f32.js: Added.
  • wasm/function-tests/i64-trunc-u-f64.js: Added.

Source/JavaScriptCore:

This patch adds initial support for truncation operators. The current patch
does range based out of bounds checking, in the future we should use system
register flags on ARM and other tricks on X86 improve the performance of
these opcodes.

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::branchTruncateDoubleToInt32):
(JSC::MacroAssemblerARM64::truncateDoubleToInt64):
(JSC::MacroAssemblerARM64::truncateDoubleToUint64):
(JSC::MacroAssemblerARM64::truncateFloatToInt32):
(JSC::MacroAssemblerARM64::truncateFloatToUint32):
(JSC::MacroAssemblerARM64::truncateFloatToInt64):
(JSC::MacroAssemblerARM64::truncateFloatToUint64):

  • assembler/MacroAssemblerX86Common.h:

(JSC::MacroAssemblerX86Common::truncateFloatToInt32):
(JSC::MacroAssemblerX86Common::truncateDoubleToUint32): Deleted.

  • assembler/MacroAssemblerX86_64.h:

(JSC::MacroAssemblerX86_64::truncateDoubleToUint32):
(JSC::MacroAssemblerX86_64::truncateDoubleToInt64):
(JSC::MacroAssemblerX86_64::truncateDoubleToUint64):
(JSC::MacroAssemblerX86_64::truncateFloatToUint32):
(JSC::MacroAssemblerX86_64::truncateFloatToInt64):
(JSC::MacroAssemblerX86_64::truncateFloatToUint64):

  • assembler/X86Assembler.h:

(JSC::X86Assembler::cvttss2si_rr):
(JSC::X86Assembler::cvttss2siq_rr):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::addOp<OpType::I32TruncSF64>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32TruncSF32>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32TruncUF64>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32TruncUF32>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64TruncSF64>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64TruncUF64>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64TruncSF32>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64TruncUF32>):

  • wasm/WasmFunctionParser.h:

(JSC::Wasm::FunctionParser<Context>::parseExpression):

1:33 PM Changeset in webkit [209475] by Beth Dakin
  • 2 edits in trunk/Source/WebKit2

Remove iCloud Pages and Keynote site-specific hacks
https://bugs.webkit.org/show_bug.cgi?id=165544
-and corresponding-
rdar://problem/29082536

Reviewed by Wenson Hsieh.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::needsHiddenContentEditableQuirk):
(WebKit::needsPlainTextQuirk):

1:27 PM Changeset in webkit [209474] by Simon Fraser
  • 2 edits
    2 adds in trunk/LayoutTests

REGRESSION (r209447): LayoutTests compositing/layer-creation/fixed-position-out-of-view-scaled.html and compositing/layer-creation/fixed-position-out-of-view-scaled-scroll.html failing
https://bugs.webkit.org/show_bug.cgi?id=165530

New baseline for WK1 (which has RTL/compositing isseus), and mark a test as flakey in WK1.

  • platform/mac-wk1/TestExpectations:
  • platform/mac-wk1/compositing/layer-creation/fixed-overlap-extent-rtl-expected.txt: Added.
1:20 PM Changeset in webkit [209473] by adachan@apple.com
  • 3 edits in trunk/Source/WebKit2

Add a getter for serverTrust in _WKObservablePageState
https://bugs.webkit.org/show_bug.cgi?id=165433

Reviewed by Anders Carlsson.

  • UIProcess/API/C/mac/WKPagePrivateMac.h:
  • UIProcess/API/C/mac/WKPagePrivateMac.mm:

(-[WKObservablePageState serverTrust]):

1:13 PM Changeset in webkit [209472] by n_wang@apple.com
  • 3 edits
    2 adds in trunk

AX: menu type toolbar should be mapped correctly on Mac
https://bugs.webkit.org/show_bug.cgi?id=165537

Reviewed by Chris Fleizach.

Source/WebCore:

The menu tag with a toolbar type should have the corresponding role.

Test: accessibility/mac/menu-type-toolbar.html

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::determineAccessibilityRole):

LayoutTests:

  • accessibility/mac/menu-type-toolbar-expected.txt: Added.
  • accessibility/mac/menu-type-toolbar.html: Added.
1:10 PM Changeset in webkit [209471] by ggaren@apple.com
  • 2 edits in trunk/LayoutTests

Fixed a test failure seen in web-timing-minimal-performance-now.html
https://bugs.webkit.org/show_bug.cgi?id=165542

Reviewed by Beth Dakin.

This test was always slightly wrong, but it is much more likely to fail
as of <https://trac.webkit.org/changeset/209462>.

  • fast/dom/Window/web-timing-minimal-performance-now.html: < is not a

correct test for monotonicity. < tests for stricly increasing. <= is a
correct test for monotonicity. All computer clocks have some granularity,
so computer clocks are monotonic but not strictly increasing: you can
sample the clock twice in the same tick.

12:40 PM Changeset in webkit [209470] by Wenson Hsieh
  • 3 edits
    22 adds in trunk

Add a new project for recording and playing back editing commands in editable web content
https://bugs.webkit.org/show_bug.cgi?id=165114
<rdar://problem/29408135>

Reviewed by Beth Dakin.

Source/WebCore:

Adds new scripts used to record and play back editing, as well as a new Xcode Copy files phase that pushes these
scripts to the internal system directory when installing. See the Tools ChangeLog and individual comments below
for more details. Covered by 3 new unit tests in the EditingHistory project.

  • InternalScripts/DumpEditingHistory.js: Added.

(beginProcessingTopLevelUpdate):
(endProcessingTopLevelUpdate):
(appendDOMUpdatesFromRecords):
(appendSelectionUpdateIfNecessary):

Adds new entries into the top-level list of DOM updates captured when editing. Respectively, these are input
events and selection changes.

(EditingHistory.getEditingHistoryAsJSONString):

  • InternalScripts/EditingHistoryUtil.js: Added.

(prototype._scramble):
(prototype.applyToText):
(prototype.applyToFilename):
(prototype._scrambedNumberIndexForCode):
(prototype._scrambedLowercaseIndexForCode):
(prototype._scrambedUppercaseIndexForCode):

Naive implementation of an obfuscator. Currently, this only affects alphanumeric characters. Obfuscation is off
by default, but can be toggled on in JavaScript.

(elementFromMarkdown):
(GlobalNodeMap):
(GlobalNodeMap.prototype.nodesForGUIDs):
(GlobalNodeMap.prototype.guidsForTNodes):
(GlobalNodeMap.prototype.nodeForGUID):
(GlobalNodeMap.prototype.guidForNode):
(GlobalNodeMap.prototype.hasGUIDForNode):
(GlobalNodeMap.prototype.nodes):
(GlobalNodeMap.prototype.toObject):
(GlobalNodeMap.fromObject):
(GlobalNodeMap.dataForNode):
(GlobalNodeMap.elementFromTagName):
(GlobalNodeMap.nodeAttributesToObject):
(GlobalNodeMap.prototype.descriptionHTMLForGUID):
(GlobalNodeMap.prototype.descriptionHTMLForNode):

The GlobalNodeMap keeps track of every node that has appeared in the DOM, assigning each node a globally unique
identifier (GUID). This GUID is used when reconstructing the DOM, as well as unapplying or applying editing.

(SelectionState):
(SelectionState.prototype.isEqual):
(SelectionState.prototype.applyToSelection):
(SelectionState.fromSelection):
(SelectionState.prototype.toObject):
(SelectionState.fromObject):

Represents a snapshot of the Selection state (determined by getSelection()).

(DOMUpdate):
(DOMUpdate.prototype.apply):
(DOMUpdate.prototype.unapply):
(DOMUpdate.prototype.targetNode):
(DOMUpdate.prototype.detailsElement):
(DOMUpdate.ofType):
(DOMUpdate.fromRecords):

A DOMUpdate is an abstract object representing a change in the DOM that may be applied and unapplied. These are
also serializable as hashes, which may then be converted to JSON when generating editing history data.

(ChildListUpdate):
(ChildListUpdate.prototype.apply):
(ChildListUpdate.prototype.unapply):
(ChildListUpdate.prototype._nextSibling):
(ChildListUpdate.prototype._removedNodes):
(ChildListUpdate.prototype._addedNodes):
(ChildListUpdate.prototype.toObject):
(ChildListUpdate.prototype.detailsElement):
(ChildListUpdate.fromObject):

These three update types correspond to the three types of DOM mutations. These may appear as top-level updates
if they are not captured during an input event, but for the majority of user-input-driven changes, they will be
children of an input event.

(CharacterDataUpdate):
(CharacterDataUpdate.prototype.apply):
(CharacterDataUpdate.prototype.unapply):
(CharacterDataUpdate.prototype.detailsElement):
(CharacterDataUpdate.prototype.toObject):
(CharacterDataUpdate.fromObject):
(AttributeUpdate):
(AttributeUpdate.prototype.apply):
(AttributeUpdate.prototype.unapply):
(AttributeUpdate.prototype.detailsElement):
(AttributeUpdate.prototype.toObject):
(AttributeUpdate.fromObject):
(SelectionUpdate):
(SelectionUpdate.prototype.apply):
(SelectionUpdate.prototype.unapply):
(SelectionUpdate.prototype.toObject):
(SelectionUpdate.fromObject):
(SelectionUpdate.prototype._rangeDescriptionHTML):
(SelectionUpdate.prototype._anchorDescriptionHTML):
(SelectionUpdate.prototype._focusDescriptionHTML):
(SelectionUpdate.prototype.detailsElement):

Represents a change in the Selection. While no changes to the DOM structure occur as a result of a
SelectionUpdate, the information contained in these updates is used to determine where the selection should be
when rewinding or playing back the editing history.

(InputEventUpdate):
(InputEventUpdate.prototype._obfuscatedData):
(InputEventUpdate.prototype.apply):
(InputEventUpdate.prototype.unapply):
(InputEventUpdate.prototype.toObject):
(InputEventUpdate.fromObject):
(InputEventUpdate.prototype.detailsElement):

Represents an update due to user input, which consists of some number of child DOM mutation updates.

  • WebCore.xcodeproj/project.pbxproj:

Tools:

Adds a new Xcode project containing work towards rewinding and playing back editing commands. This work is
wrapped in an Xcode project to take advantage of the XCTest framework. To manually test recording, open the
capture test harness, edit the contenteditable body, and then hit cmd-S. This downloads a .json file which may
then be dragged into the playback test harness.

Also adds 3 new unit tests in EditingHistoryTests/RewindAndPlaybackTests.m. These tests carry out the following
steps:

  1. Load the capture harness and perform test-specific editing on the web view.
  2. Let originalState be a dump of the DOM at this point in time.
  3. Extract the JSON-serialized editing history data and load the playback harness with this data.
  4. Rewind all editing to the beginning.
  5. Playback all editing to the end.
  6. Dump the state of the DOM. This should be identical to originalState.
  • EditingHistory/EditingHistory.xcodeproj/project.pbxproj: Added.
  • EditingHistory/EditingHistory/Info.plist: Added.
  • EditingHistory/EditingHistory/Resources/CaptureHarness.html: Added.
  • EditingHistory/EditingHistory/Resources/DOMTestingUtil.js: Added.
  • EditingHistory/EditingHistory/Resources/PlaybackHarness.html: Added.
  • EditingHistory/EditingHistory/TestRunner.h: Added.
  • EditingHistory/EditingHistory/TestRunner.m: Added.

(injectedMessageEventHandlerScript):
(-[TestRunner init]):
(-[TestRunner deleteBackwards:]):
(-[TestRunner typeString:]):
(-[TestRunner bodyElementSubtree]):
(-[TestRunner bodyTextContent]):
(-[TestRunner editingHistoryJSON]):
(-[TestRunner loadPlaybackTestHarnessWithJSON:]):
(-[TestRunner numberOfUpdates]):
(-[TestRunner jumpToUpdateIndex:]):
(-[TestRunner expectEvents:afterPerforming:]):
(-[TestRunner loadCaptureTestHarness]):
(-[TestRunner setTextObfuscationEnabled:]):
(-[TestRunner isDoneWaitingForPendingEvents]):
(-[TestRunner userContentController:didReceiveScriptMessage:]):

The TestRunner provides utilities that a unit test should use to drive the test forward (e.g. loading harnesses)
or inspect the state of the loaded page (e.g. extracting JSON editing history data from the capture harness).

  • EditingHistory/EditingHistory/TestUtil.h: Added.
  • EditingHistory/EditingHistory/TestUtil.m: Added.

(waitUntilWithTimeout):
(waitUntil):

Provides utilities for running tests. For now, this is just spinning the runloop on a given condition.

  • EditingHistory/EditingHistory/WKWebViewAdditions.h: Added.
  • EditingHistory/EditingHistory/WKWebViewAdditions.m: Added.

(-[WKWebView loadPageFromBundleNamed:]):
(-[WKWebView typeCharacter:]):
(-[WKWebView keyPressWithCharacters:keyCode:]):
(-[WKWebView stringByEvaluatingJavaScriptFromString:]):

Provides utilities for simulating interaction in a web view.

  • EditingHistory/EditingHistory/main.m: Added.

(main):

  • EditingHistory/EditingHistoryTests/Info.plist: Added.
  • EditingHistory/EditingHistoryTests/RewindAndPlaybackTests.m: Added.

(-[RewindAndPlaybackTests setUp]):
(-[RewindAndPlaybackTests tearDown]):
(-[RewindAndPlaybackTests testTypingSingleLineOfText]):
(-[RewindAndPlaybackTests testTypingMultipleLinesOfText]):
(-[RewindAndPlaybackTests testTypingAndDeletingText]):
(-[RewindAndPlaybackTests rewindAndPlaybackEditingInPlaybackTestHarness]):
(-[RewindAndPlaybackTests originalBodySubtree:isEqualToFinalSubtree:]):

12:32 PM Changeset in webkit [209469] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

ASSERT crash while running media-source/mediasource-activesourcebuffers.html under Stress GC bot.
https://bugs.webkit.org/show_bug.cgi?id=165514

Reviewed by Eric Carlson.

If a track associated with MSE is disabled after a SourceBuffer begins parsing a queued
append operation, SourceBuffer can get into a state where it asks SourceBufferPrivateAVFObjC
if it is ready to accept data for that disabled track. This causes an ASSERT_NOT_REACHED in
isReadyForMoreData().

However, this seems to be a valid condition; we can safely just return "false" from
isReadyForMoreSamples() (and also bail from notifyClientWhenReadyForMoreSamples()) when asked
about a disabled track.

  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:

(WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples):
(WebCore::SourceBufferPrivateAVFObjC::notifyClientWhenReadyForMoreSamples):

12:29 PM Changeset in webkit [209468] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebKit2

Exiting Element Fullscreen mode loses focus on WKWebView.
https://bugs.webkit.org/show_bug.cgi?id=165512

Reviewed by Eric Carlson.

Setting 'window.contentView.hidden = YES' will reset the first-responder (whereas
previously setting 'window.contentView.layer.hidden = YES' did not). Grab the first-
responder before doing so, so that it can be reset correctly when moving the WKWebView
back to it's original window.

  • UIProcess/mac/WKFullScreenWindowController.mm:

(-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):

12:25 PM Changeset in webkit [209467] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit2

Fix CMake build after r209418.
https://bugs.webkit.org/show_bug.cgi?id=165484

  • PlatformMac.cmake:
11:51 AM Changeset in webkit [209466] by hyatt@apple.com
  • 9 edits in trunk/Source/WebCore

[CSS Parser] Eliminate the Scope class and fold it into CSSTokenizer
https://bugs.webkit.org/show_bug.cgi?id=165532

Reviewed by Dean Jackson.

The Scope class, nested inside CSSTokenizer, is both poorly named and serves
no purpose. It's especially weird that it was the entry point into tokenization
instead of CSSTokenizer.

Eliminate the class, fold its members and functions into CSSTokenizer, and have
callers just make a CSSTokenizer instead.

  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::parseSupportsCondition):
(WebCore::CSSParser::parseSelector):

  • css/parser/CSSParserImpl.cpp:

(WebCore::CSSParserImpl::parseValue):
(WebCore::CSSParserImpl::parseCustomPropertyValue):
(WebCore::CSSParserImpl::parseInlineStyleDeclaration):
(WebCore::CSSParserImpl::parseDeclarationList):
(WebCore::CSSParserImpl::parseRule):
(WebCore::CSSParserImpl::parseStyleSheet):
(WebCore::CSSParserImpl::parseKeyframeKeyList):
(WebCore::CSSParserImpl::parseDeclarationListForInspector):
(WebCore::CSSParserImpl::parseStyleSheetForInspector):

  • css/parser/CSSTokenizer.cpp:

(WebCore::CSSTokenizer::CSSTokenizer):
(WebCore::CSSTokenizer::tokenRange):
(WebCore::CSSTokenizer::tokenCount):
(WebCore::CSSTokenizer::registerString):
(WebCore::CSSTokenizer::Scope::Scope): Deleted.
(WebCore::CSSTokenizer::Scope::tokenRange): Deleted.
(WebCore::CSSTokenizer::Scope::tokenCount): Deleted.

  • css/parser/CSSTokenizer.h:

(WebCore::CSSTokenizer::Scope::storeString): Deleted.

  • css/parser/CSSTokenizerInputStream.cpp:

(WebCore::CSSTokenizerInputStream::CSSTokenizerInputStream):

  • css/parser/CSSTokenizerInputStream.h:
  • css/parser/MediaQueryParser.cpp:

(WebCore::MediaQueryParser::parseMediaQuerySet):

  • css/parser/SizesAttributeParser.cpp:

(WebCore::SizesAttributeParser::SizesAttributeParser):

11:31 AM Changeset in webkit [209465] by commit-queue@webkit.org
  • 27 edits
    2 deletes in trunk

Web Inspector: Remove unused and mostly untested Page domain commands and events
https://bugs.webkit.org/show_bug.cgi?id=165507

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-12-07
Reviewed by Brian Burg.

Source/JavaScriptCore:

Remove unused and unsupported commands and events.

  • Page.setDocumentContent
  • Page.getScriptExecutionStatus
  • Page.setScriptExecutionDisabled
  • Page.handleJavaScriptDialog
  • Page.javascriptDialogOpening
  • Page.javascriptDialogClosed
  • Page.scriptsEnabled
  • inspector/protocol/Page.json:

Source/WebCore:

Remove any code associated with the commands/events being removed.

  • inspector/DOMPatchSupport.cpp:
  • inspector/DOMPatchSupport.h:
  • inspector/InspectorClient.h:

(WebCore::InspectorClient::handleJavaScriptDialog): Deleted.

  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::scriptsEnabledImpl): Deleted.
(WebCore::InspectorInstrumentation::willRunJavaScriptDialogImpl): Deleted.
(WebCore::InspectorInstrumentation::didRunJavaScriptDialogImpl): Deleted.

  • inspector/InspectorInstrumentation.h:

(WebCore::InspectorInstrumentation::scriptsEnabled): Deleted.
(WebCore::InspectorInstrumentation::willRunJavaScriptDialog): Deleted.
(WebCore::InspectorInstrumentation::didRunJavaScriptDialog): Deleted.

  • inspector/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::disable):
(WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
(WebCore::InspectorPageAgent::didPaint):
(WebCore::InspectorPageAgent::buildObjectForFrame):
(WebCore::InspectorPageAgent::archive):
(WebCore::createXHRTextDecoder): Deleted.
(WebCore::InspectorPageAgent::getScriptExecutionStatus): Deleted.
(WebCore::InspectorPageAgent::setScriptExecutionDisabled): Deleted.
(WebCore::InspectorPageAgent::willRunJavaScriptDialog): Deleted.
(WebCore::InspectorPageAgent::didRunJavaScriptDialog): Deleted.
(WebCore::InspectorPageAgent::scriptsEnabled): Deleted.
(WebCore::InspectorPageAgent::handleJavaScriptDialog): Deleted.

  • inspector/InspectorPageAgent.h:
  • page/Chrome.cpp:

(WebCore::Chrome::runBeforeUnloadConfirmPanel):
(WebCore::Chrome::runJavaScriptAlert):
(WebCore::Chrome::runJavaScriptConfirm):
(WebCore::Chrome::runJavaScriptPrompt):

  • page/Settings.cpp:

(WebCore::Settings::setScriptEnabled):

Source/WebInspectorUI:

  • UserInterface/Protocol/PageObserver.js:

(WebInspector.PageObserver.prototype.javascriptDialogOpening):
(WebInspector.PageObserver.prototype.javascriptDialogClosed):
(WebInspector.PageObserver.prototype.scriptsEnabled):
Keep stub in case legacy backends dispatch the event to the frontend.

  • UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js:
  • UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js:
  • UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
  • UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
  • UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js:
  • Versions/Inspector-iOS-10.0.json:
  • Versions/Inspector-iOS-7.0.json:
  • Versions/Inspector-iOS-8.0.json:
  • Versions/Inspector-iOS-9.0.json:
  • Versions/Inspector-iOS-9.3.json:

Remove handleJavaScriptDialog command from legacy backends because it
doesn't appear as if the iOS backend handled it at all.

LayoutTests:

  • inspector/page/javascriptDialogEvents-expected.txt: Removed.
  • inspector/page/javascriptDialogEvents.html: Removed.
  • platform/gtk/TestExpectations:
  • platform/mac/TestExpectations:

Remove test skipped by all platforms.

11:30 AM Changeset in webkit [209464] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

[pointer-lock] Cursor should become visible when exiting pointer-lock via ESC key.
https://bugs.webkit.org/show_bug.cgi?id=165377

Reviewed by Eric Carlson.

Follow up to previous patch; clear the m_forceCursorVisibleUponUnlock flag upon losing
pointer lock, so that subsequent unlocks don't erroneously cause the cursor to become
visible.

  • page/PointerLockController.cpp:

(WebCore::PointerLockController::didLosePointerLock):

11:21 AM Changeset in webkit [209463] by matthew_hanson@apple.com
  • 2 edits in branches/safari-602-branch/Source/WebCore

Merge r209462. rdar://problem/29556990

10:39 AM Changeset in webkit [209462] by ggaren@apple.com
  • 2 edits in trunk/Source/WebCore

performance.now() should truncate to 100us
https://bugs.webkit.org/show_bug.cgi?id=165503
<rdar://problem/29544531>

Reviewed by Mark Lam.

  • page/Performance.cpp:

(WebCore::Performance::reduceTimeResolution):

10:33 AM Changeset in webkit [209461] by hyatt@apple.com
  • 2 edits in trunk/LayoutTests

Fix a bad result that I landed by accident.

  • fast/css/object-position/parsing-object-position-expected.txt:
9:18 AM Changeset in webkit [209460] by hyatt@apple.com
  • 20 edits in trunk

[CSS Parser] Turn back on a bunch of layout tests
https://bugs.webkit.org/show_bug.cgi?id=165529

Reviewed by Zalan Bujtas.

Source/WebCore:

Fixes fast/css/transform-origin-parsing.html.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::consumeTransformOrigin):
The implicit check was relying on a null check of the z value, but
we called releaseNonNull on it already. This meant all z properties were
marked as implicit incorrectly. Fix by storing whether or not we had a z
value in a local variable.

LayoutTests:

  • TestExpectations:
  • css3/parsing-css3-nthchild-expected.txt:
  • css3/parsing-css3-nthchild.html:
  • css3/scroll-snap/scroll-snap-position-values-expected.txt:
  • css3/scroll-snap/scroll-snap-position-values.html:
  • editing/execCommand/insert-list-with-noneditable-content-expected.txt:
  • fast/css/object-position/parsing-object-position-expected.txt:
  • fast/css/object-position/parsing-object-position.html:
  • fast/css/parsing-css-number-types-expected.txt:
  • fast/css/parsing-css-wrap-expected.txt:
  • fast/css/script-tests/transform-origin-parsing.js:
  • fast/css/transform-inline-style-remove-expected.txt:
  • fast/css/transform-origin-parsing-expected.txt:
  • fast/css/variables/custom-property-dynamic-update-expected.html:
  • fast/events/mouse-cursor-expected.txt:
  • fast/inspector-support/style-expected.txt:
  • platform/mac/svg/webarchive/svg-script-subresouces-expected.txt:
8:48 AM Changeset in webkit [209459] by matthew_hanson@apple.com
  • 5 edits in trunk/Source

Versioning.

8:38 AM Changeset in webkit [209458] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-603.1.15

New tag.

8:35 AM Changeset in webkit [209457] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Rebaseline fast/table/003.html after r209421.
https://bugs.webkit.org/show_bug.cgi?id=165513

Unreviewed test gardening.

  • platform/ios-simulator/fast/table/003-expected.txt:
8:27 AM Changeset in webkit [209456] by akling@apple.com
  • 2 edits in trunk/Source/WebCore

[iOS] Remove bitrotted FrameLoader attempt to limit page caching under memory pressure.
<https://webkit.org/b/165527>

Reviewed by Antti Koivisto.

This code no longer does anything, as the page cache is hard capped
at 0 entries while under memory pressure.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::commitProvisionalLoad):

7:32 AM Changeset in webkit [209455] by Yusuke Suzuki
  • 5 edits in trunk/Source/JavaScriptCore

[JSC] Merge PromiseReactions
https://bugs.webkit.org/show_bug.cgi?id=165526

Reviewed by Sam Weinig.

Our promise implementation has two arrays per Promise; promiseFulfillReactions and promiseRejectReactions.
And everytime we call promise.then, we create two promise reactions for fullfill and reject.
However, these two reactions and the arrays for reactions can be merged into one array and one reaction.
It reduces the unnecessary object allocations.

No behavior change.

  • builtins/BuiltinNames.h:
  • builtins/PromiseOperations.js:

(globalPrivate.newPromiseReaction):
(globalPrivate.triggerPromiseReactions):
(globalPrivate.rejectPromise):
(globalPrivate.fulfillPromise):
(globalPrivate.promiseReactionJob):
(globalPrivate.initializePromise):

  • builtins/PromisePrototype.js:

(then):

  • runtime/JSPromise.cpp:

(JSC::JSPromise::finishCreation):

5:38 AM Changeset in webkit [209454] by Philippe Normand
  • 2 edits in trunk/Tools

[GTK][jhbuild] missing dependency on libvpx in gst-plugins-good
https://bugs.webkit.org/show_bug.cgi?id=165525

Reviewed by Carlos Garcia Campos.

  • gtk/jhbuild.modules: gst-plugins-good should depend on the

libvpx package built within jhbuild.

3:14 AM Changeset in webkit [209453] by Philippe Normand
  • 3 edits in trunk/Source/WebKit2

Unreviewed, GTK build fix after r209407.

  • Platform/IPC/unix/ConnectionUnix.cpp:

(IPC::Connection::processMessage):

  • UIProcess/LegacySessionStateCodingNone.cpp:

(WebKit::decodeLegacySessionState):

1:15 AM Changeset in webkit [209452] by Philippe Normand
  • 2 edits
    2 adds in trunk/Tools

[GTK][jhbuild] gst-plugins-bad fails to build with OpenSSL 1.1.0
https://bugs.webkit.org/show_bug.cgi?id=165520

Reviewed by Carlos Garcia Campos.

  • gtk/jhbuild.modules: Added missing dependency on openh264 in

gst-plugins-bad, along with 2 upstream patches fixing the build
against OpenSSL 1.1.0.

  • gtk/patches/gst-plugins-bad-0001-dtls-port-to-OpenSSL-1.1.0.patch: Added.
  • gtk/patches/gst-plugins-bad-0002-dtlscertificate-Fix-error-checking-in-RSA_generate_k.patch: Added.

Dec 6, 2016:

11:48 PM Changeset in webkit [209451] by graouts@webkit.org
  • 35 edits
    4 adds in trunk

[Modern Media Controls] Use tap and pinch gestures on iOS
https://bugs.webkit.org/show_bug.cgi?id=165518

Reviewed by Dean Jackson.

Source/WebCore:

We now use touch events to identify taps and pinches on media controls to respond immediately
to user interaction on buttons and enter fullscreen when pinching out.

  • Modules/modern-media-controls/controls/button.css:

(button):

  • Modules/modern-media-controls/controls/button.js:

(Button):
(Button.prototype.handleEvent):
(Button.prototype.gestureRecognizerStateDidChange):
(Button.prototype._notifyDelegateOfActivation):
(Button.prototype._handleUIEvent): Deleted.

  • Modules/modern-media-controls/controls/controls-bar.js:

(ControlsBar.prototype.set fadesWhileIdle):
(ControlsBar.prototype.gestureRecognizerStateDidChange):

  • Modules/modern-media-controls/controls/icon-button.js:

(IconButton.prototype._updateImage):
(IconButton):

  • Modules/modern-media-controls/controls/ios-inline-media-controls.js:

(IOSInlineMediaControls.prototype.gestureRecognizerStateDidChange):

  • Modules/modern-media-controls/gesture-recognizers/gesture-recognizer.js: Added.

(GestureRecognizer):
(GestureRecognizer.prototype.get state):
(GestureRecognizer.prototype.set state):
(GestureRecognizer.prototype.get target):
(GestureRecognizer.prototype.set target):
(GestureRecognizer.prototype.get numberOfTouches):
(GestureRecognizer.prototype.get enabled):
(GestureRecognizer.prototype.set enabled):
(GestureRecognizer.prototype.reset):
(GestureRecognizer.prototype.locationInElement):
(GestureRecognizer.prototype.locationInClient):
(GestureRecognizer.prototype.locationOfTouchInElement):
(GestureRecognizer.prototype.touchesBegan):
(GestureRecognizer.prototype.touchesMoved):
(GestureRecognizer.prototype.touchesEnded):
(GestureRecognizer.prototype.touchesCancelled):
(GestureRecognizer.prototype.gestureBegan):
(GestureRecognizer.prototype.gestureChanged):
(GestureRecognizer.prototype.gestureEnded):
(GestureRecognizer.prototype.enterPossibleState):
(GestureRecognizer.prototype.enterBeganState):
(GestureRecognizer.prototype.enterEndedState):
(GestureRecognizer.prototype.enterCancelledState):
(GestureRecognizer.prototype.enterFailedState):
(GestureRecognizer.prototype.enterChangedState):
(GestureRecognizer.prototype.enterRecognizedState):
(GestureRecognizer.prototype.handleEvent):
(GestureRecognizer.prototype._initRecognizer):
(GestureRecognizer.prototype._updateBaseListeners):
(GestureRecognizer.prototype._removeTrackingListeners):
(GestureRecognizer.prototype._updateTargetTouches):
(GestureRecognizer.prototype._updateKeyboardModifiers):

  • Modules/modern-media-controls/gesture-recognizers/pinch.js: Added.

(PinchGestureRecognizer):
(PinchGestureRecognizer.prototype.get velocity):
(PinchGestureRecognizer.prototype.touchesBegan):
(PinchGestureRecognizer.prototype.touchesMoved):
(PinchGestureRecognizer.prototype.touchesEnded):
(PinchGestureRecognizer.prototype.gestureBegan):
(PinchGestureRecognizer.prototype.gestureChanged):
(PinchGestureRecognizer.prototype.gestureEnded):
(PinchGestureRecognizer.prototype.reset):
(PinchGestureRecognizer.prototype._recordGesture):
(PinchGestureRecognizer.prototype._updateStateWithEvent):
(PinchGestureRecognizer.prototype._distance):

  • Modules/modern-media-controls/gesture-recognizers/tap.js: Added.

(TapGestureRecognizer):
(TapGestureRecognizer.prototype.touchesBegan):
(TapGestureRecognizer.prototype.touchesMoved):
(TapGestureRecognizer.prototype.touchesEnded):
(TapGestureRecognizer.prototype.reset):
(TapGestureRecognizer.prototype.locationInElement):
(TapGestureRecognizer.prototype.locationInClient):
(TapGestureRecognizer.prototype._clearTimer):
(TapGestureRecognizer.prototype._rewindTimer):
(TapGestureRecognizer.prototype._timerFired):

  • Modules/modern-media-controls/js-files:
  • Modules/modern-media-controls/media/airplay-support.js:

(AirplaySupport.prototype.buttonWasClicked): Deleted.

  • Modules/modern-media-controls/media/controls-visibility-support.js:

(ControlsVisibilitySupport):
(ControlsVisibilitySupport.prototype.handleEvent):
(ControlsVisibilitySupport.prototype.syncControl): Deleted.

  • Modules/modern-media-controls/media/fullscreen-support.js:

(FullscreenSupport):
(FullscreenSupport.prototype.iOSInlineMediaControlsRecognizedPinchInGesture):
(FullscreenSupport.prototype.buttonWasClicked): Deleted.

  • Modules/modern-media-controls/media/media-controller-support.js:

(MediaControllerSupport):
(MediaControllerSupport.prototype.handleEvent):
(MediaControllerSupport.prototype.buttonWasClicked): Deleted.

  • Modules/modern-media-controls/media/mute-support.js:

(MuteSupport.prototype.buttonWasClicked): Deleted.

  • Modules/modern-media-controls/media/pip-support.js:

(PiPSupport.prototype.buttonWasClicked): Deleted.

  • Modules/modern-media-controls/media/playback-support.js:

(PlaybackSupport.prototype.buttonWasClicked): Deleted.

  • Modules/modern-media-controls/media/skip-back-support.js:

(SkipBackSupport.prototype.buttonWasClicked): Deleted.

  • Modules/modern-media-controls/media/start-support.js:

(StartSupport.prototype.buttonWasClicked): Deleted.

  • Modules/modern-media-controls/media/tracks-support.js:

(TracksSupport.prototype.buttonWasClicked): Deleted.

LayoutTests:

With the addition of new gesture recognizer source files, some tests were failing
due to linking to only a subset of the modern media controls resources.

  • media/modern-media-controls/airplay-button/airplay-button.html:
  • media/modern-media-controls/aspect-ratio-button/aspect-ratio-button.html:
  • media/modern-media-controls/button/button.html:
  • media/modern-media-controls/buttons-container/buttons-container-buttons-property.html:
  • media/modern-media-controls/buttons-container/buttons-container-constructor.html:
  • media/modern-media-controls/buttons-container/buttons-container-layout.html:
  • media/modern-media-controls/fullscreen-button/fullscreen-button.html:
  • media/modern-media-controls/icon-button/icon-button-active-state.html:
  • media/modern-media-controls/icon-button/icon-button.html:
  • media/modern-media-controls/mute-button/mute-button.html:
  • media/modern-media-controls/pip-button/pip-button.html:
  • media/modern-media-controls/placard/placard.html:
  • media/modern-media-controls/play-pause-button/play-pause-button.html:
  • media/modern-media-controls/skip-back-button/skip-back-button.html:
  • media/modern-media-controls/start-button/start-button-styles.html:
  • media/modern-media-controls/start-button/start-button.html:
  • media/modern-media-controls/tracks-button/tracks-button.html:
10:07 PM Changeset in webkit [209450] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

Apply styling to media documents with modern controls
https://bugs.webkit.org/show_bug.cgi?id=165499
<rdar://problems/29543847>

Reviewed by Antoine Quint.

Forgot to commit most of the changes in MediaDocument.cpp :(

  • html/MediaDocument.cpp:

(WebCore::MediaDocumentParser::createDocumentStructure):

9:31 PM Changeset in webkit [209449] by Ryan Haddad
  • 12 edits
    4 deletes in trunk/Source/WebKit2

Unreviewed, rolling out r209422.

This change caused assertion failures during API tests.

Reverted changeset:

"[MediaStream][Mac] Revoke sandbox extensions when capture
ends"
https://bugs.webkit.org/show_bug.cgi?id=165476
http://trac.webkit.org/changeset/209422

9:18 PM Changeset in webkit [209448] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking http/tests/security/module-incorrect-mime-types.html as flaky on ios-simulator-wk2.
https://bugs.webkit.org/show_bug.cgi?id=165344

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations:
9:14 PM Changeset in webkit [209447] by Simon Fraser
  • 6 edits in trunk

Two tiled drawing tests failing with visual viewports enabled.
https://bugs.webkit.org/show_bug.cgi?id=165489

Reviewed by Dean Jackson.
Source/WebCore:

computeLayoutViewportOrigin() gets called for iframes when the layout viewport
is zero-sized, but the visual viewport is non-zero. It doesn't really make sense
to compute a layout viewport when the visual viewport is larger than the layout
viewport, but if this happens just anchor the layout viewport at the origin
of the visual viewport.

  • page/FrameView.cpp:

(WebCore::FrameView::computeLayoutViewportOrigin):

LayoutTests:

Unfail and rebaseline.

  • platform/mac-wk2/TestExpectations:
  • tiled-drawing/scrolling/frames/coordinated-frame-expected.txt:
  • tiled-drawing/scrolling/frames/coordinated-frame-in-fixed-expected.txt:
8:58 PM Changeset in webkit [209446] by Darin Adler
  • 23 edits
    9 deletes in trunk/Source

Remove various stray uses of WebCore::Dictionary
https://bugs.webkit.org/show_bug.cgi?id=165358

Reviewed by Sam Weinig.

I discovered three completely unused classes in the MediaStream code:
MediaTrackConstraint, MediaTrackConstraintSet, and MediaTrackConstraints.
While there is some chance we may implement these at some point, they are
likely to be dictionaries or some other kind of data structure rather than
clases, and there is no reason to keep the current classes.

  • CMakeLists.txt: Removed MediaTrackConstraint, MediaTrackConstraintSet,

and MediaTrackConstraints.

  • DerivedSources.cpp: Ditto.
  • DerivedSources.make: Ditto.
  • Modules/indexeddb/IDBDatabase.h: Removed include of Dictionary.h.
  • Modules/indexeddb/IDBObjectStore.cpp: Added include of HeapInlines.h.
  • Modules/indexeddb/IDBRequest.cpp: Added include of StrongInlines.h.
  • Modules/indexeddb/IDBTransaction.cpp: Added include of SerializedScriptValue.h.
  • Modules/mediastream/MediaStreamTrack.cpp:

(WebCore::MediaStreamTrack::getConstraints): Deleted.
This function is implemented entirely in the bindings layer.

  • Modules/mediastream/MediaStreamTrack.h: Removed getConstraints.
  • Modules/mediastream/MediaTrackConstraint.cpp: Removed.
  • Modules/mediastream/MediaTrackConstraint.h: Removed.
  • Modules/mediastream/MediaTrackConstraint.idl: Removed.
  • Modules/mediastream/MediaTrackConstraintSet.cpp: Removed.
  • Modules/mediastream/MediaTrackConstraintSet.h: Removed.
  • Modules/mediastream/MediaTrackConstraintSet.idl: Removed.
  • Modules/mediastream/MediaTrackConstraints.cpp: Removed.
  • Modules/mediastream/MediaTrackConstraints.h: Removed.
  • Modules/mediastream/MediaTrackConstraints.idl: Removed.
  • Modules/mediastream/NavigatorUserMedia.idl: Use the type names from the latest

getUserMedia specification for the arguments to webkitGetUserMedia; not sure they
are precisely correct for this legacy function, but since this is a JSBuiltin,
it's all ignored anyway. Just important not to call anything "Dictionary".

  • WebCore.xcodeproj/project.pbxproj: Removed MediaTrackConstraint, MediaTrackConstraintSet,

and MediaTrackConstraints.

  • bindings/js/JSApplePaySessionCustom.cpp:

(WebCore::JSApplePaySession::completeShippingMethodSelection): Use uncheckedArgument, since
the code explicitly checks the number of arguments.
(WebCore::JSApplePaySession::completeShippingContactSelection): Ditto.
(WebCore::JSApplePaySession::completePaymentMethodSelection): Ditto.

  • bindings/js/JSFontFaceCustom.cpp: Removed include of Dictionary.h.
  • dom/Document.cpp: Ditto.
  • dom/Element.cpp: Ditto.
  • dom/Element.h: Removed forward declaration of Dictionary.
8:36 PM Changeset in webkit [209445] by Wenson Hsieh
  • 4 edits in trunk

After preventing a beforeinput event, an input event is fired when formatting rich text
https://bugs.webkit.org/show_bug.cgi?id=165435
<rdar://problem/29522314>

Reviewed by Ryosuke Niwa.

Source/WebCore:

This regressed after I refactored some input event event dispatch logic when formatting text in r208461.
I moved the logic for dispatching input events when applying styles into Editor::applyStyle, but left out an
early return after firing the beforeinput event if the default behavior was prevented, which caused us to
continue on and dispatch an input event. The fix is to bail from applyStyle if default was prevented.

Augmented an existing layout test to cover this case.

  • editing/Editor.cpp:

(WebCore::Editor::applyStyle):
(WebCore::Editor::applyParagraphStyle):

LayoutTests:

Augmented a layout test to verify that when preventing beforeinput events, a corresponding input event is not
fired in addition to the style not being applied to the text.

  • fast/events/before-input-prevent-biu.html:
8:26 PM Changeset in webkit [209444] by Simon Fraser
  • 3 edits in trunk/LayoutTests

Fix behavior of background-attachment:fixed with visual viewports
https://bugs.webkit.org/show_bug.cgi?id=165465

Fixed backgrounds are working correctly. Unskip and land a new image result for this test.

  • TestExpectations:
  • tiled-drawing/scrolling/fixed-background/fixed-body-background-zoomed-expected.png:
8:24 PM Changeset in webkit [209443] by dino@apple.com
  • 6 edits in trunk/Source/WebKit2

Include default value in Experimental Feature information
https://bugs.webkit.org/show_bug.cgi?id=165509
<rdar://problems/29547177>

Reviewed by Tim Horton.

Add a defaultValue member variable to experimental
features, both the C++ and ObjC interfaces.

  • UIProcess/API/APIExperimentalFeature.cpp:

(API::ExperimentalFeature::create):
(API::ExperimentalFeature::ExperimentalFeature):

  • UIProcess/API/APIExperimentalFeature.h:
  • UIProcess/API/Cocoa/_WKExperimentalFeature.h:
  • UIProcess/API/Cocoa/_WKExperimentalFeature.mm:

(-[_WKExperimentalFeature description]):
(-[_WKExperimentalFeature defaultValue]):

  • UIProcess/WebPreferences.cpp:

(WebKit::createExperimentalFeaturesVector):

7:12 PM Changeset in webkit [209442] by mark.lam@apple.com
  • 5 edits in trunk

GetByID IC is wrongly unwrapping the global proxy this value for getter/setters.
https://bugs.webkit.org/show_bug.cgi?id=165401

Reviewed by Saam Barati.

Source/JavaScriptCore:

When the this value for a property access is the JS global and that property
access is via a GetterSetter, the underlying getter / setter functions would
expect the this value they receive to be the JSProxy instance instead of the
JSGlobalObject. This is consistent with how the LLINT and runtime code behaves.
The IC code should behave the same way.

Also added some ASSERTs to document invariants in the code, and help detect
bugs sooner if the code gets changed in a way that breaks those invariants in
the future.

  • bytecode/PolymorphicAccess.cpp:

(JSC::AccessCase::generateImpl):

LayoutTests:

Set the test loose now that this bug is fixed.

7:03 PM Changeset in webkit [209441] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

[Modern Media Controls] Instantiate iOS media controls
https://bugs.webkit.org/show_bug.cgi?id=165498

Patch by Antoine Quint <Antoine Quint> on 2016-12-06
Reviewed by Dean Jackson.

Add support for the modern media controls runtime flags in RenderThemeIOS and, when instantiating iOS controls,
return an IOSInlineMediaControls class.

  • Modules/modern-media-controls/media/media-controller.js:

(MediaController.prototype._controlsClass):
(MediaController):

  • rendering/RenderThemeIOS.h:
  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::mediaControlsStyleSheet):
(WebCore::RenderThemeIOS::mediaControlsScript):
(WebCore::RenderThemeIOS::mediaControlsBase64StringForIconAndPlatform):

6:52 PM Changeset in webkit [209440] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

DumpRenderTree ASSERT in JSC::ExecutableBase::isHostFunction seen on bots
https://bugs.webkit.org/show_bug.cgi?id=165497
<rdar://problem/29538973>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-12-06
Reviewed by Saam Barati.

  • inspector/agents/InspectorScriptProfilerAgent.cpp:

(Inspector::InspectorScriptProfilerAgent::trackingComplete):
Defer collection when extracting and processing the samples to avoid
any objects held by the samples from getting collected while processing.
This is because while processing we call into functions that can
allocate and we must prevent those functions from syncing with the
GC thread which may collect other sample data yet to be processed.

5:23 PM Changeset in webkit [209439] by dino@apple.com
  • 3 edits
    2 adds in trunk

Apply styling to media documents with modern controls
https://bugs.webkit.org/show_bug.cgi?id=165499
<rdar://problems/29543847>

Reviewed by Antoine Quint.

Source/WebCore:

Existing MediaDocuments got styling from the injected style
sheet, which had rules for such documents. The modern media controls
use a scoped style rule, so we can't touch the document style. Instead,
inline the style directly from MediaDocument.

Test: media/modern-media-controls/media-documents/background-color-and-centering.html

  • html/MediaDocument.cpp:

(WebCore::MediaDocumentParser::createDocumentStructure):

LayoutTests:

Make sure that the small test video has the correct background,
and is not anchored to the top left of the page.

  • media/modern-media-controls/media-documents/background-color-and-centering-expected.html: Added.
  • media/modern-media-controls/media-documents/background-color-and-centering.html: Added.
5:15 PM Changeset in webkit [209438] by Alan Bujtas
  • 8 edits in trunk/Source/WebCore

Move RenderElement::rendererForRootBackground to RenderView.
https://bugs.webkit.org/show_bug.cgi?id=165454

Reviewed by Simon Fraser.

Currently RenderElement::rendererForRootBackground can only be called on document element's renderer.
This patch removes this limitation and moves the functionality from RenderElement to RenderView.

No change in functionality.

  • page/FrameView.cpp:

(WebCore::FrameView::calculateExtendedBackgroundMode):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::paintRootBoxFillLayers):

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::rendererForRootBackground): Deleted.

  • rendering/RenderElement.h:
  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::rendererBackgroundColor):

  • rendering/RenderView.cpp:

(WebCore::RenderView::rendererForRootBackground):
(WebCore::rendererObscuresBackground):
(WebCore::RenderView::paintBoxDecorations):
(WebCore::RenderView::rootBackgroundIsEntirelyFixed):

  • rendering/RenderView.h:
5:15 PM Changeset in webkit [209437] by jiewen_tan@apple.com
  • 18 edits
    1 copy
    25 adds in trunk

[Part 1 of 2] Add support for SPKI format while doing SubtleCrypto.importKey/exportKey
https://bugs.webkit.org/show_bug.cgi?id=129978
<rdar://problem/21799829>

LayoutTests/imported/w3c:

Reviewed by Brent Fulgham.

  • WebCryptoAPI/encrypt_decrypt/test_rsa_oaep-expected.txt:

Source/WebCore:

This is part 1 of Bug 129978. In this patch, it adds the SPKI format support for
SubtleCrypto.importKey/exportKey. Currently support algorithms are RSAES-PKCS1-v1_5,
RSASSA-PKCS1-v1_5 and RSA-OAEP.

Reviewed by Brent Fulgham.

Tests: crypto/subtle/rsa-import-jwk-key-export-spki-key.html

crypto/subtle/rsa-import-spki-key-export-jwk-key.html
crypto/subtle/rsa-import-spki-key-export-spki-key.html
crypto/subtle/rsa-import-spki-small-key.html
crypto/subtle/rsa-oaep-generate-export-key-spki.html
crypto/subtle/rsa-oaep-import-spki-key.html
crypto/subtle/rsaes-pkcs1-v1_5-generate-export-key-spki.html
crypto/subtle/rsaes-pkcs1-v1_5-import-spki-key.html
crypto/subtle/rsassa-pkcs1-v1_5-generate-export-key-spki.html
crypto/subtle/rsassa-pkcs1-v1_5-import-spki-key.html
crypto/workers/subtle/rsa-export-spki-key.html
crypto/workers/subtle/rsa-import-spki-key.html

  • bindings/js/JSSubtleCryptoCustom.cpp:

(WebCore::toKeyData):

  • crypto/CommonCryptoUtilities.h:
  • crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:

(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::exportKey):

  • crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:

(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::exportKey):

  • crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:

(WebCore::CryptoAlgorithmRSA_OAEP::importKey):
(WebCore::CryptoAlgorithmRSA_OAEP::exportKey):

  • crypto/gnutls/CryptoKeyRSAGnuTLS.cpp:

(WebCore::CryptoKeyRSA::importSpki):
(WebCore::CryptoKeyRSA::exportSpki):

  • crypto/keys/CryptoKeyRSA.h:
  • crypto/mac/CryptoKeyRSAMac.cpp:

(WebCore::bytesUsedToEncodedLength):
(WebCore::bytesNeededForEncodedLength):
(WebCore::addEncodedASN1Length):
(WebCore::CryptoKeyRSA::importSpki):
(WebCore::CryptoKeyRSA::exportSpki):

LayoutTests:

Reviewed by Brent Fulgham.

  • crypto/subtle/import-key-malformed-parameters-expected.txt:
  • crypto/subtle/import-key-malformed-parameters.html:
  • crypto/subtle/rsa-export-key-malformed-parameters-expected.txt:
  • crypto/subtle/rsa-export-key-malformed-parameters.html:
  • crypto/subtle/rsa-import-jwk-key-export-spki-key-expected.txt: Added.
  • crypto/subtle/rsa-import-jwk-key-export-spki-key.html: Added.
  • crypto/subtle/rsa-import-key-malformed-parameters-expected.txt:
  • crypto/subtle/rsa-import-key-malformed-parameters.html:
  • crypto/subtle/rsa-import-spki-key-export-jwk-key-expected.txt: Added.
  • crypto/subtle/rsa-import-spki-key-export-jwk-key.html: Added.
  • crypto/subtle/rsa-import-spki-key-export-spki-key-expected.txt: Added.
  • crypto/subtle/rsa-import-spki-key-export-spki-key.html: Added.
  • crypto/subtle/rsa-import-spki-small-key-expected.txt: Added.
  • crypto/subtle/rsa-import-spki-small-key.html: Added.
  • crypto/subtle/rsa-oaep-generate-export-key-spki-expected.txt: Added.
  • crypto/subtle/rsa-oaep-generate-export-key-spki.html: Added.
  • crypto/subtle/rsa-oaep-import-spki-key-expected.txt: Added.
  • crypto/subtle/rsa-oaep-import-spki-key.html: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-generate-export-key-spki-expected.txt: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-generate-export-key-spki.html: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-import-spki-key-expected.txt: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-import-spki-key.html: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-generate-export-key-spki-expected.txt: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-generate-export-key-spki.html: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-spki-key-expected.txt: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-spki-key.html: Added.
  • crypto/workers/subtle/resources/rsa-export-spki-key.js: Added.
  • crypto/workers/subtle/resources/rsa-import-spki-key.js: Added.
  • crypto/workers/subtle/rsa-export-spki-key-expected.txt: Added.
  • crypto/workers/subtle/rsa-export-spki-key.html: Added.
  • crypto/workers/subtle/rsa-import-spki-key-expected.txt: Added.
  • crypto/workers/subtle/rsa-import-spki-key.html: Added.
4:46 PM Changeset in webkit [209436] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Fix editing text flakiness introduced in r209411
https://bugs.webkit.org/show_bug.cgi?id=165500

Reviewed by Dean Jackson.

The "insideFixed" out param was left uninitialized sometimes. This affected FrameSelection's
m_caretInsidePositionFixed, which caused problems in these tests.

Tested by editing tests in WK1.

  • editing/htmlediting.cpp:

(WebCore::absoluteBoundsForLocalCaretRect):

4:46 PM Changeset in webkit [209435] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

Unreviewed, rolling out r209391.
https://bugs.webkit.org/show_bug.cgi?id=165501

requires explicit nullptr checks so missing env vars don't
flip AC mode (Requested by mcatanzaro on #webkit).

Reverted changeset:

"[GTK] Process accelerated compositing env variables only if
they are really enabled"
https://bugs.webkit.org/show_bug.cgi?id=165300
http://trac.webkit.org/changeset/209391

4:34 PM Changeset in webkit [209434] by ap@apple.com
  • 26 edits in trunk

Correct SDKROOT values in xcconfig files
https://bugs.webkit.org/show_bug.cgi?id=165487
rdar://problem/29539209

Reviewed by Dan Bernstein.

Fix suggested by Dan Bernstein.

Source/bmalloc:

  • Configurations/DebugRelease.xcconfig:

Source/JavaScriptCore:

  • Configurations/DebugRelease.xcconfig:

Source/ThirdParty:

  • gtest/xcode/Config/DebugProject.xcconfig:
  • gtest/xcode/Config/ReleaseProject.xcconfig:

Source/ThirdParty/ANGLE:

  • Configurations/DebugRelease.xcconfig:

Source/WebCore:

  • Configurations/DebugRelease.xcconfig:

Source/WebInspectorUI:

  • Configurations/DebugRelease.xcconfig:

Source/WebKit/mac:

  • Configurations/DebugRelease.xcconfig:

Source/WebKit2:

  • Configurations/DebugRelease.xcconfig:

Source/WTF:

  • Configurations/DebugRelease.xcconfig:

Tools:

  • ContentExtensionTester/Configurations/DebugRelease.xcconfig:
  • DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
  • MiniBrowser/Configurations/DebugRelease.xcconfig:
  • TestWebKitAPI/Configurations/DebugRelease.xcconfig:
  • WebEditingTester/Configurations/DebugRelease.xcconfig:
  • WebKitTestRunner/Configurations/DebugRelease.xcconfig:
4:27 PM Changeset in webkit [209433] by sbarati@apple.com
  • 19 edits
    4 deletes in trunk/Source

Remove old Wasm object model
https://bugs.webkit.org/show_bug.cgi?id=165481

Reviewed by Keith Miller and Mark Lam.

Source/JavaScriptCore:

It's confusing to see code that consults both the old
Wasm object model alongside the new one. The old object
model is not a thing, and it's not being used. Let's
remove it now to prevent further confusion.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finalizeLLIntInlineCaches):
(JSC::CodeBlock::replacement):
(JSC::CodeBlock::computeCapabilityLevel):
(JSC::CodeBlock::updateAllPredictions):

  • bytecode/CodeBlock.h:
  • bytecode/WebAssemblyCodeBlock.cpp: Removed.
  • bytecode/WebAssemblyCodeBlock.h: Removed.
  • dfg/DFGCapabilities.cpp:

(JSC::DFG::isSupportedForInlining):

  • interpreter/Interpreter.cpp:

(JSC::GetStackTraceFunctor::operator()):
(JSC::UnwindFunctor::operator()):
(JSC::isWebAssemblyExecutable): Deleted.

  • jit/JITOperations.cpp:
  • jit/Repatch.cpp:

(JSC::linkPolymorphicCall):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::setUpCall):

  • runtime/ExecutableBase.cpp:

(JSC::ExecutableBase::clearCode):

  • runtime/ExecutableBase.h:

(JSC::ExecutableBase::isWebAssemblyExecutable): Deleted.

  • runtime/JSFunction.cpp:
  • runtime/JSFunction.h:
  • runtime/JSFunctionInlines.h:

(JSC::JSFunction::isBuiltinFunction):

  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
  • runtime/WebAssemblyExecutable.cpp: Removed.
  • runtime/WebAssemblyExecutable.h: Removed.

Source/WebCore:

  • testing/Internals.cpp:

(WebCore::Internals::parserMetaData):

3:48 PM Changeset in webkit [209432] by graouts@webkit.org
  • 3 edits
    2 adds in trunk

[Modern Media Controls] Media controls use the fullscreen layout after going from inline to fullscreen to PiP to inline
https://bugs.webkit.org/show_bug.cgi?id=165494

Reviewed by Dean Jackson.

We would only call _updateControlsIfNeeded() when entering or leaving fullscreen, so we going from fullscreen to PiP to
inline would retain fullscreen controls since we would not check for the event that indicates we went back from PiP to
inline. On platforms that support it, we listen to the "webkitpresentationmodechanged" event
to update the controls, and only "webkitfullscreenchange" on others (ie. Yosemite).

Test: media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-pip-to-inline.html

  • Modules/modern-media-controls/media/media-controller.js:

(MediaController):
(MediaController.prototype.handleEvent):
(MediaController.prototype._returnMediaLayerToInlineIfNeeded):

3:45 PM Changeset in webkit [209431] by graouts@webkit.org
  • 10 edits
    2 adds in trunk

[Modern Media Controls] Rendering issues with controls bar when captions are on
https://bugs.webkit.org/show_bug.cgi?id=165390

Reviewed by Dean Jackson.

We would face some layout issues with captions due to RenderImage::layoutShadowControls()
expecting a single RenderBox in the media controls shadow root, which was the case with
legacy media controls, but no longer the case with modern media controls. We now host
both the captions and the media controls elements under a single container, and add
an asertion in RenderImage to check that a single RenderBox child exists.

Test: media/modern-media-controls/media-controller/media-controller-single-container.html

  • Modules/modern-media-controls/controls/media-controls.css:

(.media-controls-container):
(.media-controls-container,):
(.media-controls-container > *):
(.media-controls):

  • Modules/modern-media-controls/controls/text-tracks.css:

(video::-webkit-media-text-track-container):

  • Modules/modern-media-controls/media/media-controller.js:

(MediaController):
(MediaController.prototype._updateControlsIfNeeded):

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::layoutShadowControls):

3:39 PM Changeset in webkit [209430] by graouts@webkit.org
  • 6 edits
    1 copy
    12 adds in trunk

[Modern Media Controls] Automatically hide the controls bar when the mouse is idle
https://bugs.webkit.org/show_bug.cgi?id=165492

Reviewed by Dean Jackson.

We now automatically hide the controls bar. When the media is no longer paused, the controls remain
visible for 4 seconds, regardless of where the mouse pointer is located. When the user mouses over the
media, the controls become visible and automatically hide 4 seconds after the last time the user has
moved his mouse over the media. When the user mouses out of the media, the controls automatically hide.
When the mouse is over the controls bar, it remains visible. When the media is paused, the controls bar
remain visible regardless of the mouse position.

Tests: media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-enter-and-mouse-leave.html

media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-enter-over-controls-bar.html
media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-leave-after-play.html
media/modern-media-controls/media-controller/media-controller-auto-hide-pause.html
media/modern-media-controls/media-controller/media-controller-auto-hide-rewind-with-mouse-enter.html
media/modern-media-controls/media-controller/media-controller-auto-hide.html

  • Modules/modern-media-controls/controls/controls-bar.css: Added.

(.controls-bar):
(.controls-bar.faded):

  • Modules/modern-media-controls/controls/controls-bar.js:

(ControlsBar.prototype.get userInteractionEnabled):
(ControlsBar.prototype.set userInteractionEnabled):
(ControlsBar.prototype.get fadesWhileIdle):
(ControlsBar.prototype.set fadesWhileIdle):
(ControlsBar.prototype.get visible):
(ControlsBar.prototype.set visible):
(ControlsBar.prototype.get faded):
(ControlsBar.prototype.set faded):
(ControlsBar.prototype.handleEvent):
(ControlsBar.prototype.commitProperty):
(ControlsBar.prototype._cancelAutoHideTimer):
(ControlsBar.prototype._rewindAutoHideTimer):
(ControlsBar.prototype._autoHideTimerFired):

  • Modules/modern-media-controls/controls/media-controls.js:
  • Modules/modern-media-controls/media/controls-visibility-support.js:

(ControlsVisibilitySupport.prototype.get mediaEvents):
(ControlsVisibilitySupport.prototype.syncControl):
(ControlsVisibilitySupport):

  • Modules/modern-media-controls/media/media-controller.js:

(MediaController.prototype._updateControlsIfNeeded):

3:29 PM Changeset in webkit [209429] by jfbastien@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

PureNaN: fix typo
https://bugs.webkit.org/show_bug.cgi?id=165493

Reviewed by Mark Lam.

  • runtime/PureNaN.h:
3:24 PM Changeset in webkit [209428] by dbates@webkit.org
  • 2 edits in trunk/LayoutTests

Test fast/selectors/040.html fails on iOS Simulator following <https://trac.webkit.org/changeset/209404>
(https://bugs.webkit.org/show_bug.cgi?id=79694)

Skip test fast/selectors/040.html as we do not visually highlight a programmatic selection on iOS from
observation.

  • platform/ios-simulator/TestExpectations:
3:06 PM Changeset in webkit [209427] by Alan Bujtas
  • 5 edits
    2 adds in trunk

Can not select whole line when using flexbox
https://bugs.webkit.org/show_bug.cgi?id=165299

Reviewed by David Hyatt.

Source/WebCore:

RootInlineBox::selectionTopAdjustedForPrecedingBlock assumes that the preceding block is
always above the current line. However in certain layout contexts (flex as an example) the block before
could just be on the same line as the current one.

This patch checks if we actually need to adjust the selection top to avoid vertical selection overlap.

Test: fast/flexbox/flexbox-fail-to-select-same-line.html

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::blockBeforeWithinSelectionRoot): Deleted.

  • rendering/RenderBlock.h:
  • rendering/RootInlineBox.cpp:

(WebCore::blockBeforeWithinSelectionRoot):
(WebCore::RootInlineBox::selectionTopAdjustedForPrecedingBlock):

LayoutTests:

  • fast/flexbox/flexbox-fail-to-select-same-line-expected.html: Added.
  • fast/flexbox/flexbox-fail-to-select-same-line.html: Added.
3:01 PM Changeset in webkit [209426] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

Add more assertions to ElementQueue diagnose a bug
https://bugs.webkit.org/show_bug.cgi?id=164814

Reviewed by Alexey Proskuryakov.

Set m_invoking in release builds now that assertions are also run in release builds.

  • dom/CustomElementReactionQueue.cpp:

(WebCore::CustomElementReactionStack::ElementQueue::invokeAll):

2:48 PM Changeset in webkit [209425] by jer.noble@apple.com
  • 6 edits
    3 adds in trunk

YouTube sometimes pauses when switching tabs
https://bugs.webkit.org/show_bug.cgi?id=165468

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/media-session-restrictions.html

The bitfield which represents the restrictions for "VideoAudio" media type was unititialized,
leading to what was effectively a random set of restrictions at runtime.

  • platform/audio/PlatformMediaSessionManager.cpp:

(WebCore::PlatformMediaSessionManager::resetRestrictions):

  • testing/Internals.cpp:

(WebCore::mediaTypeFromString):
(WebCore::Internals::setMediaSessionRestrictions):
(WebCore::Internals::mediaSessionRestrictions):

  • testing/Internals.h:
  • testing/Internals.idl:

LayoutTests:

  • media/media-session-restrictions.html: Added.
  • platform/ios-simulator/media/media-session-restrictions-expected.txt: Added.
  • platform/mac/media/media-session-restrictions-expected.txt: Added.
2:43 PM Changeset in webkit [209424] by mark.lam@apple.com
  • 20 edits
    3 adds
    3 deletes in trunk

Introduce the concept of Immutable Prototype Exotic Objects to comply with the spec.
https://bugs.webkit.org/show_bug.cgi?id=165227
<rdar://problem/29442665>

Reviewed by Saam Barati.

JSTests:

  • stress/get-from-scope-dynamic-onto-proxy.js:
  • Updated error message.
  • stress/proxy-dont-infinite-loop.js: Removed.
  • stress/proxy-json-path.js: Removed.
  • stress/rest-parameter-allocation-elimination-watchpoints-6.js: Removed.
  • Removed these tests because the issue they are testing relies on being able to set Object.prototype.proto to something else (which is now not possible).

Source/JavaScriptCore:

  • runtime/JSObject.cpp:

(JSC::JSObject::setPrototypeWithCycleCheck):

  • runtime/JSTypeInfo.h:

(JSC::TypeInfo::isImmutablePrototypeExoticObject):

  • runtime/Structure.h:
  • Add flag for declaring immutable prototype exotic objects.
  • runtime/ObjectConstructor.cpp:

(JSC::objectConstructorSetPrototypeOf):

  • Use better error messages.

Source/WebCore:

Make all objects in window.proto's prototype chain immutable prototype exotic
objects. This gives us roughly equivalent behavior to other browsers.

Firefox's behavior differ slightly in that Firefox will fail any attempted
assignment their proto, while the immutable prototype exotic objects will
only fail if the assignment is of a different value. See
https://tc39.github.io/ecma262/#sec-immutable-prototype-exotic-objects.

Chrome differs in that assignment to window.proto is also handled like an
immutable prototype exotic object. Instead we adhere to the current HTML spec
that says that the assignment should fail unconditionally. See
https://html.spec.whatwg.org/#the-windowproxy-exotic-object and
https://html.spec.whatwg.org/#windowproxy-setprototypeof.

If the HTML spec is changed to make the WindowProxy and Location objects into
immutable prototype exotic objects later, we can update to match the spec then.

Test: js/prototype-assignment.html

  • bindings/js/JSDOMWindowProperties.h:
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHeader):
(GeneratePrototypeDeclaration):

  • bindings/scripts/IDLAttributes.txt:
  • dom/EventTarget.idl:
  • page/DOMWindow.idl:

LayoutTests:

The new prototype-assignment.js test is currently only enabled for LLInt only
run in the JSC tests until webkit.org/b/165401 is fixed.

  • TestExpectations:
  • Skip js/prototype-assignment.html for now until webkit.org/b/165401 is fixed.
  • http/tests/security/window-named-valueOf-expected.txt:
  • js/dom/proxy-is-not-allowed-in-global-prototype-chain-expected.txt:
  • js/dom/proxy-is-not-allowed-in-global-prototype-chain.html:
  • Updated error messages.
  • js/prototype-assignment-expected.txt: Added.
  • js/prototype-assignment.html: Added.
  • js/script-tests/prototype-assignment.js: Added.

(else):
(reportError):
(shouldEqual):
(shouldThrow):
(stringify):
(makeTestID):
(doInternalSetPrototypeOf):
(ordinarySetPrototypeOf):
(setImmutablePrototype):
(windowProxySetPrototypeOf):
(initSetterExpectation):
(throwIfNoExceptionPending):
(objectSetPrototypeOf):
(setUnderscoreProto):
(reflectSetPrototypeOf):
(newObjectProto.toString):
(this.testObject.targets.push.value):
(this.testProxy.targets.push.setPrototypeOf):
(Symbol):
(test):
(runTests):

  • js/setPrototypeOf-expected.txt:
2:38 PM Changeset in webkit [209423] by akling@apple.com
  • 4 edits in trunk/Source

[Cocoa] Add some memory usage related information to sysdiagnose state dumps
<https://webkit.org/b/165375>
<rdar://problem/29057243>

Reviewed by Darin Adler.

Follow-up to address two more review comments.

Source/WebCore:

  • page/PerformanceLogging.cpp:

(WebCore::PerformanceLogging::javaScriptObjectCounts): Use WTFMove() when returning the
HashCountedSet to avoid making an extra copy.

Source/WebKit2:

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::registerWithStateDumper): Use adoptNS() instead of autorelease for NSStrings.

2:32 PM Changeset in webkit [209422] by eric.carlson@apple.com
  • 12 edits
    4 adds in trunk/Source/WebKit2

[MediaStream][Mac] Revoke sandbox extensions when capture ends
https://bugs.webkit.org/show_bug.cgi?id=165476

Reviewed by Brady Eidson.

Track media capture by process so it is possible to revoke the sandbox extensions issued to
a web process when capture stops.

  • CMakeLists.txt: Add new files.
  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::UserMediaPermissionRequestManagerProxy): Register

with process manager.

(WebKit::UserMediaPermissionRequestManagerProxy::~UserMediaPermissionRequestManagerProxy):
(WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted): Move sandbox

extension code to the process manager.

(WebKit::UserMediaPermissionRequestManagerProxy::stopCapture): New.
(WebKit::UserMediaPermissionRequestManagerProxy::startedCaptureSession): New, report state

change to the process manager.

(WebKit::UserMediaPermissionRequestManagerProxy::endedCaptureSession): Ditto.

  • UIProcess/UserMediaPermissionRequestManagerProxy.h:
  • UIProcess/UserMediaProcessManager.cpp: Added.

(WebKit::ProcessState::ProcessState):
(WebKit::ProcessState::managers):
(WebKit::ProcessState::sandboxExtensionsGranted):
(WebKit::ProcessState::setSandboxExtensionsGranted):
(WebKit::stateMap):
(WebKit::processState):
(WebKit::ProcessState::addRequestManager):
(WebKit::ProcessState::removeRequestManager):
(WebKit::UserMediaProcessManager::singleton):
(WebKit::UserMediaProcessManager::addUserMediaPermissionRequestManagerProxy):
(WebKit::UserMediaProcessManager::removeUserMediaPermissionRequestManagerProxy):
(WebKit::UserMediaProcessManager::willCreateMediaStream):
(WebKit::UserMediaProcessManager::startedCaptureSession):
(WebKit::UserMediaProcessManager::endedCaptureSession):

  • UIProcess/UserMediaProcessManager.h: Added.
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::isPlayingMediaDidChange): Report capture state changes to the request

manager proxy.

  • UIProcess/WebPageProxy.h:
  • WebKit2.xcodeproj/project.pbxproj: Add new files.
  • WebProcess/MediaStream/MediaDeviceSandboxExtensions.cpp: Added.

(WebKit::MediaDeviceSandboxExtensions::MediaDeviceSandboxExtensions):
(WebKit::MediaDeviceSandboxExtensions::encode):
(WebKit::MediaDeviceSandboxExtensions::decode):
(WebKit::MediaDeviceSandboxExtensions::operator[]):
(WebKit::MediaDeviceSandboxExtensions::size):

  • WebProcess/MediaStream/MediaDeviceSandboxExtensions.h: Added.
  • WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:

(WebKit::UserMediaPermissionRequestManager::~UserMediaPermissionRequestManager): Sandbox extension

is now in a HashMap, not a Vector.

(WebKit::UserMediaPermissionRequestManager::grantUserMediaDeviceSandboxExtensions): Record

IDs with extensions so they can be revoked later.

(WebKit::UserMediaPermissionRequestManager::revokeUserMediaDeviceSandboxExtensions): New.
(WebKit::UserMediaPermissionRequestManager::grantUserMediaDevicesSandboxExtension): Deleted.

  • WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::grantUserMediaDeviceSandboxExtensions):
(WebKit::WebPage::revokeUserMediaDeviceSandboxExtensions):
(WebKit::WebPage::grantUserMediaDevicesSandboxExtension): Deleted.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
2:31 PM Changeset in webkit [209421] by hyatt@apple.com
  • 3 edits
    2 adds in trunk

REGRESSION (Safari 10): Scrolling not working inside height 100% table
https://bugs.webkit.org/show_bug.cgi?id=164366
<rdar://problem/29095535>

Reviewed by Zalan Bujtas.

Source/WebCore:

Added fast/table/overflow-percent-height-regression.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computePercentageLogicalHeight):
This patch wasn't merged correctly from Blink. The value returned needed
to be 0, not unset.

LayoutTests:

  • fast/table/overflow-percent-height-regression-expected.html: Added.
  • fast/table/overflow-percent-height-regression.html: Added.
2:21 PM Changeset in webkit [209420] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Rebaseline fast/shadow-dom/slotted-pseudo-element-css-text.html after r209396.

Unreviewed test gardening.

  • fast/shadow-dom/slotted-pseudo-element-css-text-expected.txt:
2:10 PM Changeset in webkit [209419] by Simon Fraser
  • 4 edits in trunk/LayoutTests

Mark two tiled-drawing tests as flakey. Layout viewport rect computation has issues in subframes,
covered by https://bugs.webkit.org/show_bug.cgi?id=165489.

  • platform/mac-wk2/TestExpectations:
  • tiled-drawing/scrolling/frames/coordinated-frame-gain-scrolling-ancestor-expected.txt:
  • tiled-drawing/scrolling/frames/coordinated-frame-lose-scrolling-ancestor-expected.txt:
1:59 PM Changeset in webkit [209418] by andersca@apple.com
  • 3 edits
    2 adds in trunk/Source/WebKit2

Add a new MachMessage class and use it for sending outgoing messages
https://bugs.webkit.org/show_bug.cgi?id=165484

Reviewed by Sam Weinig.

  • Platform/IPC/mac/ConnectionMac.mm:

(IPC::Connection::sendOutgoingMessage):
Instead of trying to randomly use memory from the stack as well as using mmap for the message data for out of line messages
(which makes no sense at all, since the body data is already mmapped), just always create a MachMessage object and use it.

(IPC::machMessageSize): Deleted.
This has been moved to MachMessage::messageSize().

  • Platform/IPC/mac/MachMessage.cpp: Added.

(IPC::MachMessage::create):
Allocate extra memory to store the actual buffer.

(IPC::MachMessage::MachMessage):
Initialize variables. m_size isn't really used right now, but will be in a subsequent patch.

(IPC::MachMessage::header):
Return the header.

  • Platform/IPC/mac/MachMessage.h: Added.

(IPC::MachMessage::length):

  • WebKit2.xcodeproj/project.pbxproj:

Add new files.

1:52 PM Changeset in webkit [209417] by weinig@apple.com
  • 4 edits in trunk/Source/WebCore

REGRESSION: media/track LayoutTests are flaky failures
https://bugs.webkit.org/show_bug.cgi?id=165432

Reviewed by Antoine Quint.

RenderThemeMac was caching the media controls script / style sheets
and not being invalidated when the RuntimeEnabledFeatures changed. So,
we can just cache both.

  • bindings/generic/RuntimeEnabledFeatures.h:

Initialize m_areModernMediaControlsEnabled to false.

  • rendering/RenderThemeMac.h:
  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::mediaControlsStyleSheet):
(WebCore::RenderThemeMac::mediaControlsScript):
Have separate caches for the modern and legacy media control scripts/style sheets.

1:45 PM Changeset in webkit [209416] by weinig@apple.com
  • 3 edits in trunk/Source/WebCore

DumpRenderTree crashed in com.apple.WebCore: WebCore::MockMediaEndpoint::generateDtlsInfo const + 23
https://bugs.webkit.org/show_bug.cgi?id=165486
<rdar://problem/29149588>

Reviewed by Tim Horton.

The MockMediaEndpoint can be destroyed before the task created in MockMediaEndpoint::generateDtlsInfo()
gets a chance to run, so guard it with a weak pointer.

  • platform/mock/MockMediaEndpoint.cpp:

(WebCore::MockMediaEndpoint::MockMediaEndpoint):
(WebCore::MockMediaEndpoint::generateDtlsInfo):

  • platform/mock/MockMediaEndpoint.h:
1:40 PM Changeset in webkit [209415] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Add HTML interactive form validation blacklist for some WebKit-specific sites
https://bugs.webkit.org/show_bug.cgi?id=165470
<rdar://problem/29509424>

Reviewed by Simon Fraser.

Add HTML interactive form validation blacklist for some WebKit-specific sites
expecting our old behavior, until they get a chance to be updated.

  • html/HTMLFormElement.cpp:

(WebCore::isURLBlacklistedForInteractiveFormValidation):
(WebCore::HTMLFormElement::prepareForSubmission):

1:34 PM Changeset in webkit [209414] by Chris Dumez
  • 4 edits in trunk/Source/WebCore

Unreviewed, rollout r209050.

This change may impact other popovers than the HTML validation one.
The previous code is safer.

  • platform/ValidationBubble.h:
  • platform/ios/ValidationBubbleIOS.mm:

(-[WebValidationBubbleDelegate adaptivePresentationStyleForPresentationController:traitCollection:]):
(WebCore::ValidationBubble::setAnchorRect):

  • platform/spi/ios/UIKitSPI.h:
1:03 PM Changeset in webkit [209413] by msaboff@apple.com
  • 2 edits in trunk/Source/WTF

REGRESSION(r209399): Causes crashes when dumping JIT disassembly
https://bugs.webkit.org/show_bug.cgi?id=165483

Reviewed by Geoffrey Garen.

Fixed the RELEASE_ASSERT() to check that the 6 character string is terminated by a null
character.

  • wtf/SixCharacterHash.cpp:

(WTF::sixCharacterHashStringToInteger):

12:33 PM Changeset in webkit [209412] by hyatt@apple.com
  • 4 edits in trunk/LayoutTests

REGRESSION (r209396): animations/font-variations/font-variation-settings* tests timing out
https://bugs.webkit.org/show_bug.cgi?id=165475

Reviewed by Myles C. Maxfield.

The new parser only allows strings for @keyframe names when @-webkit-keyframe is used. Patch
the tests to use identifiers instead.

  • animations/font-variations/font-variation-settings-order.html:
  • animations/font-variations/font-variation-settings-unlike.html:
  • animations/font-variations/font-variation-settings.html:
12:00 PM Changeset in webkit [209411] by Simon Fraser
  • 21 edits
    6 adds in trunk

Improve the behavior of scroll-into-view when the target is inside position:fixed
https://bugs.webkit.org/show_bug.cgi?id=165354

Reviewed by Zalan Bujtas.
Source/WebCore:

The existing RenderLayer::scrollRectToVisible() code paid no heed to whether the
target was inside position:fixed, resulting in unwanted scrolls.

Fix this by plumbing through from the call sites a "insideFixed" flag which we get
when we call localToAbsolute(), and use this flag to avoid scrolling at all if
unzoomed.

If zoomed and we're focussing something inside position:fixed, and if visual viewports
are enabled, we can compute the visual viewport required to reveal the target rect,
which gives us the ideal scroll position.

Fix a bug on non-iOS platforms when zoomed, which is to scale the viewRect since
frameView.visibleContentRect() gives an unscaled rect on those platforms.

Not all callers of scrollRectToVisible() are fixed, but those that are not will get
the current behavior.

Tests: fast/overflow/scroll-anchor-in-position-fixed.html

fast/visual-viewport/zoomed-scroll-into-view-fixed.html
fast/visual-viewport/zoomed-scroll-to-anchor-in-position-fixed.html

  • dom/Element.cpp:

(WebCore::Element::scrollIntoView):
(WebCore::Element::scrollIntoViewIfNeeded):
(WebCore::Element::scrollIntoViewIfNotVisible):
(WebCore::Element::updateFocusAppearance):

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::FrameSelection):
(WebCore::FrameSelection::absoluteCaretBounds):
(WebCore::FrameSelection::recomputeCaretRect):
(WebCore::FrameSelection::revealSelection):

  • editing/FrameSelection.h:
  • editing/VisiblePosition.cpp:

(WebCore::VisiblePosition::absoluteCaretBounds):

  • editing/VisiblePosition.h:
  • editing/htmlediting.cpp:

(WebCore::absoluteBoundsForLocalCaretRect):

  • editing/htmlediting.h:
  • page/FrameView.cpp:

(WebCore::FrameView::scrollElementToRect):
(WebCore::FrameView::scrollToAnchor):

  • page/PrintContext.cpp:

(WebCore::PrintContext::outputLinkedDestinations):

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::getLeadingCorner):
(WebCore::RenderElement::getTrailingCorner):
(WebCore::RenderElement::absoluteAnchorRect):
(WebCore::RenderElement::anchorRect): Deleted.

  • rendering/RenderElement.h:
  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::scrollRectToVisible):
(WebCore::RenderLayer::getRectToExpose):
(WebCore::RenderLayer::autoscroll):

  • rendering/RenderLayer.h:
  • rendering/RenderObject.cpp:

(WebCore::RenderObject::scrollRectToVisible):

  • rendering/RenderObject.h:

Source/WebKit/mac:

Plumb through 'insideFixed'. We don't get compute it, so behavior from
these call sites won't change.

  • WebView/WebFrame.mm:

(-[WebFrame _scrollDOMRangeToVisible:]):
(-[WebFrame _scrollDOMRangeToVisible:withInset:]):

LayoutTests:

  • fast/overflow/scroll-anchor-in-position-fixed-expected.txt: Added.
  • fast/overflow/scroll-anchor-in-position-fixed.html: Added.
  • fast/transforms/selection-bounds-in-transformed-view.html:
  • fast/visual-viewport/zoomed-scroll-into-view-fixed-expected.txt: Added.
  • fast/visual-viewport/zoomed-scroll-into-view-fixed.html: Added.
  • fast/visual-viewport/zoomed-scroll-to-anchor-in-position-fixed-expected.txt: Added.
  • fast/visual-viewport/zoomed-scroll-to-anchor-in-position-fixed.html: Added.
  • platform/ios-simulator/TestExpectations:
11:54 AM Changeset in webkit [209410] by mmaxfield@apple.com
  • 4 edits
    2 adds in trunk

[Cocoa] REGRESSION(r205396): Intermediate CTRuns with initial advances get double counted when glyph origins are enabled
https://bugs.webkit.org/show_bug.cgi?id=165084

Reviewed by Simon Fraser.

Source/WebCore:

When glyph origins are not enabled, an intermediate CTRun's initial advance is simply added
to the previous glyph's advance. However, when glyph origins are enabled, this shouldn't
occur.

Test: fast/text/initial-advance-in-intermediate-run-complex.html

  • platform/graphics/mac/ComplexTextController.cpp:

(WebCore::ComplexTextController::adjustGlyphsAndAdvances):

LayoutTests:

  • fast/text/initial-advance-in-intermediate-run-complex-expected.html: Added.
  • fast/text/initial-advance-in-intermediate-run-complex.html: Added.
  • platform/ios-simulator/TestExpectations: Disable the test on iOS because it relies

on Arial being used to draw Arabic, which we explicitly don't allow.

11:39 AM Changeset in webkit [209409] by Simon Fraser
  • 56 edits
    1 delete in trunk

Enable visual viewports by default on Mac, and iOS Wk2
https://bugs.webkit.org/show_bug.cgi?id=165452

Reviewed by Zalan Bujtas.

Source/WebCore:

Some tests revealed an issue where, during scrollbar updates, the visual viewport would be
15px wider than the layout viewport, which results in the layout viewport shifting 15px to the
right. Prevent this by disallowing viewport updates during the AdjustViewSize phase; we'll
be called again in postLayoutTasks.

  • page/FrameView.cpp:

(WebCore::FrameView::updateLayoutViewport):

Source/WebKit/mac:

Turn visual viewports on by default for WK1 on Mac.

  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):

Source/WebKit2:

Turn visual viewports on by default for WK2.

  • Shared/WebPreferencesDefinitions.h:

LayoutTests:

Skip, fix or adjust tests for visual viewports.

  • TestExpectations:
  • animations/trigger-container-scroll-boundaries.html:
  • animations/trigger-container-scroll-empty.html:
  • animations/trigger-container-scroll-simple.html:
  • compositing/geometry/fixed-position-composited-page-scale-smaller-than-viewport.html:
  • compositing/layer-creation/fixed-position-out-of-view-scaled-expected.txt:
  • compositing/layer-creation/fixed-position-out-of-view-scaled-scroll-expected.txt:
  • fast/scrolling/ios/remove-scrolling-role-expected.txt:
  • fast/zooming/client-rect-in-fixed-zoomed-expected.txt:
  • fast/zooming/client-rect-in-fixed-zoomed.html:
  • platform/ios-simulator-wk2/compositing/geometry/fixed-in-composited-expected.txt: Removed.
  • platform/ios-simulator-wk2/compositing/geometry/limit-layer-bounds-fixed-expected.txt:
  • platform/ios-simulator-wk2/compositing/geometry/limit-layer-bounds-fixed-positioned-expected.txt:
  • platform/ios-simulator-wk2/compositing/layer-creation/fixed-position-under-transform-expected.txt:
  • platform/ios-simulator-wk2/compositing/layer-creation/no-compositing-for-sticky-expected.txt:
  • platform/ios-simulator-wk2/fast/overflow/position-fixed-transform-clipping-expected.txt:
  • platform/ios-simulator/compositing/absolute-inside-out-of-view-fixed-expected.txt:
  • platform/ios-simulator/compositing/geometry/fixed-in-composited-expected.txt:
  • scrollingcoordinator/ios/non-stable-viewport-scroll-expected.txt:
  • scrollingcoordinator/ios/ui-scrolling-tree-expected.txt:
  • tiled-drawing/fixed-layout-size-fixed-attachment-cover.html:
  • tiled-drawing/fixed-layout-size-fixed-attachment-local.html:
  • tiled-drawing/scrolling/clamp-out-of-bounds-scrolls-expected.txt:
  • tiled-drawing/scrolling/fixed-background/fixed-body-background-zoomed-expected.txt:
  • tiled-drawing/scrolling/fixed/absolute-inside-fixed-expected.txt:
  • tiled-drawing/scrolling/fixed/absolute-inside-out-of-view-fixed-expected.txt:
  • tiled-drawing/scrolling/fixed/fixed-in-overflow-expected.txt:
  • tiled-drawing/scrolling/fixed/fixed-position-out-of-view-expected.txt:
  • tiled-drawing/scrolling/fixed/fixed-position-out-of-view-negative-zindex-expected.txt:
  • tiled-drawing/scrolling/fixed/four-bars-expected.txt:
  • tiled-drawing/scrolling/fixed/four-bars-with-header-and-footer-expected.txt:
  • tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt:
  • tiled-drawing/scrolling/fixed/negative-scroll-offset-expected.txt:
  • tiled-drawing/scrolling/fixed/negative-scroll-offset-in-view-expected.txt:
  • tiled-drawing/scrolling/fixed/nested-fixed-expected.txt:
  • tiled-drawing/scrolling/fixed/percentage-inside-fixed-expected.txt:
  • tiled-drawing/scrolling/frames/coordinated-frame-expected.txt:
  • tiled-drawing/scrolling/frames/coordinated-frame-gain-scrolling-ancestor-expected.txt:
  • tiled-drawing/scrolling/frames/coordinated-frame-in-fixed-expected.txt:
  • tiled-drawing/scrolling/frames/coordinated-frame-lose-scrolling-ancestor-expected.txt:
  • tiled-drawing/scrolling/frames/fixed-inside-frame-expected.txt:
  • tiled-drawing/scrolling/frames/frameset-frame-scrollability-expected.txt:
  • tiled-drawing/scrolling/frames/frameset-nested-frame-scrollability-expected.txt:
  • tiled-drawing/scrolling/frames/remove-coordinated-frame-expected.txt:
  • tiled-drawing/scrolling/frames/scroll-region-after-frame-layout-expected.txt:
  • tiled-drawing/scrolling/scrolling-tree-after-scroll-expected.txt:
  • tiled-drawing/scrolling/scrolling-tree-slow-scrolling-expected.txt:
  • tiled-drawing/scrolling/sticky/negative-scroll-offset-expected.txt:
  • tiled-drawing/scrolling/sticky/sticky-horizontal-expected.txt:
  • tiled-drawing/scrolling/sticky/sticky-vertical-expected.txt:
11:35 AM Changeset in webkit [209408] by dbates@webkit.org
  • 7 edits in trunk

WebKitTestRunner: Plugins are disabled in new windows
https://bugs.webkit.org/show_bug.cgi?id=165410

Reviewed by Alex Christensen.

Source/WebKit2:

Remove SPI exposed to explicitly toggle plugins from WebKitTestRunner.
Instead we will update WebKitTestRunner to make use of the SPI
WKBundleOverrideBoolPreferenceForTestRunner() to toggle plugins in
all windows.

  • WebProcess/InjectedBundle/API/c/WKBundle.cpp:

(WKBundleSetPluginsEnabled): Deleted.

  • WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::setPluginsEnabled): Deleted.

Tools:

Currently WebKitTestRunner only enables plugins in the main window. So, a test that opens
a new window and loads a plugin will fail. We should enable plugins in all windows by
default. Moreover toggling testRunner.setPluginsEnabled() should effect all windows.

Making these changes is a step towards running plugins/open-and-close-window-with-plugin.html
in WebKitTestRunner (we still need to fix <https://bugs.webkit.org/show_bug.cgi?id=46714>) and
will make the behavior of WebKitTestRunner more closely match the behavior DumpRenderTree.

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::beginTesting): Call TestRunner::setPluginsEnabled() instead of
WKBundleSetPluginsEnabled().

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setPluginsEnabled): Take a similar approach as TestRunner::setXSSAuditorEnabled()
and make use of WKBundleOverrideBoolPreferenceForTestRunner().

11:20 AM Changeset in webkit [209407] by andersca@apple.com
  • 4 edits in trunk/Source/WebKit2

Don't memcpy out of line data
https://bugs.webkit.org/show_bug.cgi?id=165434

Reviewed by Sam Weinig.

Change the Decoder constructor to take a buffer deallocator parameter. If the buffer deallocator is null, the
data will be copied as before. Otherwise, the memory will be adopted by the Decoder object, and will be deallocated
by invoking the data deallocator.

  • Platform/IPC/Decoder.cpp:

(IPC::copyBuffer):
Add a new helper.

(IPC::Decoder::Decoder):
Copy the buffer if the deallocator is null.

(IPC::Decoder::~Decoder):
Invoke the deallocator or call fastFree if it is null.

(IPC::Decoder::unwrapForTesting):
Update constructor.

(IPC::roundUpToAlignment):
(IPC::Decoder::alignBufferPosition):
(IPC::Decoder::decodeVariableLengthByteArray):
(IPC::decodeValueFromBuffer):
Change all these to deal with const pointers.

  • Platform/IPC/Decoder.h:

Add new members.

  • Platform/IPC/mac/ConnectionMac.mm:

(IPC::createMessageDecoder):
When we have out of line data, pass a deallocator that calls vm_deallocate, instead of copying the data
and then immediately throwing the original away.

11:07 AM Changeset in webkit [209406] by Ryan Haddad
  • 6 edits in trunk/LayoutTests

Skip modern-media-controls tests until flakiness can be resolved.
https://bugs.webkit.org/show_bug.cgi?id=164784

Unreviewed test gardening.

  • TestExpectations:
  • platform/ios-simulator-wk2/TestExpectations:
  • platform/ios-simulator/TestExpectations:
  • platform/mac-wk1/TestExpectations:
  • platform/mac/TestExpectations:
10:24 AM Changeset in webkit [209405] by timothy_horton@apple.com
  • 14 edits
    2 adds in trunk/Source/WebKit2

Almost half-second stall scrolling apple.com because of synchronous getPositionInformation
https://bugs.webkit.org/show_bug.cgi?id=165403
<rdar://problem/29493285>

Reviewed by Enrica Casucci.

When retrieving interaction information, we don't always need to do
snapshots for 3D Touch or the action sheet, especially if we're
synchronously blocking the UI process main thread waiting for the reply.

Add a new InteractionInformationRequest, which allows callers of
getPositionInformation and requestPositionInformation to specify which
optional pieces of information they would like to compute.

  • Shared/AssistedNodeInformation.h:

Fix a incorrect comment.

  • Shared/ios/InteractionInformationRequest.cpp: Added.

(WebKit::InteractionInformationRequest::encode):
(WebKit::InteractionInformationRequest::decode):
(WebKit::InteractionInformationRequest::isValidForRequest):

  • Shared/ios/InteractionInformationRequest.h: Added.

(WebKit::InteractionInformationRequest::InteractionInformationRequest):

  • WebKit2.xcodeproj/project.pbxproj:

Add InteractionInformationRequest, which encapsulates all of the
parameters required to generate an InteractionInformationAtPosition.
Previously, that was just a point, but now we have two new parameters:
whether we should generate a snapshot of the element, and whether
we should generate a TextIndicator if the element is a link.

  • Shared/ios/InteractionInformationAtPosition.h:
  • Shared/ios/InteractionInformationAtPosition.mm:

(WebKit::InteractionInformationAtPosition::encode):
(WebKit::InteractionInformationAtPosition::decode):
(WebKit::InteractionInformationAtPosition::mergeCompatibleOptionalInformation):
Adopt InteractionInformationRequest.

  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::getPositionInformation):
(WebKit::WebPageProxy::requestPositionInformation):

  • UIProcess/ios/WKActionSheetAssistant.mm:

(-[WKActionSheetAssistant initialPresentationRectInHostViewForSheet]):
(-[WKActionSheetAssistant presentationRectInHostViewForSheet]):
(-[WKActionSheetAssistant showImageSheet]):
(-[WKActionSheetAssistant showLinkSheet]):

  • UIProcess/ios/WKPDFView.mm:

(-[WKPDFView annotation:isBeingPressedAtPoint:controller:]):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:

Adopt InteractionInformationRequest.

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _showAttachmentSheet]):
(-[WKContentView ensurePositionInformationIsUpToDate:]):
If we have a outstanding asynchronous position information request
for the current point, instead of sending a second separate request,
just wait for the async one to come in.

(-[WKContentView requestAsynchronousPositionInformationUpdate:]):
If asked to do an asynchronous request with more optional bits than
the current otherwise-valid response's request, update the position information.

(-[WKContentView gestureRecognizerShouldBegin:]):
The design of this mechanism is that during the highlight long press,
we do an async position information update, and then when we actually
begin a 3D Touch gesture, we hope to already have the requisite snapshots
ready (so that we can avoid synchronously blocking for them, there).
So, in the highlight long-press async request, ask for all the goodies.

(-[WKContentView hasSelectablePositionAtPoint:]):
(-[WKContentView pointIsNearMarkedText:]):
(-[WKContentView pointIsInAssistedNode:]):
(-[WKContentView _didNotHandleTapAsClick:]):
(-[WKContentView _positionInformationDidChange:]):
If we get a position information update for the same point, but with less
goodies attached (the snapshot/link indicator), copy them over from the old
position information, so that we never accidentally "downgrade" our info.

(-[WKContentView updatePositionInformationForActionSheetAssistant:]):
(-[WKContentView actionSheetAssistant:willStartInteractionWithElement:]):
(-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
(-[WKContentView _dataForPreviewItemController:atPosition:type:]):
(-[WKContentView _presentedViewControllerForPreviewItemController:]):
More adoption.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::handleTap):
(WebKit::WebPage::handleTwoFingerTapAtPoint):
(WebKit::WebPage::commitPotentialTap):
Adopt InteractionInformationRequest.

(WebKit::WebPage::getPositionInformation):
(WebKit::WebPage::requestPositionInformation):
Copy the request into the response.
Only snapshot if the request wants a snapshot.
Only make a link indicator if the request wants one.

9:58 AM Changeset in webkit [209404] by dbates@webkit.org
  • 2 edits
    1 add
    8 deletes in trunk/LayoutTests

Make fast/selectors/040.html actually test background-color painting for ::selection when run in DRT
https://bugs.webkit.org/show_bug.cgi?id=79694

Reviewed by Beth Dakin.

Currently the test case fast/selectors/040.html doesn't actually test that we
honor the background-color of ::selection when run in DRT. In particular, it
doesn't programmatically select any text and hence the DRT results reflect a
paragraph of non-selected text. Instead, we should programmatically select the
test paragraph so that DRT can capture the painting of background-color for ::selection.

  • fast/selectors/040-expected.html: Added.
  • fast/selectors/040.html:
  • platform/efl/fast/selectors/040-expected.png: Removed.
  • platform/efl/fast/selectors/040-expected.txt: Removed.
  • platform/gtk/fast/selectors/040-expected.png: Removed.
  • platform/gtk/fast/selectors/040-expected.txt: Removed.
  • platform/ios-simulator/fast/selectors/040-expected.txt: Removed.
  • platform/mac/fast/selectors/040-expected.png: Removed.
  • platform/mac/fast/selectors/040-expected.txt: Removed.
  • platform/win/fast/selectors/040-expected.txt: Removed.
9:46 AM Changeset in webkit [209403] by dbates@webkit.org
  • 8 edits in trunk/Source

Cleanup: Rename some HTTP 0.9-specific functions to conform to WebKit Code Style Guidelines
https://bugs.webkit.org/show_bug.cgi?id=165451

Reviewed by Alex Christensen.

Source/WebCore:

Rename Document::shouldEnforceHTTP0_9Sandbox() and ResourceResponseBase::isHttpVersion0_9()
to Document::shouldEnforceHTTP09Sandbox() and ResourceResponseBase::isHTTP09, respectively,
to conform to the WebKit Code Style Guidelines.

  • dom/Document.cpp:

(WebCore::Document::initSecurityContext):
(WebCore::Document::shouldEnforceHTTP09Sandbox): Renamed; formerly named shouldEnforceHTTP0_9Sandbox

  • dom/Document.h:
  • platform/network/ResourceHandle.cpp:

(WebCore::ResourceHandle::didReceiveResponse):

  • platform/network/ResourceResponseBase.cpp:

(WebCore::ResourceResponseBase::isHTTP09): Renamed; formerly named isHttpVersion0_9.

  • platform/network/ResourceResponseBase.h:

Source/WebKit2:

  • NetworkProcess/NetworkDataTask.cpp:

(WebKit::NetworkDataTask::didReceiveResponse):

9:46 AM Changeset in webkit [209402] by dbates@webkit.org
  • 3 edits in trunk/Source/WebKit2

Remove unused InjectedBundle::overrideXSSAuditorEnabledForTestRunner()
https://bugs.webkit.org/show_bug.cgi?id=165408

Reviewed by Alex Christensen.

InjectedBundle::overrideXSSAuditorEnabledForTestRunner() is unused. This function was only
called by WKBundleOverrideXSSAuditorEnabledForTestRunner(), which was removed in r106005.

  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::overrideXSSAuditorEnabledForTestRunner): Deleted.

  • WebProcess/InjectedBundle/InjectedBundle.h:
9:45 AM Changeset in webkit [209401] by dbates@webkit.org
  • 3 edits in trunk/LayoutTests

Test insecure-xhr-sync-in-main-frame.html fails with CORS error if run before r203542
https://bugs.webkit.org/show_bug.cgi?id=165407

Reviewed by Alexey Proskuryakov.

Make the test insecure-xhr-sync-in-main-frame.html demonstrate a mixed content failure
instead of a CORS failure when run before r203542.

In r203542 the test http/tests/security/mixedContent/insecure-xhr-sync-in-main-frame.html
was added to ensure that we block loading insecure data via XHR from an HTTPS page. When
this test is run prior to r203542 it fails due to a CORS errors as opposed to showing
the intended JavaScript alert failure message. The CORS error is due to loading a
cross-origin resource that did not return an appropriate Access-Control-Allow-Origin header
to allow reading of the response.

  • http/tests/security/mixedContent/insecure-xhr-sync-in-main-frame-expected.txt: Update expected result

based on the change below.

  • http/tests/security/mixedContent/resources/insecure-xhr-sync-in-main-frame-window.html:

Load a resource that returns "Access-Control-Allow-Origin: *" so that origin (http, 127.0.0.1, 8000)
can read the response returned from origin (https, 127.0.0.1, 8443).

9:42 AM Changeset in webkit [209400] by dbates@webkit.org
  • 16 edits in trunk/Source/WebCore

Use Vector::uncheckedAppend() in more places
https://bugs.webkit.org/show_bug.cgi?id=164952

Reviewed by Darin Adler.

We can use Vector::uncheckedAppend() whenever the number of items that will be appended
to a vector is equal to or less than its capacity. Using Vector::uncheckedAppend() is
more efficient than Vector::append() as it avoids checking the capacity of the vector
before appending a value to the end of it.

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::SerializedScriptValue::SerializedScriptValue):

  • contentextensions/DFABytecodeCompiler.cpp:

(WebCore::ContentExtensions::DFABytecodeCompiler::extractJumpTable):

  • contentextensions/DFAMinimizer.cpp:
  • css/StyleProperties.cpp:

(WebCore::StyleProperties::copyPropertiesInSet): Use Vector::uncheckedAppend() and inline
the assignment of the temporary variable value into the if condition to limit its scope
as it is referenced exactly once in the loop body.

  • css/StyleRule.cpp:

(WebCore::StyleRuleGroup::StyleRuleGroup): Use Vector::uncheckedAppend() and write for-loop
using a C++11 range-based for-loop.

  • css/parser/CSSParserValues.cpp:

(WebCore::CSSParserSelector::setLangArgumentList):

  • cssjit/SelectorCompiler.cpp:

(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthLastChildOf):

  • dom/DocumentMarkerController.cpp:

(WebCore::updateRenderedRectsForMarker):

  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:

(WebCore::convertToLayoutUnits):

  • platform/audio/AudioBus.cpp:

(WebCore::AudioBus::AudioBus):

  • platform/graphics/FontCache.cpp:

(WebCore::FontCache::purgeInactiveFontData):

  • platform/graphics/PathUtilities.cpp:

(WebCore::polygonsForRect):

  • platform/mediastream/CaptureDeviceManager.cpp:

(CaptureDeviceManager::bestSourcesForTypeAndConstraints):

  • platform/mediastream/RealtimeMediaSource.cpp:

(WebCore::RealtimeMediaSource::fitnessDistance):

  • platform/network/cf/FormDataStreamCFNet.cpp:

(WebCore::formCreate):

9:18 AM Changeset in webkit [209399] by Darin Adler
  • 30 edits in trunk/Source

Use ASCIICType more, and improve it a little bit
https://bugs.webkit.org/show_bug.cgi?id=165360

Reviewed by Sam Weinig.

Source/JavaScriptCore:

  • inspector/InspectorValues.cpp:

(Inspector::readHexDigits): Use isASCIIHexDigit.
(Inspector::hextoInt): Deleted.
(decodeString): Use toASCIIHexValue.

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::parseDigit): Use isASCIIDigit, isASCIIUpper, and isASCIILower.

  • runtime/StringPrototype.cpp:

(JSC::substituteBackreferencesSlow): Use isASCIIDigit.

Source/WebCore:

  • css/CSSGrammar.y.in: Use isASCIIDigit.
  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::parseFontFaceUnicodeRange): Use isASCIIHexDigit and
toASCIIHexValue.
(WebCore::isEqualToCSSIdentifier): Use isASCIILower.

  • html/FormController.cpp:

(WebCore::isNotFormControlTypeCharacter): Use isASCIILower.

  • html/parser/CSSPreloadScanner.cpp:

(WebCore::CSSPreloadScanner::tokenize): Use isASCIIAlpha.

  • platform/Decimal.cpp:

(WebCore::Decimal::fromString): Use isASCIIDigit.

  • platform/FileSystem.cpp:

(WebCore::decodeFromFilename): Use isASCIIHexDigit and toASCIIHexValue.

  • platform/URL.cpp:

(WebCore::isLetterMatchIgnoringCase): Deleted.
(WebCore::isSchemeCharacterMatchIgnoringCase): Deleted.
(WebCore::assertProtocolIsGood): Use isASCIIUpper.
(WebCore::URL::protocolIs): Use isASCIIAlphaCaselessEqual.
(WebCore::URL::parse): Ditto.
(WebCore::protocolIs): Ditto.
(WebCore::protocolIsInHTTPFamily): Ditto.

  • platform/URLParser.cpp:

(WeCore::URLParser::parseIPv4Piece): Use isASCIIDigit.

  • platform/mac/WebCoreNSURLExtras.mm:

(WebCore::isRussianDomainNameCharacter): Use isASCIIDigit.
(WebCore::allCharactersAllowedByTLDRules): Ditto.
(WebCore::dataWithUserTypedString): Use upperNibbleToASCIIHexDigit and
lowerNibbleToASCIIHexDigit.
(WebCore::dataForURLComponentType): Ditto.
(WebCore::createStringWithEscapedUnsafeCharacters): Ditto.
(WebCore::userVisibleString): Use isASCIIHexDigit, toASCIIHexValue,
upperNibbleToASCIIHexDigit, and lowerNibbleToASCIIHexDigit.
(WebCore::isUserVisibleURL): Use isASCIIHexDigit and toASCIIHexValue.

  • platform/network/FormDataBuilder.cpp:

(WebCore::FormDataBuilder::encodeStringAsFormData): Use isASCIIAlphanumeric.

  • rendering/mathml/RenderMathMLToken.cpp:

(WebCore::mathVariant): Use isASCIIUpper, isASCIILower, and isASCIIDigit.

  • svg/SVGParserUtilities.cpp:

(WebCore::genericParseNumber): Use isASCIIDigit.

  • svg/SVGPathStringSource.cpp:

(WebCore::nextCommandHelper): Ditto.

  • xml/XPathParser.cpp:

(WebCore::XPath::Parser::lexNumber): Ditto.
(WebCore::XPath::Parser::nextTokenInternal): Ditto.

Source/WebKit2:

  • WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:

(WebKit::capitalizeRFC822HeaderFieldName): Removed unneeded checks to simplify code.

Source/WTF:

  • wtf/ASCIICType.h: Added declarations of all the functions to the top of the file,

so we have a list of what's available, not just a mix of that and the implementation.

  • wtf/HexNumber.h:

(WTF::Internal::hexDigitsForMode): Moved lowerHexDigits and upperHexDigits
inside this function.
(WTF::appendByteAsHex): Use auto.
(WTF::placeByteAsHexCompressIfPossible): Ditto.
(WTF::placeByteAsHex): Ditto.
(WTF::appendUnsignedAsHex): Ditto.
(WTF::appendUnsigned64AsHex): Ditto.
(WTF::appendUnsignedAsHexFixedSize): Ditto.
(WTF::isHexDigit): Deleted.
(WTF::uncheckedHexDigit): Deleted.
(WTF::hexDigitValue): Deleted.
(WTF::uncheckedHexDigitValue): Deleted.

  • wtf/SixCharacterHash.cpp:

(WTF::sixCharacterHashStringToInteger): Use isASCIIUpper, isASCIILower, and
isASCIIDigit. Also added some FIXMEs; for some reason this function uses
RELEASE_ASSERT to abort if the passed-in string is not six characters long,
and it's not clear to me why this is so critical to assert.
(WTF::integerToSixCharacterHashString): Moved the table inside this function,
obviating the need for a macro named TABLE.

  • wtf/dtoa/bignum.cc:

(WTF::double_conversion::HexCharValue): Deleted.
(WTF::double_conversion::Bignum::AssignHexString): Use toASCIIHexValue.

  • wtf/dtoa/double-conversion.cc:

(WTF::double_conversion::StringToDoubleConverter::StringToDouble): Use isASCIIDigit.

  • wtf/text/StringBuilder.cpp:

(WTF::appendQuotedJSONStringInternal): Use upperNibbleToASCIIHexDigit and
lowerNibbleToASCIIHexDigit.

  • wtf/text/StringImpl.cpp:

(WTF::StringImpl::convertToUppercaseWithoutLocale): Use toASCIIUpper.
Removed the workaround for a bug that was fixed in Visual Studio 2013.

9:14 AM Changeset in webkit [209398] by Ryan Haddad
  • 3 edits in trunk/Source/WebCore

Rebaseline bindings tests after r209390.

Unreviewed test gardening.

  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::convertDictionaryToJS):

  • bindings/scripts/test/JS/JSTestObj.h:
8:55 AM Changeset in webkit [209397] by timothy_horton@apple.com
  • 5 edits in trunk

PDF markup/annotations visible in Mail on macOS but not on iOS
https://bugs.webkit.org/show_bug.cgi?id=165444
<rdar://problem/28942896>

Reviewed by Simon Fraser.

No new tests, but enabled an existing test for this feature.

  • platform/graphics/cg/PDFDocumentImage.cpp:

(WebCore::PDFDocumentImage::drawPDFPage):

  • platform/spi/cg/CoreGraphicsSPI.h:

Make use of CGContextDrawPDFPageWithAnnotations where available,
to paint the page with annotations.

  • platform/ios-simulator/TestExpectations:
8:54 AM Changeset in webkit [209396] by hyatt@apple.com
  • 4 edits in trunk/Source

[CSS Parser] Turn on the new CSS parser
https://bugs.webkit.org/show_bug.cgi?id=165213

Reviewed by Zalan Bujtas.

Source/WebCore:

  • page/Settings.in:

Source/WebKit2:

  • Shared/WebPreferencesDefinitions.h:
8:50 AM Changeset in webkit [209395] by mitz@apple.com
  • 2 edits in trunk/Source/WebCore

Tried to fix the USE(APPLE_INTERNAL_SDK) build after r209385.

  • platform/spi/cocoa/NSTouchBarSPI.h:
8:40 AM Changeset in webkit [209394] by jer.noble@apple.com
  • 6 edits in trunk/Source/WebCore

[pointer-lock] Cursor should become visible when exiting pointer-lock via ESC key.
https://bugs.webkit.org/show_bug.cgi?id=165377

Reviewed by Darin Adler.

Introduce the concept of "force cursor to become visible" when requesting the pointer be
unlocked. ESC events will cause the pointer to become visible, while normal key events
will not.

  • page/EventHandler.cpp:

(WebCore::EventHandler::keyEvent):

  • page/PointerLockController.cpp:

(WebCore::PointerLockController::requestPointerUnlock):
(WebCore::PointerLockController::requestPointerUnlockAndForceCursorVisible):
(WebCore::PointerLockController::documentDetached):
(WebCore::PointerLockController::didLosePointerLock):

  • page/PointerLockController.h:

Drive-by fix: apply Darin's feedback to existing functions:

  • dom/Document.cpp:

(WebCore::Document::prepareForDestruction):

  • dom/Element.cpp:

(WebCore::Element::removedFrom):

  • page/PointerLockController.cpp:

(WebCore::PointerLockController::elementRemoved):
(WebCore::PointerLockController::documentDetached):

7:55 AM Changeset in webkit [209393] by hyatt@apple.com
  • 2 edits in trunk/LayoutTests

[CSS Parser] Avoid more test
https://bugs.webkit.org/show_bug.cgi?id=165463

Reviewed by Zalan Bujtas.

7:34 AM Changeset in webkit [209392] by Csaba Osztrogonác
  • 5 edits in trunk/Source/JavaScriptCore

Add storeFence support for ARMv7
https://bugs.webkit.org/show_bug.cgi?id=164733

Reviewed by Saam Barati.

  • assembler/ARMAssembler.h:

(JSC::ARMAssembler::dmbISHST): Added.

  • assembler/ARMv7Assembler.h: Typo fixed, DMB has only T1 encoding.

(JSC::ARMv7Assembler::dmbSY):
(JSC::ARMv7Assembler::dmbISHST): Added.

  • assembler/MacroAssemblerARM.h:

(JSC::MacroAssemblerARM::storeFence):

  • assembler/MacroAssemblerARMv7.h:

(JSC::MacroAssemblerARMv7::storeFence):

4:16 AM Changeset in webkit [209391] by tpopela@redhat.com
  • 2 edits in trunk/Source/WebKit2

[GTK] Process accelerated compositing env variables only if they are really enabled
https://bugs.webkit.org/show_bug.cgi?id=165300

Don't process the WEBKIT_FORCE_COMPOSITING_MODE and
WEBKIT_DISABLE_COMPOSITING_MODE env variables if they are disabled
(eg. WEBKIT_DISABLE_COMPOSITING_MODE=0).

Reviewed by Michael Catanzaro.

  • UIProcess/gtk/WebPreferencesGtk.cpp:

(WebKit::WebPreferences::platformInitializeStore):

Dec 5, 2016:

11:59 PM Changeset in webkit [209390] by commit-queue@webkit.org
  • 80 edits
    2 deletes in trunk

[WebIDL] Add support for converting dictionaries to JS
https://bugs.webkit.org/show_bug.cgi?id=165367

Patch by Sam Weinig <sam@webkit.org> on 2016-12-06
Reviewed by Darin Adler and Alex Christensen.

Source/WebCore:

  • Adds support for converting dictionary types to JSValues via JSDOMConvert.
  • Adopts that functionality to correct the CryptoKeyPair implementation, which is supposed to be a dictionary. (While doing this, I also update places that were passing both a CryptoKey and CryptoKeyPair to use a Variant, since they always only wanted one.)
  • Re-works DOMPromise and DeferredPromise to be based on JSDOMConvert and IDLTypes.
  • CMakeLists.txt:
  • PlatformEfl.cmake:
  • PlatformGTK.cmake:
  • PlatformMac.cmake:
  • WebCore.xcodeproj/project.pbxproj:

Remove JSCryptoKeyPairCustom.cpp and CryptoKeyPair.cpp.

  • Modules/encryptedmedia/legacy/WebKitMediaKeys.cpp:
  • Modules/mediasource/MediaSource.cpp:
  • Modules/mediasource/SourceBuffer.cpp:
  • bindings/js/JSMediaDevicesCustom.cpp:
  • html/MediaController.cpp:
  • html/track/TextTrack.cpp:

Add some missing includes.

  • Modules/applepay/ApplePaySession.cpp:

(WebCore::ApplePaySession::canMakePaymentsWithActiveCard):
(WebCore::ApplePaySession::openPaymentSetup):

  • Modules/fetch/FetchBody.cpp:

(WebCore::FetchBody::text):
(WebCore::FetchBody::consume):
(WebCore::FetchBody::loadingFailed):

  • Modules/fetch/FetchBodyConsumer.cpp:

(WebCore::FetchBodyConsumer::resolveWithData):
(WebCore::FetchBodyConsumer::resolve):

  • Modules/fetch/FetchBodyOwner.cpp:

(WebCore::FetchBodyOwner::blob):
(WebCore::FetchBodyOwner::formData):
(WebCore::FetchBodyOwner::text):

  • Modules/fetch/FetchResponse.h:
  • Modules/mediastream/MediaDevices.h:
  • Modules/mediastream/MediaEndpointPeerConnection.cpp:

(WebCore::MediaEndpointPeerConnection::replaceTrack):
(WebCore::MediaEndpointPeerConnection::replaceTrackTask):

  • Modules/mediastream/MediaEndpointPeerConnection.h:
  • Modules/mediastream/MediaStreamTrack.cpp:

(WebCore::MediaStreamTrack::applyConstraints):

  • Modules/mediastream/PeerConnectionBackend.cpp:

(WebCore::PeerConnectionBackend::setLocalDescription):
(WebCore::PeerConnectionBackend::setRemoteDescription):
(WebCore::PeerConnectionBackend::addIceCandidate):

  • Modules/mediastream/PeerConnectionBackend.h:
  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::queuedSetLocalDescription):
(WebCore::RTCPeerConnection::queuedSetRemoteDescription):
(WebCore::RTCPeerConnection::queuedAddIceCandidate):
(WebCore::RTCPeerConnection::replaceTrack):

  • Modules/mediastream/RTCPeerConnection.h:
  • Modules/mediastream/RTCRtpSender.cpp:

(WebCore::RTCRtpSender::replaceTrack):

  • Modules/mediastream/RTCRtpSender.h:
  • Modules/mediastream/UserMediaRequest.cpp:

(WebCore::UserMediaRequest::deny):

  • Modules/webaudio/AudioContext.cpp:

(WebCore::AudioContext::suspend):
(WebCore::AudioContext::resume):

  • bindings/js/JSCustomElementRegistryCustom.cpp:

(WebCore::whenDefinedPromise):

  • bindings/js/ScriptModuleLoader.cpp:

(WebCore::ScriptModuleLoader::resolve):
(WebCore::ScriptModuleLoader::notifyFinished):

  • css/FontFace.h:
  • css/FontFaceSet.cpp:

(WebCore::FontFaceSet::load):

  • css/FontFaceSet.h:
  • dom/CustomElementRegistry.cpp:

(WebCore::CustomElementRegistry::addElementDefinition):

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::rejectPendingPlayPromises):

  • html/HTMLMediaElement.h:

Update to use new IDLType based promises.

  • bindings/generic/IDLTypes.h:

Add a new type, ParameterType, to use as the parameter to
DOMPromise/DeferredPromise.

  • bindings/js/JSCryptoKeyPairCustom.cpp:

Removed.

  • bindings/js/JSDOMConvert.h:

(WebCore::JSConverter<IDLDictionary<T>>::convert):
Add JSConverter specialization for IDLDictionary. Have it simply forward to a generated
convertDictionaryToJS function, following the convention set in place by IDLEnumeration.

  • bindings/js/JSDOMPromise.cpp:
  • bindings/js/JSDOMPromise.h:

Re-write to be based on IDLTypes and JSDOMConvert, simplifying the implementation.

  • bindings/js/JSSubtleCryptoCustom.cpp:
  • bindings/js/JSWebKitSubtleCryptoCustom.cpp:

Update for variant based KeyOrKeyPair.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateDictionaryHeaderContent):
(GenerateDictionaryImplementationContent):
Add generation of the convertDictionaryToJS function. I made it require the JSGenerateToJSObject
extended attribute for now, as the majority of dictionaries do not need this code generated for them.

  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::convertDictionaryToJS):

  • bindings/scripts/test/JS/JSTestObj.h:
  • bindings/scripts/test/TestObj.idl:

Add JSGenerateToJSObject to a dictionary to test generation in bindings tests.

  • crypto/CryptoAlgorithm.h:

Change KeyOrKeyPairCallback to take a Variant<RefPtr<CryptoKey>, CryptoKeyPair>, rather
than two separate arguments.

  • crypto/CryptoKeyPair.cpp:

Removed.

  • crypto/CryptoKeyPair.h:

Convert to a struct.

  • crypto/CryptoKeyPair.idl:

Convert to a dictionary.

  • crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:

(WebCore::CryptoAlgorithmAES_CBC::generateKey):

  • crypto/algorithms/CryptoAlgorithmAES_KW.cpp:

(WebCore::CryptoAlgorithmAES_KW::generateKey):

  • crypto/algorithms/CryptoAlgorithmHMAC.cpp:

(WebCore::CryptoAlgorithmHMAC::generateKey):

  • crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:

(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::generateKey):

  • crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:

(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey):

  • crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:

(WebCore::CryptoAlgorithmRSA_OAEP::generateKey):

  • crypto/keys/CryptoKeyRSA.h:
  • crypto/mac/CryptoKeyRSAMac.cpp:

(WebCore::CryptoKeyRSA::generatePair):
Update for new signature of KeyOrKeyPairCallback.

Source/WebKit2:

  • CMakeLists.txt:

Add missing directories to look in for headers.

LayoutTests:

  • crypto/subtle/rsa-oaep-generate-key-expected.txt:
  • crypto/subtle/rsa-oaep-generate-key.html:
  • crypto/subtle/rsaes-pkcs1-v1_5-generate-key-expected.txt:
  • crypto/subtle/rsaes-pkcs1-v1_5-generate-key-extractable-expected.txt:
  • crypto/subtle/rsaes-pkcs1-v1_5-generate-key-extractable.html:
  • crypto/subtle/rsaes-pkcs1-v1_5-generate-key.html:
  • crypto/subtle/rsassa-pkcs1-v1_5-generate-key-expected.txt:
  • crypto/subtle/rsassa-pkcs1-v1_5-generate-key.html:
  • crypto/webkitSubtle/rsa-oaep-generate-non-extractable-key-expected.txt:
  • crypto/webkitSubtle/rsa-oaep-generate-non-extractable-key.html:
  • crypto/webkitSubtle/rsa-oaep-key-manipulation-expected.txt:
  • crypto/webkitSubtle/rsa-oaep-key-manipulation.html:
  • crypto/webkitSubtle/rsassa-pkcs1-v1_5-generate-key-expected.txt:
  • crypto/webkitSubtle/rsassa-pkcs1-v1_5-generate-key-with-leading-zeroes-in-exponent-expected.txt:
  • crypto/webkitSubtle/rsassa-pkcs1-v1_5-generate-key-with-leading-zeroes-in-exponent.html:
  • crypto/webkitSubtle/rsassa-pkcs1-v1_5-generate-key.html:
  • crypto/workers/subtle/resources/rsa-generate-key.js:
  • crypto/workers/subtle/rsa-generate-key-expected.txt:

Update tests and expected results to show that CryptoKeyPair is now a vanilla object, not a platform object.

11:34 PM Changeset in webkit [209389] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Reject invalid hex colors on the fast path
https://bugs.webkit.org/show_bug.cgi?id=165461

Reviewed by Zalan Bujtas.

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::fastParseColorInternal):
Make sure to check for success. There was even a FIXME in the code about this!
Matches our old parser's behavior.

10:55 PM Changeset in webkit [209388] by commit-queue@webkit.org
  • 10 edits
    2 adds in trunk

[Modern Media Controls] Controls bar in fullscreen cannot be dragged
https://bugs.webkit.org/show_bug.cgi?id=165448

Patch by Antoine Quint <Antoine Quint> on 2016-12-05
Reviewed by Simon Fraser.

Source/WebCore:

We weren't listening to mousemove and mouseup events on the right event target, window in the context
of a fullscreen shadow root makes no sense. We now listen to those events on the media controls, which
we size to fit the whole of the media element's bounds. We then apply a transform to the controls bar
to apply the dragging distance.

Test: media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag.html

  • Modules/modern-media-controls/controls/controls-bar.js:

(ControlsBar.prototype.get translation):
(ControlsBar.prototype.set translation):
(ControlsBar.prototype.commitProperty):
(ControlsBar): Deleted.

  • Modules/modern-media-controls/controls/macos-fullscreen-media-controls.css:

(.media-controls.mac.fullscreen):
(.media-controls.mac.fullscreen > .controls-bar):

  • Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js:

(MacOSFullscreenMediaControls.prototype._handleMousedown):
(MacOSFullscreenMediaControls.prototype._handleMousemove):
(MacOSFullscreenMediaControls.prototype._handleMouseup):

LayoutTests:

Add a new test that simulates a dragging interaction of the controls bar in fullscreen.

  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles-expected.txt:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-controls-bar-styles-expected.txt:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-controls-bar-styles.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag-expected.txt: Added.
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag.html: Added.
  • platform/ios-simulator/TestExpectations:
9:44 PM Changeset in webkit [209387] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Allow calc in SVG attributes
https://bugs.webkit.org/show_bug.cgi?id=165459

Reviewed by Zalan Bujtas.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::consumeLength):

9:39 PM Changeset in webkit [209386] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

Build fix followup to r209379:

STP 19 fails to launch on 16B255
https://bugs.webkit.org/show_bug.cgi?id=165388
-and corresponding-
rdar://problem/29514476

Patch by Brady Eidson <beidson@apple.com> on 2016-12-05
Rubberstamped by Tim Horton.

No new tests (No behavior change).

  • platform/spi/cocoa/NSTouchBarSPI.h: Strategically relocate NS_ASSUME_NONNULL* macros.
9:34 PM Changeset in webkit [209385] by beidson@apple.com
  • 2 edits in trunk/Source/WebCore

Build fix followup to r209379:

STP 19 fails to launch on 16B255
https://bugs.webkit.org/show_bug.cgi?id=165388
-and corresponding-
rdar://problem/29514476

Rubberstamped by Tim Horton.

No new tests (No behavior change).

  • platform/spi/cocoa/NSTouchBarSPI.h: Strategically relocate NS_ASSUME_NONNULL* macros.
8:46 PM Changeset in webkit [209384] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Fix dashboard region parsing
https://bugs.webkit.org/show_bug.cgi?id=165456

Reviewed by Zalan Bujtas.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeWebkitDashboardRegion):
Make sure to reject whitespace by itself as well as unclosed dashboard-region functions.

8:34 PM Changeset in webkit [209383] by hyatt@apple.com
  • 4 edits in trunk/Source/WebCore

[CSS Parser] Properly reject large numeric values
https://bugs.webkit.org/show_bug.cgi?id=165455

Reviewed by Zalan Bujtas.

The new parser clamped numeric values in both the slow and fast paths to the max
and min float values. The old parser simply allowed the values to be inf, and then
had std::isinf checks to reject.

Blink rejects also even though it clamps, but I could not discern the mechanism by
which they did so. Therefore I am changing the new parser to exactly match the old
parser. Numeric values are no longer clamped, but instead are allowed to be inf, and
isinf checks now exist in the new parser in the same places they do in the old parser.

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::parseSimpleLength):
(WebCore::parseSimpleLengthValue):

  • css/parser/CSSParserToken.cpp:

(WebCore::CSSParserToken::CSSParserToken):

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::consumeLength):
(WebCore::CSSPropertyParserHelpers::consumePercent):

7:37 PM Changeset in webkit [209382] by bshafiei@apple.com
  • 2 edits in tags/Safari-603.1.14.2/Source/WebCore

Merged r209379. rdar://problem/29514476

7:35 PM Changeset in webkit [209381] by bshafiei@apple.com
  • 5 edits in tags/Safari-603.1.14.2/Source

Versioning.

7:33 PM Changeset in webkit [209380] by bshafiei@apple.com
  • 1 copy in tags/Safari-603.1.14.2

New tag.

7:30 PM Changeset in webkit [209379] by Ricky Mondello
  • 2 edits in trunk/Source/WebCore

STP 19 fails to launch on 16B255
https://bugs.webkit.org/show_bug.cgi?id=165388
-and corresponding-
rdar://problem/29514476

Reviewed by Tim Horton.

  • platform/spi/cocoa/NSTouchBarSPI.h: Re-declare the SPI symbols as weak. The cited crash itself is for a

symbol we weren't handling here, but is part of the same group. Re-declare all four of these symbols to
be safe.

7:14 PM Changeset in webkit [209378] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit2

Try to fix the iOS Simulator build.

  • UIProcess/mac/RemoteLayerTreeHost.mm:

(WebKit::RemoteLayerTreeHost::mapAllIOSurfaceBackingStore):

6:43 PM Changeset in webkit [209377] by Simon Fraser
  • 3 edits in trunk/Source/WebKit2

Minor reformat and renames in -didUpdateVisibleRect:
https://bugs.webkit.org/show_bug.cgi?id=165365

Reviewed by Dave Hyatt.

didUpdateVisibleRect:... has lots of parameters. Put one on each line.

Rename the rects to make it clear they are "content" rects (i.e. in document coordinates).

  • UIProcess/ios/WKContentView.h:
  • UIProcess/ios/WKContentView.mm:

(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):

6:41 PM Changeset in webkit [209376] by hyatt@apple.com
  • 2 edits in trunk/LayoutTests

[CSS Parser] Skip more bad tests
https://bugs.webkit.org/show_bug.cgi?id=165449

Reviewed by Zalan Bujtas.

The font tests have illegal declarations where the
ordering of the sub-properties is all wrong. Skip for
now until we can rewrite them.

The negative-calc value test is wrong, since tab-size
takes only positive integers, so a calc that resolves
to a negative number must be rejected. Avoid the test
for now until we can rewrite it.

6:37 PM Changeset in webkit [209375] by commit-queue@webkit.org
  • 7 edits in trunk

ERROR: post-layout: dirty renderer(s) - Encountered with LayoutTest media/modern-media-controls/media-controller/media-controller-fullscreen-ltr.html
https://bugs.webkit.org/show_bug.cgi?id=165312

Patch by Antoine Quint <Antoine Quint> on 2016-12-05
Reviewed by Simon Fraser.

Source/WebCore:

Reverting part of the code added in https://bugs.webkit.org/show_bug.cgi?id=165287 that triggered
an assertion. We go back to removing previous media controls as we add new ones when the fullscreen
status changes, and simply hide the controls during the animated transition using a CSS pseudo-class.
This also fixes an issue where we wouldn't have removed the previous controls should we have entered
fullscreen in a different way than clicking on the fullscreen button in the media controls.

We restore testing coverage that was fixed due to this assertion.

  • Modules/modern-media-controls/controls/media-controls.css:

(:host(:-webkit-animating-full-screen-transition) .media-controls):

  • Modules/modern-media-controls/controls/media-controls.js:

(MediaControls.prototype.fadeIn):
(MediaControls.prototype.presentInElement): Deleted.

  • Modules/modern-media-controls/media/fullscreen-support.js:

(FullscreenSupport.prototype.buttonWasClicked):

  • Modules/modern-media-controls/media/media-controller.js:

(MediaController.prototype._updateControlsIfNeeded):

LayoutTests:

Restore previously skipped tests.

  • platform/mac/TestExpectations:
6:30 PM Changeset in webkit [209374] by hyatt@apple.com
  • 6 edits in trunk/LayoutTests

[CSS Parser] Tweak more layout tests to pass
https://bugs.webkit.org/show_bug.cgi?id=165447

Reviewed by Zalan Bujtas.

Add a few more tests to avoid.

  • fast/css/parsing-font-variant-ligatures-expected.txt:
  • fast/css/parsing-font-variant-ligatures.html:

Remove the assumption that multiple occurrences of the
same value are allowed.

  • fast/filter-image/parse-filter-image-expected.txt:
  • fast/filter-image/parse-filter-image.html:

Change the test to require url(), since you cannot omit it
and expect the filter to parse properly.

6:19 PM Changeset in webkit [209373] by dino@apple.com
  • 4 edits
    3 adds in trunk

MediaDocuments crash with modern media controls
https://bugs.webkit.org/show_bug.cgi?id=165446
<rdar://problem/29524959>

Reviewed by Antoine Quint.

Source/WebCore:

The modern media controls inject a <style> element into
the document, which exposed a bug when used in MediaDocuments.
Such documents were not getting a charset, and the hash table
for the CSSParserContexts was crashing.

Test: media/modern-media-controls/media-documents/insert-style-should-not-crash.html

  • css/parser/CSSParserMode.h: Guard against an empty charset.

(WebCore::CSSParserContextHash::hash):

  • dom/InlineStyleSheetOwner.cpp: Ask for the charset with fallback.

(WebCore::parserContextForElement):

LayoutTests:

  • media/modern-media-controls/media-documents/insert-style-should-not-crash-expected.txt: Added.
  • media/modern-media-controls/media-documents/insert-style-should-not-crash.html: Added.
6:08 PM Changeset in webkit [209372] by hyatt@apple.com
  • 2 edits in trunk/LayoutTests

[CSS Parser] Avoid more tests
https://bugs.webkit.org/show_bug.cgi?id=165445

Reviewed by Tim Horton.

Just skip the custom property test, since it's a ref test.

5:56 PM Changeset in webkit [209371] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] shape-rendering supports crispEdges rather than crisp-edges
https://bugs.webkit.org/show_bug.cgi?id=165443

Reviewed by Tim Horton.

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):

5:45 PM Changeset in webkit [209370] by hyatt@apple.com
  • 4 edits in trunk/Source/WebCore

[CSS Parser] Support setting of custom properties from the CSS OM
https://bugs.webkit.org/show_bug.cgi?id=165442

Reviewed by Tim Horton.

  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::parseCustomPropertyValue):
Call in to a new function in CSSParserImpl that can handle
custom property parsing.

  • css/parser/CSSParserImpl.cpp:

(WebCore::CSSParserImpl::parseCustomPropertyValue):
New function that is similar to parseValue, but handling custom
properties.

(WebCore::CSSParserImpl::consumeDeclaration):
(WebCore::CSSParserImpl::consumeCustomPropertyValue):
(WebCore::CSSParserImpl::consumeVariableValue): Deleted.

  • css/parser/CSSParserImpl.h:

Rename consumeVariableValue to consumeCustomPropertyValue, since that
is more clear. consumeVariableValue sounds like you might be resolving
a variable reference rather than parsing a custom property's value.

5:07 PM Changeset in webkit [209369] by timothy_horton@apple.com
  • 16 edits in trunk/Source

Adopt CAMachPort-as-layer-contents
https://bugs.webkit.org/show_bug.cgi?id=141687
<rdar://problem/19393233>

Reviewed by Darin Adler.

No new tests, just a performance bump.

  • platform/spi/cocoa/QuartzCoreSPI.h:

Add some SPI.

  • Shared/mac/RemoteLayerBackingStore.h:
  • Shared/mac/RemoteLayerBackingStore.mm:

(WebKit::RemoteLayerBackingStore::decode):
On the UI process side, instead of actually looking up the surface,
just keep the MachSendRight around, to later be turned into a CAMachPort.

(WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer):
Make a CAMachPort and leak our send right into it. CAMachPort
will adopt the port and destroy it when needed.

(WebKit::RemoteLayerBackingStore::setBufferVolatility):
Tiny style fix.

  • Shared/mac/RemoteLayerTreePropertyApplier.h:
  • Shared/mac/RemoteLayerTreePropertyApplier.mm:

(WebKit::applyPropertiesToLayer):
(WebKit::RemoteLayerTreePropertyApplier::applyProperties):

  • UIProcess/DrawingAreaProxy.h:

(WebKit::DrawingAreaProxy::prepareForAppSuspension):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::applicationDidFinishSnapshottingAfterEnteringBackground):

  • UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
  • UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:

(WebKit::RemoteLayerTreeDrawingAreaProxy::prepareForAppSuspension):

  • UIProcess/mac/RemoteLayerTreeHost.h:
  • UIProcess/mac/RemoteLayerTreeHost.mm:

(WebKit::RemoteLayerTreeHost::updateLayerTree):
(WebKit::RemoteLayerTreeHost::mapAllIOSurfaceBackingStore):

  • WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:

(WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
Two supporting changes in order to fix the two regressions that this
caused when we tried to land it two years ago:

When an app is being suspended, resolve all CAMachPort backing store
into actual IOSurfaces. Otherwise, any live CAMachPorts will keep a
+1 on their respective IOSurface's use count, causing us to fail to
mark them volatile, keeping the app alive for more time (re-trying the
volatility change), and increasing the likelihood of background jetsam.

If the debugging tile map is enabled, do not use CAMachPort, because
we don't have a great way to plumb the same CAMachPort to two layers
(and it doesn't seem to work even if you do). Instead, just map the
IOSurface into the UI process like we used to.

5:04 PM Changeset in webkit [209368] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] calcs on column-width that resolve to 0 should be discarded
https://bugs.webkit.org/show_bug.cgi?id=165439

Reviewed by Dean Jackson.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeColumnWidth):

5:01 PM Changeset in webkit [209367] by Matt Baker
  • 2 edits in trunk/Source/JavaScriptCore

Web Inspector: remove ASSERT from InspectorDebuggerAgent::derefAsyncCallData
https://bugs.webkit.org/show_bug.cgi?id=165413
<rdar://problem/29517587>

Reviewed by Brian Burg.

DOMTimer::removeById can call into InspectorInstrumentation with an
invalid identifier, so don't assert that async call data exists.

  • inspector/agents/InspectorDebuggerAgent.cpp:

(Inspector::InspectorDebuggerAgent::derefAsyncCallData):

4:21 PM Changeset in webkit [209366] by Matt Baker
  • 5 edits in trunk

Web Inspector: Object.shallowEqual([{}], [{}]) should return true
https://bugs.webkit.org/show_bug.cgi?id=165397

Reviewed by Brian Burg.

Source/WebInspectorUI:

  • UserInterface/Base/Utilities.js:

(value):
Array.shallowEqual should compare array items using strict equivalence,
and on failure defer to Object.shallowEqual.

LayoutTests:

Added passing and failing inputs for TestHarness.prototype.expectShallowEqual.

  • inspector/unit-tests/test-harness-expect-functions-expected.txt:
  • inspector/unit-tests/test-harness-expect-functions.html:
4:10 PM Changeset in webkit [209365] by beidson@apple.com
  • 1 edit
    2 adds in trunk/PerformanceTests

Add an IndexedDB perf test to PerformanceTests.
https://bugs.webkit.org/show_bug.cgi?id=165430

Reviewed by Alex Christensen.

  • IndexedDB/index-multientry.html: Added.
3:48 PM Changeset in webkit [209364] by dino@apple.com
  • 23 edits
    4 adds in trunk

pointer lock needs to be feature detectable
https://bugs.webkit.org/show_bug.cgi?id=165426
<rdar://problem/29486715>

Reviewed by Antoine Quint.

Source/WebCore:

Annotate the public-facing API for pointer-lock, so
that it is hidden when not available.

Also move the Setting to a RuntimeEnabledFeature, since
pointer-lock is exposed from WebKit as a feature.

Tests: pointer-lock/pointerlock-interface-disabled.html

pointer-lock/pointerlock-interface.html

  • bindings/generic/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setPointerLockEnabled):
(WebCore::RuntimeEnabledFeatures::pointerLockEnabled):

  • dom/Document.idl:
  • dom/Element.idl:
  • page/PointerLockController.cpp:

(WebCore::PointerLockController::requestPointerLock):
(WebCore::PointerLockController::requestPointerUnlock):

  • page/Settings.in:

Source/WebKit/mac:

Set the RuntimeEnabledFeature as preferences
change.

  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

Source/WebKit2:

Set the RuntimeEnabledFeature as preferences
change.

  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetPointerLockEnabled):
(WKPreferencesGetPointerLockEnabled):

  • UIProcess/API/C/WKPreferencesRefPrivate.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

Tools:

Expose the comment line to turn on/off pointer lock.

  • DumpRenderTree/TestOptions.h:
  • DumpRenderTree/TestOptions.mm:

(TestOptions::TestOptions):

  • DumpRenderTree/mac/DumpRenderTree.mm:

(resetWebPreferencesToConsistentValues):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):

  • WebKitTestRunner/TestOptions.h:
  • WebKitTestRunner/ios/PlatformWebViewIOS.mm:

(WTR::PlatformWebView::viewSupportsOptions):

  • WebKitTestRunner/mac/PlatformWebViewMac.mm:

(WTR::PlatformWebView::viewSupportsOptions):

Websites/webkit.org:

We can now accurately detect pointer-lock.

  • experimental-features.html:

LayoutTests:

Checks that the API is hidden when the feature is turned off.

  • pointer-lock/pointerlock-interface-disabled-expected.txt: Added.
  • pointer-lock/pointerlock-interface-disabled.html: Added.
  • pointer-lock/pointerlock-interface-expected.txt: Added.
  • pointer-lock/pointerlock-interface.html: Added.
3:39 PM Changeset in webkit [209363] by hyatt@apple.com
  • 2 edits in trunk/LayoutTests

[CSS Parser] Skip a grid test
https://bugs.webkit.org/show_bug.cgi?id=165427

Reviewed by Zalan Bujtas.

3:38 PM Changeset in webkit [209362] by ggaren@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

2016-12-05 Geoffrey Garen <ggaren@apple.com>

Fixed a bug in my last patch.

Unreviewed.

  • bytecode/UnlinkedFunctionExecutable.h: Restore the conversion to one-based counting.
3:27 PM Changeset in webkit [209361] by ggaren@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Moved start and end column linking into helper functions
https://bugs.webkit.org/show_bug.cgi?id=165422

Reviewed by Sam Weinig.

  • bytecode/UnlinkedFunctionExecutable.cpp:

(JSC::UnlinkedFunctionExecutable::link):

  • bytecode/UnlinkedFunctionExecutable.h:
3:27 PM Changeset in webkit [209360] by Keith Rollin
  • 2 edits in trunk/Source/WebCore

Reduce number of platformMemoryUsage calls
https://bugs.webkit.org/show_bug.cgi?id=164375

Reviewed by Darin Adler.

Removed the calls to WTF::releaseFastMallocFreeMemory (it's already
called elsewhere in the free-all-memory pipeline) and
malloc_zone_pressure_relief (it should be called by the OS on its own
terms).

No new tests -- no new or changed features.

  • platform/cocoa/MemoryPressureHandlerCocoa.mm:

(WebCore::MemoryPressureHandler::ReliefLogger::platformMemoryUsage):

3:19 PM Changeset in webkit [209359] by hyatt@apple.com
  • 2 edits in trunk/LayoutTests

[CSS Parser] Avoid more invalid tests
https://bugs.webkit.org/show_bug.cgi?id=165424

Reviewed by Dean Jackson.

Avoid the aspect-ratio test, since it thinks whitespace should not be allowed, even though
it should be. Avoid a couple of grid tests that assume the grid breadth can't be 0fr, even
though it can be. Non-negative means < 0, not <= 0 like the old parser assumes.

3:04 PM Changeset in webkit [209358] by mark.lam@apple.com
  • 7 edits in trunk/Source/JavaScriptCore

Fix JSC files so that we can build a release build with NDEBUG #undef'ed.
https://bugs.webkit.org/show_bug.cgi?id=165409

Reviewed by Keith Miller.

This allows us to run a release build with DEBUG ASSERTs enabled.

  • bytecode/BytecodeLivenessAnalysis.cpp:
  • bytecode/UnlinkedEvalCodeBlock.cpp:
  • bytecode/UnlinkedFunctionCodeBlock.cpp:
  • bytecode/UnlinkedModuleProgramCodeBlock.cpp:
  • bytecode/UnlinkedProgramCodeBlock.cpp:
  • runtime/EvalExecutable.cpp:
3:00 PM Changeset in webkit [209357] by ggaren@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Renamed source => parentSource
https://bugs.webkit.org/show_bug.cgi?id=165419

Reviewed by Saam Barati.

This should help clarify that a FunctionExecutable holds the source
code to its *parent* scope, and not its own SourceCode.

  • builtins/BuiltinExecutables.cpp:

(JSC::BuiltinExecutables::createExecutable):

  • bytecode/UnlinkedFunctionExecutable.cpp:

(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
(JSC::UnlinkedFunctionExecutable::link):

  • bytecode/UnlinkedFunctionExecutable.h:
2:56 PM Changeset in webkit [209356] by hyatt@apple.com
  • 2 edits in trunk/LayoutTests

[CSS Parser] Fix invalid column-span test
https://bugs.webkit.org/show_bug.cgi?id=165420

Reviewed by Dean Jackson.

  • fast/multicol/newmulticol/spanner-becomes-regular-block.html:
2:53 PM Changeset in webkit [209355] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Leave the Animation type alone when the property is invalid
https://bugs.webkit.org/show_bug.cgi?id=165418

Reviewed by Dean Jackson.

  • css/CSSToStyleMap.cpp:

(WebCore::CSSToStyleMap::mapAnimationProperty):

2:52 PM Changeset in webkit [209354] by hyatt@apple.com
  • 2 edits in trunk/LayoutTests

[CSS Parser] Avoid more tests
https://bugs.webkit.org/show_bug.cgi?id=165417

Reviewed by Simon Fraser.

2:46 PM Changeset in webkit [209353] by ggaren@apple.com
  • 8 edits in trunk/Source/JavaScriptCore

ScriptExecutable should not contain a copy of firstLine and startColumn
https://bugs.webkit.org/show_bug.cgi?id=165415

Reviewed by Keith Miller.

We already have this data in SourceCode.

It's super confusing to have two copies of this data, where one is
allowed to mutate. In reality, your line and column number never change.

  • bytecode/UnlinkedFunctionExecutable.cpp:

(JSC::UnlinkedFunctionExecutable::link):

  • runtime/CodeCache.cpp:

(JSC::CodeCache::getUnlinkedGlobalCodeBlock):

  • runtime/CodeCache.h:

(JSC::generateUnlinkedCodeBlock):

  • runtime/FunctionExecutable.cpp:

(JSC::FunctionExecutable::FunctionExecutable):

  • runtime/FunctionExecutable.h:
  • runtime/ScriptExecutable.cpp:

(JSC::ScriptExecutable::ScriptExecutable):
(JSC::ScriptExecutable::newCodeBlockFor):

  • runtime/ScriptExecutable.h:

(JSC::ScriptExecutable::firstLine):
(JSC::ScriptExecutable::startColumn):
(JSC::ScriptExecutable::recordParse):

2:42 PM Changeset in webkit [209352] by Antti Koivisto
  • 12 edits
    2 adds in trunk

keyframes do not work when defined inside a style in a shadowRoot
https://bugs.webkit.org/show_bug.cgi?id=164608
<rdar://problem/29210251>

Reviewed by Darin Adler.

Source/WebCore:

With :host and ::slotted rules a keyframe animation affecting an element can be
defined in a style scope different from the element's own scope. Style resolver
loses the scope information when building the RenderStyle so there is no way
to find out the correct scope.

Fix by passing style scope through to style builder and including a scope association
with the animation name. Find the correct scope when resolving keyframes.

Test: fast/shadow-dom/shadow-host-animation.html

  • css/CSSToStyleMap.cpp:

(WebCore::CSSToStyleMap::mapAnimationName):

Include scope with the name.

  • css/ElementRuleCollector.cpp:

(WebCore::MatchRequest::MatchRequest):
(WebCore::ElementRuleCollector::addMatchedRule):
(WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
(WebCore::ElementRuleCollector::matchAuthorRules):
(WebCore::ElementRuleCollector::matchAuthorShadowPseudoElementRules):
(WebCore::ElementRuleCollector::matchHostPseudoClassRules):
(WebCore::ElementRuleCollector::matchSlottedPseudoElementRules):
(WebCore::ElementRuleCollector::collectMatchingRulesForList):

Replace treeContextOrdinal int with Style::ScopeOrdinal enum carrying the same information.
Simplify the code removing unnecessary use of MatchRequest struct.

(WebCore::compareRules):

  • css/ElementRuleCollector.h:
  • css/StyleResolver.cpp:

(WebCore::StyleResolver::MatchResult::addMatchedProperties):
(WebCore::StyleResolver::CascadedProperties::setPropertyInternal):
(WebCore::StyleResolver::CascadedProperties::set):
(WebCore::StyleResolver::CascadedProperties::setDeferred):

Pass styleScopeOrdinal through the cascade mechanism

(WebCore::cascadeLevelForIndex):
(WebCore::StyleResolver::CascadedProperties::addMatch):
(WebCore::StyleResolver::CascadedProperties::addImportantMatches):
(WebCore::StyleResolver::CascadedProperties::Property::apply):

Set styleScopeOrdinal in State when applying style.

(WebCore::StyleResolver::CascadedProperties::addStyleProperties): Deleted.

Move the code to the only caller.

  • css/StyleResolver.h:

(WebCore::StyleResolver::State::styleScopeOrdinal):
(WebCore::StyleResolver::State::setStyleScopeOrdinal):

  • page/animation/CompositeAnimation.cpp:

(WebCore::KeyframeAnimation::KeyframeAnimation):
(WebCore::KeyframeAnimation::resolveKeyframeStyles):

Find the correct scope for resolving keyframes based on the scope ordinal.

  • platform/animation/Animation.cpp:
  • platform/animation/Animation.h:

Add m_nameStyleScopeOrdinal that tells the scope where the name is defined.

  • style/StyleScope.cpp:

(WebCore::Style::Scope::forOrdinal):

Find the scope for ordinal.

  • style/StyleScope.h:

Define ScopeOrdinal types.

(WebCore::Style::operator++):

LayoutTests:

  • fast/shadow-dom/shadow-host-animation-expected.html: Added.
  • fast/shadow-dom/shadow-host-animation.html: Added.
2:38 PM Changeset in webkit [209351] by hyatt@apple.com
  • 3 edits in trunk/Source/WebCore

[CSS Parser] Support glyph-orientation-horizontal and glyph-orientation-vertical
https://bugs.webkit.org/show_bug.cgi?id=165414

Reviewed by Zalan Bujtas.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeGlyphOrientation):
(WebCore::CSSPropertyParser::parseSingleValue):
Add support for the glyph-orientation-horizontal and glyph-orientation-vertical
properties. They take an angle and allow unitless values.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::consumeAngle):
Fix a bug in the handling of unitless values for angles. Make sure to
actually pass in the value instead of always doing 0. Blink does not
accept unitless values for angles at all, so this is another difference
to investigate for SVG in the future.

2:20 PM Changeset in webkit [209350] by caitp@igalia.com
  • 5 edits in trunk

[JSC] report unexpected token when "async" is followed by identifier
https://bugs.webkit.org/show_bug.cgi?id=165091

Reviewed by Mark Lam.

JSTests:

  • stress/bug-165091.js:

Source/JavaScriptCore:

Report a SyntaxError, in order to report correct error in contexts
an async ArrowFunction cannot occur. Also corrects errors in comment
describing JSTokenType bitfield, which was added in r209293.

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseMemberExpression):

  • parser/ParserTokens.h:
2:16 PM Changeset in webkit [209349] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Skip three media/modern-media-controls tests.
https://bugs.webkit.org/show_bug.cgi?id=165312

Unreviewed test gardening.

  • platform/mac/TestExpectations:
2:08 PM Changeset in webkit [209348] by Ryan Haddad
  • 21 edits
    6 deletes in trunk

Unreviewed, rolling out r209299.

This change appears to have caused LayoutTest failures on
Sierra WK1.

Reverted changeset:

"Improve the behavior of scroll-into-view when the target is
inside position:fixed"
https://bugs.webkit.org/show_bug.cgi?id=165354
http://trac.webkit.org/changeset/209299

1:56 PM Changeset in webkit [209347] by hyatt@apple.com
  • 5 edits in trunk/LayoutTests

[CSS Parser] Fix column tests with illegal syntax
https://bugs.webkit.org/show_bug.cgi?id=165411

Reviewed by Zalan Bujtas.

Patch column-span layout tests that use invalid syntax
to use the spec-compliant syntax instead (none instead of 1).

  • fast/multicol/newmulticol/remove-spanner4.html:
  • fast/multicol/newmulticol/remove-spanner5.html:
  • fast/multicol/newmulticol/remove-spanner6.html:
  • fast/multicol/span/span-as-immediate-child-property-removal.html:
1:31 PM Changeset in webkit [209346] by akling@apple.com
  • 7 edits in trunk/Source

[Cocoa] Add some memory usage related information to sysdiagnose state dumps
<https://webkit.org/b/165375>
<rdar://problem/29057243>

Reviewed by Darin Adler.

Source/WebCore:

Add a flag to memoryUsageStatistics() to allow gathering of slightly more expensive information.
This mode is used when capturing a state dump for sysdiagnose.

The more expensive information added in this patch relates to information about live objects
and memory on the JavaScript heap.

  • WebCore.xcodeproj/project.pbxproj:
  • page/PerformanceLogging.cpp:

(WebCore::PerformanceLogging::memoryUsageStatistics):
(WebCore::PerformanceLogging::javaScriptObjectCounts):
(WebCore::PerformanceLogging::didReachPointOfInterest):

  • page/PerformanceLogging.h:

Source/WebKit2:

Add two new entries to the sysdiagnose state dumps for WebContent processes:
"Memory Usage Stats" and "JavaScript Object Counts".

The first category contains all the interesting stuff from task_info()
along with some WebCore and JavaScriptCore object/memory counters.

The second category contains a list of all the JS object types currently live
on the heap, along with a count.

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::registerWithStateDumper): Add two new entries to the
state dictionary: "Memory Usage Stats" and "JavaScript Object Counts".

1:04 PM Changeset in webkit [209345] by hyatt@apple.com
  • 2 edits in trunk/LayoutTests

[CSS Parser] Avoid a few more tests
https://bugs.webkit.org/show_bug.cgi?id=165404

Reviewed by Zalan Bujtas.

12:51 PM Changeset in webkit [209344] by hyatt@apple.com
  • 3 edits in trunk/LayoutTests

[CSS Parser] Fix flex property parsing test
https://bugs.webkit.org/show_bug.cgi?id=165402

Reviewed by Simon Fraser.

flex-grow and flex-shrink must occur together. They cannot be before and after
the flex-basis. Since this test is about valid property declarations, just fix it
by removing the invalid ones.

  • css3/flexbox/flex-property-parsing-expected.txt:
  • css3/flexbox/flex-property-parsing.html:
12:38 PM Changeset in webkit [209343] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking media/modern-media-controls/seek-backward-support/seek-backward-support.html as flaky on mac-wk1.
https://bugs.webkit.org/show_bug.cgi?id=165386

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
12:32 PM Changeset in webkit [209342] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: Remove legacy styles
https://bugs.webkit.org/show_bug.cgi?id=165389

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-12-05
Reviewed by Matt Baker.

Remove styles for platforms we don't build on anymore (Mavericks
and Mountain Lion). There are also no "unknown-mac" styles to
upgrade to a named platform.

  • UserInterface/Base/Platform.js:

Add sierra and remove older unsupported platforms.

  • UserInterface/Views/Main.css:

(body):
(body:not(.mavericks)): Deleted.

  • UserInterface/Views/TabBar.css:

(body.mavericks .tab-bar > .item:not(.disabled).selected): Deleted.

  • UserInterface/Views/Toolbar.css:

(body .toolbar):
(body.window-inactive .toolbar):
(body.mac-platform:not(.docked) .toolbar):
(body.mac-platform:not(.docked)):
(body:not(.mavericks) .toolbar,): Deleted.
(body.window-inactive:not(.mavericks) .toolbar): Deleted.
(body.mac-platform:not(.docked, .mavericks) .toolbar): Deleted.
(body.mac-platform:not(.docked, .mavericks)): Deleted.
Remove mavericks specific styles.

12:26 PM Changeset in webkit [209341] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Make sure the transform fast path uses WebKitCSSTransformValue
https://bugs.webkit.org/show_bug.cgi?id=165399

Reviewed by Dean Jackson.

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::parseTransformTranslateArguments):
(WebCore::parseTransformNumberArguments):
(WebCore::parseSimpleTransformValue):
(WebCore::parseSimpleTransformList):

12:17 PM Changeset in webkit [209340] by matthew_hanson@apple.com
  • 2 edits in tags/Safari-603.1.14.1/Source/WebCore

Merge r209332. rdar://problem/29514476

12:17 PM Changeset in webkit [209339] by matthew_hanson@apple.com
  • 2 edits in tags/Safari-603.1.14.1/Source/WebCore

Merge r209330. rdar://problem/29514476

12:11 PM Changeset in webkit [209338] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Fix calc() with -webkit-line-clamp
https://bugs.webkit.org/show_bug.cgi?id=165398

Reviewed by Zalan Bujtas.

Remove the aggressive token type checking up front, since it was causing calc() to not
be allowed.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeLineClamp):

12:02 PM Changeset in webkit [209337] by Jonathan Bedard
  • 4 edits in trunk/Tools

Make it possible to use an existing simulator instance for one-off testing
https://bugs.webkit.org/show_bug.cgi?id=164568
<rdar://problem/29189133>

Reviewed by Daniel Bates.

With this patch, if a simulator is currently running on the machine and
'--dedicated-simulators' is not passed into the application, only one simulator
instance will be used, and this instance will be the existing instance.
If no simulator is running or '--dedicated-simulators' is passed to the script,
previous behavior will be used.

  • Scripts/webkitpy/layout_tests/run_webkit_tests.py:

(parse_args):

  • Scripts/webkitpy/port/ios.py:

(IOSSimulatorPort.init): Logic for enabling usage of currently running simulator.
(IOSSimulatorPort._create_simulators): Only create simulators when needed, don't reset already running simulators.
(IOSSimulatorPort.setup_test_run): Don't open already running simulators.
(IOSSimulatorPort._quit_ios_simulator): Only quit simulators if we manage them.
(IOSSimulatorPort.clean_up_test_run): Only clean up simulators if we manage them.
(IOSSimulatorPort._using_dedicated_simulators): True if simulators need to be managed, false if using an existing instance.
(IOSSimulatorPort.device_id_for_worker_number): Access currently running simulator if not managing devices.

  • Scripts/webkitpy/xcode/simulator.py:

(Simulator.refresh): Check if xcode_simctl_list returned None instead of a generator.
(Simulator.current_device): Get currently running device.

12:01 PM Changeset in webkit [209336] by hyatt@apple.com
  • 1 edit
    2 deletes in trunk/LayoutTests

[CSS Parser] Remove calc column-span test
https://bugs.webkit.org/show_bug.cgi?id=165393

Reviewed by Zalan Bujtas.

"1" is not a legal value for column-span, let alone allowing it to support a calc that
resolves to 1.

  • fast/css/webkit-column-span-calculated-value-expected.txt: Removed.
  • fast/css/webkit-column-span-calculated-value.html: Removed.
11:36 AM Changeset in webkit [209335] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Support -webkit-text-decoration
https://bugs.webkit.org/show_bug.cgi?id=165391

Reviewed by Dean Jackson.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseShorthand):

11:33 AM Changeset in webkit [209334] by matthew_hanson@apple.com
  • 5 edits in branches/safari-602-branch/Source

Versioning.

11:31 AM Changeset in webkit [209333] by matthew_hanson@apple.com
  • 5 edits in tags/Safari-603.1.14.1/Source

Versioning.

11:25 AM Changeset in webkit [209332] by Beth Dakin
  • 2 edits in trunk/Source/WebCore

STP 19 fails to launch on 16B255
https://bugs.webkit.org/show_bug.cgi?id=165388
-and corresponding-
rdar://problem/29514476

Rubber-stamped by Brady Eidson.

  • platform/spi/cocoa/NSTouchBarSPI.h:
11:24 AM Changeset in webkit [209331] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-603.1.14.1

New tag.

11:21 AM Changeset in webkit [209330] by Beth Dakin
  • 2 edits in trunk/Source/WebCore

STP 19 fails to launch on 16B255
https://bugs.webkit.org/show_bug.cgi?id=165388
-and corresponding-
rdar://problem/29514476

Reviewed by Tim Horton.

Speculative fix.

  • platform/spi/cocoa/NSTouchBarSPI.h:
11:17 AM Changeset in webkit [209329] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Support the 'alphabetic' keyword for text-underline-position
https://bugs.webkit.org/show_bug.cgi?id=165387

Reviewed by Simon Fraser.

Fixes fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-underline-position.html

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseSingleValue):

11:03 AM Changeset in webkit [209328] by keith_miller@apple.com
  • 4 edits in trunk

Add Wasm i64 to i32 conversion.
https://bugs.webkit.org/show_bug.cgi?id=165378

Reviewed by Filip Pizlo.

It turns out the wrap operation is just B3's Trunc.

  • wasm/wasm.json:
11:02 AM Changeset in webkit [209327] by mitz@apple.com
  • 2 edits in trunk/Tools

Disable a crashing test on iOS.

  • TestWebKitAPI/Tests/WebKit2Cocoa/BundleEditingDelegate.mm:
11:02 AM Changeset in webkit [209326] by Joseph Pecoraro
  • 5 edits
    1 add in trunk/Source

REGRESSION(r208985): SafariForWebKitDevelopment Symbol Not Found looking for method with WTF::Optional
https://bugs.webkit.org/show_bug.cgi?id=165351

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

Some versions of Safari expect:

Inspector::BackendDispatcher::reportProtocolError(WTF::Optional<long>, Inspector::BackendDispatcher::CommonErrorCode, WTF::String const&)

Which we had updated to use std::optional. Expose a version with the original
Symbol for these Safaris. This stub will just call through to the new version.

  • inspector/InspectorBackendDispatcher.cpp:

(Inspector::BackendDispatcher::reportProtocolError):

  • inspector/InspectorBackendDispatcher.h:

Source/WTF:

Include a slimmed down version of WTF::Optional which older versions
of Safari still depend on for a JavaScriptCore exported symbol.
To prevent misuse name it WTF::DeprecatedOptional and use it only in
the one instance it is needed.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/DeprecatedOptional.h: Added.

(WTF::Optional::operator bool):
(WTF::Optional::value):
(WTF::Optional::asPtr):

10:19 AM Changeset in webkit [209325] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Fix assert when unknown properties are encountered.
https://bugs.webkit.org/show_bug.cgi?id=165385

Reviewed by Zalan Bujtas.

  • css/CSSToStyleMap.cpp:

(WebCore::CSSToStyleMap::mapAnimationProperty):

10:04 AM Changeset in webkit [209324] by hyatt@apple.com
  • 3 edits in trunk/Source/WebCore

[CSS Parser] Fix rx and ry parsing
https://bugs.webkit.org/show_bug.cgi?id=165383

Reviewed by Dean Jackson.

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::isSimpleLengthPropertyID):
rx and ry can be negative in the slow path, so make sure they can be negative in the
fast path too.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeRxOrRy):
Disallow auto as a value since we are not equipped to handle it, and it's not clear if it's
even valid.

9:50 AM Changeset in webkit [209323] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking media/modern-media-controls/media-controller/media-controller-resize.html as flaky on macOS.
https://bugs.webkit.org/show_bug.cgi?id=164571

Unreviewed test gardening.

  • platform/mac/TestExpectations:
9:47 AM Changeset in webkit [209322] by Konstantin Tokarev
  • 8 edits in trunk/Source

Add STDC_FORMAT_MACROS before inttypes.h is included
https://bugs.webkit.org/show_bug.cgi?id=165374

We need formatting macros like PRIu64 to be available in all places where
inttypes.h header is used. All these usages get inttypes.h definitions
via wtf/Assertions.h header, except SQLiteFileSystem.cpp where formatting
macros are not used anymore since r185129.

This patch fixes multiple build errors with MinGW and reduces number of
independent STDC_FORMAT_MACROS uses in the code base.

Reviewed by Darin Adler.

Source/JavaScriptCore:

  • disassembler/ARM64/A64DOpcode.cpp: Removed STDC_FORMAT_MACROS

because it is obtained via Assertions.h now

  • disassembler/ARM64Disassembler.cpp: Ditto.

Source/WebCore:

No new tests needed.

  • platform/sql/SQLiteFileSystem.cpp: Removed unused inttypes.h

inclusion.

Source/WTF:

  • wtf/Assertions.h: Define STDC_FORMAT_MACROS.
  • wtf/StdLibExtras.h: Remove definition of PRId64 for Windows, as we

have STDC_FORMAT_MACROS defined now.

9:43 AM Changeset in webkit [209321] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Properly fail on bad values for -webkit-clip-path
https://bugs.webkit.org/show_bug.cgi?id=165382

Reviewed by Dean Jackson.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeBasicShapeOrBox):

9:35 AM Changeset in webkit [209320] by hyatt@apple.com
  • 3 edits in trunk/Source/WebCore

[CSS Parser] The page-break-* properties are only keyword props for old parser.
https://bugs.webkit.org/show_bug.cgi?id=165381

Reviewed by Dean Jackson.

  • css/parser/CSSParser.cpp:

(WebCore::isKeywordPropertyID):

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isKeywordPropertyID):

9:28 AM Changeset in webkit [209319] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Don't use CSS_PARSER_INTEGER unit for resolved integer calcs.
https://bugs.webkit.org/show_bug.cgi?id=165379

Reviewed by Dean Jackson.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::CalcParser::consumeNumber):

9:13 AM Changeset in webkit [209318] by hyatt@apple.com
  • 6 edits in trunk/Source/WebCore

[CSS Parser] Add parseValue support to new parser. Use new parser for UA sheet too if useNewParser is set.
https://bugs.webkit.org/show_bug.cgi?id=165376

Reviewed by Zalan Bujtas.

  • css/StyleColor.cpp:

(WebCore::StyleColor::isColorKeyword):
Include system colors when using the fast parseValue path.

  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::setupParser):
Add an assert to catch any code path using the old parser when the new parser flag is set.

(WebCore::CSSParser::parseSheet):
(WebCore::CSSParser::parseRule):
(WebCore::CSSParser::parseKeyframeRule):
(WebCore::CSSParser::parseSupportsCondition):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseSelector):
(WebCore::CSSParser::parseDeclaration):
Patched to use the new parser in UASheetMode as well as other modes when the new parser flag
is set. parseValue is patched to use the new parser's fast paths and to call into CSSParserImpl's
parseValue.

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::isSimpleLengthPropertyID):
Support CSSPropertyShapeMargin in the fast path since the old parser did in its fast path.

(WebCore::parseSimpleLengthValue):
Don't ever return unitless numbers. If we accept a unitless number, convert the unit to PX still.

(WebCore::CSSParserFastPaths::parseColor):
Use the CSSValuePool when creating colors on the fast path.

  • css/parser/CSSParserImpl.cpp:

(WebCore::CSSParserImpl::parseValue):

  • css/parser/CSSParserImpl.h:

Change the return type to be compatible with the old parser's ParseResult flag.

9:06 AM Changeset in webkit [209317] by Konstantin Tokarev
  • 1 edit
    2 deletes in trunk/Source/WebCore

Removed MediaPlayerPrivateTaskTimer
https://bugs.webkit.org/show_bug.cgi?id=165373

Reviewed by Sam Weinig.

It is not used anywhere since QTSDK removal in r165476.

No new tests needed.

  • platform/graphics/win/MediaPlayerPrivateTaskTimer.cpp: Removed.
  • platform/graphics/win/MediaPlayerPrivateTaskTimer.h: Removed.
3:50 AM Changeset in webkit [209316] by Csaba Osztrogonác
  • 2 edits in trunk/Source/WebKit2

Unreviewed cmake buildfix after r209307.

  • PlatformMac.cmake:
3:31 AM Changeset in webkit [209315] by Csaba Osztrogonác
  • 2 edits in trunk/Source/WebKit

Unreviewed cmake buildfix after r209252.

  • PlatformMac.cmake:

Dec 4, 2016:

4:35 PM Changeset in webkit [209314] by hyatt@apple.com
  • 13 edits in trunk

[CSS Parser] Eliminate in-place lowercasing in the parser.
https://bugs.webkit.org/show_bug.cgi?id=165368

Reviewed by Darin Adler.

Source/WebCore:

Replace the in-place lowercasing that the parser does with new
mechanisms. In-place lowercasing ruins serialization and doesn't
work on CSS parsed from static strings. It also has the side effect
of mutating strings passed in from JavaScript like for querySelectorAll.

For class/id selectors, we now check if the string is lowercase or not.
If it contains uppercase ASCII characters, then we allocate the RareData
for the selector. RareData now has two fields instead of one for the value,
a matching value (all lowercase in quirks mode), and a serializing value (the
original string). Because this is done at the CSSSelector level, the old
parser has been patched as well for these cases.

In addition, in-place lowercasing was done for pseudo-elements, for
media query features, and for attr(). In all of these cases we do
lowercase converting by first checking if it's needed. Serialization will
not retain the original string in these cases, so we may want to revisit
these cases in the future and apply a solution similar to what we did for
selectors.

  • css/CSSGrammar.y.in:
  • css/CSSSelector.cpp:

(WebCore::CSSSelector::createRareData):
(WebCore::CSSSelector::selectorText):
(WebCore::CSSSelector::RareData::RareData):
(WebCore::CSSSelector::RareData::~RareData):

  • css/CSSSelector.h:

(WebCore::CSSSelector::RareData::create):
(WebCore::CSSSelector::setValue):
(WebCore::CSSSelector::value):
(WebCore::CSSSelector::serializingValue):

  • css/MediaQueryExp.cpp:

(WebCore::MediaQueryExpression::MediaQueryExpression):

  • css/parser/CSSParserToken.cpp:

(WebCore::convertToASCIILowercaseInPlace): Deleted.
(WebCore::CSSParserToken::convertToASCIILowercaseInPlace): Deleted.

  • css/parser/CSSParserToken.h:
  • css/parser/CSSParserValues.h:

(WebCore::CSSParserSelector::setValue):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeAttr):

  • css/parser/CSSSelectorParser.cpp:

(WebCore::CSSSelectorParser::consumeId):
(WebCore::CSSSelectorParser::consumeClass):
(WebCore::CSSSelectorParser::consumePseudo):

  • css/parser/MediaQueryParser.cpp:

(WebCore::MediaQueryParser::readFeature):

LayoutTests:

  • fast/media/mq-pointer-expected.txt:
2:47 PM Changeset in webkit [209313] by keith_miller@apple.com
  • 9 edits
    2 adds in trunk

Add support for Wasm ctz and popcnt
https://bugs.webkit.org/show_bug.cgi?id=165369

Reviewed by Saam Barati.

JSTests:

  • wasm/function-tests/ctz.js: Added.
  • wasm/function-tests/popcnt.js: Added.

Source/JavaScriptCore:

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::countTrailingZeros32):
(JSC::MacroAssemblerARM64::countTrailingZeros64):

  • assembler/MacroAssemblerX86Common.cpp:
  • assembler/MacroAssemblerX86Common.h:

(JSC::MacroAssemblerX86Common::countTrailingZeros32):
(JSC::MacroAssemblerX86Common::supportsBMI1):
(JSC::MacroAssemblerX86Common::ctzAfterBsf):

  • assembler/MacroAssemblerX86_64.h:

(JSC::MacroAssemblerX86_64::countTrailingZeros64):

  • assembler/X86Assembler.h:

(JSC::X86Assembler::tzcnt_rr):
(JSC::X86Assembler::tzcntq_rr):
(JSC::X86Assembler::bsf_rr):
(JSC::X86Assembler::bsfq_rr):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::addOp<OpType::I32Ctz>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64Ctz>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32Popcnt>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64Popcnt>):

  • wasm/WasmFunctionParser.h:

(JSC::Wasm::FunctionParser<Context>::parseExpression):

1:23 PM Changeset in webkit [209312] by sbarati@apple.com
  • 22 edits
    2 adds in trunk/Source/JavaScriptCore

We should have a Wasm callee
https://bugs.webkit.org/show_bug.cgi?id=165163

Reviewed by Keith Miller.

This patch adds JSWebAssemblyCallee and stores it into the
callee slot in the call frame as part of the prologue of a
wasm function. This is the first step in implementing
unwinding from/through wasm frames. We will use the callee
to identify that a machine frame belongs to wasm code.

(callWasmFunction):
(functionTestWasmModuleFunctions):

  • llint/LowLevelInterpreter64.asm:
  • runtime/JSGlobalObject.cpp:
  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
  • wasm/JSWebAssembly.h:
  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::parseAndCompile):

  • wasm/WasmCallingConvention.h:

(JSC::Wasm::CallingConvention::setupFrameInPrologue):

  • wasm/WasmFormat.h:
  • wasm/WasmPlan.cpp:

(JSC::Wasm::Plan::initializeCallees):

  • wasm/WasmPlan.h:

(JSC::Wasm::Plan::compiledFunction):
(JSC::Wasm::Plan::getCompiledFunctions): Deleted.

  • wasm/js/JSWebAssemblyCallee.cpp: Added.

(JSC::JSWebAssemblyCallee::JSWebAssemblyCallee):
(JSC::JSWebAssemblyCallee::finishCreation):
(JSC::JSWebAssemblyCallee::destroy):

  • wasm/js/JSWebAssemblyCallee.h: Added.

(JSC::JSWebAssemblyCallee::create):
(JSC::JSWebAssemblyCallee::createStructure):
(JSC::JSWebAssemblyCallee::jsEntryPoint):

  • wasm/js/JSWebAssemblyModule.cpp:

(JSC::JSWebAssemblyModule::create):
(JSC::JSWebAssemblyModule::JSWebAssemblyModule):
(JSC::JSWebAssemblyModule::visitChildren):

  • wasm/js/JSWebAssemblyModule.h:

(JSC::JSWebAssemblyModule::moduleInformation):
(JSC::JSWebAssemblyModule::callee):
(JSC::JSWebAssemblyModule::callees):
(JSC::JSWebAssemblyModule::offsetOfCallees):
(JSC::JSWebAssemblyModule::allocationSize):
(JSC::JSWebAssemblyModule::compiledFunctions): Deleted.

  • wasm/js/WebAssemblyFunction.cpp:

(JSC::callWebAssemblyFunction):
(JSC::WebAssemblyFunction::create):
(JSC::WebAssemblyFunction::visitChildren):
(JSC::WebAssemblyFunction::finishCreation):

  • wasm/js/WebAssemblyFunction.h:

(JSC::WebAssemblyFunction::webAssemblyCallee):
(JSC::WebAssemblyFunction::instance):
(JSC::WebAssemblyFunction::signature):
(JSC::CallableWebAssemblyFunction::CallableWebAssemblyFunction): Deleted.
(JSC::WebAssemblyFunction::webAssemblyFunctionCell): Deleted.

  • wasm/js/WebAssemblyFunctionCell.cpp:

(JSC::WebAssemblyFunctionCell::create): Deleted.
(JSC::WebAssemblyFunctionCell::WebAssemblyFunctionCell): Deleted.
(JSC::WebAssemblyFunctionCell::destroy): Deleted.
(JSC::WebAssemblyFunctionCell::createStructure): Deleted.

  • wasm/js/WebAssemblyFunctionCell.h:

(JSC::WebAssemblyFunctionCell::function): Deleted.

  • wasm/js/WebAssemblyModuleConstructor.cpp:

(JSC::constructJSWebAssemblyModule):

  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::link):

12:22 PM Changeset in webkit [209311] by Matt Baker
  • 3 edits
    2 adds in trunk

Web Inspector: Assertion Failures breakpoint should respect global Breakpoints enabled setting
https://bugs.webkit.org/show_bug.cgi?id=165277
<rdar://problem/29467098>

Reviewed by Mark Lam.

Source/JavaScriptCore:

  • inspector/agents/InspectorDebuggerAgent.cpp:

(Inspector::InspectorDebuggerAgent::handleConsoleAssert):
Check that breakpoints are active before pausing.

LayoutTests:

New test for DebuggerManager.prototype.breakPointsEnabled.

  • inspector/debugger/breakpoints-disabled-expected.txt: Added.
  • inspector/debugger/breakpoints-disabled.html: Added.
1:20 AM Changeset in webkit [209310] by Gyuyoung Kim
  • 4 edits in trunk

Fix a build break on EFL since r209303.

Unreviewed build fix.

Source/WebCore:

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::exceptionForSerializationFailure): Add a return in the end of function.

Tools:

  • Scripts/webkitperl/FeatureList.pm: Disable SS Device Adaptation temporarily.

Dec 3, 2016:

4:28 PM Changeset in webkit [209309] by Yusuke Suzuki
  • 14 edits
    1 copy in trunk

Refactor SymbolImpl layout
https://bugs.webkit.org/show_bug.cgi?id=165247

Reviewed by Darin Adler.

Source/JavaScriptCore:

Use SymbolImpl::{create, createNullSymbol} instead.

  • runtime/PrivateName.h:

(JSC::PrivateName::PrivateName):

Source/WTF:

This patch moves SymbolImpl initialization from StringImpl to SymbolImpl.
In SymbolImpl, we create the appropriate fields. At that time, these fields
should be aligned to the BufferSubstring StringImpl.

And we newly create the m_flags in SymbolImpl. Instead of using special
StringImpl::null(), we store s_flagIsNullSymbol flag here. In WTF, we have
the invariant that StringImpl::empty() is the only atomic empty string.
But StringImpl::null() breaks this invariant. Using a special flag is safer
way to represent the null Symbol Symbol().

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/StdLibExtras.h:

(WTF::roundUpToMultipleOfImpl0):
(WTF::roundUpToMultipleOfImpl):
(WTF::roundUpToMultipleOf):

  • wtf/text/StringImpl.cpp:

(WTF::StringImpl::~StringImpl):
(WTF::StringImpl::createSymbol): Deleted.
(WTF::StringImpl::createNullSymbol): Deleted.

  • wtf/text/StringImpl.h:

(WTF::StringImpl::isAtomic):
(WTF::StringImpl::StringImpl):
(WTF::StringImpl::requiresCopy):
(WTF::StringImpl::isNullSymbol): Deleted.
(WTF::StringImpl::symbolAwareHash): Deleted.
(WTF::StringImpl::existingSymbolAwareHash): Deleted.
(WTF::StringImpl::null): Deleted.
(WTF::StringImpl::extractFoldedStringInSymbol): Deleted.
(WTF::StringImpl::symbolRegistry): Deleted.
(WTF::StringImpl::hashForSymbol): Deleted.

  • wtf/text/StringStatics.cpp:

(WTF::StringImpl::nextHashForSymbol): Deleted.

  • wtf/text/SymbolImpl.cpp: Copied from Source/WTF/wtf/text/SymbolRegistry.cpp.

(WTF::SymbolImpl::nextHashForSymbol):
(WTF::SymbolImpl::create):
(WTF::SymbolImpl::createNullSymbol):

  • wtf/text/SymbolImpl.h:

(WTF::SymbolImpl::hashForSymbol):
(WTF::SymbolImpl::symbolRegistry):
(WTF::SymbolImpl::isNullSymbol):
(WTF::SymbolImpl::extractFoldedString):
(WTF::SymbolImpl::SymbolImpl):
(WTF::StringImpl::symbolAwareHash):
(WTF::StringImpl::existingSymbolAwareHash):

  • wtf/text/SymbolRegistry.cpp:

(WTF::SymbolRegistry::~SymbolRegistry):
(WTF::SymbolRegistry::symbolForKey):
(WTF::SymbolRegistry::keyForSymbol):

  • wtf/text/UniquedStringImpl.h:

(WTF::UniquedStringImpl::UniquedStringImpl):

Tools:

  • TestWebKitAPI/Tests/WTF/StringImpl.cpp:

(TestWebKitAPI::TEST):

4:11 PM Changeset in webkit [209308] by mitz@apple.com
  • 2 edits in trunk/Tools

Fixed the build after r209307.

  • TestWebKitAPI/Tests/WebKit2Cocoa/BundleEditingDelegate.mm:

(TEST):

3:49 PM Changeset in webkit [209307] by mitz@apple.com
  • 19 edits
    8 adds in trunk

[Cocoa] Expose InjectedBundlePageEditorClient via the Objective-C bundle SPI
https://bugs.webkit.org/show_bug.cgi?id=165276
<rdar://problem/29467040>

Reviewed by Darin Adler.

Source/WebCore:

  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::write): Make sure to put the client data on the pasteboard,

like we do on macOS.

Source/WebKit2:

Test: TestWebKitAPI/Tests/WebKit2Cocoa/BundleEditingDelegate.mm

  • Shared/Cocoa/APIObject.mm:

(API::Object::newObject): Wrap InjectedBundleRangeHandle in WKWebProcessPlugInRangeHandle.

  • WebKit2.xcodeproj/project.pbxproj: Added references to new files, making WKWebProcessPlugInEditingDelegate.h and WKWebProcessPlugInRangeHandle.h private headers.
  • WebProcess/InjectedBundle/API/APIInjectedBundleEditorClient.h: Added. An base class based on InjectedBundlePageEditorClient.

(API::InjectedBundle::EditorClient::~EditorClient):
(API::InjectedBundle::EditorClient::shouldBeginEditing):
(API::InjectedBundle::EditorClient::shouldEndEditing):
(API::InjectedBundle::EditorClient::shouldInsertNode):
(API::InjectedBundle::EditorClient::shouldInsertText):
(API::InjectedBundle::EditorClient::shouldDeleteRange):
(API::InjectedBundle::EditorClient::shouldChangeSelectedRange):
(API::InjectedBundle::EditorClient::shouldApplyStyle):
(API::InjectedBundle::EditorClient::didBeginEditing):
(API::InjectedBundle::EditorClient::didEndEditing):
(API::InjectedBundle::EditorClient::didChange):
(API::InjectedBundle::EditorClient::didChangeSelection):
(API::InjectedBundle::EditorClient::willWriteToPasteboard):
(API::InjectedBundle::EditorClient::getPasteboardDataForRange):
(API::InjectedBundle::EditorClient::didWriteToPasteboard):

  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInEditingDelegate.h: Added. Declares the new delegate protocol, currently comprising three methods corresponding to willWriteToPasteboard, getPasteboardDataForRange, and didWriteToPasteboard.
  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h:
  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:

(-[WKWebProcessPlugInFrame jsRangeForRangeHandle:inWorld:]): Added. Gets the JS wrapper for

the specified range handle.

  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.h: Added.
  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.mm: Added.

(-[WKWebProcessPlugInRangeHandle dealloc]): Call the InjectedBundleRangeHandle destructor.
(+[WKWebProcessPlugInRangeHandle rangeHandleWithJSValue:inContext:]): Get or create an

InjectedBundleRangeHandle for the specified object.

(-[WKWebProcessPlugInRangeHandle frame]): Return the range’s owner document’s frame.
(-[WKWebProcessPlugInRangeHandle _rangeHandle]): Return the InjectedBundleRangeHandle.
(-[WKWebProcessPlugInRangeHandle _apiObject]): Ditto.

  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandleInternal.h: Added.

(WebKit::wrapper):

  • WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:

(WKBundlePageSetEditorClient): Updated for WebPage change.

  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:

(-[WKWebProcessPlugInBrowserContextController _editingDelegate]): Added. Returns the

delegate.

(-[WKWebProcessPlugInBrowserContextController _setEditingDelegate:]): Added. Defines a

Client class, which derives from API::InjectedBundle::EditorClient, and invokes the
delegate methods. Instantiates a Client and sets it on the WebPage.

  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h: Declared new _editingDelegate property.
  • WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:

(WebKit::InjectedBundleRangeHandle::document): Added. Returns an InjectedBundleNodeHandle

for the range’s owner document.

  • WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.h:
  • WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:

(WebKit::InjectedBundlePageEditorClient::InjectedBundlePageEditorClient): Added. Calls

initialize().

(WebKit::InjectedBundlePageEditorClient::shouldBeginEditing): Updated for type change.
(WebKit::InjectedBundlePageEditorClient::shouldEndEditing): Ditto.
(WebKit::InjectedBundlePageEditorClient::shouldInsertNode): Ditto.
(WebKit::InjectedBundlePageEditorClient::shouldInsertText): Ditto.
(WebKit::InjectedBundlePageEditorClient::shouldDeleteRange): Ditto.
(WebKit::InjectedBundlePageEditorClient::shouldChangeSelectedRange): Ditto.
(WebKit::InjectedBundlePageEditorClient::shouldApplyStyle): Ditto.
(WebKit::InjectedBundlePageEditorClient::didBeginEditing): Ditto.
(WebKit::InjectedBundlePageEditorClient::didEndEditing): Ditto.
(WebKit::InjectedBundlePageEditorClient::didChange): Ditto.
(WebKit::InjectedBundlePageEditorClient::didChangeSelection): Ditto.
(WebKit::InjectedBundlePageEditorClient::willWriteToPasteboard): Ditto.
(WebKit::InjectedBundlePageEditorClient::getPasteboardDataForRange): Ditto.
(WebKit::InjectedBundlePageEditorClient::didWriteToPasteboard): Ditto.

  • WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h: Now derives from API::InjectedBundle::EditorClient.
  • WebProcess/WebCoreSupport/WebEditorClient.cpp:

(WebKit::WebEditorClient::shouldDeleteRange): Ditto.
(WebKit::WebEditorClient::shouldBeginEditing): Ditto.
(WebKit::WebEditorClient::shouldEndEditing): Ditto.
(WebKit::WebEditorClient::shouldInsertNode): Ditto.
(WebKit::WebEditorClient::shouldInsertText): Ditto.
(WebKit::WebEditorClient::shouldChangeSelectedRange): Ditto.
(WebKit::WebEditorClient::shouldApplyStyle): Ditto.
(WebKit::WebEditorClient::didBeginEditing): Ditto.
(WebKit::WebEditorClient::respondToChangedContents): Ditto.
(WebKit::WebEditorClient::respondToChangedSelection): Ditto.
(WebKit::WebEditorClient::didEndEditing): Ditto.
(WebKit::WebEditorClient::didWriteSelectionToPasteboard): Ditto.
(WebKit::WebEditorClient::willWriteSelectionToPasteboard): Ditto.
(WebKit::WebEditorClient::getClientPasteboardDataForRange): Ditto.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::WebPage): Initialize m_editorClient.
(WebKit::WebPage::setInjectedBundleEditorClient): Replaces

initializeInjectedBundleEditorClient and just sets m_editorClient.

(WebKit::WebPage::close): Resets m_editorClient.

  • WebProcess/WebPage/WebPage.h: Changed m_editorClient to a unique_ptr.

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/BundleEditingDelegate.mm: Added.

(-[BundleEditingDelegateRemoteObject willWriteToPasteboard:]):
(-[BundleEditingDelegateRemoteObject didWriteToPasteboard]):
(TEST):

  • TestWebKitAPI/Tests/WebKit2Cocoa/BundleEditingDelegatePlugIn.mm: Added.

(-[BundleEditingDelegatePlugIn webProcessPlugIn:didCreateBrowserContextController:]):
(-[BundleEditingDelegatePlugIn _webProcessPlugInBrowserContextController:willWriteRangeToPasteboard:]):
(-[BundleEditingDelegatePlugIn _webProcessPlugInBrowserContextController:pasteboardDataForRange:]):
(-[BundleEditingDelegatePlugIn _webProcessPlugInBrowserContextControllerDidWriteToPasteboard:]):

  • TestWebKitAPI/Tests/WebKit2Cocoa/BundleEditingDelegateProtocol.h: Added.
2:58 PM Changeset in webkit [209306] by jfbastien@apple.com
  • 22 edits in trunk

WebAssembly: update binary format to 0xD version
https://bugs.webkit.org/show_bug.cgi?id=165345

Reviewed by Keith Miller.

As described in the following PR: https://github.com/WebAssembly/design/pull/836
Originally committed in r209175, reverted in r209242, and fixed in r209284.

JSTests:

  • wasm/Builder.js:

(const._normalizeFunctionSignature):

  • wasm/Builder_WebAssemblyBinary.js:

(const.emitters.Type):
(const.emitters.Code):

  • wasm/LowLevelBinary.js:

(export.default.LowLevelBinary.prototype.block_type):
(export.default.LowLevelBinary.prototype.inline_signature_type): Deleted.

  • wasm/WASM.js:
  • wasm/js-api/test_basic_api.js:
  • wasm/self-test/test_BuilderWebAssembly.js:

(EmptyModule):
(CustomSection):

  • wasm/self-test/test_WASM.js:
  • wasm/wasm.json:

Source/JavaScriptCore:

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::zeroForType):
(JSC::Wasm::B3IRGenerator::addConstant):
(JSC::Wasm::createJSWrapper):

  • wasm/WasmCallingConvention.h:

(JSC::Wasm::CallingConvention::marshallArgument):

  • wasm/WasmFormat.cpp:

(JSC::Wasm::toString): Deleted.

  • wasm/WasmFormat.h:

(JSC::Wasm::isValueType):
(JSC::Wasm::toB3Type): Deleted.

  • wasm/WasmFunctionParser.h:

(JSC::Wasm::FunctionParser<Context>::parseExpression):

  • wasm/WasmModuleParser.cpp:

(JSC::Wasm::ModuleParser::parse):
(JSC::Wasm::ModuleParser::parseType):

  • wasm/WasmModuleParser.h:
  • wasm/WasmParser.h:

(JSC::Wasm::Parser::parseResultType):

  • wasm/generateWasm.py:

(Wasm.init):

  • wasm/generateWasmOpsHeader.py:

(cppMacro):
(typeMacroizer):
(opcodeMacroizer):

  • wasm/js/WebAssemblyFunction.cpp:

(JSC::callWebAssemblyFunction):

  • wasm/wasm.json:
1:43 PM Changeset in webkit [209305] by hyatt@apple.com
  • 1 edit
    2 deletes in trunk/LayoutTests

[CSS Parser] Remove Inspector test of Bison errors
https://bugs.webkit.org/show_bug.cgi?id=165362

Reviewed by Simon Fraser.

The old parser logs invalid property declaration errors whenever a Bison error
occurs. This catches only a fraction of declaration errors,
since Bison accepts practically everything and leaves it up to the specific
parser functions to determine validity of a property.

The new parser does not have this error reporting. The old reporting will be
removed from CSSParser when the new parser turns on. This patch removes the
test of Bison errors.

  • inspector/console/css-source-locations-expected.txt: Removed.
  • inspector/console/css-source-locations.html: Removed.
1:22 PM Changeset in webkit [209304] by hyatt@apple.com
  • 12 edits in trunk/Source/WebCore

[CSS Parser] Remove line numbers from StyleRule.
https://bugs.webkit.org/show_bug.cgi?id=165361

Reviewed by Simon Fraser.

StyleRules have a concept of a source line that is eventually passed
to the inspector. This was only ever used by normal rules, i.e., ones with
selectors, and set to 0 for all other rules. This line was set to the line number
at which the end of the selector text occurred.

Because Inspector already computes the start and end range for the selector
text, storing a source line on StyleRule ends up being redundant. This patch
gets rid of the source line and uses the end line of the selector text
instead.

  • css/CSSGrammar.y.in:

Remove the code that updates the last seen selector line.

  • css/CSSKeyframeRule.cpp:

(WebCore::StyleKeyframe::StyleKeyframe):

  • css/CSSKeyframesRule.cpp:

(WebCore::StyleRuleKeyframes::StyleRuleKeyframes):
No longer need to pass in a 0 line number.

  • css/StyleRule.cpp:

(WebCore::StyleRule::StyleRule):
(WebCore::StyleRule::create):
(WebCore::StyleRule::splitIntoMultipleRulesWithMaximumSelectorComponentCount):
(WebCore::StyleRuleFontFace::StyleRuleFontFace):
(WebCore::StyleRuleGroup::StyleRuleGroup):
(WebCore::StyleRuleCharset::StyleRuleCharset):
(WebCore::StyleRuleNamespace::StyleRuleNamespace):

  • css/StyleRule.h:

(WebCore::StyleRuleBase::StyleRuleBase):
(WebCore::StyleRuleBase::sourceLine): Deleted.

  • css/StyleRuleImport.cpp:

(WebCore::StyleRuleImport::StyleRuleImport):
Remove m_sourceLine and change the create methods and constructors to not
require a line number.

  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::createStyleRule):
Line number no longer needed.

(WebCore::CSSParser::updateLastSelectorLineAndPosition): Deleted.

  • css/parser/CSSParser.h:

Got rid of the function that tracks and updates the last seen selector line.

  • css/parser/CSSParserImpl.cpp:

(WebCore::CSSParserImpl::consumeStyleRule):
Fix the rule creation in the new parser to not pass in a 0 line number.

  • inspector/InspectorStyleSheet.cpp:

(WebCore::buildSourceRangeObject):
(WebCore::InspectorStyleSheet::buildObjectForSelectorList):
(WebCore::InspectorStyleSheet::buildObjectForRule):

  • inspector/InspectorStyleSheet.h:

Patch the methods that build up the selector range to return the end line
information for selector text so that it can be set as the source line
for the rule (thus eliminating the need to store the line number on the style
rule itself).

12:22 PM Changeset in webkit [209303] by weinig@apple.com
  • 42 edits
    2 deletes in trunk

optional sequence values not handled correctly by binding generator
https://bugs.webkit.org/show_bug.cgi?id=142562

Source/WebCore:

Also fixes:

Remove non-standard postMessage overload
https://bugs.webkit.org/show_bug.cgi?id=161911

and

Wrong argument order in window.postMessage
https://bugs.webkit.org/show_bug.cgi?id=63141

Reviewed by Darin Adler.

  • WebCore.xcodeproj/project.pbxproj:

Remove no longer needed files.

  • bindings/generic/IDLTypes.h:
  • bindings/js/JSDOMConvert.h:

(WebCore::Converter<IDLObject>::convert):
Add support for the WebIDL object type.

  • bindings/js/JSDOMBinding.cpp:

(WebCore::createDOMException):
Add support for throwing stack overflow errors.

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::handlePostMessage): Deleted.
(WebCore::JSDOMWindow::postMessage): Deleted.

  • bindings/js/JSDedicatedWorkerGlobalScopeCustom.cpp: Removed.
  • bindings/js/JSMessagePortCustom.cpp:

(WebCore::JSMessagePort::postMessage): Deleted.
(WebCore::extractTransferables): Deleted.

  • bindings/js/JSMessagePortCustom.h: Removed.
  • bindings/js/JSWorkerCustom.cpp:

(WebCore::JSWorker::postMessage): Deleted.
Remove custom bindings for postMessage.

  • bindings/js/SerializedScriptValue.h:

Switch to using enum class.

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::SerializedScriptValue::transferArrayBuffers):
(WebCore::SerializedScriptValue::create):
Add new create function that takes the transfer list, processes it, and returns
MessagePorts and SerializedScriptValue / exception.

(WebCore::CloneBase::throwStackOverflow): Deleted.
(WebCore::CloneDeserializer::throwValidationError): Deleted.
Remove uncalled functions.

  • bindings/scripts/CodeGenerator.pm:

(IsRefPtrType):
(IsBuiltinType):

  • bindings/scripts/CodeGeneratorJS.pm:

(AddToIncludesForIDLType):
(GetBaseIDLType):
Add support for the WebIDL 'object' type.

  • bindings/scripts/test/JS/JSTestObj.cpp:
  • bindings/scripts/test/TestObj.idl:

Add tests for 'object'.

  • dom/ExceptionCode.h:

Add two new ExceptionCodes:

  • ExistingExceptionError, to indicate that implementation code threw a JS exception.
  • StackOverflowError, to indicate that a stack overflow exception should be thrown.
  • dom/MessagePort.cpp:

(WebCore::MessagePort::postMessage):

  • dom/MessagePort.h:
  • dom/MessagePort.idl:
  • page/DOMWindow.cpp:

(WebCore::DOMWindow::postMessage):

  • page/DOMWindow.h:
  • page/DOMWindow.idl:
  • workers/DedicatedWorkerGlobalScope.cpp:

(WebCore::DedicatedWorkerGlobalScope::postMessage):

  • workers/DedicatedWorkerGlobalScope.h:
  • workers/DedicatedWorkerGlobalScope.idl:
  • workers/Worker.cpp:

(WebCore::Worker::postMessage):

  • workers/Worker.h:
  • workers/Worker.idl:

Update to call new SerializedScriptValue create function.

LayoutTests:

Reviewed by Darin Adler.

  • fast/canvas/webgl/resources/typed-array-worker.js:
  • fast/dom/Window/window-postmessage-args-expected.txt:
  • fast/dom/Window/window-postmessage-args.html:
  • fast/events/message-port-deleted-document.html:
  • fast/events/message-port-deleted-frame.html:
  • fast/events/message-port-inactive-document.html:
  • fast/events/message-port-multi-expected.txt:
  • fast/events/message-port.html:
  • fast/workers/worker-context-multi-port-expected.txt:
  • fast/workers/worker-multi-port-expected.txt:
  • webgl/1.0.2/resources/webgl_test_files/conformance/typedarrays/resources/typed-array-worker.js:
  • webgl/1.0.3/resources/webgl_test_files/conformance/typedarrays/resources/typed-array-worker.js:

Update for new exceptions and stricter enforcement of the postMessage signature.

11:56 AM Changeset in webkit [209302] by hyatt@apple.com
  • 3 edits in trunk/Source/WebCore

[CSS Parser] Support Dashboard Regions
https://bugs.webkit.org/show_bug.cgi?id=165357

Reviewed by Daniel Bates.

  • css/CSSValueKeywords.in:
  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeWebkitDashboardRegion):
(WebCore::CSSPropertyParser::parseSingleValue):

11:05 AM Changeset in webkit [209301] by keith_miller@apple.com
  • 6 edits
    1 add in trunk

Add Wasm copysign
https://bugs.webkit.org/show_bug.cgi?id=165355

Reviewed by Filip Pizlo.

JSTests:

  • wasm/function-tests/copysign.js: Added.

Source/JavaScriptCore:

This patch also makes two other important changes:

1) allows for i64 constants in the B3 generator language.
2) Fixes a bug with F64ConvertUI64 where the operation returned a Float instead

of a Double in B3.

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::addOp<F64ConvertUI64>):

  • wasm/generateWasmB3IRGeneratorInlinesHeader.py:

(CodeGenerator.generateOpcode):
(generateConstCode):
(generateI32ConstCode): Deleted.

  • wasm/wasm.json:
10:41 AM Changeset in webkit [209300] by commit-queue@webkit.org
  • 6 edits
    1 delete in trunk

Unreviewed, rolling out r209298.
https://bugs.webkit.org/show_bug.cgi?id=165359

broke the build (Requested by smfr on #webkit).

Reverted changeset:

"Add Wasm copysign"
https://bugs.webkit.org/show_bug.cgi?id=165355
http://trac.webkit.org/changeset/209298

10:33 AM Changeset in webkit [209299] by Simon Fraser
  • 21 edits
    6 adds in trunk

Improve the behavior of scroll-into-view when the target is inside position:fixed
https://bugs.webkit.org/show_bug.cgi?id=165354

Reviewed by Zalan Bujtas.
Source/WebCore:

The existing RenderLayer::scrollRectToVisible() code paid no heed to whether the
target was inside position:fixed, resulting in unwanted scrolls.

Fix this by plumbing through from the call sites a "insideFixed" flag which we get
when we call localToAbsolute(), and use this flag to avoid scrolling at all if
unzoomed.

If zoomed and we're focussing something inside position:fixed, and if visual viewports
are enabled, we can compute the visual viewport required to reveal the target rect,
which gives us the ideal scroll position.

Fix a bug on non-iOS platforms when zoomed, which is to scale the viewRect since
frameView.visibleContentRect() gives an unscaled rect on those platforms.

Not all callers of scrollRectToVisible() are fixed, but those that are not will get
the current behavior.

Tests: fast/overflow/scroll-anchor-in-position-fixed.html

fast/visual-viewport/zoomed-scroll-into-view-fixed.html
fast/visual-viewport/zoomed-scroll-to-anchor-in-position-fixed.html

  • dom/Element.cpp:

(WebCore::Element::scrollIntoView):
(WebCore::Element::scrollIntoViewIfNeeded):
(WebCore::Element::scrollIntoViewIfNotVisible):
(WebCore::Element::updateFocusAppearance):

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::FrameSelection):
(WebCore::FrameSelection::absoluteCaretBounds):
(WebCore::FrameSelection::recomputeCaretRect):
(WebCore::FrameSelection::revealSelection):

  • editing/FrameSelection.h:
  • editing/VisiblePosition.cpp:

(WebCore::VisiblePosition::absoluteCaretBounds):

  • editing/VisiblePosition.h:
  • editing/htmlediting.cpp:

(WebCore::absoluteBoundsForLocalCaretRect):

  • editing/htmlediting.h:
  • page/FrameView.cpp:

(WebCore::FrameView::scrollElementToRect):
(WebCore::FrameView::scrollToAnchor):

  • page/PrintContext.cpp:

(WebCore::PrintContext::outputLinkedDestinations):

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::getLeadingCorner):
(WebCore::RenderElement::getTrailingCorner):
(WebCore::RenderElement::absoluteAnchorRect):
(WebCore::RenderElement::anchorRect): Renamed to absoluteAnchorRect().

  • rendering/RenderElement.h:
  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::scrollRectToVisible):
(WebCore::RenderLayer::getRectToExpose):
(WebCore::RenderLayer::autoscroll):

  • rendering/RenderLayer.h:
  • rendering/RenderObject.cpp:

(WebCore::RenderObject::scrollRectToVisible):

  • rendering/RenderObject.h:

Source/WebKit/mac:

Plumb through 'insideFixed'. We don't get compute it, so behavior from
these call sites won't change.

  • WebView/WebFrame.mm:

(-[WebFrame _scrollDOMRangeToVisible:]):
(-[WebFrame _scrollDOMRangeToVisible:withInset:]):

LayoutTests:

  • fast/overflow/scroll-anchor-in-position-fixed-expected.txt: Added.
  • fast/overflow/scroll-anchor-in-position-fixed.html: Added.
  • fast/visual-viewport/zoomed-scroll-to-anchor-in-position-fixed-expected.txt: Added.
  • fast/visual-viewport/zoomed-scroll-to-anchor-in-position-fixed.html: Added.
  • platform/ios-simulator/TestExpectations:
9:37 AM Changeset in webkit [209298] by keith_miller@apple.com
  • 6 edits
    1 add in trunk

Add Wasm copysign
https://bugs.webkit.org/show_bug.cgi?id=165355

Reviewed by Filip Pizlo.

JSTests:

  • wasm/function-tests/copysign.js: Added.

Source/JavaScriptCore:

This patch also makes two other important changes:

1) allows for i64 constants in the B3 generator language.
2) Fixes a bug with F64ConvertUI64 where the operation returned a Float instead

of a Double in B3.

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::addOp<F64ConvertUI64>):

  • wasm/generateWasmB3IRGeneratorInlinesHeader.py:

(CodeGenerator.generateOpcode):
(generateConstCode):
(generateI32ConstCode): Deleted.

  • wasm/wasm.json:
8:36 AM Changeset in webkit [209297] by Simon Fraser
  • 6 edits
    2 adds in trunk

localToAbsolute() does incorrect conversion for elements inside position:fixed with zooming
https://bugs.webkit.org/show_bug.cgi?id=165244

Reviewed by Zalan Bujtas.

Source/WebCore:

RenderView::mapLocalToContainer() and RenderView::mapAbsoluteToLocalPoint() handle the coordinate
mapping through the RenderView's transform (when zoomed), and apply the scroll offset for position:fixed
elements.

They did this in the wrong order; "local to absolute" applied the zoom scale, and then adjusted for the scroll position,
and "absolute to local" applied the scroll position and then the transform.

However that scroll position adjustment should be in unzoomed coordinates, since it's accounting for the
layout adjustment that position:fixed receives (which actually occurs via the localToAbsolute() call
in RenderLayer's accumulateOffsetTowardsAncestor()). "local to absolute" should therefore apply the scroll
adjustment first before the transform, and "absolute to local" the reverse.

In both visual viewport mode, and legacy drifty fixed mode FrameView::scrollPositionForFixedPosition()
returns a scroll offset that is unaffected by zoom, which is correct and confirms this change.

[Confusingly, ScrollView scroll positions _are_ affected by zoom, as the entire document gets bigger.]

RenderGeometryMap::mapToContainer(), which is an optimization on top of RenderView::mapLocalToContainer(),
gets a similar fix.

Test: fast/zooming/client-rect-in-fixed-zoomed.html

  • rendering/RenderGeometryMap.cpp:

(WebCore::RenderGeometryMap::mapToContainer):

  • rendering/RenderView.cpp:

(WebCore::RenderView::mapLocalToContainer):
(WebCore::RenderView::mapAbsoluteToLocalPoint):

LayoutTests:

Test getBoundingClientRect() (which internally calls localToAbsolute())
for an element inside position:fixed after zooming.

  • fast/visual-viewport/zoomed-fixed-expected.txt: Rebaseline
  • fast/zooming/client-rect-in-fixed-zoomed-expected.txt: Added.
  • fast/zooming/client-rect-in-fixed-zoomed.html: Added.
  • platform/ios-simulator/TestExpectations: Skip new test on iOS; test requires window.scrollTo to be synchronous.
Note: See TracTimeline for information about the timeline view.