Timeline



Nov 20, 2016:

10:22 PM Changeset in webkit [208939] by zandobersek@gmail.com
  • 20 edits in trunk

[EncryptedMedia] Make EME API runtime-enabled
https://bugs.webkit.org/show_bug.cgi?id=164927

Reviewed by Jer Noble.

Source/JavaScriptCore:

  • runtime/CommonIdentifiers.h: Add the necessary identifiers.

Source/WebCore:

Update the EME API IDL definitions to use the EnabledAtRuntime
attribute on the relevant interfaces, attributes and operations.
EncryptedMediaAPI is used as the attribute value.

The corresponding getter, setter and member boolean are added to
the RuntimeEnabledFeatures class.

  • Modules/encryptedmedia/MediaKeyMessageEvent.idl:
  • Modules/encryptedmedia/MediaKeySession.idl:
  • Modules/encryptedmedia/MediaKeyStatusMap.idl:
  • Modules/encryptedmedia/MediaKeySystemAccess.idl:
  • Modules/encryptedmedia/MediaKeys.idl:
  • Modules/encryptedmedia/NavigatorEME.idl:
  • bindings/generic/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setEncryptedMediaAPIEnabled):
(WebCore::RuntimeEnabledFeatures::encryptedMediaAPIEnabled):

  • html/HTMLMediaElement.idl:
  • html/MediaEncryptedEvent.idl:

Source/WebKit2:

Add the new EncryptedMediaAPI preference. Set the same feature
flag on the shared RuntimeEnabledFeatures object to the
corresponding value that's stored in the WebPreferencesStore.

InjectedBundle::overrideBoolPreferenceForTestRunner() does the
same when the 'WebKitEncryptedMediaAPIEnabled' preference is
overridden in WKTR for testing purposes.

  • Shared/WebPreferencesDefinitions.h:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

Tools:

Enable the EME API via the WKTR InjectedBundle whenever testing
commences. This does not have any effect unless the EME feature
is enabled at compile-time, but it's still added to match other
features and for future use.

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::beginTesting):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setEncryptedMediaAPIEnabled):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
8:38 PM Changeset in webkit [208938] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebCore

REGRESSION (r208606?): LayoutTest fast/mediastream/enumerating-crash.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=164715
<rdar://problem/29277180>

Reviewed by Alexey Proskuryakov.

No new tests, fixes an existing test crash.

  • Modules/mediastream/UserMediaRequest.cpp:

(WebCore::UserMediaRequest::contextDestroyed): Call base class method before clearing m_controller

because it nullifies the security context.

5:34 PM Changeset in webkit [208937] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix exception scope verification failures in ConstructData.cpp.
https://bugs.webkit.org/show_bug.cgi?id=164976

Reviewed by Darin Adler.

  • runtime/ConstructData.cpp:

(JSC::construct):

5:33 PM Changeset in webkit [208936] by mark.lam@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Fix exception scope verification failures in CommonSlowPaths.cpp/h.
https://bugs.webkit.org/show_bug.cgi?id=164975

Reviewed by Darin Adler.

  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/CommonSlowPaths.h:

(JSC::CommonSlowPaths::opIn):

5:31 PM Changeset in webkit [208935] by mark.lam@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Fix exception scope verification failures in DateConstructor.cpp and DatePrototype.cpp.
https://bugs.webkit.org/show_bug.cgi?id=164995

Reviewed by Darin Adler.

  • runtime/DateConstructor.cpp:

(JSC::millisecondsFromComponents):
(JSC::constructDate):

  • runtime/DatePrototype.cpp:

(JSC::dateProtoFuncToPrimitiveSymbol):

4:57 PM Changeset in webkit [208934] by commit-queue@webkit.org
  • 1 edit
    6 adds in trunk/LayoutTests

Add iOS text selection tests - long press clear and multi line selection tests
https://bugs.webkit.org/show_bug.cgi?id=164899

Patch by Megan Gardner <Megan Gardner> on 2016-11-20
Reviewed by Darin Adler.

Test for clearing a selection after a long press.
Test for checking multi-line select, both increasing and decreasing, using the left selection.
Test for checking multi-line select, both increasing and decreasing, using the right selection.

  • fast/events/touch/ios/long-press-then-drag-down-to-change-selected-text-expected.txt: Added.
  • fast/events/touch/ios/long-press-then-drag-down-to-change-selected-text.html: Added.
  • fast/events/touch/ios/long-press-then-drag-up-to-change-selected-text-expected.txt: Added.
  • fast/events/touch/ios/long-press-then-drag-up-to-change-selected-text.html: Added.
  • fast/events/touch/ios/long-press-to-select-and-tap-to-clear-expected.txt: Added.
  • fast/events/touch/ios/long-press-to-select-and-tap-to-clear.html: Added.
9:43 AM WebKitGTK/2.14.x edited by Michael Catanzaro
(diff)
12:58 AM Changeset in webkit [208933] by caitp@igalia.com
  • 8 edits in trunk

[JSC] speed up parsing of async functions
https://bugs.webkit.org/show_bug.cgi?id=164808

Reviewed by Yusuke Suzuki.

JSTests:

Add tests for line terminator following "async" keyword in async
function syntax.

  • stress/async-await-syntax.js:

(shouldBe):

Source/JavaScriptCore:

Minor adjustments to Parser in order to mitigate slowdown with async
function parsing enabled:

  • Tokenize "async" as a keyword
  • Perform less branching in various areas of the Parser
  • parser/Keywords.table:
  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseStatementListItem):
(JSC::Parser<LexerType>::parseStatement):
(JSC::Parser<LexerType>::maybeParseAsyncFunctionDeclarationStatement):
(JSC::Parser<LexerType>::parseClass):
(JSC::Parser<LexerType>::parseExportDeclaration):
(JSC::Parser<LexerType>::parseAssignmentExpression):
(JSC::Parser<LexerType>::parseProperty):
(JSC::Parser<LexerType>::createResolveAndUseVariable):
(JSC::Parser<LexerType>::parsePrimaryExpression):
(JSC::Parser<LexerType>::parseMemberExpression):
(JSC::Parser<LexerType>::printUnexpectedTokenText):

  • parser/Parser.h:

(JSC::isAnyContextualKeyword):
(JSC::isIdentifierOrAnyContextualKeyword):
(JSC::isSafeContextualKeyword):
(JSC::Parser::matchSpecIdentifier):

  • parser/ParserTokens.h:
  • runtime/CommonIdentifiers.h:

Nov 19, 2016:

7:29 PM Changeset in webkit [208932] by mark.lam@apple.com
  • 4 edits in trunk/JSTests

op_mod-* JSC tests needs a longer timeout too.
https://bugs.webkit.org/show_bug.cgi?id=164994

Reviewed by Yusuke Suzuki.

  • stress/op_mod-ConstVar.js:
  • stress/op_mod-VarConst.js:
  • stress/op_mod-VarVar.js:
4:38 PM Changeset in webkit [208931] by Antti Koivisto
  • 12 edits in trunk/Source/WebKit2

Salt network cache hashes
https://bugs.webkit.org/show_bug.cgi?id=164924

Reviewed by Alex Christensen.

To enhance privacy make cache content unidentifiable from file names alone.
This is done by generating a unique persistent salt for each cache instance.
It is used when computing hashes used in file names.

The patch also replaces plain text partition directory names with salted hashes.

  • NetworkProcess/cache/NetworkCache.cpp:

(WebKit::NetworkCache::Cache::makeCacheKey):
(WebKit::NetworkCache::makeCacheKey): Deleted.

  • NetworkProcess/cache/NetworkCache.h:

Increment cache version.

  • NetworkProcess/cache/NetworkCacheBlobStorage.cpp:

(WebKit::NetworkCache::BlobStorage::BlobStorage):
(WebKit::NetworkCache::BlobStorage::add):
(WebKit::NetworkCache::BlobStorage::get):

Use salt for blob content hash.

  • NetworkProcess/cache/NetworkCacheBlobStorage.h:
  • NetworkProcess/cache/NetworkCacheData.cpp:

(WebKit::NetworkCache::computeSHA1):

For simplicity all SHA1s are now salted.

(WebKit::NetworkCache::makeSalt):
(WebKit::NetworkCache::readOrMakeSalt):

Read salt if it exists, generate and persist it otherwise.

  • NetworkProcess/cache/NetworkCacheData.h:
  • NetworkProcess/cache/NetworkCacheKey.cpp:

(WebKit::NetworkCache::Key::Key):

Remove the "No partition" string and just empty.
That was only needed to have a directory name of some sort.

(WebKit::NetworkCache::Key::computeHash):

Use salt for key hash.

(WebKit::NetworkCache::Key::computePartitionHash):

Separate hash for partition.

  • NetworkProcess/cache/NetworkCacheKey.h:
  • NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:

(WebKit::NetworkCache::makeSubresourcesKey):
(WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::saveToDiskIfReady):
(WebKit::NetworkCache::SpeculativeLoadManager::retrieveSubresourcesEntry):

  • NetworkProcess/cache/NetworkCacheStorage.cpp:

(WebKit::NetworkCache::makeSaltFilePath):
(WebKit::NetworkCache::Storage::open):

Cache can't be opened if we can't read or persist a salt.

(WebKit::NetworkCache::traverseRecordsFiles):
(WebKit::NetworkCache::Storage::Storage):
(WebKit::NetworkCache::Storage::synchronize):
(WebKit::NetworkCache::Storage::recordDirectoryPathForKey):

Use the partition hash in the directory name instead of a plain text name.

(WebKit::NetworkCache::decodeRecordHeader):
(WebKit::NetworkCache::Storage::readRecord):
(WebKit::NetworkCache::Storage::encodeRecord):
(WebKit::NetworkCache::Storage::traverse):
(WebKit::NetworkCache::Storage::clear):

  • NetworkProcess/cache/NetworkCacheStorage.h:

(WebKit::NetworkCache::Storage::salt):

1:22 PM Changeset in webkit [208930] by Chris Dumez
  • 15 edits in trunk

Update HTML form validation messages
https://bugs.webkit.org/show_bug.cgi?id=164957
<rdar://problem/29338669>

Reviewed by Darin Adler.

Source/WebCore:

Update HTML form validation messages as per recent feedback:

  • Drop the "Please".
  • Drop the period at the end.
  • Drop the "if you want to proceed" that was used only for the checkbox.

No new tests, rebaselined existing tests.

  • English.lproj/Localizable.strings:
  • platform/LocalizedStrings.cpp:

(WebCore::validationMessageValueMissingText):
(WebCore::validationMessageValueMissingForCheckboxText):
(WebCore::validationMessageValueMissingForFileText):
(WebCore::validationMessageValueMissingForRadioText):
(WebCore::validationMessageValueMissingForSelectText):
(WebCore::validationMessageTypeMismatchText):
(WebCore::validationMessageTypeMismatchForEmailText):
(WebCore::validationMessageTypeMismatchForURLText):
(WebCore::validationMessagePatternMismatchText):
(WebCore::validationMessageTooShortText):
(WebCore::validationMessageTooLongText):
(WebCore::validationMessageRangeUnderflowText):
(WebCore::validationMessageRangeOverflowText):
(WebCore::validationMessageStepMismatchText):
(WebCore::validationMessageBadInputForNumberText):

LayoutTests:

Rebaseline existing tests.

  • fast/forms/number/number-validation-message-expected.txt:
  • fast/forms/number/number-validation-message.html:
  • fast/forms/validation-custom-message-expected.txt:
  • fast/forms/validation-custom-message.html:
  • fast/forms/validation-messages-expected.txt:
  • fast/forms/validation-messages.html:
  • fast/forms/validationMessage-expected.txt:
1:12 PM Changeset in webkit [208929] by jdiggs@igalia.com
  • 12 edits
    9 adds in trunk

AX: [ATK] Implement selection interface and states for elements supporting aria-selected and for menu roles
https://bugs.webkit.org/show_bug.cgi?id=164865

Reviewed by Chris Fleizach.

Source/WebCore:

Implement AtkSelection and support ATK_STATE_SELECTABLE and ATK_STATE_SELECTED
for elements supporting aria-selected and for menu-related roles. Also enable the
equivalent support for the Mac because NSAccessibilitySelectedChildrenAttribute is
included as supported on the same roles.

In addition, fix several bugs discovered along the way: Call isSelected() on role
tab, because tab supports aria-selected; not aria-checked. Correct ATK mapping
of ListBoxRole and ListBoxOptionRole for combobox descendants. Always defer to
WebCore for inclusion/exclusion decisions related to elements with an explicit
ARIA role.

Tests: accessibility/aria-combobox-hierarchy.html

accessibility/aria-selected-menu-items.html
accessibility/aria-selected.html

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::selectedTabItem):
(WebCore::AccessibilityNodeObject::canSetSelectedAttribute):

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::isDescendantOfRole):

  • accessibility/AccessibilityObject.h:

(WebCore::AccessibilityObject::canHaveSelectedChildren):

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::isSelected):
(WebCore::AccessibilityRenderObject::canHaveSelectedChildren):
(WebCore::AccessibilityRenderObject::selectedChildren):

  • accessibility/AccessibilityRenderObject.h:
  • accessibility/atk/AccessibilityObjectAtk.cpp:

(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):

  • accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:

(webkitAccessibleSelectionGetSelectionCount):

  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(atkRole):
(getInterfaceMaskFromObject):

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

LayoutTests:

New tests for the added support. In addition, update the expectations for
aria-combobox.html to reflect the corrected ATK mapping of ListBoxRole for
combobox descendants.

  • accessibility/aria-combobox-expected.txt: Updated.
  • accessibility/aria-combobox-hierarchy.html: Added.
  • accessibility/aria-selected-menu-items.html: Added.
  • accessibility/aria-selected.html: Added.
  • platform/gtk/accessibility/aria-combobox-hierarchy-expected.txt: Added.
  • platform/gtk/accessibility/aria-selected-expected.txt: Added.
  • platform/gtk/accessibility/aria-selected-menu-items-expected.txt: Added.
  • platform/mac/accessibility/aria-combobox-hierarchy-expected.txt: Added.
  • platform/mac/accessibility/aria-selected-expected.txt: Added.
  • platform/mac/accessibility/aria-selected-menu-items-expected.txt: Added.
1:04 PM Changeset in webkit [208928] by Simon Fraser
  • 2 edits in trunk/Tools

Fix the Mac and iOS bulds.

  • WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:

(-[TestRunnerWKWebView _stableStateOverride]):
(-[TestRunnerWKWebView _setStableStateOverride:]):

11:34 AM Changeset in webkit [208927] by Simon Fraser
  • 46 edits in trunk

[iOS WK2] When zoomed in and panning on pages with fixed bars, parts of the bars are sometimes missing
https://bugs.webkit.org/show_bug.cgi?id=164855

Reviewed by Sam Weinig.
Source/WebCore:

During UI-process panning and zooming, we send visible rect updates to the web process
with inStableState=false, and don't update GraphicsLayers until we get into a stable state.

This causes a problem where the web process has a stale notion of where the GraphicsLayers
for position:fixed elements are, but is then told to update tiling coverage with an up-to-date
visible rect. The existing "sync layer positions" path isn't useful to fix this, because it
breaks the relationship between the GraphicsLayer positions and their FixedPositionViewportConstraints
in the scrolling tree.

To address this, add the notion of an Optional<> approximatePosition on GraphicsLayers. This is used
only by the coverageRect computation code path, and is cleared by a setPosition(). ApproximatePositions
are pushed onto GraphicsLayers via the syncViewportConstrainedLayerPositions() code path (renamed to
reconcileViewportConstrainedLayerPositions).

This allows us to remmove "viewportIsStable" from GraphicsLayer flushing, and FrameView.

SetOrSyncScrollingLayerPosition is made into an enum class.

Tested by scrollingcoordinator/ios/non-stable-viewport-scroll.html

  • page/FrameView.cpp:

(WebCore::FrameView::reset):

  • page/FrameView.h:
  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
(WebCore::AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll):
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
(WebCore::AsyncScrollingCoordinator::reconcileScrollingState):
(WebCore::AsyncScrollingCoordinator::reconcileViewportConstrainedLayerPositions):
(WebCore::AsyncScrollingCoordinator::syncViewportConstrainedLayerPositions): Deleted.

  • page/scrolling/AsyncScrollingCoordinator.h:

(WebCore::AsyncScrollingCoordinator::ScheduledScrollUpdate::ScheduledScrollUpdate):

  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::operator<<):

  • page/scrolling/ScrollingCoordinator.h:

(WebCore::ScrollingCoordinator::reconcileScrollingState):
(WebCore::ScrollingCoordinator::reconcileViewportConstrainedLayerPositions):
(WebCore::ScrollingCoordinator::syncViewportConstrainedLayerPositions): Deleted.

  • page/scrolling/ScrollingStateFixedNode.cpp:

(WebCore::ScrollingStateFixedNode::reconcileLayerPositionForViewportRect):
(WebCore::ScrollingStateFixedNode::syncLayerPositionForViewportRect): Deleted.

  • page/scrolling/ScrollingStateFixedNode.h:
  • page/scrolling/ScrollingStateNode.h:

(WebCore::ScrollingStateNode::reconcileLayerPositionForViewportRect):
(WebCore::ScrollingStateNode::syncLayerPositionForViewportRect): Deleted.

  • page/scrolling/ScrollingStateStickyNode.cpp:

(WebCore::ScrollingStateStickyNode::reconcileLayerPositionForViewportRect):
(WebCore::ScrollingStateStickyNode::syncLayerPositionForViewportRect): Deleted.

  • page/scrolling/ScrollingStateStickyNode.h:
  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::scrollPositionChangedViaDelegatedScrolling):

  • page/scrolling/ScrollingTree.h:
  • page/scrolling/ThreadedScrollingTree.cpp:

(WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):

  • page/scrolling/ThreadedScrollingTree.h:
  • page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:

(WebCore::ScrollingTreeFrameScrollingNodeIOS::setScrollPositionWithoutContentEdgeConstraints):

  • page/scrolling/ios/ScrollingTreeIOS.cpp:

(WebCore::ScrollingTreeIOS::scrollingTreeNodeDidScroll):

  • page/scrolling/ios/ScrollingTreeIOS.h:
  • page/scrolling/mac/ScrollingTreeFixedNode.mm:

(WebCore::ScrollingTreeFixedNode::updateLayersAfterAncestorChange):

  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::dumpProperties):

  • platform/graphics/GraphicsLayer.h:

(WebCore::GraphicsLayer::setPosition):
(WebCore::GraphicsLayer::approximatePosition):
(WebCore::GraphicsLayer::setApproximatePosition):
(WebCore::GraphicsLayer::flushCompositingState):
(WebCore::GraphicsLayer::flushCompositingStateForThisLayerOnly):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::flushCompositingState):
(WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly):
(WebCore::GraphicsLayerCA::computeVisibleAndCoverageRect):
(WebCore::GraphicsLayerCA::setVisibleAndCoverageRects): No longer bail for viewportConstained layers when the viewport is unstable.
(WebCore::GraphicsLayerCA::recursiveCommitChanges):

  • platform/graphics/ca/GraphicsLayerCA.h:

(WebCore::GraphicsLayerCA::CommitState::CommitState): Deleted.

  • platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:

(WebCore::GraphicsLayerTextureMapper::flushCompositingState):

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::CoordinatedGraphicsLayer::flushCompositingState):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::flushPendingLayerChanges):

Source/WebKit/win:

Remove the "inStableState" parameter from flushCompositingState() etc.

  • WebCoreSupport/AcceleratedCompositingContext.cpp:

(AcceleratedCompositingContext::flushPendingLayerChanges):

  • WebView.cpp:

(WebView::flushPendingGraphicsLayerChanges):

Source/WebKit2:

During UI-process panning and zooming, we send visible rect updates to the web process
with inStableState=false, and don't update GraphicsLayers until we get into a stable state.

This causes a problem where the web process has a stale notion of where the GraphicsLayers
for position:fixed elements are, but is then told to update tiling coverage with an up-to-date
visible rect. The existing "sync layer positions" path isn't useful to fix this, because it
breaks the relationship between the GraphicsLayer positions and their FixedPositionViewportConstraints
in the scrolling tree.

To address this, add the notion of an Optional<> approximatePosition on GraphicsLayers. This is used
only by the coverageRect computation code path, and is cleared by a setPosition(). ApproximatePositions
are pushed onto GraphicsLayers via the syncViewportConstrainedLayerPositions() code path (renamed to
reconcileViewportConstrainedLayerPositions).

Tested by scrollingcoordinator/ios/non-stable-viewport-scroll.html

  • UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:

(WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidScroll):

  • UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
  • UIProcess/Scrolling/RemoteScrollingTree.cpp:

(WebKit::RemoteScrollingTree::scrollingTreeNodeDidScroll):

  • UIProcess/Scrolling/RemoteScrollingTree.h:
  • WebProcess/Scrolling/RemoteScrollingCoordinator.mm:

(WebKit::RemoteScrollingCoordinator::scrollPositionChangedForNode):

  • WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:

(WebKit::CompositingCoordinator::flushPendingLayerChanges):

  • WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:

(WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):

  • WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:

(WebKit::LayerTreeHostGtk::flushPendingLayerChanges):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::updateVisibleContentRects): Always push the custom fixed position rect down, but send
ScrollingLayerPositionAction::SetApproximate if the state is not stable.

  • WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:

(WebKit::RemoteLayerTreeDrawingArea::flushLayers):

  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

(WebKit::TiledCoreAnimationDrawingArea::flushLayers):

11:02 AM Changeset in webkit [208926] by Simon Fraser
  • 18 edits
    2 adds in trunk

Make it possible to test non-stable-state scrolling on iOS
https://bugs.webkit.org/show_bug.cgi?id=164905

Reviewed by Dan Bernstein.

Source/WebKit2:

Make it possible for an iOS layout test to force every visible rect update
from the UI process to the web process to be in a non-stable state. This emulates
what happens during panning and zooming interactions, and allows us to test the
scrolling and layer trees in these transient states.

This is done by adding a testing property on WKWebView, _stableStateOverride, whose
getters and setters are overridden in TestRunnerWKWebView. When non-nil, we _updateVisibleContentRectAfterScrollInView
consults the NSNumber's boolValue and uses it to override the stable state.

To facilitate this kind of testing, also add immediateScrollToOffset() and
immediateZoomToScale() to UIScriptController. Finally, add doAfterPresentationUpdate()
which provides a callback that fires after one trip to the web process and back.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _updateVisibleContentRectAfterScrollInView:]):
(-[WKWebView _stableStateOverride]):
(-[WKWebView _setStableStateOverride:]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:

Tools:

Make it possible for an iOS layout test to force every visible rect update
from the UI process to the web process to be in a non-stable state. This emulates
what happens during panning and zooming interactions, and allows us to test the
scrolling and layer trees in these transient states.

This is done by adding a testing property on WKWebView, _stableStateOverride, whose
getters and setters are overridden in TestRunnerWKWebView. When non-nil, we _updateVisibleContentRectAfterScrollInView
consults the NSNumber's boolValue and uses it to override the stable state.

To facilitate this kind of testing, also add immediateScrollToOffset() and
immediateZoomToScale() to UIScriptController. Finally, add doAfterPresentationUpdate()
which provides a callback that fires after one trip to the web process and back.

Add code generation support for optional boolean attributes in IDL.

Align CodeGeneratorDumpRenderTree.pm and CodeGeneratorTestRunner.pm.

  • DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm:

(_generateImplementationFile):
(_platformTypeConstructor):
(_returnExpression):

  • DumpRenderTree/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::doAfterPresentationUpdate):
(WTR::contentOffsetBoundedInValidRange):
(WTR::UIScriptController::scrollToOffset):
(WTR::UIScriptController::immediateScrollToOffset):
(WTR::UIScriptController::immediateZoomToScale):
(WTR::UIScriptController::stableStateOverride):
(WTR::UIScriptController::setStableStateOverride):

  • DumpRenderTree/mac/UIScriptControllerMac.mm:

(WTR::UIScriptController::doAfterPresentationUpdate):

  • TestRunnerShared/Bindings/JSWrappable.h:

(WTR::JSValueMakeBooleanOrNull):
(WTR::JSValueToNullableBoolean):

  • TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
  • TestRunnerShared/UIScriptContext/UIScriptController.cpp:

(WTR::UIScriptController::immediateScrollToOffset):
(WTR::UIScriptController::immediateZoomToScale):
(WTR::UIScriptController::stableStateOverride):
(WTR::UIScriptController::setStableStateOverride):

  • TestRunnerShared/UIScriptContext/UIScriptController.h:
  • WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm:

(_classRefGetter):
(_platformTypeConstructor):
(_returnExpression):

  • WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:

(-[TestRunnerWKWebView dealloc]):
(-[TestRunnerWKWebView _stableStateOverride]):
(-[TestRunnerWKWebView _setStableStateOverride:]):

  • WebKitTestRunner/ios/TestControllerIOS.mm:

(WTR::TestController::platformResetStateToConsistentValues):

  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::doAsyncTask):
(WTR::UIScriptController::doAfterPresentationUpdate):
(WTR::UIScriptController::zoomToScale):
(WTR::UIScriptController::immediateScrollToOffset):
(WTR::UIScriptController::immediateZoomToScale):
(WTR::UIScriptController::stableStateOverride):
(WTR::UIScriptController::setStableStateOverride):

  • WebKitTestRunner/mac/UIScriptControllerMac.mm:

(WTR::UIScriptController::doAfterPresentationUpdate):

LayoutTests:

  • scrollingcoordinator/ios/non-stable-viewport-scroll-expected.txt: Added.
  • scrollingcoordinator/ios/non-stable-viewport-scroll.html: Added.
9:39 AM Changeset in webkit [208925] by mark.lam@apple.com
  • 6 edits in trunk

Add --timeoutMultiplier option to allow some tests more time to run.
https://bugs.webkit.org/show_bug.cgi?id=164951

Reviewed by Yusuke Suzuki.

JSTests:

Extended the timeout for these tests by 50% more because they run quite slow on
low-end machines.

  • stress/op_div-ConstVar.js:
  • stress/op_div-VarConst.js:
  • stress/op_div-VarVar.js:

Source/JavaScriptCore:

  • jsc.cpp:

(timeoutThreadMain):

  • Modified to factor in a timeout multiplier that can adjust the timeout duration.

(startTimeoutThreadIfNeeded):

  • Moved the code that starts the timeout thread here from main() so that we can

call it after command line args have been parsed instead.
(main):

  • Deleted old timeout thread starting code.

(CommandLine::parseArguments):

  • Added parsing of the --timeoutMultiplier option.

(jscmain):

  • Start the timeout thread if needed after we've parsed the command line args.
12:08 AM Changeset in webkit [208924] by jdiggs@igalia.com
  • 11 edits
    2 adds in trunk

AX: [ATK] Expose aria-busy via ATK_STATE_BUSY
https://bugs.webkit.org/show_bug.cgi?id=164909

Reviewed by Chris Fleizach.

Source/WebCore:

Expose aria-busy via ATK_STATE_BUSY. Also rename ariaLiveRegionBusy()
to isBusy() because in ARIA 1.1 aria-busy is no longer limited to live
regions.

Test: accessibility/aria-busy.html

  • accessibility/AccessibilityObject.h:

(WebCore::AccessibilityObject::isBusy):
(WebCore::AccessibilityObject::ariaLiveRegionBusy): Deleted.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::isBusy):
(WebCore::AccessibilityRenderObject::ariaLiveRegionBusy): Deleted.

  • accessibility/AccessibilityRenderObject.h:
  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(setAtkStateSetFromCoreObject):

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper accessibilityARIAIsBusy]):

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

  • inspector/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):

Tools:

Implement boolAttributeValue() for ATK so we can test AXElementBusy.

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

(WTR::AccessibilityUIElement::boolAttributeValue):

LayoutTests:

  • accessibility/aria-busy-expected.txt: Added.
  • accessibility/aria-busy.html: Added.
12:03 AM Changeset in webkit [208923] by mark.lam@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Fix missing exception checks in JSC inspector files.
https://bugs.webkit.org/show_bug.cgi?id=164959

Reviewed by Saam Barati.

  • inspector/JSInjectedScriptHost.cpp:

(Inspector::JSInjectedScriptHost::getInternalProperties):
(Inspector::JSInjectedScriptHost::weakMapEntries):
(Inspector::JSInjectedScriptHost::weakSetEntries):
(Inspector::JSInjectedScriptHost::iteratorEntries):

  • inspector/JSJavaScriptCallFrame.cpp:

(Inspector::JSJavaScriptCallFrame::scopeDescriptions):

12:02 AM Changeset in webkit [208922] by rniwa@webkit.org
  • 4 edits
    7 adds in trunk

REGRESSION(r200964): Tab focus navigation is broken on results.en.voyages-sncf.com
https://bugs.webkit.org/show_bug.cgi?id=164888

Reviewed by Antti Koivisto.

Source/WebCore:

The bug was caused by FocusNavigationScope::parentInScope incorrectly returning nullptr when moving out of
a user agent shadow tree of a SVG use element. Fixed the bug by explicitly checking against the focus scope's
root node or its slot element. Also removed a superfluous early return when the parent node is a focus scope.

Tests: fast/shadow-dom/focus-navigation-out-of-slot.html

fast/shadow-dom/focus-navigation-passes-shadow-host.html
fast/shadow-dom/focus-navigation-passes-svg-use-element.html

  • page/FocusController.cpp:

(WebCore::FocusNavigationScope::parentInScope):

LayoutTests:

Add regression tests for moving the focus across a shadow tree and a SVG use element
and the one that moves out of a slot element.

  • fast/shadow-dom/focus-navigation-out-of-slot-expected.txt: Added.
  • fast/shadow-dom/focus-navigation-out-of-slot.html: Added.
  • fast/shadow-dom/focus-navigation-passes-shadow-host-expected.txt: Added.
  • fast/shadow-dom/focus-navigation-passes-shadow-host.html: Added.
  • fast/shadow-dom/focus-navigation-passes-svg-use-element-expected.txt: Added.
  • fast/shadow-dom/focus-navigation-passes-svg-use-element.html: Added.
  • platform/ios-simulator/TestExpectations: Skip the newly added tests on iOS.

Nov 18, 2016:

11:35 PM Changeset in webkit [208921] by Simon Fraser
  • 12 edits
    6 adds in trunk

[iOS WK2] Eliminate a source of flakiness in layout tests by forcing WebPage into "responsive" mode for all tests, with an internals override
https://bugs.webkit.org/show_bug.cgi?id=164980

Reviewed by Chris Dumez.

Source/WebCore:

WebPage::eventThrottlingDelay() uses a latency estimate based on the round-trip time from the UI process
to affect behavior, including whether scroll events are fired. This also affects the FrameView "scrolledByUser"
flag that impacts tile coverage.

During testing, latency falling above or below the 16ms threshold could affect behavior. Fix by forcing
WebPage into "responsive" mode while running tests, via InjectedBundlePage::prepare().

Add a nullable internals property so that a test can specify responsive, unresponsive or default behavior.

Tests: fast/scrolling/ios/scroll-events-default.html

fast/scrolling/ios/scroll-events-responsive.html
fast/scrolling/ios/scroll-events-unresponsive.html

  • page/Page.h:

(WebCore::Page::eventThrottlingBehaviorOverride):
(WebCore::Page::setEventThrottlingBehaviorOverride):

  • testing/Internals.cpp:

(WebCore::Internals::setEventThrottlingBehaviorOverride):
(WebCore::Internals::eventThrottlingBehaviorOverride):

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

Source/WebKit2:

WebPage::eventThrottlingDelay() uses a latency estimate based on the round-trip time from the UI process
to affect behavior, including whether scroll events are fired. This also affects the FrameView "scrolledByUser"
flag that impacts tile coverage.

During testing, latency falling above or below the 16ms threshold could affect behavior. Fix by forcing
WebPage into "responsive" mode while running tests, via InjectedBundlePage::prepare().

Add a nullable internals property so that a test can specify responsive, unresponsive or default behavior.

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

(WKBundlePageSetEventThrottlingBehaviorOverride):

  • WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::eventThrottlingDelay):

Tools:

  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:

(WTR::InjectedBundlePage::prepare):

LayoutTests:

  • fast/scrolling/ios/scroll-events-default-expected.txt: Added.
  • fast/scrolling/ios/scroll-events-default.html: Added.
  • fast/scrolling/ios/scroll-events-responsive-expected.txt: Added.
  • fast/scrolling/ios/scroll-events-responsive.html: Added.
  • fast/scrolling/ios/scroll-events-unresponsive-expected.txt: Added.
  • fast/scrolling/ios/scroll-events-unresponsive.html: Added.
9:09 PM Changeset in webkit [208920] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed attempt to fix the build after r208917.

  • dom/CustomElementReactionQueue.cpp:

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

8:45 PM Changeset in webkit [208919] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed attempt to fix the build after r208917.

  • dom/CustomElementReactionQueue.cpp:
8:38 PM Changeset in webkit [208918] by jiewen_tan@apple.com
  • 21 edits
    31 adds in trunk

Update SubtleCrypto::decrypt to match the latest spec
https://bugs.webkit.org/show_bug.cgi?id=164739
<rdar://problem/29257848>

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

  • WebCryptoAPI/encrypt_decrypt/test_aes_cbc-expected.txt:
  • WebCryptoAPI/idlharness-expected.txt:

Source/WebCore:

This patch does following few things:

  1. It updates the SubtleCrypto::decrypt method to match the latest spec: https://www.w3.org/TR/WebCryptoAPI/#SubtleCrypto-method-decrypt. It also refers to the latest Editor's Draft to a certain degree: https://w3c.github.io/webcrypto/Overview.html#SubtleCrypto-method-decrypt.
  2. It implements decrypt operations of the following algorithms: AES-CBC, RSAES-PKCS1-V1_5, and RSA-OAEP.

Tests: crypto/subtle/aes-cbc-decrypt-malformed-parameters.html

crypto/subtle/aes-cbc-generate-key-encrypt-decrypt.html
crypto/subtle/aes-cbc-import-key-decrypt.html
crypto/subtle/decrypt-malformed-parameters.html
crypto/subtle/rsa-oaep-decrypt-malformed-parameters.html
crypto/subtle/rsa-oaep-generate-key-encrypt-decrypt-label.html
crypto/subtle/rsa-oaep-generate-key-encrypt-decrypt.html
crypto/subtle/rsa-oaep-import-key-decrypt-label.html
crypto/subtle/rsa-oaep-import-key-decrypt.html
crypto/subtle/rsaes-pkcs1-v1_5-generate-key-encrypt-decrypt.html
crypto/subtle/rsaes-pkcs1-v1_5-import-key-decrypt.html
crypto/workers/subtle/aes-cbc-import-key-decrypt.html
crypto/workers/subtle/rsa-oaep-import-key-decrypt.html
crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-decrypt.html

  • bindings/js/JSSubtleCryptoCustom.cpp:

(WebCore::normalizeCryptoAlgorithmParameters):
(WebCore::toCryptoKey):
(WebCore::toVector):
(WebCore::jsSubtleCryptoFunctionEncryptPromise):
(WebCore::jsSubtleCryptoFunctionDecryptPromise):
(WebCore::jsSubtleCryptoFunctionExportKeyPromise):
(WebCore::JSSubtleCrypto::decrypt):

  • crypto/CryptoAlgorithm.cpp:

(WebCore::CryptoAlgorithm::decrypt):

  • crypto/CryptoAlgorithm.h:
  • crypto/SubtleCrypto.idl:
  • crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:

(WebCore::CryptoAlgorithmAES_CBC::decrypt):

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

(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::decrypt):

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

(WebCore::CryptoAlgorithmRSA_OAEP::decrypt):

  • crypto/algorithms/CryptoAlgorithmRSA_OAEP.h:
  • crypto/gnutls/CryptoAlgorithmAES_CBCGnuTLS.cpp:

(WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):

  • crypto/gnutls/CryptoAlgorithmRSAES_PKCS1_v1_5GnuTLS.cpp:

(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):

  • crypto/gnutls/CryptoAlgorithmRSA_OAEPGnuTLS.cpp:

(WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):

  • crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:

(WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):

  • crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:

(WebCore::decryptRSAES_PKCS1_v1_5):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):

  • crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:

(WebCore::decryptRSA_OAEP):
(WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):

LayoutTests:

  • crypto/subtle/aes-cbc-decrypt-malformed-parameters-expected.txt: Added.
  • crypto/subtle/aes-cbc-decrypt-malformed-parameters.html: Added.
  • crypto/subtle/aes-cbc-generate-key-encrypt-decrypt-expected.txt: Added.
  • crypto/subtle/aes-cbc-generate-key-encrypt-decrypt.html: Added.
  • crypto/subtle/aes-cbc-import-key-decrypt-expected.txt: Added.
  • crypto/subtle/aes-cbc-import-key-decrypt.html: Added.
  • crypto/subtle/decrypt-malformed-parameters-expected.txt: Added.
  • crypto/subtle/decrypt-malformed-parameters.html: Added.
  • crypto/subtle/rsa-oaep-decrypt-malformed-parameters-expected.txt: Added.
  • crypto/subtle/rsa-oaep-decrypt-malformed-parameters.html: Added.
  • crypto/subtle/rsa-oaep-generate-key-encrypt-decrypt-expected.txt: Added.
  • crypto/subtle/rsa-oaep-generate-key-encrypt-decrypt-label-expected.txt: Added.
  • crypto/subtle/rsa-oaep-generate-key-encrypt-decrypt-label.html: Added.
  • crypto/subtle/rsa-oaep-generate-key-encrypt-decrypt.html: Added.
  • crypto/subtle/rsa-oaep-import-key-decrypt-expected.txt: Added.
  • crypto/subtle/rsa-oaep-import-key-decrypt-label-expected.txt: Added.
  • crypto/subtle/rsa-oaep-import-key-decrypt-label.html: Added.
  • crypto/subtle/rsa-oaep-import-key-decrypt.html: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-generate-key-encrypt-decrypt-expected.txt: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-generate-key-encrypt-decrypt.html: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-import-key-decrypt-expected.txt: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-import-key-decrypt.html: Added.
  • crypto/workers/subtle/aes-cbc-import-key-decrypt-expected.txt: Added.
  • crypto/workers/subtle/aes-cbc-import-key-decrypt.html: Added.
  • crypto/workers/subtle/resources/aes-cbc-import-key-decrypt.js: Added.
  • crypto/workers/subtle/resources/rsa-oaep-import-key-decrypt.js: Added.
  • crypto/workers/subtle/resources/rsaes-pkcs1-v1_5-import-key-decrypt.js: Added.
  • crypto/workers/subtle/rsa-oaep-import-key-decrypt-expected.txt: Added.
  • crypto/workers/subtle/rsa-oaep-import-key-decrypt.html: Added.
  • crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-decrypt-expected.txt: Added.
  • crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-decrypt.html: Added.
8:25 PM Changeset in webkit [208917] by Chris Dumez
  • 5 edits in trunk

Unreviewed, rolling out r208837.

The bots did not show a progression

Reverted changeset:

"REGRESSION(r208082): 1% Speedometer regression on iOS"
https://bugs.webkit.org/show_bug.cgi?id=164852
http://trac.webkit.org/changeset/208837

7:33 PM Changeset in webkit [208916] by Simon Fraser
  • 20 edits in trunk/Source

Remove use of std::chrono in WebPage and entrained code
https://bugs.webkit.org/show_bug.cgi?id=164967

Reviewed by Tim Horton.

Replace std::chrono with Seconds and Monotonic Time.

Use more C++11 initialization for WebPage data members.

Source/WebCore:

  • page/ChromeClient.h:
  • page/FrameView.cpp:

(WebCore::FrameView::scrollPositionChanged):
(WebCore::FrameView::setScrollVelocity):

  • page/FrameView.h:
  • platform/Timer.h:

(WebCore::TimerBase::startRepeating):
(WebCore::TimerBase::startOneShot):
(WebCore::TimerBase::augmentFireInterval):
(WebCore::TimerBase::augmentRepeatInterval):

  • platform/graphics/TiledBacking.h:

(WebCore::VelocityData::VelocityData):

  • platform/graphics/ca/TileController.cpp:

(WebCore::TileController::adjustTileCoverageRect):

Source/WebKit2:

  • Shared/VisibleContentRectUpdateInfo.cpp:

(WebKit::operator<<):

  • Shared/VisibleContentRectUpdateInfo.h:

(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::VisibleContentRectUpdateInfo::timestamp):

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<MonotonicTime>::encode):
(IPC::ArgumentCoder<MonotonicTime>::decode):
(IPC::ArgumentCoder<Seconds>::encode):
(IPC::ArgumentCoder<Seconds>::decode):

  • Shared/WebCoreArgumentCoders.h:
  • UIProcess/ios/WKContentView.mm:

(WebKit::HistoricalVelocityData::HistoricalVelocityData):
(WebKit::HistoricalVelocityData::velocityForNewData):
(WebKit::HistoricalVelocityData::append):
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:

(WebKit::WebChromeClient::eventThrottlingDelay):

  • WebProcess/WebPage/ViewUpdateDispatcher.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::WebPage):
(WebKit::m_userActivityHysteresis):
(WebKit::WebPage::didFlushLayerTreeAtTime):
(WebKit::WebPage::didCommitLoad):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::eventThrottlingDelay):
(WebKit::WebPage::updateVisibleContentRects):

  • WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:

(WebKit::RemoteLayerTreeDrawingArea::flushLayers):

6:51 PM Changeset in webkit [208915] by dino@apple.com
  • 27 edits
    8 adds in trunk

AX: "(inverted-colors)" media query only matches on page reload; should match on change
https://bugs.webkit.org/show_bug.cgi?id=163564
<rdar://problem/28807350>

Source/WebCore:

Reviewed by Simon Fraser.

Mark some media queries as responding to notifications that
system accessibility settings have changed. When Page gets told
that has happened, check if any of the results have changed.

Tests: fast/media/mq-inverted-colors-live-update.html

fast/media/mq-monochrome-live-update.html
fast/media/mq-prefers-reduced-motion-live-update.html

  • css/MediaQueryEvaluator.cpp:

(WebCore::isAccessibilitySettingsDependent):
(WebCore::MediaQueryEvaluator::evaluate):

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::addAccessibilitySettingsDependentMediaQueryResult):
(WebCore::StyleResolver::hasMediaQueriesAffectedByAccessibilitySettingsChange):

  • css/StyleResolver.h:

(WebCore::StyleResolver::hasAccessibilitySettingsDependentMediaQueries):

  • page/Page.cpp:

(WebCore::Page::accessibilitySettingsDidChange):

  • page/Page.h:

Source/WebKit2:

Reviewed by Simon Fraser.

Listen for the appropriate notifications that accessibility settings
have changed. This is a single notification on macOS, which uses WebViewImpl,
and more fine-grained notifications on iOS, using WKWebView.

When we see the notification, send a message to the WebProcess which will
then tell the WebCore::Page.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):
(-[WKWebView _accessibilitySettingsDidChange:]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm:

(-[WKAccessibilitySettingsObserver initWithImpl:]):
(-[WKAccessibilitySettingsObserver dealloc]):
(-[WKAccessibilitySettingsObserver _settingsDidChange:]):
(WebKit::WebViewImpl::WebViewImpl):
(WebKit::WebViewImpl::accessibilitySettingsDidChange):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::accessibilitySettingsDidChange):

  • UIProcess/WebPageProxy.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::accessibilitySettingsDidChange):

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

Tools:

Reviewed by NOBODY (OOPS!).

Add a UIScriptController method that tricks WebKit into thinking
it has received a notification that accessibility settings have
changed. Combined with our forced overrides, this allows us to
test if a page would react to the notifications.

  • DumpRenderTree/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::simulateAccessibilitySettingsChangeNotification):

  • DumpRenderTree/mac/UIScriptControllerMac.mm:

(WTR::UIScriptController::simulateAccessibilitySettingsChangeNotification):

  • TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
  • TestRunnerShared/UIScriptContext/UIScriptController.cpp:

(WTR::simulateAccessibilitySettingsChangeNotification):

  • TestRunnerShared/UIScriptContext/UIScriptController.h:
  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::simulateAccessibilitySettingsChangeNotification):

  • WebKitTestRunner/mac/UIScriptControllerMac.mm:

(WTR::UIScriptController::simulateAccessibilitySettingsChangeNotification):

LayoutTests:

Reviewed by Simon Fraser.

  • fast/media/mq-inverted-colors-live-update-in-subframes-expected.html: Added.
  • fast/media/mq-inverted-colors-live-update-in-subframes.html: Added.
  • fast/media/mq-inverted-colors-live-update-expected.html: Added.
  • fast/media/mq-inverted-colors-live-update.html: Added.
  • fast/media/mq-monochrome-live-update-expected.html: Added.
  • fast/media/mq-monochrome-live-update.html: Added.
  • fast/media/mq-prefers-reduced-motion-live-update-expected.html: Added.
  • fast/media/mq-prefers-reduced-motion-live-update.html: Added.
6:45 PM Changeset in webkit [208914] by andersca@apple.com
  • 9 edits in trunk/Source/WebCore

Rename the 'other' Apple Pay Button type to 'donate'
https://bugs.webkit.org/show_bug.cgi?id=164978

Reviewed by Dean Jackson.

  • DerivedSources.make:
  • WebCorePrefix.h:
  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator ApplePayButtonType):

  • css/CSSValueKeywords.in:
  • css/parser/CSSParser.cpp:

(WebCore::isValidKeywordPropertyAndValue):

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):

  • rendering/RenderThemeCocoa.mm:

(WebCore::toPKPaymentButtonType):

  • rendering/style/RenderStyleConstants.h:
5:46 PM Changeset in webkit [208913] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix missing exception checks in DFGOperations.cpp.
https://bugs.webkit.org/show_bug.cgi?id=164958

Reviewed by Geoffrey Garen.

  • dfg/DFGOperations.cpp:
5:40 PM Changeset in webkit [208912] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix exception scope verification failures in ShadowChicken.cpp.
https://bugs.webkit.org/show_bug.cgi?id=164966

Reviewed by Saam Barati.

  • interpreter/ShadowChicken.cpp:

(JSC::ShadowChicken::functionsOnStack):

5:00 PM Changeset in webkit [208911] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

USE WK_MAC_TBA for version number in _webViewRequestPointerLock:(WKWebView *)webView WK_API_AVAILABLE(macosx(10.12))
https://bugs.webkit.org/show_bug.cgi?id=164962

Patch by Jeremy Jones <jeremyj@apple.com> on 2016-11-18
Reviewed by Dean Jackson.

  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
5:00 PM Changeset in webkit [208910] by mmaxfield@apple.com
  • 12 edits
    2 adds in trunk

[WebGL2] Implement texStorage2D()
https://bugs.webkit.org/show_bug.cgi?id=164493

Reviewed by Dean Jackson.

Source/WebCore:

Create a new validation function which only accepts sized internalFormats.
After running texStorage2D(), we also texSubImage2D() to zero-fill it. This
is to compensate for potentially buggy drivers.

Because glTexStorage2D() was only added to OpenGL in version 4.2, not all
OpenGL 3.2+ contexts can implement this command. However, according to
https://developer.apple.com/opengl/capabilities/ all Apple GPUs have the
GL_ARB_texture_storage which implements this call. In the future, we could
implement texStorage2D() on top of texImage2D() if there are any ports which
want WebGL2 but don't have 4.2 and don't have the extension.

Also, when calling texStorage2D, callers specify an internalFormat but not a
type/format pair. This means that storing the texture's type is only valid
for WebGL 1 contexts. This patch surrounds all calls to reading the texture
type with guards and adds an ASSERT() at the read site to make sure the
right thing is happening.

Test: fast/canvas/webgl/webgl2-texStorage.html

  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::WebGL2RenderingContext::validateTexStorageFuncParameters):
(WebCore::WebGL2RenderingContext::texStorage2D):

  • html/canvas/WebGL2RenderingContext.h:
  • html/canvas/WebGLRenderingContext.cpp:

(WebCore::WebGLRenderingContext::validateIndexArrayConservative):

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::create):
(WebCore::WebGLRenderingContextBase::copyTexSubImage2D):
(WebCore::WebGLRenderingContextBase::validateTexFunc):
(WebCore::WebGLRenderingContextBase::validateTexFuncData):
(WebCore::WebGLRenderingContextBase::texImage2D):

  • html/canvas/WebGLTexture.cpp:

(WebCore::WebGLTexture::WebGLTexture):
(WebCore::WebGLTexture::getType):
(WebCore::WebGLTexture::needToUseBlackTexture):
(WebCore::WebGLTexture::canGenerateMipmaps):
(WebCore::internalFormatIsFloatType):
(WebCore::internalFormatIsHalfFloatType):
(WebCore::WebGLTexture::update):

  • html/canvas/WebGLTexture.h:
  • platform/graphics/GraphicsContext3D.cpp:

(WebCore::GraphicsContext3D::texImage2DResourceSafe):
(WebCore::GraphicsContext3D::packImageData):
(WebCore::GraphicsContext3D::extractImageData):

  • platform/graphics/GraphicsContext3D.h:
  • platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:

(WebCore::Extensions3DOpenGLCommon::initializeAvailableExtensions):

  • platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:

(WebCore::GraphicsContext3D::texStorage2D):
(WebCore::GraphicsContext3D::texStorage3D):

LayoutTests:

  • fast/canvas/webgl/webgl2-texStorage-expected.txt: Added.
  • fast/canvas/webgl/webgl2-texStorage.html: Added.
4:58 PM Changeset in webkit [208909] by achristensen@apple.com
  • 4 edits in trunk

TextDecoder constructor should not accept replacement encodings
https://bugs.webkit.org/show_bug.cgi?id=164903

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/encoding/api-replacement-encodings-expected.txt:

Source/WebCore:

Covered by newly passing web platform tests.

  • dom/TextDecoder.cpp:

(WebCore::TextDecoder::create):
https://encoding.spec.whatwg.org/#textdecoder says about the constructor:
"If label is either not a label or is a label for replacement, throws a RangeError."
See https://bugs.webkit.org/show_bug.cgi?id=159180 for the mapping of the replacement
codec names to "replacement".

4:38 PM Changeset in webkit [208908] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Assertion failures in ActiveDOMObject::~ActiveDOMObject under Database destructor
https://bugs.webkit.org/show_bug.cgi?id=164955
<rdar://problem/29336715>

Reviewed by Brady Eidson.

Make sure the Database's DatabaseContext object is destroyed on the context
thread given that DatabaseContext is an ActiveDOMObject and there is an
assertion in the ActiveDOMObject destructor that it should be destroyed on
on the context thread.

No new tests, already covered by existing tests.

  • Modules/webdatabase/Database.cpp:

(WebCore::Database::~Database):

4:28 PM Changeset in webkit [208907] by matthew_hanson@apple.com
  • 2 edits in tags/Safari-603.1.13/Source/WebKit/mac

Merge r208877. rdar://problem/29326204

4:28 PM Changeset in webkit [208906] by matthew_hanson@apple.com
  • 5 edits in tags/Safari-603.1.13

Disable INTERSECTION_OBSERVER on the tag. rdar://problem/29324149

3:50 PM Changeset in webkit [208905] by achristensen@apple.com
  • 2 edits in trunk/Tools

Fix API test after r208902
https://bugs.webkit.org/show_bug.cgi?id=144194

  • TestWebKitAPI/Tests/Cocoa/URLExtras.mm:

(TestWebKitAPI::TEST):
The fullwidth solidus, U+FF0F, changed encoding from IDN2003 to IDN2008, probably to prevent domains from using it
to spoof other domains. https://webkit.org/blog/ and https://webkit.org\uFF0Fblog/ would otherwise look
too similar when rendered.

3:35 PM Changeset in webkit [208904] by enrica@apple.com
  • 24 edits in trunk/Source

Refactor drag and drop for WebKit2 to encode DragData message exchange.
https://bugs.webkit.org/show_bug.cgi?id=164945

Reviewed by Tim Horton.

Source/WebCore:

No new tests. No change in functionality.

  • loader/EmptyClients.h:
  • page/DragClient.h:
  • page/DragController.cpp:

(WebCore::createMouseEvent):
(WebCore::documentFragmentFromDragData):
(WebCore::DragController::dragIsMove):
(WebCore::DragController::dragEntered):
(WebCore::DragController::dragExited):
(WebCore::DragController::dragUpdated):
(WebCore::DragController::performDragOperation):
(WebCore::DragController::dragEnteredOrUpdated):
(WebCore::DragController::tryDocumentDrag):
(WebCore::DragController::operationForLoad):
(WebCore::DragController::dispatchTextInputEventFor):
(WebCore::DragController::concludeEditDrag):
(WebCore::DragController::canProcessDrag):
(WebCore::DragController::tryDHTMLDrag):

  • page/DragController.h:
  • page/efl/DragControllerEfl.cpp:

(WebCore::DragController::isCopyKeyDown):
(WebCore::DragController::dragOperation):

  • page/gtk/DragControllerGtk.cpp:

(WebCore::DragController::isCopyKeyDown):
(WebCore::DragController::dragOperation):

  • page/mac/DragControllerMac.mm:

(WebCore::DragController::isCopyKeyDown):
(WebCore::DragController::dragOperation):

  • page/win/DragControllerWin.cpp:

(WebCore::DragController::dragOperation):
(WebCore::DragController::isCopyKeyDown):

  • platform/DragData.h:

(WebCore::DragData::DragData):

Source/WebKit/mac:

  • WebCoreSupport/WebDragClient.h:
  • WebCoreSupport/WebDragClient.mm:

(WebDragClient::actionMaskForDrag):
(WebDragClient::willPerformDragDestinationAction):

Source/WebKit2:

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<DragData>::encode):
(IPC::ArgumentCoder<DragData>::decode):

  • Shared/WebCoreArgumentCoders.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::performDragControllerAction):

  • WebProcess/WebCoreSupport/WebDragClient.cpp:

(WebKit::WebDragClient::willPerformDragDestinationAction):
(WebKit::WebDragClient::actionMaskForDrag):

  • WebProcess/WebCoreSupport/WebDragClient.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::performDragControllerAction):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
3:33 PM Changeset in webkit [208903] by commit-queue@webkit.org
  • 33 edits in trunk

Add runtime flag to enable pointer lock. Enable pointer lock feature for mac.
https://bugs.webkit.org/show_bug.cgi?id=163801

Patch by Jeremy Jones <jeremyj@apple.com> on 2016-11-18
Reviewed by Simon Fraser.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

These tests now pass with DumpRenderTree.
LayoutTests/pointer-lock/lock-already-locked.html
LayoutTests/pointer-lock/lock-element-not-in-dom.html
LayoutTests/pointer-lock/locked-element-iframe-removed-from-dom.html
LayoutTests/pointer-lock/mouse-event-api.html

PointerLockController::requestPointerLock now protects against synchronous callback
to allowPointerLock().

Add pointerLockEnabled setting.

  • Configurations/FeatureDefines.xcconfig:
  • dom/Document.cpp:

(WebCore::Document::exitPointerLock): Fix existing typo.
(WebCore::Document::pointerLockElement):

  • features.json:
  • page/EventHandler.cpp:
  • page/PointerLockController.cpp:

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

  • page/Settings.in:

Source/WebKit/mac:

Plumb through PointerLockEnabled setting.

  • Configurations/FeatureDefines.xcconfig:
  • WebCoreSupport/WebChromeClient.mm:

(WebChromeClient::requestPointerUnlock):

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

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

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

(-[WebView _preferencesChanged:]):

Source/WebKit2:

Add SPI to notify client of pointer lock and for client to allow or deny.
Unlock pointer when view is not longer active.

  • Configurations/FeatureDefines.xcconfig:
  • Shared/WebPreferencesDefinitions.h:
  • UIProcess/API/APIUIClient.h:

(API::UIClient::requestPointerLock):
(API::UIClient::didLosePointerLock):

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetPageUIClient):
(WKPageDidAllowPointerLock):
(WKPageDidDenyPointerLock):

  • UIProcess/API/C/WKPagePrivate.h:
  • UIProcess/API/C/WKPageUIClient.h:
  • UIProcess/API/C/WKPreferences.cpp:
  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/Cocoa/UIDelegate.h:
  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::requestPointerLock):
(WebKit::UIDelegate::UIClient::didLosePointerLock):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::dispatchActivityStateChange):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
(WebKit::WebPageProxy::requestPointerLock):
(WebKit::WebPageProxy::didAllowPointerLock):
(WebKit::WebPageProxy::didDenyPointerLock):
(WebKit::WebPageProxy::requestPointerUnlock):

  • UIProcess/WebPageProxy.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

Source/WTF:

  • wtf/FeatureDefines.h: ENABLE_POINTER_LOCK true for Mac.
2:47 PM Changeset in webkit [208902] by achristensen@apple.com
  • 11 edits in trunk

Support IDN2008 with UTS #46 instead of IDN2003
https://bugs.webkit.org/show_bug.cgi?id=144194

Reviewed by Darin Adler.

Source/WebCore:

Use uidna_nameToASCII instead of the deprecated uidna_IDNToASCII.
It uses IDN2008 instead of IDN2003, and it uses UTF #46 when used with a UIDNA opened with uidna_openUTS46.
This follows https://url.spec.whatwg.org/#concept-domain-to-ascii except we do not use Transitional_Processing
to prevent homograph attacks on german domain names with "ß" and "ss" in them. These are now treated as separate domains.
Firefox also doesn't use Transitional_Processing. Chrome and the current specification use Transitional_processing,
but https://github.com/whatwg/url/issues/110 might change the spec.

In addition, http://unicode.org/reports/tr46/ says:
"implementations are encouraged to apply the Bidi and ContextJ validity criteria"
Bidi checks prevent domain names with bidirectional text, such as latin and hebrew characters in the same domain. Chrome and Firefox do this.

ContextJ checks prevent code points such as U+200D, which is a zero-width joiner which users would not see when looking at the domain name.
Firefox currently enables ContextJ checks and it is suggested by UTS #46, so we'll do it.

ContextO checks, which we do not use and neither does any other browser nor the spec, would fail if a domain contains code points such as U+30FB,
which looks somewhat like a dot. We can investigate enabling these checks later.

Covered by new API tests and rebased LayoutTests.
The new API tests verify that we do not use transitional processing, that we do apply the Bidi and ContextJ checks, but not ContextO checks.

  • platform/URLParser.cpp:

(WebCore::URLParser::domainToASCII):
(WebCore::URLParser::internationalDomainNameTranscoder):

  • platform/URLParser.h:
  • platform/mac/WebCoreNSURLExtras.mm:

(WebCore::mapHostNameWithRange):

Tools:

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):
Add some tests from http://unicode.org/faq/idn.html verifying that we follow UTS46's deviations from IDN2008.
Add some tests based on https://tools.ietf.org/html/rfc5893 verifying that we check for bidirectional text.
Add a test based on https://tools.ietf.org/html/rfc5892 verifying that we do not do ContextO check.
Add a test for U+321D and U+321E which have particularly interesting punycode encodings. We match Firefox here now.
Also add a test from http://www.unicode.org/reports/tr46/#IDNAComparison verifying we are not using IDN2003.
We should consider importing all of http://www.unicode.org/Public/idna/9.0.0/IdnaTest.txt as URL domain tests.

LayoutTests:

  • fast/encoding/idn-security.html:

Move some characters with changed IDN encodings to inside the check for old ICU.

  • fast/url/idna2003-expected.txt:
  • fast/url/idna2008-expected.txt:

Update expected results. We are now more compliant with IDN2008.

2:32 PM Changeset in webkit [208901] by Yusuke Suzuki
  • 2 edits in trunk/JSTests

REGRESSION(r208867): JSC test failure: ChakraCore.yaml/ChakraCore/test/strict/05.arguments_sm.js.default
https://bugs.webkit.org/show_bug.cgi?id=164929

Reviewed by Mark Lam.

ES2017 drops arguments.caller and JavaScriptCore is updated to meet the spec.
This patch rebaselines the result of ChakraCore test for JSC.

  • ChakraCore/test/strict/05.arguments_sm.baseline-jsc:
2:31 PM Changeset in webkit [208900] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking two js/dom/domjit-function-get-element-by-id-* tests as flaky.
https://bugs.webkit.org/show_bug.cgi?id=164797

Unreviewed test gardening.

2:30 PM Changeset in webkit [208899] by dino@apple.com
  • 9 edits
    1 copy
    3 adds in trunk

Better testing for accessibility media queries
https://bugs.webkit.org/show_bug.cgi?id=164954
<rdar://problem/29338292>

Reviewed by Myles Maxfield.

Source/WebCore:

Provide an override mode for the accessibility media queries
that rely on system settings. This way we can test that they
are least responding to something.

Tests: fast/media/mq-inverted-colors-forced-value.html

fast/media/mq-monochrome-forced-value.html

  • css/MediaQueryEvaluator.cpp: Query the Settings to see if we're

forcing a value.
(WebCore::monochromeEvaluate):
(WebCore::invertedColorsEvaluate):
(WebCore::prefersReducedMotionEvaluate):

  • page/Settings.h:
  • testing/InternalSettings.cpp: Add new forcing values for inverted-colors

and monochrome.
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::settingsToInternalSettingsValue):
(WebCore::internalSettingsToSettingsValue):
(WebCore::InternalSettings::forcedColorsAreInvertedAccessibilityValue):
(WebCore::InternalSettings::setForcedColorsAreInvertedAccessibilityValue):
(WebCore::InternalSettings::forcedDisplayIsMonochromeAccessibilityValue):
(WebCore::InternalSettings::setForcedDisplayIsMonochromeAccessibilityValue):
(WebCore::InternalSettings::forcedPrefersReducedMotionAccessibilityValue):
(WebCore::InternalSettings::setForcedPrefersReducedMotionAccessibilityValue):
(WebCore::InternalSettings::forcedPrefersReducedMotionValue): Deleted.
(WebCore::InternalSettings::setForcedPrefersReducedMotionValue): Deleted.

  • testing/InternalSettings.h:
  • testing/InternalSettings.idl:

LayoutTests:

  • fast/media/mq-inverted-colors-forced-value-expected.html: Added.
  • fast/media/mq-inverted-colors-forced-value.html: Copied from LayoutTests/fast/media/mq-prefers-reduced-motion-forced-value.html.
  • fast/media/mq-monochrome-forced-value-expected.html: Added.
  • fast/media/mq-monochrome-forced-value.html: Added.
  • fast/media/mq-prefers-reduced-motion-forced-value.html:
2:29 PM Changeset in webkit [208898] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix cloop.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::stronglyVisitStrongReferences):

2:11 PM Changeset in webkit [208897] by fpizlo@apple.com
  • 16 edits
    1 add in trunk

Concurrent GC should be able to run splay in debug mode and earley/raytrace in release mode with no perf regression
https://bugs.webkit.org/show_bug.cgi?id=164282

Reviewed by Geoffrey Garen and Oliver Hunt.

PerformanceTests:

CDjs is a fun benchmark for stressing concurrent GCs, but to really give the GC a good
workout you need to increase the amount of work that the test does. This adds a second
configuration of the benchmark that has more aircraft. It uses much more memory and causes us
to do more GCs and those GCs take longer.

  • JetStream/cdjs/benchmark.js:

(benchmarkImpl):
(benchmark):

  • JetStream/cdjs/large.js: Added.

Source/JavaScriptCore:

The two three remaining bugs were:

  • Improper ordering inside putDirectWithoutTransition() and friends. We need to make sure that the GC doesn't see the store to Structure::m_offset until we've resized the butterfly. That proved a bit tricky. On the other hand, this means that we could probably remove the requirement that the GC holds the Structure lock in some cases. I haven't removed that lock yet because I still think it might protect some weird cases, and it doesn't seem to cost us anything.


  • CodeBlock's GC strategy needed to be made thread-safe (visitWeakly, visitChildren, and their friends now hold locks) and incremental-safe (we need to update predictions in the finalizer to make sure we clear anything that was put into a value profile towards the end of GC).


  • The GC timeslicing scheduler needed to be made a bit more aggressive to deal with generational workloads like earley, raytrace, and CDjs. Once I got those benchmarks to run, I found that they would do many useless iterations of GC because they wouldn't pause long enough after rescanning weak references and roots. I added a bunch of knobs for forcing a pause. In the end, I realized that I could get the desired effect by putting a ceiling on mutator utilization. We want the GC to finish quickly if it is possible to do so, even if the amount of allocation that the mutator had done is low. Having a utilization ceiling seems to accomplish this for benchmarks with trivial heaps (earley and raytrace) as well as huge heaps (like CDjs in its "large" configuration).


This preserves splay performance, makes the concurrent GC more stable, and makes the
concurrent GC not a perf regression on earley or raytrace. It seems to give us great CDjs
performance as well, but this is still hard to tell because we crash a lot in that benchmark.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::visitWeakly):
(JSC::CodeBlock::visitChildren):
(JSC::CodeBlock::shouldVisitStrongly):
(JSC::CodeBlock::shouldJettisonDueToOldAge):
(JSC::CodeBlock::propagateTransitions):
(JSC::CodeBlock::determineLiveness):
(JSC::CodeBlock::WeakReferenceHarvester::visitWeakReferences):
(JSC::CodeBlock::UnconditionalFinalizer::finalizeUnconditionally):
(JSC::CodeBlock::visitOSRExitTargets):
(JSC::CodeBlock::stronglyVisitStrongReferences):
(JSC::CodeBlock::stronglyVisitWeakReferences):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::clearVisitWeaklyHasBeenCalled):

  • heap/CodeBlockSet.cpp:

(JSC::CodeBlockSet::deleteUnmarkedAndUnreferenced):

  • heap/Heap.cpp:

(JSC::Heap::ResumeTheWorldScope::ResumeTheWorldScope):
(JSC::Heap::markToFixpoint):
(JSC::Heap::beginMarking):
(JSC::Heap::addToRememberedSet):
(JSC::Heap::collectInThread):

  • heap/Heap.h:
  • heap/HeapInlines.h:

(JSC::Heap::mutatorFence):

  • heap/MarkedBlock.cpp:
  • runtime/JSCellInlines.h:

(JSC::JSCell::finishCreation):

  • runtime/JSObjectInlines.h:

(JSC::JSObject::putDirectWithoutTransition):
(JSC::JSObject::putDirectInternal):

  • runtime/Options.h:
  • runtime/Structure.cpp:

(JSC::Structure::add):

  • runtime/Structure.h:
  • runtime/StructureInlines.h:

(JSC::Structure::add):

2:04 PM Changeset in webkit [208896] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking http/tests/misc/link-rel-icon-beforeload.html as failing on mac-wk1.
https://bugs.webkit.org/show_bug.cgi?id=164933

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
2:04 PM Changeset in webkit [208895] by Matt Baker
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: TimelineDataGridNode assertions when refreshing page
https://bugs.webkit.org/show_bug.cgi?id=162642
<rdar://problem/28505898>

Reviewed by Timothy Hatcher.

This patch fixes a number of deficiencies in the Network tab that caused
TimelineDataGridNode graphs to refresh before the tab became visible.

  • UserInterface/Views/ElementsTabContentView.js:

(WebInspector.ElementsTabContentView):
(WebInspector.ElementsTabContentView.prototype.shown):
Drive-by fix: defer showing the DOM content view until the tab is shown.

  • UserInterface/Views/NetworkGridContentView.js:

(WebInspector.NetworkGridContentView):
Drive-by event listener cleanup.
(WebInspector.NetworkGridContentView.prototype.get startTime):
(WebInspector.NetworkGridContentView.prototype.get endTime):
Back endTime with a variable, instead of using the ruler value which
isn't valid before the tab is shown for the first time.

(WebInspector.NetworkGridContentView.prototype.shown):
Force the grid to update its layout, and that of the Timeline column ruler.
During layout the ruler's secondsPerPixel value is used, which isn't
valid until the ruler does an initial layout.

(WebInspector.NetworkGridContentView.prototype.reset):
Clear pending records. This was causing duplicates to appear when the
inspected page was refreshed multiple times prior to showing the Network
tab for the first time.

(WebInspector.NetworkGridContentView.prototype.layout):
Should more closely match behavior in NetworkTimelineView.prototype.layout.
Graph end time padding is added if no longer updating the current time.

(WebInspector.NetworkGridContentView.prototype._networkTimelineRecordAdded):
Track endTime of the last record added, so that the graph end time can
be padded once the current time is no longer being updated.

(WebInspector.NetworkGridContentView.prototype._update):
(WebInspector.NetworkGridContentView.prototype._stopUpdatingCurrentTime):
Graph end time padding shouldn't be applied here, since this isn't called
if the inspected page finishes loading before the view is shown.

(WebInspector.NetworkGridContentView.prototype._clearNetworkItems): Deleted.
Replaced by an arrow function.

  • UserInterface/Views/NetworkSidebarPanel.js:

(WebInspector.NetworkSidebarPanel.prototype._networkTimelineReset):
Don't show the content view if the tab is hidden.

1:55 PM Changeset in webkit [208894] by mmaxfield@apple.com
  • 3 edits
    2 adds in trunk

Unsupported emoji are invisible
https://bugs.webkit.org/show_bug.cgi?id=164944
<rdar://problem/28591608>

Reviewed by Dean Jackson.

Source/WebCore:

In WidthIterator, we explicitly skip characters which the OS has no font
to render with. However, for emoji, we should draw something to show that
there is missing content. Because we have nothing to draw, we can draw
the .notdef glyph (empty box, or "tofu").

Test: fast/text/emoji-draws.html

  • platform/graphics/WidthIterator.cpp:

(WebCore::characterMustDrawSomething):
(WebCore::WidthIterator::advanceInternal):

LayoutTests:

  • fast/text/emoji-draws-expected-mismatch.html: Added.
  • fast/text/emoji-draws.html: Added.
1:47 PM Changeset in webkit [208893] by weinig@apple.com
  • 17 edits in trunk

[WebIDL] Add support for record types
https://bugs.webkit.org/show_bug.cgi?id=164935

Reviewed by Tim Horton.

Source/WebCore:

Add support for WebIDLs record types. We map them to HashMap<String, {OtherType}>.

  • bindings/generic/IDLTypes.h:
  • Add IDLRecord type and helper predicate.
  • Remove IDLRegExp which is no longer in WebIDL and we never supported.
  • bindings/js/JSDOMBinding.cpp:

(WebCore::stringToByteString):
(WebCore::identifierToByteString):
(WebCore::valueToByteString):
(WebCore::hasUnpairedSurrogate):
(WebCore::stringToUSVString):
(WebCore::identifierToUSVString):
(WebCore::valueToUSVString):

  • bindings/js/JSDOMBinding.h:

Refactor ByteString and USVString conversion to support converting from
either a JSValue or Identifier.

  • bindings/js/JSDOMConvert.h:

(WebCore::DetailConverter<IDLRecord<K, V>>):
(WebCore::JSConverter<IDLRecord<K, V>>):
Add conversion support for record types. Use Detail::IdentifierConverter helper
to convert identifiers to strings using the correct conversion rules.

(WebCore::Converter<IDLUnion<T...>>::convert):
Update comments in union conversion to match current spec. Remove check
for regular expressions and add support for record types.

  • bindings/scripts/CodeGenerator.pm:

(IsRefPtrType):
Add record and union types to the list of things that aren't RefPtrs.

(IsRecordType):
Add predicate for testing if a type is a record.

(IsWrapperType):
Remove check for union. This is now handled in the IsRefPtrType check.

(SkipIncludeHeader): Deleted.
(GetSequenceInnerType): Deleted.
(GetFrozenArrayInnerType): Deleted.
(GetSequenceOrFrozenArrayInnerType): Deleted.
Remove no longer necessary functions.

  • bindings/scripts/CodeGeneratorJS.pm:

(AddIncludesForImplementationType):
Remove check for includes to skip. This is now only called for interfaces, which should be included
unconditionally.

(AddToIncludesForIDLType):
Add includes and recursive includes for record types.

(GenerateOverloadedFunctionOrConstructor):
Update to account for records.

(GetGnuVTableRefForInterface):
(GetGnuVTableNameForInterface):
(GetGnuMangledNameForInterface):
(GetWinVTableNameForInterface):
(GetWinMangledNameForInterface):
Strength-reduce GetNativeTypeForConversions and GetNamespaceForInterface into their callers.

(GetBaseIDLType):
Add support for IDLRecord. Remove call to GetIDLInterfaceName now that is simply the type name.

(GetNativeType):
Simplify sequence/FrozenArray support and add record support.

(GetNativeInnerType):
Generalize GetNativeVectorInnerType to work for record types as well.

(ShouldPassWrapperByReference):
Moved so native type accessors can be together.

(NativeToJSValueDOMConvertNeedsState):
(NativeToJSValueDOMConvertNeedsGlobalObject):
Add record support.

(GetNativeTypeForConversions): Deleted.
(GetNamespaceForInterface): Deleted.
(GetNativeVectorType): Deleted.
(GetIDLInterfaceName): Deleted.
(GetNativeVectorInnerType): Deleted.
Remove unneeded functions.

  • bindings/scripts/IDLParser.pm:

(typeDescription):
Add helper useful for debugging, that constructs the string form of a type.

(typeByApplyingTypedefs):
Add missing call to typeByApplyingTypedefs (this is noted by a fix in JSTestCallbackFunctionWithTypedefs.h)

(parseNonAnyType):
Remove unused $subtypeName variables and add support for parsing record types.

  • bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp:
  • bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.h:
  • bindings/scripts/test/JS/JSTestObj.cpp:
  • bindings/scripts/test/TestObj.idl:

Add tests for records and update results.

  • testing/TypeConversions.h:

(WebCore::TypeConversions::testLongRecord):
(WebCore::TypeConversions::setTestLongRecord):
(WebCore::TypeConversions::testNodeRecord):
(WebCore::TypeConversions::setTestNodeRecord):
(WebCore::TypeConversions::testSequenceRecord):
(WebCore::TypeConversions::setTestSequenceRecord):

  • testing/TypeConversions.idl:

Add record types so it can be tested from layout tests.

LayoutTests:

  • js/dom/webidl-type-mapping-expected.txt:
  • js/dom/webidl-type-mapping.html:

Add tests for WebIDL record types.

1:41 PM Changeset in webkit [208892] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Support font-variation-settings
https://bugs.webkit.org/show_bug.cgi?id=164947

Reviewed by Myles Maxfield.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeFontVariationTag):
(WebCore::consumeFontVariationSettings):
(WebCore::CSSPropertyParser::parseSingleValue):

1:31 PM Changeset in webkit [208891] by jiewen_tan@apple.com
  • 43 edits
    3 copies
    24 adds in trunk

Update SubtleCrypto::encrypt to match the latest spec
https://bugs.webkit.org/show_bug.cgi?id=164738
<rdar://problem/29257812>

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

  • WebCryptoAPI/encrypt_decrypt/test_aes_cbc-expected.txt:
  • WebCryptoAPI/encrypt_decrypt/test_aes_ctr-expected.txt:
  • WebCryptoAPI/encrypt_decrypt/test_aes_gcm-expected.txt:
  • WebCryptoAPI/encrypt_decrypt/test_rsa_oaep-expected.txt:
  • WebCryptoAPI/idlharness-expected.txt:

Source/WebCore:

This patch does following few things:

  1. It updates the SubtleCrypto::encrypt method to match the latest spec: https://www.w3.org/TR/WebCryptoAPI/#SubtleCrypto-method-encrypt. It also refers to the latest Editor's Draft to a certain degree: https://w3c.github.io/webcrypto/Overview.html#SubtleCrypto-method-encrypt.
  2. It implements encrypt operations of the following algorithms: AES-CBC, RSAES-PKCS1-V1_5, and RSA-OAEP.
  3. It addes ASSERT(parameters) for every method that accepts a std::unique_ptr<CryptoAlgorithmParameters>&& type parameter.
  4. It changes RefPtr<CryptoKey>&& to Ref<CryptoKey>&& for every method that accepts a CryptoKey.

Tests: crypto/subtle/aes-cbc-encrypt-malformed-parameters.html

crypto/subtle/aes-cbc-import-key-encrypt.html
crypto/subtle/encrypt-malformed-parameters.html
crypto/subtle/rsa-oaep-encrypt-malformed-parameters.html
crypto/subtle/rsa-oaep-import-key-encrypt-label.html
crypto/subtle/rsa-oaep-import-key-encrypt.html
crypto/subtle/rsaes-pkcs1-v1_5-import-key-encrypt.html
crypto/workers/subtle/aes-cbc-import-key-encrypt.html
crypto/workers/subtle/rsa-oaep-import-key-encrypt.html
crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-encrypt.html

  • CMakeLists.txt:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/BufferSource.h:

(WebCore::BufferSource::BufferSource):
Add a default constructor for initializing an empty BufferSource object.

  • bindings/js/JSSubtleCryptoCustom.cpp:

(WebCore::normalizeCryptoAlgorithmParameters):
(WebCore::jsSubtleCryptoFunctionEncryptPromise):
(WebCore::JSSubtleCrypto::encrypt):

  • crypto/CryptoAlgorithm.cpp:

(WebCore::CryptoAlgorithm::encrypt):
(WebCore::CryptoAlgorithm::exportKey):

  • crypto/CryptoAlgorithm.h:
  • crypto/CryptoAlgorithmParameters.h:
  • crypto/CryptoKey.h:
  • crypto/SubtleCrypto.cpp:

(WebCore::SubtleCrypto::SubtleCrypto):

  • crypto/SubtleCrypto.h:

(WebCore::SubtleCrypto::workQueue):

  • crypto/SubtleCrypto.idl:
  • crypto/gnutls/CryptoAlgorithmAES_CBCGnuTLS.cpp:

(WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):

  • crypto/gnutls/CryptoAlgorithmRSAES_PKCS1_v1_5GnuTLS.cpp:

(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):

  • crypto/gnutls/CryptoAlgorithmRSA_OAEPGnuTLS.cpp:

(WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):

  • crypto/gnutls/CryptoKeyRSAGnuTLS.cpp:

(WebCore::CryptoKeyRSA::generatePair):

  • crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:

(WebCore::CryptoAlgorithmAES_CBC::encrypt):
(WebCore::CryptoAlgorithmAES_CBC::generateKey):
(WebCore::CryptoAlgorithmAES_CBC::importKey):
(WebCore::CryptoAlgorithmAES_CBC::exportKey):

  • crypto/algorithms/CryptoAlgorithmAES_CBC.h:
  • crypto/algorithms/CryptoAlgorithmAES_KW.cpp:

(WebCore::CryptoAlgorithmAES_KW::generateKey):
(WebCore::CryptoAlgorithmAES_KW::importKey):
(WebCore::CryptoAlgorithmAES_KW::exportKey):

  • crypto/algorithms/CryptoAlgorithmAES_KW.h:
  • crypto/algorithms/CryptoAlgorithmHMAC.cpp:

(WebCore::CryptoAlgorithmHMAC::generateKey):
(WebCore::CryptoAlgorithmHMAC::importKey):
(WebCore::CryptoAlgorithmHMAC::exportKey):

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

(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::encrypt):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::generateKey):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::exportKey):

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

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

  • crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
  • crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:

(WebCore::CryptoAlgorithmRSA_OAEP::encrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::generateKey):
(WebCore::CryptoAlgorithmRSA_OAEP::importKey):
(WebCore::CryptoAlgorithmRSA_OAEP::exportKey):

  • crypto/algorithms/CryptoAlgorithmRSA_OAEP.h:
  • crypto/keys/CryptoKeyRSA.h:
  • crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:

(WebCore::transformAES_CBC):
(WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):

  • crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:

(WebCore::encryptRSAES_PKCS1_v1_5):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):

  • crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:

(WebCore::encryptRSA_OAEP):
(WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):

  • crypto/mac/CryptoKeyRSAMac.cpp:

(WebCore::CryptoKeyRSA::generatePair):

  • crypto/parameters/AesCbcParams.idl: Added.
  • crypto/parameters/CryptoAlgorithmAesCbcParams.h: Added.
  • crypto/parameters/CryptoAlgorithmAesCbcParamsDeprecated.h:
  • crypto/parameters/CryptoAlgorithmRsaOaepParams.h: Added.
  • crypto/parameters/RsaOaepParams.idl: Added.

LayoutTests:

  • TestExpectations:
  • crypto/subtle/aes-cbc-encrypt-malformed-parameters-expected.txt: Added.
  • crypto/subtle/aes-cbc-encrypt-malformed-parameters.html: Added.
  • crypto/subtle/aes-cbc-import-key-encrypt-expected.txt: Added.
  • crypto/subtle/aes-cbc-import-key-encrypt.html: Added.
  • crypto/subtle/encrypt-malformed-parameters-expected.txt: Added.
  • crypto/subtle/encrypt-malformed-parameters.html: Added.
  • crypto/subtle/rsa-oaep-encrypt-malformed-parameters-expected.txt: Added.
  • crypto/subtle/rsa-oaep-encrypt-malformed-parameters.html: Added.
  • crypto/subtle/rsa-oaep-import-key-encrypt-expected.txt: Added.
  • crypto/subtle/rsa-oaep-import-key-encrypt-label-expected.txt: Added.
  • crypto/subtle/rsa-oaep-import-key-encrypt-label.html: Added.
  • crypto/subtle/rsa-oaep-import-key-encrypt.html: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-import-key-encrypt-expected.txt: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-import-key-encrypt.html: Added.
  • crypto/workers/subtle/aes-cbc-import-key-encrypt-expected.txt: Added.
  • crypto/workers/subtle/aes-cbc-import-key-encrypt.html: Added.
  • crypto/workers/subtle/resources/aes-cbc-import-key-encrypt.js: Added.
  • crypto/workers/subtle/resources/rsa-oaep-import-key-encrypt.js: Added.
  • crypto/workers/subtle/resources/rsaes-pkcs1-v1_5-import-key-encrypt.js: Added.
  • crypto/workers/subtle/rsa-oaep-import-key-encrypt-expected.txt: Added.
  • crypto/workers/subtle/rsa-oaep-import-key-encrypt.html: Added.
  • crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-encrypt-expected.txt: Added.
  • crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-encrypt.html: Added.
1:23 PM Changeset in webkit [208890] by Ryan Haddad
  • 2 edits in trunk/Source/WebCore

Attempt to fix iOS build again.
<rdar://problem/29312689>

Unreviewed build fix.

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTextTrack):
(WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack):

12:56 PM Changeset in webkit [208889] by mmaxfield@apple.com
  • 6 edits
    2 adds in trunk

[CSS Font Loading] FontFaceSet.load() promises don't always fire
https://bugs.webkit.org/show_bug.cgi?id=164902

Reviewed by David Hyatt.

Source/WebCore:

Test: fast/text/fontfaceset-rebuild-during-loading.html

We currently handle web fonts in two phases. The first phase is building up
StyleRuleFontFace objects which reflect the style on the page. The second is creating
CSSFontFace objects from those StyleRuleFontFace objects. When script modifies the
style on the page, we can often update the CSSFontFace objects, but there are some
modifications which we don't know how to model. For these operations, we destroy the
CSSFontFace objects and rebuild them from the newly modified StyleRuleFontFace objects.

Normally, this is fine. However, with the CSS font loading API, the CSSFontFaces back
Javascript objects which will persist across the rebuilding step mentioned above. This
means that the FontFace objects need to adopt the new CSSFontFace objects and forget
the old CSSFontFace objects.

There was one bit of state which I forgot to update during this rebuilding phase. The
FontFaceSet object contains an internal HashMap where a reference to a CSSFontFace
is used as a key. After the rebuilding phase, this reference wasn't updated to point
to the new CSSFontFace.

The solution is to instead use a reference to the higher-level FontFace as the key to
the HashMap. This object is persistent across the rebuilding phase (and it adopts
the new CSSFontFaces). There is not a lifetime problem because the FontFace holds a
strong reference to its backing CSSFontFace object.

This bug didn't cause a memory problem because the HashMap was keeping the old
CSSFontFace alive because the key was a strong reference.

This patch also adds a lengthy comment explaining how the migration works.

  • css/CSSFontFace.cpp:

(WebCore::CSSFontFace::initializeWrapper): This is another bit of state which didn't
survive the rebuilding phase. Moving it here causes it to survive.
(WebCore::CSSFontFace::wrapper):

  • css/CSSFontSelector.cpp:

(WebCore::CSSFontSelector::addFontFaceRule):

  • css/FontFaceSet.cpp:

(WebCore::FontFaceSet::load):
(WebCore::FontFaceSet::faceFinished):

  • css/FontFaceSet.h:

LayoutTests:

  • fast/text/fontfaceset-rebuild-during-loading-expected.txt: Added.
  • fast/text/fontfaceset-rebuild-during-loading.html: Added.
12:27 PM Changeset in webkit [208888] by mmaxfield@apple.com
  • 29 edits in trunk

[SVG -> OTF Font Converter] Fonts advances are not internally consistent inside the generated font file
https://bugs.webkit.org/show_bug.cgi?id=164846
<rdar://problem/29031509>

Reviewed by Darin Adler.

Source/WebCore:

The fonts I'm generating in the SVG -> OTF converter have fractional FUnit values for their advances.
The CFF table can encode that, but hmtx can't, which means the font isn't internally consistent.

Covered by existing tests.

  • svg/SVGToOTFFontConversion.cpp:

LayoutTests:

  • platform/ios-simulator/svg/W3C-SVG-1.1/fonts-elem-01-t-expected.txt:
  • platform/ios-simulator/svg/W3C-SVG-1.1/fonts-elem-02-t-expected.txt:
  • platform/ios-simulator/svg/W3C-SVG-1.1/fonts-elem-03-b-expected.txt:
  • platform/ios-simulator/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.txt:
  • platform/ios-simulator/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.txt:
  • platform/ios-simulator/svg/W3C-SVG-1.1/text-intro-01-t-expected.txt:
  • platform/ios-simulator/svg/W3C-SVG-1.1/text-intro-02-b-expected.txt:
  • platform/ios-simulator/svg/W3C-SVG-1.1/text-intro-03-b-expected.txt:
  • platform/ios-simulator/svg/W3C-SVG-1.1/text-intro-04-t-expected.txt:
  • platform/ios-simulator/svg/batik/text/textEffect-expected.txt:
  • platform/ios-simulator/svg/batik/text/textEffect3-expected.txt:
  • platform/ios-simulator/svg/batik/text/textPosition2-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/fonts-elem-01-t-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/fonts-elem-02-t-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/fonts-elem-03-b-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/text-intro-01-t-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/text-intro-02-b-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/text-intro-03-b-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/text-intro-04-t-expected.txt:
  • platform/mac/svg/batik/text/textEffect3-expected.txt:
  • platform/mac/svg/batik/text/textPosition2-expected.txt:
  • platform/mac/svg/custom/svg-fonts-fallback-expected.txt:
  • platform/mac/svg/wicd/test-rightsizing-b-expected.txt:
  • svg/W3C-SVG-1.1/fonts-elem-04-b-expected.txt:
12:01 PM Changeset in webkit [208887] by Ryan Haddad
  • 2 edits in trunk/Source/WebCore

Attempt to fix iOS build.
<rdar://problem/29312689>

Unreviewed build fix.

  • platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:

(WebCore::MediaSelectionGroupAVFObjC::updateOptions):

11:09 AM Changeset in webkit [208886] by hyatt@apple.com
  • 9 edits in trunk/Source/WebCore

[CSS Parser] Hook up InspectorStyleSheet to the new CSS parser.
https://bugs.webkit.org/show_bug.cgi?id=164886

Reviewed by Dean Jackson.

  • css/CSSGrammar.y.in:

Get rid of the CSSRuleSourceData type enum, since StyleRule's type
enum is exactly the same.

  • css/CSSPropertySourceData.cpp:

(WebCore::CSSPropertySourceData::CSSPropertySourceData):

  • css/CSSPropertySourceData.h:

Add a concept of disabled to CSSPropertySourceData. This is used for
commented out properties.

(WebCore::CSSRuleSourceData::create):
(WebCore::CSSRuleSourceData::createUnknown):
(WebCore::CSSRuleSourceData::CSSRuleSourceData):
Get rid of the CSSRuleSourceData type enum, since StyleRule's type
enum is exactly the same.

  • css/parser/CSSParser.cpp:

(WebCore::CSSParserContext::CSSParserContext):
(WebCore::CSSParser::parseSheetForInspector):
(WebCore::CSSParser::parseDeclarationForInspector):
(WebCore::CSSParser::markSupportsRuleHeaderStart):
(WebCore::CSSParser::markRuleHeaderStart):
(WebCore::CSSParser::markPropertyEnd):

  • css/parser/CSSParser.h:

Add functions that represent the new API for inspector sheet
and declaration parsing. Patch the old parse code to use StyleRule::Type
now that the CSSRuleSourceData type is gone.

  • css/parser/CSSParserObserver.h:

Tweak the API for our memory management.

  • inspector/InspectorStyleSheet.cpp:

(flattenSourceData):
(WebCore::parserContextForDocument):
(WebCore::StyleSheetHandler::StyleSheetHandler):
(WebCore::StyleSheetHandler::startRuleHeader):
(WebCore::StyleSheetHandler::setRuleHeaderEnd):
(WebCore::StyleSheetHandler::endRuleHeader):
(WebCore::StyleSheetHandler::observeSelector):
(WebCore::StyleSheetHandler::startRuleBody):
(WebCore::StyleSheetHandler::endRuleBody):
(WebCore::StyleSheetHandler::popRuleData):
(WebCore::fixUnparsedProperties):
(WebCore::StyleSheetHandler::fixUnparsedPropertyRanges):
(WebCore::StyleSheetHandler::observeProperty):
(WebCore::StyleSheetHandler::observeComment):
(WebCore::InspectorStyle::populateAllProperties):
(WebCore::isValidSelectorListString):
(WebCore::InspectorStyleSheet::ensureSourceData):
(WebCore::InspectorStyleSheetForInlineStyle::ensureParsedDataReady):
(WebCore::InspectorStyleSheetForInlineStyle::ruleSourceData):
(WebCore::createCSSParser): Deleted.
(WebCore::InspectorStyleSheetForInlineStyle::getStyleAttributeRanges): Deleted.

  • inspector/InspectorStyleSheet.h:

(WebCore::InspectorStyleProperty::setRawTextFromStyleDeclaration):
Add the new implementation. This involves duplicating most of the old
parser code for this into a new class, StyleSheetHandler, that implements
the observer interface and builds up the same data structures as the old
parser did in response to the callbacks.

10:57 AM Changeset in webkit [208885] by Joseph Pecoraro
  • 10 edits in trunk

Web Inspector: Generator functions should have a displayable name when shown in stack traces
https://bugs.webkit.org/show_bug.cgi?id=164844
<rdar://problem/29300697>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/generator-function-name.js:

Add another test now that we name the inner generator function
that we do not break the lexical resolution of names.

Source/JavaScriptCore:

  • parser/SyntaxChecker.h:

(JSC::SyntaxChecker::createGeneratorFunctionBody):

  • parser/ASTBuilder.h:

(JSC::ASTBuilder::createGeneratorFunctionBody):
New way to create a generator function with an inferred name.

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseInner):
(JSC::Parser<LexerType>::parseGeneratorFunctionSourceElements):

  • parser/Parser.h:

Pass on the name of the generator wrapper function so we can
use it on the inner generator function.

LayoutTests:

  • inspector/debugger/js-stacktrace-expected.txt:
  • inspector/debugger/js-stacktrace.html:

Add a test case for console.trace() / Error stack inside of generators.
Modernize the test to reduce redundency and get nicer output.

7:17 AM Changeset in webkit [208884] by mitz@apple.com
  • 2 edits in trunk/Source/WebCore

Tried to fix some non-macOS builds.
<rdar://problems/29331425&29331438&29331722>

  • platform/mac/WebPlaybackControlsManager.h:
3:54 AM WebKitGTK/2.14.x edited by magomez@igalia.com
(diff)
3:53 AM WebKitGTK/2.14.x edited by magomez@igalia.com
(diff)
2:03 AM Changeset in webkit [208883] by pvollan@apple.com
  • 2 edits in trunk/Source/WebCore

[Win32] Start releasing memory earlier when memory is running low.
https://bugs.webkit.org/show_bug.cgi?id=164862

Reviewed by Brent Fulgham.

On Windows, 32-bit processes have 2GB of memory available, where some is used by the system.
Debugging has shown that allocations might fail and cause crashes when memory usage is > ~1GB.
We should start releasing memory before we reach 1GB.

  • platform/win/MemoryPressureHandlerWin.cpp:

(WebCore::CheckMemoryTimer::fired):

Nov 17, 2016:

11:50 PM Changeset in webkit [208882] by Carlos Garcia Campos
  • 8 edits in trunk

Downloads started by context menu actions should also have a web view associated
https://bugs.webkit.org/show_bug.cgi?id=164364

Reviewed by Michael Catanzaro.

Source/WebKit2:

When a request is converted to a download WebPageProxy calls handleDownloadRequest() and clients handle that to
associate the web view to the download. When a download is started by a context menu action, WebPageProxy calls
WebProcessPool::download() with this as initiatingPage parameter, but clients are not notified in this case.

  • UIProcess/API/gtk/WebKitDownload.cpp:

(webkitDownloadCreateForRequest): Deleted.

  • UIProcess/API/gtk/WebKitDownloadPrivate.h:
  • UIProcess/API/gtk/WebKitWebContext.cpp:

(webkitWebContextStartDownload): Use webkitWebContextGetOrCreateDownload() after WebProcessPool::download()
because the WebKitDownload could have already been created by the web view download handler at this point.

  • UIProcess/API/gtk/WebKitWebView.cpp:

(webkit_web_view_download_uri): We no longer need to associate the web view to the download here.

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::download): If an initiatingPage has been passed, call handleDownloadRequest() to notify
the page client.

Tools:

Add a GTK+ unit tests to check that downloads started by the context menu have a web view associated.

  • TestWebKitAPI/Tests/WebKit2Gtk/TestDownloads.cpp:

(downloadLocalFileSuccessfully):
(testDownloadOverwriteDestinationDisallowed):
(testDownloadLocalFileError):
(testDownloadRemoteFile):
(testDownloadRemoteFileError):
(testDownloadMIMEType):
(contextMenuCallback):
(testContextMenuDownloadActions):
(beforeAll):

11:25 PM Changeset in webkit [208881] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebCore

REGRESSION(r208511): ImageDecoders: Crash decoding GIF images since r208511
https://bugs.webkit.org/show_bug.cgi?id=164864

Reviewed by Simon Fraser.

This happens sometimes since r208511 because the same decoder is used by more than one thread at the same
time and the decoders are not thread-safe. Several methods in ImageDecoder need to decode partially the image,
so it's possible that one method calls frameBufferAtIndex at the same times as createFrameImageAtIndex that now
can be called from the image decoder thread. Use a Lock in ImageDecoder to protect calls to frameBufferAtIndex.

  • platform/image-decoders/ImageDecoder.cpp:

(WebCore::ImageDecoder::frameIsCompleteAtIndex):
(WebCore::ImageDecoder::frameDurationAtIndex):
(WebCore::ImageDecoder::createFrameImageAtIndex):

  • platform/image-decoders/ImageDecoder.h:
11:21 PM Changeset in webkit [208880] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit2

REGRESSION: API test _WKDownload.ConvertResponseToDownload is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=164631

Reviewed by Carlos Garcia Campos.

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::convertToDownload):
I could reproduce the flaky failure 100% of the time when not using NETWORK_SESSION
by adding a usleep(1000000) in NetworkResourceLoader::convertToDownload. m_networkLoad
was not being set to nullptr before it was being checked in NetworkResourceLoader::abort

10:28 PM Changeset in webkit [208879] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit2

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

  • PlatformMac.cmake:

Add new files.

9:30 PM Changeset in webkit [208878] by rniwa@webkit.org
  • 16 edits
    1 move
    1 add in trunk

Add an experimental API to find elements across shadow boundaries
https://bugs.webkit.org/show_bug.cgi?id=164851
<rdar://problem/28220092>

Reviewed by Sam Weinig.

Source/JavaScriptCore:

  • runtime/CommonIdentifiers.h:

Source/WebCore:

Add window.collectMatchingElementsInFlatTree(Node node, DOMString selectors)
as an experimental API which finds a list of elements that matches the given CSS selectors
and expose it to a JSWorld on which WKBundleScriptWorldMakeAllShadowRootsOpen was called.

No new tests. More test cases are added to WebKit2.InjectedBundleMakeAllShadowRootsOpen.

  • bindings/scripts/CodeGeneratorJS.pm:

(NeedsRuntimeCheck): Added. Abstracts checks for EnabledAtRuntime and EnabledForWorld.
(OperationShouldBeOnInstance):
(GeneratePropertiesHashTable):
(GetRuntimeEnableFunctionName): Use worldForDOMObject(this).condition() for EnabledForWorld.
Also split the line for EnabledAtRuntime and EnabledAtRuntime for a better readability.
(GenerateImplementation):
(addIterableProperties):

  • bindings/scripts/IDLAttributes.txt:
  • bindings/scripts/preprocess-idls.pl:

(GenerateConstructorAttribute):

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

(WebCore::JSTestGlobalObject::finishCreation):
(WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorld):
(WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorldCaller):

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

(WebCore::JSTestObjPrototype::finishCreation):
(WebCore::jsTestObjPrototypeFunctionWorldSpecificMethod):
(WebCore::jsTestObjPrototypeFunctionWorldSpecificMethodCaller):

  • bindings/scripts/test/TestGlobalObject.idl: Added a test case.
  • bindings/scripts/test/TestObj.idl: Ditto.
  • page/DOMWindow.cpp:

(WebCore::DOMWindow::collectMatchingElementsInFlatTree): Added. Implements the feature by
calling SelectorQuery's matches on a node yielded by ComposedTreeIterator.

  • page/DOMWindow.h:
  • page/DOMWindow.idl:

Tools:

Added test cases for window.collectMatchingElementsInFlatTree to WebKit2.InjectedBundleMakeAllShadowRootOpen.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2/InjectedBundleMakeAllShadowRoot*s*Open_Bundle.cpp: Renamed

from InjectedBundleMakeAllShadowRootOpen_Bundle.cpp.
(TestWebKitAPI::InjectedBundleMakeAllShadowRootOpenTest::initialize): Added test cases for
window.collectMatchingElementsInFlatTree by calling alert() many times.

  • TestWebKitAPI/Tests/WebKit2/InjectedBundleMakeAllShadowRootsOpen.cpp:

(TestWebKitAPI::runJavaScriptAlert): Added expectations for multiple test cases. Each test case
finishes with a call to alert, and moves testNumber forward.
(TestWebKitAPI::TEST): Use the newly added closed-shadow-tree-test.html

  • TestWebKitAPI/Tests/WebKit2/closed-shadow-tree-test.html: Added. Creates a shadow tree with slots

and tests that window.collectMatchingElementsInFlatTree is not present when
an event named "testnormalworld" is dispatched by the injected bundle.

9:11 PM Changeset in webkit [208877] by mitz@apple.com
  • 2 edits in trunk/Source/WebKit/mac

Try to fix some non-macOS builds.

  • WebView/WebView.mm:
9:07 PM Changeset in webkit [208876] by weinig@apple.com
  • 14 edits in trunk

[WebIDL] Add support for ByteString
https://bugs.webkit.org/show_bug.cgi?id=164901

Reviewed by Darin Adler.

Source/WebCore:

  • bindings/generic/IDLTypes.h:

Make IDLByteString a IDLString.

  • bindings/js/JSDOMBinding.cpp:

(WebCore::valueToByteString):
(WebCore::valueToUSVString):

  • bindings/js/JSDOMBinding.h:

Add conversion function for ByteString and fix valueToUSVString to take an ExecState reference.

  • bindings/js/JSDOMConvert.h:

(WebCore::Converter<IDLByteString>::convert):
(WebCore::JSConverter<IDLByteString>::convert):
Add conversion functions for ByteString, using valueToByteString.

(WebCore::Converter<IDLUSVString>::convert):
Update to pass the ExecState by reference.

  • bindings/js/JSMessageEventCustom.cpp:

(WebCore::handleInitMessageEvent):
Update to pass the ExecState by reference.

  • bindings/js/JSWorkerGlobalScopeCustom.cpp:

(WebCore::JSWorkerGlobalScope::importScripts):
Update to pass the ExecState by reference.

  • bindings/scripts/CodeGenerator.pm:

Add ByteString as a string type.

  • testing/TypeConversions.h:

(WebCore::TypeConversions::testByteString):
(WebCore::TypeConversions::setTestByteString):

  • testing/TypeConversions.idl:

Add a testByteString attribute for testing.

LayoutTests:

  • js/dom/webidl-type-mapping-expected.txt:
  • js/dom/webidl-type-mapping.html:

Add tests for ByteString using the new TypeConversions.testByteString attribute.

8:57 PM Changeset in webkit [208875] by rniwa@webkit.org
  • 8 edits in trunk/Source

WKBundleNodeHandleSetHTMLInputElementSpellcheckEnabled should keep text replacement enabled
https://bugs.webkit.org/show_bug.cgi?id=164857
<rdar://problem/27721742>

Reviewed by Wenson Hsieh.

Source/WebCore:

It turns out that some users want text replacement to be always enabled so change the semantics of
WKBundleNodeHandleSetHTMLInputElementSpellcheckEnabled to only disable everything else.

Instead of completely disabling spellchecking, remove all text checking options but text replacement
when the user types into an input element on which this API is used to disable spellchecking.

No new tests since we don't have a good facility to test text replacement.

  • dom/Element.h:

(WebCore::Element::isSpellCheckingEnabled): Made this non-virtual now that there is no override.

  • editing/Editor.cpp:

(WebCore::Editor::replaceSelectionWithFragment):
(WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): Don't call resolveTextCheckingTypeMask twice.
(WebCore::Editor::resolveTextCheckingTypeMask): Filter out the text checking options if the root editable
element is inside an input element on which isSpellcheckDisabledExceptTextReplacement is set to true.

  • editing/Editor.h:
  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::HTMLInputElement):
(WebCore::HTMLInputElement::isSpellCheckingEnabled): Deleted.

  • html/HTMLInputElement.h:

(WebCore::HTMLInputElement::setSpellcheckDisabledExceptTextReplacement): Renamed from setSpellcheckEnabled
to reflect the new semantics.
(WebCore::HTMLInputElement::isSpellcheckDisabledExceptTextReplacement): Ditto.

Source/WebKit2:

  • WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:

(WebKit::InjectedBundleNodeHandle::setHTMLInputElementSpellcheckEnabled):

7:32 PM Changeset in webkit [208874] by wilander@apple.com
  • 9 edits in trunk/Source

Resource load statistics: Cover further data records, count removed data records, and only fire handler when needed
https://bugs.webkit.org/show_bug.cgi?id=164659

Reviewed by Andy Estes.

Source/WebCore:

No new tests. This feature is behind a flag and off by default. Tests require real domain names.

  • loader/ResourceLoadObserver.cpp:

(WebCore::ResourceLoadObserver::logFrameNavigation):
(WebCore::ResourceLoadObserver::logSubresourceLoading):
(WebCore::ResourceLoadObserver::logWebSocketLoading):

All three functions are now more conservative in calls to
m_store->fireDataModificationHandler(). They only fire when an important statistic has
changed or data records have previously been removed for the domain in question.

  • loader/ResourceLoadStatistics.cpp:

(WebCore::ResourceLoadStatistics::encode):

Added the dataRecordsRemoved statistic.

(WebCore::ResourceLoadStatistics::decode):

Now takes a version parameter to control which keys to expect.
Added the dataRecordsRemoved statistic.

(WebCore::appendHashCountedSet):

Removed stray linefeed.

(WebCore::ResourceLoadStatistics::toString):

Added the dataRecordsRemoved statistic.

(WebCore::ResourceLoadStatistics::merge):

Added the dataRecordsRemoved statistic.

  • loader/ResourceLoadStatistics.h:

Added the dataRecordsRemoved statistic.

  • loader/ResourceLoadStatisticsStore.cpp:

(WebCore::ResourceLoadStatisticsStore::createEncoderFromData):

Now encodes a version number for the statistics model.

(WebCore::ResourceLoadStatisticsStore::readDataFromDecoder):

Now tries to decode a version number and passes it on to statistics decoding.

(WebCore::ResourceLoadStatisticsStore::processStatistics):

No longer gates processing on the number of data captured.

(WebCore::ResourceLoadStatisticsStore::updateStatisticsForRemovedDataRecords):

Update function for the new dataRecordsRemoved statistic.

(WebCore::ResourceLoadStatisticsStore::hasEnoughDataForStatisticsProcessing): Deleted.

No longer needed since we no longer gate processing on the number of data captured.

  • loader/ResourceLoadStatisticsStore.h:

Source/WebKit2:

  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::removeDataRecords):

Consistent naming with 'remove' rather than 'delete'.
Now removes localStorage, IndexDB, disk cache, and memory cache too.
Updates statistics with number of times it has removed data records.

(WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated):

No longer checks whether it has enough data since the classification rules
are absolute, not relative.

(WebKit::WebResourceLoadStatisticsStore::clearDataRecords): Deleted.

  • UIProcess/WebResourceLoadStatisticsStore.h:

Consistent naming with 'remove' rather than 'delete'.

6:41 PM Changeset in webkit [208873] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Fix WinCairo build after r208740
https://bugs.webkit.org/show_bug.cgi?id=164749

  • platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:

(WebCore::GraphicsContext3D::reshapeFBOs):
(WebCore::GraphicsContext3D::validateAttributes):
(WebCore::GraphicsContext3D::getExtensions):
Use more references instead of pointers, like Myles did in r208740

6:11 PM Changeset in webkit [208872] by achristensen@apple.com
  • 31 edits
    8 adds in trunk

Implement TextDecoder and TextEncoder
https://bugs.webkit.org/show_bug.cgi?id=163771

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

  • web-platform-tests/encoding/api-basics-expected.txt:
  • web-platform-tests/encoding/api-invalid-label-expected.txt:
  • web-platform-tests/encoding/api-replacement-encodings-expected.txt:
  • web-platform-tests/encoding/api-surrogates-utf8-expected.txt:
  • web-platform-tests/encoding/idlharness-expected.txt:
  • web-platform-tests/encoding/iso-2022-jp-decoder-expected.txt:
  • web-platform-tests/encoding/single-byte-decoder-expected.txt:
  • web-platform-tests/encoding/textdecoder-byte-order-marks-expected.txt:
  • web-platform-tests/encoding/textdecoder-fatal-expected.txt:
  • web-platform-tests/encoding/textdecoder-fatal-single-byte-expected.txt:
  • web-platform-tests/encoding/textdecoder-fatal-streaming-expected.txt:
  • web-platform-tests/encoding/textdecoder-ignorebom-expected.txt:
  • web-platform-tests/encoding/textdecoder-labels-expected.txt:
  • web-platform-tests/encoding/textdecoder-streaming-expected.txt:
  • web-platform-tests/encoding/textdecoder-utf16-surrogates-expected.txt:
  • web-platform-tests/encoding/textencoder-constructor-non-utf-expected.txt:
  • web-platform-tests/encoding/textencoder-utf16-surrogates-expected.txt:

Source/WebCore:

This API is already implemented by Chrome and Firefox
as specified in https://encoding.spec.whatwg.org/

Covered by newly passing web platform tests.

  • features.json:
  • CMakeLists.txt:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/TextDecoder.cpp: Added.

(WebCore::isEncodingWhitespace):
(WebCore::TextDecoder::create):
(WebCore::TextDecoder::TextDecoder):
(WebCore::TextDecoder::ignoreBOMIfNecessary):
(WebCore::TextDecoder::prependBOMIfNecessary):
(WebCore::codeUnitByteSize):
(WebCore::TextDecoder::decode):
(WebCore::TextDecoder::encoding):

  • dom/TextDecoder.h: Added.

(WebCore::TextDecoder::fatal):
(WebCore::TextDecoder::ignoreBOM):

  • dom/TextDecoder.idl: Added.
  • dom/TextEncoder.cpp: Added.

(WebCore::TextEncoder::TextEncoder):
(WebCore::TextEncoder::encoding):
(WebCore::TextEncoder::encode):

  • dom/TextEncoder.h: Added.

(WebCore::TextEncoder::create):

  • dom/TextEncoder.idl: Added.

LayoutTests:

  • fast/encoding/utf-8-non-ascii-expected.txt: Added.
  • fast/encoding/utf-8-non-ascii.html: Added.
  • js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
  • platform/efl/js/dom/global-constructors-attributes-expected.txt:
  • platform/gtk/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac/js/dom/global-constructors-attributes-expected.txt:
  • platform/win/js/dom/global-constructors-attributes-expected.txt:
5:26 PM Changeset in webkit [208871] by weinig@apple.com
  • 3 edits in trunk/Source/WebCore

Try to fix the windows build again.

  • svg/SVGStringList.h:
  • svg/properties/SVGStaticListPropertyTearOff.h:

(WebCore::SVGStaticListPropertyTearOff::SVGStaticListPropertyTearOff):

5:09 PM Changeset in webkit [208870] by weinig@apple.com
  • 2 edits in trunk/Source/WebCore

Try to fix the windows build.

  • svg/SVGStringList.h:

Remove unnecessary using declarations.

4:55 PM Changeset in webkit [208869] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Regression(r208672?): ASSERTION FAILED: isMainThread() in WebCore::Node::ref()
https://bugs.webkit.org/show_bug.cgi?id=164887
<rdar://problem/29319497>

Reviewed by Brady Eidson.

Restore pre-r208672 behavior where we do not ref the script execution context in the
background thread since this is unsafe. We use WTFMove(m_scriptExecutionContext)
instead of m_scriptExecutionContext.copyRef(). Before r208672, it was calling
m_scriptExecutionContext.releaseNonNull() because m_scriptExecutionContext was a
RefPtr instead of a Ref. Note that copyRef() causes 2 issues here:

  1. It refs the scriptExecutionContext in a non-main thread which is unsafe and asserts.
  2. The point of this postTask in the destructor is to make sure the scriptExecutionContext gets destroyed in the main thread so we definitely want to *transfer* ownership of m_scriptExecutionContext to the main thread, not ref it to pass it to the main thread.

No new tests, already covered by storage/websql/multiple-transactions-on-different-handles.html.

  • Modules/webdatabase/Database.cpp:

(WebCore::Database::~Database):

4:48 PM Changeset in webkit [208868] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Rebaseline fast/html/keygen.html for Sierra.

Unreviewed test gardening.

  • platform/mac/fast/html/keygen-expected.txt:
4:37 PM Changeset in webkit [208867] by Yusuke Suzuki
  • 9 edits
    1 add in trunk

[JSC] Drop arguments.caller
https://bugs.webkit.org/show_bug.cgi?id=164859

Reviewed by Saam Barati.

JSTests:

  • stress/strict-mode-arguments-caller.js: Added.

(strictArguments):
(shouldBe):

Source/JavaScriptCore:

Originally, some JavaScript engine has arguments.caller property.
But it easily causes some information leaks and it becomes obstacles
for secure ECMAScript (SES). In ES5, we make it deprecated in strict
mode. To do so, we explicitly set "caller" getter throwing TypeError
to arguments in strict mode.

But now, there is no modern engine which supports arguments.caller
in sloppy mode. So the original compatibility problem is gone and
"caller" getter in the strict mode arguments becomes meaningless.

ES2017 drops this from the spec. In this patch, we also drop this
arguments.caller in strict mode support.

Note that Function#caller is still alive.

  • runtime/ClonedArguments.cpp:

(JSC::ClonedArguments::getOwnPropertySlot):
(JSC::ClonedArguments::put):
(JSC::ClonedArguments::deleteProperty):
(JSC::ClonedArguments::defineOwnProperty):
(JSC::ClonedArguments::materializeSpecials):

LayoutTests:

  • js/basic-strict-mode-expected.txt:
  • js/script-tests/basic-strict-mode.js:
  • js/script-tests/strict-throw-type-error.js:
  • js/script-tests/throw-type-error-is-unique.js:

(test):

  • js/strict-throw-type-error-expected.txt:
4:23 PM Changeset in webkit [208866] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Inlining should be disallowed when JSC_alwaysUseShadowChicken=true.
https://bugs.webkit.org/show_bug.cgi?id=164893
<rdar://problem/29146436>

Reviewed by Saam Barati.

  • runtime/Options.cpp:

(JSC::recomputeDependentOptions):

4:22 PM Changeset in webkit [208865] by beidson@apple.com
  • 26 edits
    7 copies
    1 add in trunk

Add _WKIconLoadingDelegate SPI.
https://bugs.webkit.org/show_bug.cgi?id=164894

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (Manual testing possible in MiniBrowser now, WKTR tests coming soon in https://bugs.webkit.org/show_bug.cgi?id=164895).

With this client, WebCore will ask the FrameLoaderClient about each icon found in the <head>.

WebKit2 will then ask the embedding app - for each icon - if it wants that icon to load.

For icons the app decides to load, WebKit will pass the data to the app without storing locally.

  • WebCore.xcodeproj/project.pbxproj:
  • dom/Document.cpp:

(WebCore::Document::implicitClose):

  • html/LinkIconCollector.cpp:

(WebCore::iconSize):
(WebCore::compareIcons):

  • html/LinkIconCollector.h:
  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::startIconLoading):
(WebCore::DocumentLoader::didGetLoadDecisionForIcon):
(WebCore::DocumentLoader::finishedLoadingIcon):

  • loader/DocumentLoader.h:
  • loader/FrameLoaderClient.h:
  • loader/icon/IconLoader.cpp:

(WebCore::IconLoader::IconLoader):
(WebCore::IconLoader::startLoading):
(WebCore::IconLoader::notifyFinished):

  • loader/icon/IconLoader.h:
  • platform/LinkIcon.h: Copied from Source/WebCore/html/LinkIconCollector.h.

(WebCore::LinkIcon::encode):
(WebCore::LinkIcon::decode):

Source/WebKit2:

With this client, WebCore will ask the FrameLoaderClient about each icon found in the <head>.

WebKit2 will then ask the embedding app - for each icon - if it wants that icon to load.

For icons the app decides to load, WebKit will pass the data to the app without storing locally.

  • UIProcess/API/APIIconLoadingClient.h: Copied from Source/WebCore/html/LinkIconCollector.h.

(API::IconLoadingClient::~IconLoadingClient):
(API::IconLoadingClient::getLoadDecisionForIcon):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):
(-[WKWebView _iconLoadingDelegate]):
(-[WKWebView _setIconLoadingDelegate:]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/Cocoa/_WKIconLoadingDelegate.h: Copied from Source/WebCore/html/LinkIconCollector.h.
  • UIProcess/API/Cocoa/_WKLinkIconParameters.h: Copied from Source/WebCore/html/LinkIconCollector.h.
  • UIProcess/API/Cocoa/_WKLinkIconParameters.mm: Copied from Source/WebCore/html/LinkIconCollector.h.

(-[_WKLinkIconParameters _initWithLinkIcon:]):
(-[_WKLinkIconParameters url]):
(-[_WKLinkIconParameters mimeType]):
(-[_WKLinkIconParameters size]):
(-[_WKLinkIconParameters iconType]):

  • UIProcess/API/Cocoa/_WKLinkIconParametersInternal.h: Copied from Source/WebCore/html/LinkIconCollector.h.
  • UIProcess/Cocoa/IconLoadingDelegate.h: Copied from Source/WebCore/html/LinkIconCollector.h.
  • UIProcess/Cocoa/IconLoadingDelegate.mm: Added.

(WebKit::IconLoadingDelegate::IconLoadingDelegate):
(WebKit::IconLoadingDelegate::~IconLoadingDelegate):
(WebKit::IconLoadingDelegate::createIconLoadingClient):
(WebKit::IconLoadingDelegate::delegate):
(WebKit::IconLoadingDelegate::setDelegate):
(WebKit::IconLoadingDelegate::IconLoadingClient::IconLoadingClient):
(WebKit::IconLoadingDelegate::IconLoadingClient::~IconLoadingClient):
(WebKit::IconLoadingDelegate::IconLoadingClient::getLoadDecisionForIcon):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setIconLoadingClient):
(WebKit::WebPageProxy::getLoadDecisionForIcon):
(WebKit::WebPageProxy::finishedLoadingIcon):

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::iconLoadingClient):

  • UIProcess/WebPageProxy.messages.in:
  • WebKit2.xcodeproj/project.pbxproj:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::useIconLoadingClient):
(WebKit::WebFrameLoaderClient::getLoadDecisionForIcon):
(WebKit::WebFrameLoaderClient::finishedLoadingIcon):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

(WebKit::WebFrameLoaderClient::setUseIconLoadingClient):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didGetLoadDecisionForIcon):
(WebKit::WebPage::setUseIconLoadingClient):

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

Tools:

Add MiniBrowser support for this new SPI, configurable with a setting.

  • MiniBrowser/mac/SettingsController.h:
  • MiniBrowser/mac/SettingsController.m:

(-[SettingsController _populateMenu]):
(-[SettingsController validateMenuItem:]):
(-[SettingsController loadsAllSiteIcons]):
(-[SettingsController toggleLoadsAllSiteIcons:]):

  • MiniBrowser/mac/WK2BrowserWindowController.m:

(-[WK2BrowserWindowController awakeFromNib]):
(-[WK2BrowserWindowController webView:shouldLoadIconWithParameters:completionHandler:]):

4:11 PM Changeset in webkit [208864] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Update TestExpectations for media/modern-media-controls/pip-support/pip-support-enabled.html.
https://bugs.webkit.org/show_bug.cgi?id=164336

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
3:58 PM Changeset in webkit [208863] by weinig@apple.com
  • 91 edits
    7 copies
    5 moves
    3 deletes in trunk/Source/WebCore

[SVG] Moving more special casing of SVG out of the bindings - SVG lists
https://bugs.webkit.org/show_bug.cgi?id=164790

Reviewed by Alex Christensen.

  • Make SVGLengthList, SVGNumberList, SVGPointList, SVGStringList, SVGPathSegList and SVGTransformList real classes and stop special casing them in the bindings generator. This removes the remaining SVG specializations for tear offs from the bindings generator.
  • Renamed existing SVGLengthList, SVGNumberList, SVGPointList, SVGStringList, SVGPathSegList, SVGPathSegList and SVGTransformList to SVG<Type>ListValues, to make way for the new classes.
  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • svg/SVGAllInOne.cpp:

Add new files.

  • bindings/scripts/CodeGenerator.pm:
  • bindings/scripts/CodeGeneratorJS.pm:

Remove SVG tear off specific code!

  • rendering/svg/RenderSVGShape.cpp:
  • rendering/svg/RenderSVGText.cpp:
  • rendering/svg/RenderSVGTextPath.cpp:
  • rendering/svg/SVGRenderTreeAsText.cpp:
  • svg/SVGAnimateMotionElement.cpp:
  • svg/SVGClipPathElement.cpp:
  • svg/SVGLinearGradientElement.cpp:
  • svg/SVGRadialGradientElement.cpp:

Remove unnecessary #includes.

  • rendering/svg/SVGPathData.cpp:

(WebCore::updatePathFromPolygonElement):
(WebCore::updatePathFromPolylineElement):

  • rendering/svg/SVGTextLayoutAttributesBuilder.cpp:

(WebCore::updateCharacterData):
(WebCore::SVGTextLayoutAttributesBuilder::fillCharacterDataMap):

  • svg/SVGAnimatedLengthList.cpp:

(WebCore::SVGAnimatedLengthListAnimator::constructFromString):
(WebCore::parseLengthListFromString):
(WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue):
(WebCore::SVGAnimatedLengthListAnimator::calculateDistance):

  • svg/SVGAnimatedLengthList.h:
  • svg/SVGAnimatedNumberList.cpp:

(WebCore::SVGAnimatedNumberListAnimator::constructFromString):
(WebCore::SVGAnimatedNumberListAnimator::addAnimatedTypes):
(WebCore::SVGAnimatedNumberListAnimator::calculateAnimatedValue):
(WebCore::SVGAnimatedNumberListAnimator::calculateDistance):

  • svg/SVGAnimatedNumberList.h:
  • svg/SVGAnimatedPath.cpp:

(WebCore::SVGAnimatedPathAnimator::resetAnimValToBaseVal):

  • svg/SVGAnimatedPointList.cpp:

(WebCore::SVGAnimatedPointListAnimator::constructFromString):
(WebCore::SVGAnimatedPointListAnimator::addAnimatedTypes):
(WebCore::SVGAnimatedPointListAnimator::calculateAnimatedValue):
(WebCore::SVGAnimatedPointListAnimator::calculateDistance):

  • svg/SVGAnimatedPointList.h:
  • svg/SVGAnimatedTransformList.cpp:

(WebCore::SVGAnimatedTransformListAnimator::constructFromString):
(WebCore::SVGAnimatedTransformListAnimator::calculateAnimatedValue):

  • svg/SVGAnimatedTransformList.h:
  • svg/SVGAnimatedType.cpp:

(WebCore::SVGAnimatedType::createLengthList):
(WebCore::SVGAnimatedType::createNumberList):
(WebCore::SVGAnimatedType::createPointList):
(WebCore::SVGAnimatedType::createTransformList):

  • svg/SVGAnimatedType.h:

(WebCore::SVGAnimatedType::lengthList):
(WebCore::SVGAnimatedType::numberList):
(WebCore::SVGAnimatedType::pointList):
(WebCore::SVGAnimatedType::transformList):

  • svg/SVGComponentTransferFunctionElement.cpp:

(WebCore::SVGComponentTransferFunctionElement::parseAttribute):

  • svg/SVGFEColorMatrixElement.cpp:

(WebCore::SVGFEColorMatrixElement::parseAttribute):

  • svg/SVGFEConvolveMatrixElement.cpp:

(WebCore::SVGFEConvolveMatrixElement::parseAttribute):
(WebCore::SVGFEConvolveMatrixElement::build):

  • svg/SVGParserUtilities.cpp:

(WebCore::pointsListFromSVGData):

  • svg/SVGParserUtilities.h:
  • svg/SVGPathElement.cpp:
  • svg/SVGPathElement.h:
  • svg/SVGPathSegListBuilder.cpp:
  • svg/SVGPathSegListBuilder.h:
  • svg/SVGPathSegListSource.cpp:
  • svg/SVGPathSegListSource.h:
  • svg/SVGPathUtilities.cpp:

(WebCore::buildSVGPathByteStreamFromSVGPathSegListValues):
(WebCore::appendSVGPathByteStreamFromSVGPathSeg):
(WebCore::buildSVGPathSegListValuesFromByteStream):
(WebCore::buildStringFromSVGPathSegListValues):
(WebCore::buildSVGPathByteStreamFromSVGPathSegList): Deleted.
(WebCore::buildSVGPathSegListFromByteStream): Deleted.
(WebCore::buildStringFromSVGPathSegList): Deleted.

  • svg/SVGPathUtilities.h:
  • svg/SVGPolyElement.cpp:

(WebCore::SVGPolyElement::parseAttribute):
(WebCore::SVGPolyElement::lookupOrCreatePointsWrapper):
(WebCore::SVGPolyElement::points):
(WebCore::SVGPolyElement::animatedPoints):

  • svg/SVGPolyElement.h:

(WebCore::SVGPolyElement::pointList):

  • svg/SVGTextPositioningElement.cpp:

(WebCore::SVGTextPositioningElement::parseAttribute):

  • svg/SVGTransformable.cpp:

(WebCore::SVGTransformable::parseTransformAttribute):

  • svg/SVGTransformable.h:
  • svg/SVGViewElement.cpp:

(WebCore::SVGViewElement::viewTarget):
(WebCore::SVGViewElement::parseAttribute):

  • svg/SVGViewElement.h:
  • svg/SVGViewElement.idl:
  • svg/SVGViewSpec.cpp:

(WebCore::SVGViewSpec::transformString):
(WebCore::SVGViewSpec::transform):
(WebCore::SVGViewSpec::lookupOrCreateTransformWrapper):
(WebCore::SVGViewSpec::reset):

  • svg/SVGViewSpec.h:

Update for name changes.

  • svg/SVGAngle.h:

(WebCore::SVGAngle::create):
(WebCore::SVGAngle::SVGAngle):

  • svg/SVGLength.h:

(WebCore::SVGLength::create):
(WebCore::SVGLength::SVGLength):

  • svg/SVGMatrix.h:

(WebCore::SVGMatrix::create):
(WebCore::SVGMatrix::SVGMatrix):

  • svg/SVGNumber.h:

(WebCore::SVGNumber::create):
(WebCore::SVGNumber::SVGNumber):

  • svg/SVGPoint.h:

(WebCore::SVGPoint::create):
(WebCore::SVGPoint::SVGPoint):

  • svg/SVGPreserveAspectRatio.h:

(WebCore::SVGPreserveAspectRatio::create):
(WebCore::SVGPreserveAspectRatio::SVGPreserveAspectRatio):

  • svg/SVGRect.h:

(WebCore::SVGRect::create):
(WebCore::SVGRect::SVGRect):

  • svg/SVGTransform.h:

(WebCore::SVGTransform::create):
(WebCore::SVGTransform::SVGTransform):

  • svg/properties/SVGPropertyTearOff.h:

(WebCore::SVGPropertyTearOff::create):
Pass the SVGAnimatedProperty parameter by reference.

  • svg/SVGAnimationElement.cpp:

(WebCore::SVGAnimationElement::requiredFeatures):
(WebCore::SVGAnimationElement::requiredExtensions):
(WebCore::SVGAnimationElement::systemLanguage):

  • svg/SVGAnimationElement.h:
  • svg/SVGCursorElement.cpp:

(WebCore::SVGCursorElement::requiredFeatures):
(WebCore::SVGCursorElement::requiredExtensions):
(WebCore::SVGCursorElement::systemLanguage):

  • svg/SVGCursorElement.h:
  • svg/SVGGradientElement.cpp:
  • svg/SVGGraphicsElement.cpp:

(WebCore::SVGGraphicsElement::requiredFeatures):
(WebCore::SVGGraphicsElement::requiredExtensions):
(WebCore::SVGGraphicsElement::systemLanguage):

  • svg/SVGGraphicsElement.h:
  • svg/SVGMaskElement.cpp:

(WebCore::SVGMaskElement::requiredFeatures):
(WebCore::SVGMaskElement::requiredExtensions):
(WebCore::SVGMaskElement::systemLanguage):

  • svg/SVGMaskElement.h:
  • svg/SVGPatternElement.cpp:

(WebCore::SVGPatternElement::parseAttribute):
(WebCore::SVGPatternElement::requiredFeatures):
(WebCore::SVGPatternElement::requiredExtensions):
(WebCore::SVGPatternElement::systemLanguage):

  • svg/SVGPatternElement.h:
  • svg/SVGTests.cpp:

(WebCore::SVGTests::synchronizeAttribute):
(WebCore::SVGTests::synchronizeRequiredFeatures):
(WebCore::SVGTests::synchronizeRequiredExtensions):
(WebCore::SVGTests::synchronizeSystemLanguage):
(WebCore::SVGTests::requiredFeatures):
(WebCore::SVGTests::requiredExtensions):
(WebCore::SVGTests::systemLanguage):

  • svg/SVGTests.h:
  • svg/SVGTests.idl:

Make SVGTests SVGStringLists work by adding implementations of functions
on the SVGElements that implement SVGTests, passing *this down to SVGTests.

  • svg/SVGLengthList.cpp: Removed.
  • svg/SVGLengthList.h:
  • svg/SVGLengthList.idl:
  • svg/SVGLengthListValues.cpp: Copied from svg/SVGLengthList.cpp.
  • svg/SVGLengthListValues.h: Copied from svg/SVGLengthList.h.

Rename SVGLengthList to SVGLengthListValues and add an explicit implementation of
the SVGLengthList interface inheriting from SVGListPropertyTearOff<SVGLengthListValues>.

  • svg/SVGNumberList.cpp: Removed.
  • svg/SVGNumberList.h:
  • svg/SVGNumberListValues.cpp: Copied from svg/SVGNumberList.cpp.
  • svg/SVGNumberListValues.h: Copied from svg/SVGNumberList.h.

Rename SVGNumberList to SVGNumberListValues and add an explicit implementation of
the SVGNumberList interface inheriting from SVGListPropertyTearOff<SVGNumberListValues>.

  • svg/SVGPathSegList.cpp:
  • svg/SVGPathSegList.h:
  • svg/SVGPathSegListValues.cpp: Copied from svg/SVGPathSegList.cpp.
  • svg/SVGPathSegListValues.h: Copied from svg/SVGPathSegList.h.
  • svg/properties/SVGPathSegListPropertyTearOff.cpp: Removed.
  • svg/properties/SVGPathSegListPropertyTearOff.h: Removed.

Rename SVGPathSegList to SVGPathSegListValues and add an explicit implementation of
the SVGPathSegList interface inheriting from SVGListProperty<SVGPathSegListValues>.

  • svg/SVGPointList.cpp: Removed.
  • svg/SVGPointList.h:
  • svg/SVGPointListValues.cpp: Copied from svg/SVGPointList.cpp.
  • svg/SVGPointListValues.h: Copied from svg/SVGPointList.h.

Rename SVGPointList to SVGPointListValues and add an explicit implementation of
the SVGPointList interface inheriting from SVGListPropertyTearOff<SVGPointListValues>.

  • svg/SVGStringList.cpp: Removed.
  • svg/SVGStringList.h:
  • svg/SVGStringListValues.cpp: Copied from svg/SVGStringList.cpp.
  • svg/SVGStringListValues.h: Copied from svg/SVGStringList.h.

Rename SVGStringList to SVGStringListValues and add an explicit implementation of
the SVGStringList interface inheriting from SVGStaticListPropertyTearOff<SVGStringListValues>.

  • svg/SVGTransformList.cpp: Removed.
  • svg/SVGTransformList.h:
  • svg/SVGTransformListValues.cpp: Copied from svg/SVGTransformList.cpp.
  • svg/SVGTransformListValues.h: Copied from svg/SVGTransformList.h.
  • svg/properties/SVGTransformListPropertyTearOff.h: Removed.

Rename SVGTransformList to SVGTransformListValues and add an explicit implementation of
the SVGTransformList interface inheriting from SVGListPropertyTearOff<SVGTransformListValues>.

  • svg/properties/SVGAnimatedListPropertyTearOff.h:
  • svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
  • svg/properties/SVGAnimatedPropertyTearOff.h:
  • svg/properties/SVGAnimatedTransformListPropertyTearOff.h:
  • svg/properties/SVGStaticListPropertyTearOff.h:

Convert to return fully specialized types for baseVal and animVal, removing many unnecessary casts
around the codebase. Also add some uses of Ref.

  • svg/properties/SVGListProperty.h:

(WebCore::SVGListProperty::getItemValuesAndWrappers):
(WebCore::SVGListProperty::removeItemValuesAndWrappers):

  • svg/properties/SVGListPropertyTearOff.h:

(WebCore::SVGListPropertyTearOff::create):
(WebCore::SVGListPropertyTearOff::SVGListPropertyTearOff):
(WebCore::SVGListPropertyTearOff::~SVGListPropertyTearOff):
Store the AnimatedListPropertyTearOff as a Ref, and pass it around by reference.

  • svg/properties/SVGStaticPropertyTearOff.h:

Update to take the ContextElement by reference.

3:54 PM Changeset in webkit [208862] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Correct a typo in a TestExpectations file.

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
3:05 PM Changeset in webkit [208861] by Brent Fulgham
  • 2 edits in trunk/Source/WebCore

Improve URL length handling
https://bugs.webkit.org/show_bug.cgi?id=164884
<rdar://problem/5909143>

Reviewed by David Kilzer.

Make sure the result of re-encoding and other fix-up stays within
expected parameters.

No new tests. No change in behavior.

  • platform/URL.cpp:

(WebCore::URL::parse):

1:37 PM Changeset in webkit [208860] by fpizlo@apple.com
  • 6 edits in trunk/Source/JavaScriptCore

Speculatively disable eager object zero-fill on not-x86 to let the bots decide if that's a problem
https://bugs.webkit.org/show_bug.cgi?id=164885

Reviewed by Mark Lam.

This adds a useGCFences() function that we use to guard all eager object zero-fill and the
related fences. It currently returns true only on x86().

The goal here is to get the bots to tell us if this code is responsible for perf issues on
any non-x86 platforms. We have a few different paths that we can pursue if this turns out
to be the case. Eager zero-fill is merely the easiest way to optimize out some fences, but
we could get rid of it and instead teach B3 how to think about fences.

  • assembler/CPU.h:

(JSC::useGCFences):

  • bytecode/PolymorphicAccess.cpp:

(JSC::AccessCase::generateImpl):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileAllocatePropertyStorage):
(JSC::DFG::SpeculativeJIT::compileReallocatePropertyStorage):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileMaterializeNewObject):
(JSC::FTL::DFG::LowerDFGToB3::allocatePropertyStorage):
(JSC::FTL::DFG::LowerDFGToB3::reallocatePropertyStorage):
(JSC::FTL::DFG::LowerDFGToB3::allocateObject):
(JSC::FTL::DFG::LowerDFGToB3::mutatorFence):
(JSC::FTL::DFG::LowerDFGToB3::setButterfly):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::mutatorFence):
(JSC::AssemblyHelpers::storeButterfly):
(JSC::AssemblyHelpers::emitInitializeInlineStorage):
(JSC::AssemblyHelpers::emitInitializeOutOfLineStorage):

1:23 PM Changeset in webkit [208859] by Alan Bujtas
  • 4 edits in trunk

Render tree should be all clean by the end of FrameView::layout().
https://bugs.webkit.org/show_bug.cgi?id=162834

Reviewed by Simon Fraser.

Source/WebCore:

This is a preventive patch to ensure we don't introduce new bugs through
dirty renderers. There are still 3 failing cases and they are skipped for now (debug only).

  • page/FrameView.cpp:

(WebCore::RenderTreeNeedsLayoutChecker::~RenderTreeNeedsLayoutChecker):

LayoutTests:

1:20 PM Changeset in webkit [208858] by Brent Fulgham
  • 8 edits in trunk

keygen element should not support < 2048 RSA key lengths
https://bugs.webkit.org/show_bug.cgi?id=164874
<rdar://problem/22618141>

Reviewed by Dean Jackson.

Source/WebCore:

Remove the two insecure RSA choices (512-bit and 1024-bit) so that users
do not accidentally select a bad key length.

Tested by fast/html/keygen.html

  • platform/LocalizedStrings.cpp:

(WebCore::keygenMenuItem512): Deleted.
(WebCore::keygenMenuItem1024): Deleted.

  • platform/LocalizedStrings.h:
  • platform/mac/SSLKeyGeneratorMac.mm:

(WebCore::signedPublicKeyAndChallengeString): ASSERT on bad key size.
(WebCore::getSupportedKeySizes): Remove bad key sizes.
(WebCore::signedPublicKeyAndChallengeString): Ditto.

  • platform/win/SSLKeyGeneratorWin.cpp:

(WebCore::WebCore::getSupportedKeySizes): Ditto.

LayoutTests:

  • platform/mac/fast/html/keygen-expected.txt:
  • platform/mac-elcapitan/fast/html/keygen-expected.txt:
12:25 PM Changeset in webkit [208857] by commit-queue@webkit.org
  • 5 edits in trunk

Web Inspector: Shift clicking on named color value only shows its hex form
https://bugs.webkit.org/show_bug.cgi?id=162758

Patch by Devin Rousso <Devin Rousso> on 2016-11-17
Reviewed by Timothy Hatcher.

Source/WebInspectorUI:

  • UserInterface/Models/Color.js:

(WebInspector.Color.prototype.nextFormat):
Reworked the logic for the formatting order to be the following:

  • Long HEX and Long HEXAlpha
  • RGB and RGBA
  • HSL and HSLA
  • Keyword (if applicable)
  • Short HEX (if applicable)
  • Short HEXAlpha (if applicable)

It will only show formats with alpha values if the color value has an alpha that is not 1.
If the alpha is not 1, it will not show formats with non-alpha values.

The changes to this function have no effect on the context menu items of InlineSwatch
elements. The purpose of each of those items is to allow the user to change the format to
a specified type, whereas WebInspector.Color.prototype.nextFormat is used to cycle through
all of the relevant formats.

(WebInspector.Color.prototype._toRGBString):
(WebInspector.Color.prototype._toRGBAString):
(WebInspector.Color.prototype._toHSLString):
(WebInspector.Color.prototype._toHSLAString):
Unrelated fix of extra decimals when converting from HEX to RGB and HSL.

  • UserInterface/Views/CSSStyleDeclarationTextEditor.js:

(WebInspector.CSSStyleDeclarationTextEditor._inlineSwatchValueChanged):
Removed assertion for _hasActiveInlineSwatchEditor since the value may change from
switching the format of a color swatch (Shift-Click).

LayoutTests:

  • inspector/model/color.html:

Updated the WebInspector.Color.prototype.nextFormat test for the new nextFormat logic.

12:15 PM Changeset in webkit [208856] by caitp@igalia.com
  • 3 edits in trunk/Tools

[JSC] remove leftover references to ES2017_ASYNCFUNCTION_SYNTAX flag
https://bugs.webkit.org/show_bug.cgi?id=164879

Reviewed by Alex Christensen.

The flag was referenced in FeatureList.pm and in one of the
FeatureDefines.xcconfig files, despite being removed.

  • Scripts/webkitperl/FeatureList.pm:
  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
11:21 AM Changeset in webkit [208855] by keith_miller@apple.com
  • 9 edits in trunk

Add rotate to Wasm
https://bugs.webkit.org/show_bug.cgi?id=164871

Reviewed by Filip Pizlo.

JSTests:

  • wasm/wasm.json:

Source/JavaScriptCore:

Add rotate left and rotate right to Wasm. These directly map to B3 opcodes.
This also moves arm specific transformations of rotate left to lower macros
after optimization. It's a bad idea to have platform specific canonicalizations
in reduce strength since other optimizations may not be aware of it.

Add a bug to do pure CSE after lower macros after optimization since we want to
clean up RotL(value, Neg(Neg(shift))).

  • b3/B3Generate.cpp:

(JSC::B3::generateToAir):

  • b3/B3LowerMacrosAfterOptimizations.cpp:
  • b3/B3ReduceStrength.cpp:
  • wasm/wasm.json:

Websites/webkit.org:

Update docs for new rotate instructions.

  • docs/b3/intermediate-representation.html:
11:07 AM Changeset in webkit [208854] by keith_miller@apple.com
  • 4 edits in trunk

Add sqrt to Wasm
https://bugs.webkit.org/show_bug.cgi?id=164877

Reviewed by Mark Lam.

B3 already has a Sqrt opcode we just need to map Wasm to it.

  • wasm/wasm.json:
10:57 AM Changeset in webkit [208853] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=164616

Unreviewed test gardening.

  • platform/mac/TestExpectations:
10:50 AM Changeset in webkit [208852] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking inspector/worker/debugger-multiple-targets-pause.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=164872

Unreviewed test gardening.

  • platform/mac/TestExpectations:
10:43 AM Changeset in webkit [208851] by eric.carlson@apple.com
  • 21 edits
    1 copy in trunk/Source/WebCore

[MediaStream][Mac] Use AVCapturePreview object for camera/microphone rendering
https://bugs.webkit.org/show_bug.cgi?id=164837
<rdar://problem/29297727>

Reviewed by Jer Noble.

No new tests, the real capture devices can not be used in layout tests.

  • WebCore.xcodeproj/project.pbxproj:

Drive-by fix: clear m_settingMediaStreamSrcObject when the media player is destroyed unless
that happens as a side effect of setting video.srcObject.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::setSrcObject):
(WebCore::HTMLMediaElement::clearMediaPlayer):

  • html/HTMLMediaElement.h:

Add support for realtime media source that vend a preview interface, while keeping support
for those that do not (e.g. the mock capture devices).

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::isAvailable):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSampleBuffer):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::prepareVideoSampleBufferFromTrack):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayer):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::destroyLayer):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::platformLayer):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentDisplayMode):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::play):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::pause):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::internalSetVolume):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateTracks):

  • platform/mediastream/MediaStreamPrivate.cpp:

(WebCore::MediaStreamPrivate::platformLayer): Deleted, no longer used.

  • platform/mediastream/MediaStreamPrivate.h:

Enable/disable the preview when available.

  • platform/mediastream/MediaStreamTrackPrivate.cpp:

(WebCore::MediaStreamTrackPrivate::setEnabled):
(WebCore::MediaStreamTrackPrivate::endTrack):
(WebCore::MediaStreamTrackPrivate::preview):

  • platform/mediastream/MediaStreamTrackPrivate.h:
  • platform/mediastream/RealtimeMediaSource.h:

(WebCore::RealtimeMediaSource::preview):
(WebCore::RealtimeMediaSource::createWeakPtr):
(WebCore::RealtimeMediaSource::platformLayer): Deleted.

Define a realtime media source preview interface.

  • platform/mediastream/RealtimeMediaSourcePreview.h: Added.

(WebCore::RealtimeMediaSourcePreview::~RealtimeMediaSourcePreview):
(WebCore::RealtimeMediaSourcePreview::invalidate):
(WebCore::RealtimeMediaSourcePreview::createWeakPtr):
(WebCore::RealtimeMediaSourcePreview::RealtimeMediaSourcePreview):

Implement the preview interface.

  • platform/mediastream/mac/AVAudioCaptureSource.h:
  • platform/mediastream/mac/AVAudioCaptureSource.mm:

(WebCore::AVAudioSourcePreview::create):
(WebCore::AVAudioSourcePreview::AVAudioSourcePreview):
(WebCore::AVAudioSourcePreview::invalidate):
(WebCore::AVAudioSourcePreview::play):
(WebCore::AVAudioSourcePreview::pause):
(WebCore::AVAudioSourcePreview::setEnabled):
(WebCore::AVAudioSourcePreview::setVolume):
(WebCore::AVAudioSourcePreview::updateState):
(WebCore::AVAudioCaptureSource::createPreview):

  • platform/mediastream/mac/AVMediaCaptureSource.h:

(WebCore::AVMediaCaptureSource::createWeakPtr):

  • platform/mediastream/mac/AVMediaCaptureSource.mm:

(WebCore::AVMediaCaptureSource::AVMediaCaptureSource):
(WebCore::AVMediaCaptureSource::reset):
(WebCore::AVMediaCaptureSource::preview):
(WebCore::AVMediaCaptureSource::removePreview):
(WebCore::AVMediaSourcePreview::AVMediaSourcePreview):
(WebCore::AVMediaSourcePreview::~AVMediaSourcePreview):
(WebCore::AVMediaSourcePreview::invalidate):

  • platform/mediastream/mac/AVVideoCaptureSource.h:
  • platform/mediastream/mac/AVVideoCaptureSource.mm:

(WebCore::AVVideoSourcePreview::create):
(WebCore::AVVideoSourcePreview::AVVideoSourcePreview):
(WebCore::AVVideoSourcePreview::invalidate):
(WebCore::AVVideoSourcePreview::play):
(WebCore::AVVideoSourcePreview::pause):
(WebCore::AVVideoSourcePreview::setPaused):
(WebCore::AVVideoSourcePreview::setEnabled):
(WebCore::AVVideoCaptureSource::shutdownCaptureSession):
(WebCore::AVVideoCaptureSource::processNewFrame):
(WebCore::AVVideoCaptureSource::createPreview):
(WebCore::AVVideoCaptureSource::platformLayer): Deleted.

  • platform/mediastream/mac/MockRealtimeVideoSourceMac.h:
  • platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:

(WebCore::MockRealtimeVideoSourceMac::platformLayer): Deleted.
(WebCore::MockRealtimeVideoSourceMac::updatePlatformLayer): Deleted.

  • platform/mock/MockRealtimeVideoSource.cpp:

(WebCore::MockRealtimeVideoSource::applyFrameRate):
(WebCore::MockRealtimeVideoSource::applySize):
(WebCore::MockRealtimeVideoSource::generateFrame):

  • platform/mock/MockRealtimeVideoSource.h:

(WebCore::MockRealtimeVideoSource::updatePlatformLayer): Deleted.

10:19 AM Changeset in webkit [208850] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking imported/w3c/web-platform-tests/IndexedDB/idbcursor_iterating.htm as flaky on mac-wk2 debug.
https://bugs.webkit.org/show_bug.cgi?id=164870

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
10:08 AM Changeset in webkit [208849] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix build after r208839.

  • dom/Node.h:

(WebCore::Node::isDescendantOf):

9:52 AM Changeset in webkit [208848] by keith_miller@apple.com
  • 21 edits in trunk/Source/JavaScriptCore

Add support for rotate in B3 and the relevant assemblers
https://bugs.webkit.org/show_bug.cgi?id=164869

Reviewed by Geoffrey Garen.

This patch runs RotR and RotL (rotate right and left respectively)
through B3 and B3's assemblers. One thing of note is that ARM64 does
not support rotate left instead it allows negative right rotations.

This patch also fixes a theoretical bug in the assembler where
on X86 doing someShiftOp(reg, edx) would instead shift the shift
amount by the value. Additionally, this patch refactors some
of the X86 assembler to use templates when deciding how to format
the appropriate shift instruction.

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::rotateRight32):
(JSC::MacroAssemblerARM64::rotateRight64):

  • assembler/MacroAssemblerX86Common.h:

(JSC::MacroAssemblerX86Common::rotateRight32):
(JSC::MacroAssemblerX86Common::rotateLeft32):

  • assembler/MacroAssemblerX86_64.h:

(JSC::MacroAssemblerX86_64::lshift64):
(JSC::MacroAssemblerX86_64::rshift64):
(JSC::MacroAssemblerX86_64::urshift64):
(JSC::MacroAssemblerX86_64::rotateRight64):
(JSC::MacroAssemblerX86_64::rotateLeft64):
(JSC::MacroAssemblerX86_64::or64):

  • assembler/X86Assembler.h:

(JSC::X86Assembler::xorq_rm):
(JSC::X86Assembler::shiftInstruction32):
(JSC::X86Assembler::sarl_i8r):
(JSC::X86Assembler::shrl_i8r):
(JSC::X86Assembler::shll_i8r):
(JSC::X86Assembler::rorl_i8r):
(JSC::X86Assembler::rorl_CLr):
(JSC::X86Assembler::roll_i8r):
(JSC::X86Assembler::roll_CLr):
(JSC::X86Assembler::shiftInstruction64):
(JSC::X86Assembler::sarq_CLr):
(JSC::X86Assembler::sarq_i8r):
(JSC::X86Assembler::shrq_i8r):
(JSC::X86Assembler::shlq_i8r):
(JSC::X86Assembler::rorq_i8r):
(JSC::X86Assembler::rorq_CLr):
(JSC::X86Assembler::rolq_i8r):
(JSC::X86Assembler::rolq_CLr):

  • b3/B3Common.h:

(JSC::B3::rotateRight):
(JSC::B3::rotateLeft):

  • b3/B3Const32Value.cpp:

(JSC::B3::Const32Value::rotRConstant):
(JSC::B3::Const32Value::rotLConstant):

  • b3/B3Const32Value.h:
  • b3/B3Const64Value.cpp:

(JSC::B3::Const64Value::rotRConstant):
(JSC::B3::Const64Value::rotLConstant):

  • b3/B3Const64Value.h:
  • b3/B3LowerToAir.cpp:

(JSC::B3::Air::LowerToAir::lower):

  • b3/B3Opcode.cpp:

(WTF::printInternal):

  • b3/B3Opcode.h:
  • b3/B3ReduceStrength.cpp:
  • b3/B3Validate.cpp:
  • b3/B3Value.cpp:

(JSC::B3::Value::rotRConstant):
(JSC::B3::Value::rotLConstant):
(JSC::B3::Value::effects):
(JSC::B3::Value::key):
(JSC::B3::Value::typeFor):

  • b3/B3Value.h:
  • b3/B3ValueKey.cpp:

(JSC::B3::ValueKey::materialize):

  • b3/air/AirInstInlines.h:

(JSC::B3::Air::isRotateRight32Valid):
(JSC::B3::Air::isRotateLeft32Valid):
(JSC::B3::Air::isRotateRight64Valid):
(JSC::B3::Air::isRotateLeft64Valid):

  • b3/air/AirOpcode.opcodes:
  • b3/testb3.cpp:

(JSC::B3::testRotR):
(JSC::B3::testRotL):
(JSC::B3::testRotRWithImmShift):
(JSC::B3::testRotLWithImmShift):
(JSC::B3::run):

9:28 AM Changeset in webkit [208847] by hyatt@apple.com
  • 31 edits
    30 deletes in trunk

[CSS Parser] Add @supports, @keyframe and media query parsing options
https://bugs.webkit.org/show_bug.cgi?id=164821

Reviewed by Sam Weinig and Zalan Bujtas.

Source/WebCore:

  • css/CSSKeyframeRule.cpp:

(WebCore::StyleKeyframe::setKeyText):

  • css/CSSKeyframeRule.h:
  • css/CSSKeyframesRule.cpp:

(WebCore::StyleRuleKeyframes::findKeyframeIndex):
Changed to call into CSSParserImpls implementation. The new parser
is now always used when parsing the key list.

  • css/MediaList.cpp:

(WebCore::MediaQuerySet::create):
(WebCore::MediaQuerySet::MediaQuerySet):
(WebCore::MediaQuerySet::set):
(WebCore::MediaQuerySet::add):
(WebCore::MediaQuerySet::remove):
(WebCore::MediaList::setMediaText):
(WebCore::parseMediaDescriptor): Deleted.
(WebCore::MediaQuerySet::internalParse): Deleted.
(WebCore::MediaQuerySet::parse): Deleted.

  • css/MediaList.h:

Rewritten to remove fallback descriptor support/parsing, since no other
browser supports it, and this was part of our initial 2005 landing that
nobody else appears to use. Media queries now call into the new parser always.

  • css/MediaQueryExp.cpp:

(WebCore::featureWithValidDensity):
(WebCore::featureWithPositiveNumber):
(WebCore::MediaQueryExpression::MediaQueryExpression):
Make sure to support transform2d, animation and transition.

  • css/StyleMedia.cpp:

(WebCore::StyleMedia::matchMedium):
Call the normal create now that fallback descriptor syntax is gone.

  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::parseKeyframeRule):
(WebCore::CSSParser::parseSupportsCondition):
(WebCore::CSSParser::parseInlineStyleDeclaration):
(WebCore::CSSParser::parseDeclarationDeprecated):
(WebCore::CSSParser::parseDeclaration):
(WebCore::CSSParser::parseKeyframeKeyList):
(WebCore::CSSParser::parseMediaQuery): Deleted.
(WebCore::CSSParser::parseKeyframeSelector): Deleted.

  • css/parser/CSSParser.h:

Patched the old parser to have flags to call into the new parser
for supports conditions and keyframes. Rename the parseDeclaration that
is only used by the old parser to have the word Deprecated in it. Removed
the media query and key list parsing functions, since the new parser
now does it always.

  • css/parser/CSSParserIdioms.cpp:

(WebCore::convertToASCIILowercaseInPlace): Deleted.

  • css/parser/CSSParserIdioms.h:
  • css/parser/CSSParserToken.cpp:

(WebCore::convertToASCIILowercaseInPlace):
(WebCore::CSSParserToken::convertToASCIILowercaseInPlace):

  • css/parser/CSSParserToken.h:

(WebCore::CSSParserToken::value):
(WebCore::CSSParserToken::initValueFromStringView):

  • css/parser/CSSParserValues.cpp:

(WebCore::CSSParserSelector::parsePseudoElementSelectorFromStringView):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeAttr):

  • css/parser/CSSSelectorParser.cpp:

(WebCore::CSSSelectorParser::consumeId):
(WebCore::CSSSelectorParser::consumeClass):
(WebCore::CSSSelectorParser::consumePseudo):
Moving convertToASCIILowercase to be a CSSParserToken member function instead
of operating on StringView. This saves an extra step, since the token itself
already had all the correct members. Note that converting in-place is bad,
and we'll be removing it once the new parser turns on.

  • css/parser/MediaQueryParser.cpp:

(WebCore::MediaQueryParser::readMediaType):
(WebCore::MediaQueryParser::readFeature):
(WebCore::MediaQueryParser::readFeatureEnd):
Require the closing ")" on features. Fix the in-place lowercasing to only
be done for features, not for types. This matches the old parser.

  • dom/DOMImplementation.cpp:

(WebCore::DOMImplementation::createCSSStyleSheet):

  • dom/InlineStyleSheetOwner.cpp:

(WebCore::InlineStyleSheetOwner::createSheet):

  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::process):
(WebCore::HTMLLinkElement::initializeStyleSheet):

  • html/HTMLSourceElement.cpp:

(WebCore::HTMLSourceElement::parseAttribute):

  • html/HTMLStyleElement.cpp:

(WebCore::HTMLStyleElement::parseAttribute):

  • html/parser/HTMLPreloadScanner.cpp:

(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):

  • html/parser/HTMLResourcePreloader.cpp:

(WebCore::mediaAttributeMatches):
Patched to call the normal MediaQuerySet::create and not the one that had fallback
descriptor support.

Source/WebKit/mac:

Fix up the create call now that fallback descriptor syntax is gone.

  • DOM/DOM.mm:

(-[DOMHTMLLinkElement _mediaQueryMatches]):

LayoutTests:

Delete the fallback descriptor tests, since that feature has been
removed. Update some of the other tests based off some parsing changes
from using the new parser always.

  • fast/media/media-descriptor-syntax-01-expected.html: Removed.
  • fast/media/media-descriptor-syntax-01.html: Removed.
  • fast/media/media-descriptor-syntax-02-expected.html: Removed.
  • fast/media/media-descriptor-syntax-02.html: Removed.
  • fast/media/media-descriptor-syntax-03-expected.html: Removed.
  • fast/media/media-descriptor-syntax-03.html: Removed.
  • fast/media/media-descriptor-syntax-04-expected.html: Removed.
  • fast/media/media-descriptor-syntax-04.html: Removed.
  • fast/media/media-descriptor-syntax-06-expected.html: Removed.
  • fast/media/media-descriptor-syntax-06.html: Removed.
  • fast/media/media-query-list-02-expected.txt:
  • fast/media/media-query-list-03-expected.txt:
  • fast/media/media-query-list-04-expected.txt:
  • fast/media/media-query-list-05-expected.txt:
  • fast/media/media-query-list-06-expected.txt:
  • fast/media/mq-pointer-expected.txt:
  • fast/media/w3c/test_media_queries-expected.txt:
9:21 AM Changeset in webkit [208846] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Remove pass expectation for custom-elements tests on ios-sim because CEReactions were disabled in r208837.
https://bugs.webkit.org/show_bug.cgi?id=164852

Unreviewed test gardening.

  • platform/ios-simulator/TestExpectations:
2:59 AM Changeset in webkit [208845] by Yusuke Suzuki
  • 2 edits in trunk/Source/WebCore

Unreviewed, attempt to fix link error after r208841 part2

Use static_cast to avoid referencing static storage.

  • storage/StorageMap.cpp:

(WebCore::StorageMap::setItemIgnoringQuota):

2:53 AM Changeset in webkit [208844] by Yusuke Suzuki
  • 2 edits in trunk/Source/WebCore

Unreviewed, attempt to fix link error after r208841

  • storage/StorageMap.h:
1:05 AM Changeset in webkit [208843] by sbarati@apple.com
  • 34 edits in trunk

Remove async/await compile time flag and enable tests
https://bugs.webkit.org/show_bug.cgi?id=164828
<rdar://problem/28639334>

Reviewed by Yusuke Suzuki.

.:

  • Source/cmake/WebKitFeatures.cmake:

JSTests:

  • stress/async-arrow-functions-lexical-arguments-binding.js:
  • stress/async-arrow-functions-lexical-new.target-binding.js:
  • stress/async-arrow-functions-lexical-super-binding.js:
  • stress/async-arrow-functions-lexical-this-binding.js:
  • stress/async-await-basic.js:
  • stress/async-await-long-loop.js:
  • stress/async-await-module-reserved-word.js:
  • stress/async-await-mozilla.js:

(mozSyntaxErrors):

  • stress/async-await-reserved-word.js:
  • stress/async-await-syntax.js:
  • stress/async-await-throw-loop.js:
  • stress/async-function-create-nobaseline.js:
  • stress/async-function-create-optimized.js:
  • stress/async-function-declaration-sinking-no-double-allocate.js:
  • stress/async-function-declaration-sinking-osrexit.js:
  • stress/async-function-declaration-sinking-put.js:
  • stress/async-function-expression-sinking-no-double-allocate.js:
  • stress/async-function-expression-sinking-osrexit.js:
  • stress/async-function-expression-sinking-put.js:
  • test262.yaml:

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:
  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseStatementListItem):
(JSC::Parser<LexerType>::parseStatement):
(JSC::Parser<LexerType>::parseClass):
(JSC::Parser<LexerType>::parseExportDeclaration):
(JSC::Parser<LexerType>::parseAssignmentExpression):
(JSC::Parser<LexerType>::parseProperty):
(JSC::Parser<LexerType>::parsePrimaryExpression):
(JSC::Parser<LexerType>::parseMemberExpression):
(JSC::Parser<LexerType>::parseUnaryExpression):

Source/WebCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

  • Configurations/FeatureDefines.xcconfig:

Source/WTF:

  • wtf/FeatureDefines.h:
1:04 AM Changeset in webkit [208842] by pvollan@apple.com
  • 2 edits in trunk/Tools

[Win] run-api-tests is failing.
https://bugs.webkit.org/show_bug.cgi?id=164818

Reviewed by Alexey Proskuryakov.

Make sure Visual Studio interprets string literal as utf8.

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):

12:48 AM Changeset in webkit [208841] by Yusuke Suzuki
  • 67 edits
    2 moves
    1 delete in trunk

[JSC] WTF::TemporaryChange with WTF::SetForScope
https://bugs.webkit.org/show_bug.cgi?id=164761

Reviewed by Saam Barati.

Source/JavaScriptCore:

  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/SetForScope.h: Removed.
  • debugger/Debugger.cpp:
  • inspector/InspectorBackendDispatcher.cpp:

(Inspector::BackendDispatcher::dispatch):

  • inspector/ScriptDebugServer.cpp:

(Inspector::ScriptDebugServer::dispatchBreakpointActionLog):
(Inspector::ScriptDebugServer::dispatchBreakpointActionSound):
(Inspector::ScriptDebugServer::dispatchBreakpointActionProbe):
(Inspector::ScriptDebugServer::sourceParsed):
(Inspector::ScriptDebugServer::dispatchFunctionToListeners):

  • parser/Parser.cpp:

Source/WebCore:

No behavior change.

  • Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:

(WebCore::IDBServer::MemoryBackingStoreTransaction::abort):

  • bindings/js/JSCustomElementRegistryCustom.cpp:

(WebCore::JSCustomElementRegistry::define):

  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::evaluateModule):

  • css/ElementRuleCollector.cpp:

(WebCore::ElementRuleCollector::matchSlottedPseudoElementRules):

  • css/StyleResolver.cpp:
  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::parseFillShorthand):
(WebCore::CSSParser::parseShorthand):
(WebCore::CSSParser::parse4Values):
(WebCore::CSSParser::parseBorderRadius):

  • css/parser/SVGCSSParser.cpp:

(WebCore::CSSParser::parseSVGValue):

  • dom/CustomElementRegistry.h:
  • dom/Document.cpp:

(WebCore::Document::recalcStyle):
(WebCore::Document::styleForElementIgnoringPendingStylesheets):
(WebCore::Document::destroyRenderTree):

  • dom/EventTarget.cpp:

(WebCore::EventTarget::fireEventListeners):

  • dom/Microtasks.cpp:

(WebCore::MicrotaskQueue::performMicrotaskCheckpoint):

  • history/PageCache.cpp:

(WebCore::PageCache::pruneToSizeNow):

  • html/DOMTokenList.cpp:

(WebCore::DOMTokenList::updateAssociatedAttributeFromTokens):

  • html/parser/CSSPreloadScanner.cpp:

(WebCore::CSSPreloadScanner::scan):

  • html/parser/HTMLConstructionSite.h:
  • loader/ContentFilter.cpp:

(WebCore::ContentFilter::handleProvisionalLoadFailure):

  • loader/SubresourceLoader.cpp:
  • loader/cache/MemoryCache.cpp:

(WebCore::MemoryCache::pruneLiveResourcesToSize):
(WebCore::MemoryCache::pruneDeadResourcesToSize):

  • page/Chrome.cpp:

(WebCore::Chrome::runModal):

  • page/FrameView.cpp:

(WebCore::FrameView::layout):
(WebCore::FrameView::setScrollPosition):
(WebCore::FrameView::applyRecursivelyWithVisibleRect):
(WebCore::FrameView::autoSizeIfEnabled):

  • page/csp/ContentSecurityPolicy.cpp:

(WebCore::ContentSecurityPolicy::didReceiveHeaders):

  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::commitTreeState):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::commitLayerChangesAfterSublayers):

  • platform/graphics/opengl/TemporaryOpenGLSetting.h:
  • platform/graphics/texmap/TextureMapperGL.cpp:

(WebCore::TextureMapperGL::drawTexture):

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::CoordinatedGraphicsLayer::purgeBackingStores):

  • platform/graphics/win/GraphicsLayerDirect2D.cpp:
  • platform/gtk/PasteboardHelper.cpp:

(WebCore::PasteboardHelper::writeClipboardContents):

  • platform/mac/ScrollbarThemeMac.mm:

(WebCore::ScrollbarThemeMac::paint):

  • rendering/RenderBlock.cpp:
  • rendering/RenderGeometryMap.cpp:

(WebCore::RenderGeometryMap::pushMappingsToAncestor):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::updateLayerPositions):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateCompositingLayers):

  • rendering/RenderView.cpp:

(WebCore::RenderView::hitTest):

  • replay/EventLoopInputDispatcher.cpp:

(WebCore::EventLoopInputDispatcher::dispatchInput):

  • storage/StorageMap.cpp:

(WebCore::StorageMap::setItemIgnoringQuota):

  • svg/SVGPathBlender.cpp:

(WebCore::SVGPathBlender::addAnimatedPath):

Source/WebKit:

  • WebCoreSupport/WebResourceLoadScheduler.cpp:

Source/WebKit/mac:

  • WebView/WebView.mm:

(-[WebView updateTextTouchBar]):

Source/WebKit2:

  • PluginProcess/PluginControllerProxy.cpp:

(WebKit::PluginControllerProxy::initialize):

  • PluginProcess/WebProcessConnection.cpp:

(WebKit::WebProcessConnection::didReceiveMessage):
(WebKit::WebProcessConnection::didReceiveSyncMessage):

  • Shared/API/Cocoa/WKRemoteObjectCoder.mm:

(createEncodedObject):
(decodeObject):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::updateTextTouchBar):

  • UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:

(WebKit::ScrollingTreeOverflowScrollingNodeIOS::commitStateAfterChildren):

  • UIProcess/gtk/WebPasteboardProxyGtk.cpp:

(WebKit::WebPasteboardProxy::writeToClipboard):

  • WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:

(WebKit::CompositingCoordinator::flushPendingLayerChanges):
(WebKit::CompositingCoordinator::purgeBackingStores):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::mouseEvent):
(WebKit::WebPage::keyEvent):
(WebKit::WebPage::dispatchTouchEvent):
(WebKit::WebPage::setInitialFocus):
(WebKit::WebPage::insertTextAsync):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::dynamicViewportSizeUpdate):

  • WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
  • WebProcess/WebPage/mac/WebPageMac.mm:

Source/WTF:

JavaScriptCore's bytecompiler/SetForScope.h is completely the same
to WTF::TemporaryChange. SetForScope sounds better name since it
says that this object works as Scope.

We rename WTF::TemporaryChange to WTF::SetForScope. And replace
all the use to this WTF::SetForScope.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/SetForScope.h: Renamed from Source/WTF/wtf/TemporaryChange.h.

(WTF::SetForScope::SetForScope):
(WTF::SetForScope::~SetForScope):

Tools:

  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WTF/SetForScope.cpp: Renamed from Tools/TestWebKitAPI/Tests/WTF/TemporaryChange.cpp.

(TestWebKitAPI::TEST):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetStateToConsistentValues):

Nov 16, 2016:

10:47 PM Changeset in webkit [208840] by Yusuke Suzuki
  • 11 edits
    8 adds in trunk

[WebCore] Clean up script loading code in XML
https://bugs.webkit.org/show_bug.cgi?id=161651

Reviewed by Ryosuke Niwa.

Source/WebCore:

This patch cleans up XML document script handling by using PendingScript.
Previously, we directly used CachedScript. But it is not good since we
have PendingScript wrapper.

We also disable ES6 modules for non HTML document. While ES6 modules tag
requires "defer" semantics, "defer" semantics is not implemented in non
HTML documents. And ES6 module tag is only specified in whatwg HTML spec.

  • dom/LoadableClassicScript.cpp:

(WebCore::LoadableClassicScript::execute):

  • dom/ScriptElement.cpp:

(WebCore::ScriptElement::determineScriptType):
(WebCore::ScriptElement::prepareScript):
(WebCore::ScriptElement::executeClassicScript):
(WebCore::ScriptElement::executePendingScript):
(WebCore::ScriptElement::executeScript): Deleted.
(WebCore::ScriptElement::executeScriptForScriptRunner): Deleted.

  • dom/ScriptElement.h:
  • dom/ScriptRunner.cpp:

(WebCore::ScriptRunner::timerFired):

  • html/parser/HTMLDocumentParser.cpp:
  • html/parser/HTMLScriptRunner.cpp:

(WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
(WebCore::HTMLScriptRunner::runScript):

  • xml/parser/XMLDocumentParser.cpp:

(WebCore::XMLDocumentParser::notifyFinished):

  • xml/parser/XMLDocumentParser.h:
  • xml/parser/XMLDocumentParserLibxml2.cpp:

(WebCore::XMLDocumentParser::XMLDocumentParser):
(WebCore::XMLDocumentParser::~XMLDocumentParser):
(WebCore::XMLDocumentParser::endElementNs):

LayoutTests:

Add tests that ensure modules are not executed in XHTML documents.

  • js/dom/modules/module-inline-dynamic-in-xhtml-expected.txt: Added.
  • js/dom/modules/module-inline-dynamic-in-xhtml.xhtml: Added.
  • js/dom/modules/module-inline-simple-in-xhtml-expected.txt: Added.
  • js/dom/modules/module-inline-simple-in-xhtml.xhtml: Added.
  • js/dom/modules/module-src-dynamic-in-xhtml-expected.txt: Added.
  • js/dom/modules/module-src-dynamic-in-xhtml.xhtml: Added.
  • js/dom/modules/module-src-simple-in-xhtml-expected.txt: Added.
  • js/dom/modules/module-src-simple-in-xhtml.xhtml: Added.
10:24 PM Changeset in webkit [208839] by Chris Dumez
  • 23 edits in trunk/Source/WebCore

Add Node::isDescendantOf() overload that takes in a reference
https://bugs.webkit.org/show_bug.cgi?id=164854

Reviewed by Ryosuke Niwa.

Add Node::isDescendantOf() overload that takes in a reference as a lot
of call sites have a reference or a pointer they know is not null.

No new tests, no Web-exposed behavior change.

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::press):

  • dom/Document.cpp:

(WebCore::isNodeInSubtree):
(WebCore::Document::removeFullScreenElementOfSubtree):
(WebCore::Document::setAnimatingFullScreen):

  • dom/Node.cpp:

(WebCore::Node::isDescendantOf):
(WebCore::Node::isDescendantOrShadowDescendantOf):
(WebCore::Node::contains):

  • dom/Node.h:

(WebCore::Node::isDescendantOf):

  • dom/NodeIterator.cpp:

(WebCore::NodeIterator::updateForNodeRemoval):

  • dom/SelectorQuery.cpp:

(WebCore::SelectorDataList::executeFastPathForIdSelector):
(WebCore::filterRootById):

  • dom/TypedElementDescendantIterator.h:

(WebCore::TypedElementDescendantIteratorAdapter<ElementType>::beginAt):
(WebCore::TypedElementDescendantIteratorAdapter<ElementType>::from):
(WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::beginAt):
(WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::from):

  • editing/ApplyStyleCommand.cpp:

(WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
(WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):

  • editing/BreakBlockquoteCommand.cpp:

(WebCore::BreakBlockquoteCommand::doApply):

  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):

  • editing/DeleteSelectionCommand.cpp:

(WebCore::DeleteSelectionCommand::handleGeneralDelete):
(WebCore::DeleteSelectionCommand::removePreviouslySelectedEmptyTableRows):
(WebCore::DeleteSelectionCommand::doApply):

  • editing/EditingStyle.cpp:

(WebCore::EditingStyle::textDirectionForSelection):

  • editing/FormatBlockCommand.cpp:

(WebCore::FormatBlockCommand::formatRange):

  • editing/TextIterator.cpp:

(WebCore::TextIterator::advance):

  • editing/VisiblePosition.cpp:

(WebCore::VisiblePosition::honorEditingBoundaryAtOrBefore):
(WebCore::VisiblePosition::honorEditingBoundaryAtOrAfter):

  • editing/htmlediting.cpp:

(WebCore::firstEditablePositionAfterPositionInRoot):
(WebCore::lastEditablePositionBeforePositionInRoot):
(WebCore::selectionForParagraphIteration):

  • editing/markup.cpp:

(WebCore::StyledMarkupAccumulator::traverseNodesForSerialization):

  • html/CachedHTMLCollection.h:

(WebCore::traversalType>::namedItem):

  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::formElementIndex):

  • html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::CanvasRenderingContext2D::drawFocusIfNeededInternal):

  • page/EventHandler.cpp:

(WebCore::EventHandler::selectClosestContextualWordOrLinkFromMouseEvent):

  • svg/SVGSVGElement.cpp:

(WebCore::SVGSVGElement::getElementById):

9:46 PM Changeset in webkit [208838] by rniwa@webkit.org
  • 5 edits in trunk/Source/WebCore

Fix build on macOS Sierra when WEB_PLAYBACK_CONTROLS_MANAGER is enabled
https://bugs.webkit.org/show_bug.cgi?id=164845

Reviewed by Dan Bernstein.

Revert r208833 and fix the build by declaring AVFunctionBarMediaSelectionOption and AVThumbnail in AVKitSPI.h

  • platform/mac/WebPlaybackControlsManager.h:
  • platform/mac/WebPlaybackControlsManager.mm:

(-[WebPlaybackControlsManager generateFunctionBarAudioAmplitudeSamples:completionHandler:]):

  • platform/mac/WebPlaybackSessionInterfaceMac.mm:

(WebCore::WebPlaybackSessionInterfaceMac::seekableRangesChanged):
(WebCore::WebPlaybackSessionInterfaceMac::audioMediaSelectionOptionsChanged):
(WebCore::WebPlaybackSessionInterfaceMac::legibleMediaSelectionOptionsChanged):
(WebCore::WebPlaybackSessionInterfaceMac::setPlayBackControlsManager):

  • platform/spi/cocoa/AVKitSPI.h:
8:32 PM Changeset in webkit [208837] by rniwa@webkit.org
  • 5 edits in trunk

REGRESSION(r208082): 1% Speedometer regression on iOS
https://bugs.webkit.org/show_bug.cgi?id=164852

Reviewed by Chris Dumez.

Source/WebCore:

Temporarily disable CEReactions entirely to recover the regression in Speedometer since
reverting r208082 wouldn't remove CEReactions from other DOM APIs and if r208082 was a regression,
then they're likely causing a regression on Speedometer as well.

  • dom/CustomElementReactionQueue.cpp:

(WebCore::CustomElementReactionStack::ElementQueue::add): Removed the release assert added in r208785
since reactions can be inserted into the backup queue while the queue is running.
(WebCore::CustomElementReactionStack::ElementQueue::invokeAll): Ditto.

  • dom/CustomElementReactionQueue.h:

(WebCore::CustomElementReactionStack::CustomElementReactionStack): Removed all the code so that this
constructor would be optimized away by clang.
(WebCore::CustomElementReactionStack::~CustomElementReactionStack): Ditto.

LayoutTests:

Add failing test expectations for various custom elements now that CEReactions is not working.

7:30 PM Changeset in webkit [208836] by matthew_hanson@apple.com
  • 2 edits in tags/Safari-603.1.13/Source/WebKit2

Merge r208835. rdar://problem/29277451

6:23 PM Changeset in webkit [208835] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit2

Unreviewed build fix after r208589

The generated com.apple.WebKit.plugin-common.sb file was not getting copied into
the Resources folder, so was not deployed with WebKit. We need to treat it like
com.apple.WebProcess.sb and the other generated files.

  • WebKit2.xcodeproj/project.pbxproj: Tell Xcode to include the generated file in

the framework Resources.

5:34 PM Changeset in webkit [208834] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

ExceptionFuzz needs to placate exception check verification before overwriting a thrown exception.
https://bugs.webkit.org/show_bug.cgi?id=164843

Reviewed by Keith Miller.

The ThrowScope will check for unchecked simulated exceptions before throwing a
new exception. This ensures that we don't quietly overwrite a pending exception
(which should never happen, with the only exception being to rethrow the same
exception). However, ExceptionFuzz works by intentionally throwing its own
exception even when one may already exist thereby potentially overwriting an
existing exception. This is ok for ExceptionFuzz testing, but we need to placate
the exception check verifier before ExceptionFuzz throws its own exception.

  • runtime/ExceptionFuzz.cpp:

(JSC::doExceptionFuzzing):

5:26 PM Changeset in webkit [208833] by rniwa@webkit.org
  • 4 edits in trunk/Source/WebCore

Fix build on macOS Sierra when WEB_PLAYBACK_CONTROLS_MANAGER is enabled
https://bugs.webkit.org/show_bug.cgi?id=164845

Reviewed by Wenson Hsieh.

Fix builds after r208802 by wrapping code inside USE(APPLE_INTERNAL_SDK).

  • platform/mac/WebPlaybackControlsManager.h:
  • platform/mac/WebPlaybackControlsManager.mm:
  • platform/mac/WebPlaybackSessionInterfaceMac.mm:

(WebCore::WebPlaybackSessionInterfaceMac::seekableRangesChanged):
(WebCore::WebPlaybackSessionInterfaceMac::audioMediaSelectionOptionsChanged):
(WebCore::WebPlaybackSessionInterfaceMac::legibleMediaSelectionOptionsChanged):
(WebCore::WebPlaybackSessionInterfaceMac::setPlayBackControlsManager):

5:15 PM Changeset in webkit [208832] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Background tabs are often updating non-stop because they think they are visible
https://bugs.webkit.org/show_bug.cgi?id=164841
<rdar://problem/29298658>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-11-16
Reviewed by Matt Baker.

  • UserInterface/Views/NetworkGridContentView.js:

(WebInspector.NetworkGridContentView.prototype._networkTimelineRecordAdded):

  • UserInterface/Views/TimelineRecordingContentView.js:

(WebInspector.TimelineRecordingContentView.prototype._update):
Don't constantly update when this tab is not in the foreground.

5:14 PM Changeset in webkit [208831] by ap@apple.com
  • 4 edits in trunk

REGRESSION (r208455): LayoutTests swipe/pushState-cached-back-swipe.html and swipe/main-frame-pinning-requirement.html are failing
https://bugs.webkit.org/show_bug.cgi?id=164572

Reviewed by Tim Horton.

Tools:

  • WebKitTestRunner/mac/TestControllerMac.mm: (WTR::TestController::platformResetStateToConsistentValues):

Use the correct constant.

LayoutTests:

  • platform/mac-wk2/TestExpectations: Remove flakiness expectations.
5:02 PM Changeset in webkit [208830] by ggaren@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

UnlinkedCodeBlock should not have a starting line number
https://bugs.webkit.org/show_bug.cgi?id=164838

Reviewed by Mark Lam.

Here's how the starting line number in UnlinkedCodeBlock used to work:

(1) Assign the source code starting line number to the parser starting
line number.

(2) Assign (1) to the AST.

(3) Subtract (1) from (2) and assign to UnlinkedCodeBlock.

Then, when linking:

(4) Add (3) to (1).

This was an awesome no-op.

Generally, unlinked code is code that is not tied to any particular
web page or resource. So, it's inappropriate to think of it having a
starting line number.

  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):

  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedCodeBlock::recordParse):
(JSC::UnlinkedCodeBlock::hasCapturedVariables):
(JSC::UnlinkedCodeBlock::firstLine): Deleted.

  • runtime/CodeCache.cpp:

(JSC::CodeCache::getUnlinkedGlobalCodeBlock):

  • runtime/CodeCache.h:

(JSC::generateUnlinkedCodeBlock):

4:59 PM Changeset in webkit [208829] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

ScriptExecutionContext::processMessagePortMessagesSoon() should only post task when necessary
https://bugs.webkit.org/show_bug.cgi?id=164812
<rdar://problem/29148465>

Reviewed by Geoffrey Garen.

ScriptExecutionContext::processMessagePortMessagesSoon() should only post task when necessary,
meaning when there is not already one pending.

  • dom/ScriptExecutionContext.cpp:

(WebCore::ScriptExecutionContext::processMessagePortMessagesSoon):
(WebCore::ScriptExecutionContext::dispatchMessagePortEvents):

  • dom/ScriptExecutionContext.h:
4:39 PM Changeset in webkit [208828] by Chris Dumez
  • 43 edits in trunk/Source/WebCore

Use more references in TreeScope / TreeScopeAdopter
https://bugs.webkit.org/show_bug.cgi?id=164836

Reviewed by Ryosuke Niwa.

Use more references in TreeScope / TreeScopeAdopter and avoid some
unnecessary null checks.

No new tests, no Web-exposed behavior change.

  • dom/ContainerNode.cpp:

(WebCore::ContainerNode::takeAllChildrenFrom):
(WebCore::ContainerNode::insertBefore):
(WebCore::ContainerNode::replaceChild):
(WebCore::ContainerNode::removeBetween):
(WebCore::ContainerNode::appendChildWithoutPreInsertionValidityCheck):
(WebCore::ContainerNode::parserAppendChild):

  • dom/ContainerNodeAlgorithms.cpp:

(WebCore::addChildNodesToDeletionQueue):

  • dom/Document.cpp:

(WebCore::Document::adoptNode):
(WebCore::Document::moveNodeIteratorsToNewDocument):

  • dom/Document.h:
  • dom/Element.cpp:

(WebCore::Element::didMoveToNewDocument):
(WebCore::Element::addShadowRoot):
(WebCore::Element::removeShadowRoot):
(WebCore::Element::setAttributeNode):
(WebCore::Element::setAttributeNodeNS):
(WebCore::Element::ensureAttr):

  • dom/Element.h:
  • dom/Node.cpp:

(WebCore::Node::didMoveToNewDocument):

  • dom/Node.h:
  • dom/NodeRareData.h:

(WebCore::NodeListsNodeData::adoptDocument):

  • dom/TreeScope.cpp:

(WebCore::TreeScope::TreeScope):
(WebCore::TreeScope::setParentTreeScope):
(WebCore::TreeScope::adoptIfNeeded):

  • dom/TreeScope.h:

(WebCore::TreeScope::documentScope):
(WebCore::TreeScope::setDocumentScope):

  • dom/TreeScopeAdopter.cpp:

(WebCore::TreeScopeAdopter::moveTreeToNewScope):
(WebCore::TreeScopeAdopter::moveShadowTreeToNewDocument):
(WebCore::TreeScopeAdopter::ensureDidMoveToNewDocumentWasCalled):
(WebCore::TreeScopeAdopter::updateTreeScope):
(WebCore::TreeScopeAdopter::moveNodeToNewDocument):

  • dom/TreeScopeAdopter.h:

(WebCore::TreeScopeAdopter::ensureDidMoveToNewDocumentWasCalled):
(WebCore::TreeScopeAdopter::TreeScopeAdopter):

  • html/FormAssociatedElement.cpp:

(WebCore::FormAssociatedElement::didMoveToNewDocument):

  • html/FormAssociatedElement.h:
  • html/HTMLFieldSetElement.cpp:

(WebCore::HTMLFieldSetElement::didMoveToNewDocument):

  • html/HTMLFieldSetElement.h:
  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::didMoveToNewDocument):

  • html/HTMLFormControlElement.h:
  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::didMoveToNewDocument):

  • html/HTMLFormElement.h:
  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::didMoveToNewDocument):

  • html/HTMLImageElement.h:
  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::didMoveToNewDocument):

  • html/HTMLInputElement.h:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::didMoveToNewDocument):

  • html/HTMLMediaElement.h:
  • html/HTMLObjectElement.cpp:

(WebCore::HTMLObjectElement::didMoveToNewDocument):

  • html/HTMLObjectElement.h:
  • html/HTMLPictureElement.cpp:

(WebCore::HTMLPictureElement::didMoveToNewDocument):

  • html/HTMLPictureElement.h:
  • html/HTMLPlugInImageElement.cpp:

(WebCore::HTMLPlugInImageElement::didMoveToNewDocument):

  • html/HTMLPlugInImageElement.h:
  • html/HTMLTemplateElement.cpp:

(WebCore::HTMLTemplateElement::didMoveToNewDocument):

  • html/HTMLTemplateElement.h:
  • html/HTMLVideoElement.cpp:

(WebCore::HTMLVideoElement::didMoveToNewDocument):

  • html/HTMLVideoElement.h:
  • html/ImageDocument.cpp:

(WebCore::ImageDocumentElement::didMoveToNewDocument):

  • svg/SVGImageElement.cpp:

(WebCore::SVGImageElement::didMoveToNewDocument):

  • svg/SVGImageElement.h:
  • svg/SVGSVGElement.cpp:

(WebCore::SVGSVGElement::didMoveToNewDocument):

  • svg/SVGSVGElement.h:
4:37 PM Changeset in webkit [208827] by Jon Davis
  • 2 edits in trunk/Source/WebCore

Added Web App Manifest to the Feature Status page.
https://bugs.webkit.org/show_bug.cgi?id=162675

Reviewed by Timothy Hatcher.

  • features.json:
4:35 PM Changeset in webkit [208826] by Chris Dumez
  • 5 edits in trunk/Source/WebCore

Use more references for Document::removeFocusedNodeOfSubtree()
https://bugs.webkit.org/show_bug.cgi?id=164839

Reviewed by Andreas Kling.

Use more references for Document::removeFocusedNodeOfSubtree().

No new tests, no Web-exposed behavior change.

  • dom/Document.cpp:

(WebCore::isNodeInSubtree):
(WebCore::Document::removeFocusedNodeOfSubtree):
(WebCore::Document::nodeChildrenWillBeRemoved):
(WebCore::Document::nodeWillBeRemoved):
(WebCore::Document::removeFocusNavigationNodeOfSubtree):
(WebCore::Document::removeFullScreenElementOfSubtree):

  • dom/Document.h:
  • dom/Element.cpp:

(WebCore::Element::removeShadowRoot):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::clear):

4:35 PM Changeset in webkit [208825] by Brent Fulgham
  • 3 edits
    4 adds in trunk

Clear track client when removing a track
https://bugs.webkit.org/show_bug.cgi?id=164842
<rdar://problem/29213621>

Reviewed by Eric Carlson.

Source/WebCore:

Call 'clearClient' when removing a track from an HTMLMediaElement.

Test: media/track/audio-track-add-remove.html

media/track/video-track-add-remove.html

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::removeAudioTrack): Call 'clearClient'
(WebCore::HTMLMediaElement::removeVideoTrack): Ditto.

LayoutTests:

  • media/track/audio-track-add-remove-expected.txt: Added.
  • media/track/audio-track-add-remove.html: Added.
  • media/track/video-track-add-remove-expected.txt: Added.
  • media/track/video-track-add-remove.html: Added.
4:24 PM Changeset in webkit [208824] by Yusuke Suzuki
  • 43 edits in trunk

[ES6][WebCore] Change ES6_MODULES compile time flag to runtime flag
https://bugs.webkit.org/show_bug.cgi?id=164827

Reviewed by Ryosuke Niwa.

.:

  • Source/cmake/OptionsWin.cmake:
  • Source/cmake/WebKitFeatures.cmake:
  • Source/cmake/tools/vsprops/FeatureDefines.props:
  • Source/cmake/tools/vsprops/FeatureDefinesCairo.props:

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Use Settings.in. And intentionally do not use RuntimeEnabledFeatures.
According to the pointer lock's issue[1], we should use Settings.

[1]: https://bugs.webkit.org/show_bug.cgi?id=163801

  • Configurations/FeatureDefines.xcconfig:
  • dom/ScriptElement.cpp:

(WebCore::ScriptElement::determineScriptType):

  • html/parser/HTMLPreloadScanner.cpp:

(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):

  • page/Settings.in:

A bit unfortunate thing is that the setter is named setEs6ModulesEnabled
if we use es6ModulesEnabled here.

Source/WebKit/mac:

  • Configurations/FeatureDefines.xcconfig:
  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):
(-[WebPreferences es6ModulesEnabled]):
(-[WebPreferences setES6ModulesEnabled:]):

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

(-[WebView _preferencesChanged:]):

Source/WebKit/win:

  • Interfaces/IWebPreferencesPrivate.idl:
  • WebPreferenceKeysPrivate.h:
  • WebPreferences.cpp:

(WebPreferences::setES6ModulesEnabled):
(WebPreferences::es6ModulesEnabled):

  • WebPreferences.h:
  • WebView.cpp:

(WebView::notifyPreferencesChanged):

Source/WebKit2:

  • Configurations/FeatureDefines.xcconfig:
  • Shared/WebPreferencesDefinitions.h:

Annotated ES6 Modules option with DEFAULT_EXPERIMENTAL_FEATURES_ENABLED.

  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetES6ModulesEnabled):
(WKPreferencesGetES6ModulesEnabled):

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

(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

Source/WTF:

  • wtf/FeatureDefines.h:

Tools:

Enabled ES6 Modules in test runners.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(resetWebPreferencesToConsistentValues):

  • DumpRenderTree/win/DumpRenderTree.cpp:

(resetWebPreferencesToConsistentValues):

  • Scripts/webkitperl/FeatureList.pm:
  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::beginTesting):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setES6ModulesEnabled):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:

LayoutTests:

4:22 PM Changeset in webkit [208823] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed, remove outdated comment about using PassRefPtr.

  • dom/ContainerNode.cpp:

(WebCore::ContainerNode::parserAppendChild):

3:57 PM Changeset in webkit [208822] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, roll out r208811. It's not sound.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileMaterializeNewObject):
(JSC::FTL::DFG::LowerDFGToB3::allocatePropertyStorage):
(JSC::FTL::DFG::LowerDFGToB3::reallocatePropertyStorage):
(JSC::FTL::DFG::LowerDFGToB3::allocateObject):
(JSC::FTL::DFG::LowerDFGToB3::mutatorFence):
(JSC::FTL::DFG::LowerDFGToB3::setButterfly):
(JSC::FTL::DFG::LowerDFGToB3::splatWordsIfMutatorIsFenced): Deleted.

3:34 PM Changeset in webkit [208821] by keith_miller@apple.com
  • 9 edits
    1 add in trunk/Source/JavaScriptCore

Wasm function parser should use template functions for each binary and unary opcode
https://bugs.webkit.org/show_bug.cgi?id=164835

Reviewed by Mark Lam.

This patch changes the wasm function parser to call into a template specialization
for each binary/unary opcode. This change makes it easier to have custom implementations
of various opcodes. It is also, in theory a speedup since it does not require switching
on the opcode twice.

  • CMakeLists.txt:
  • DerivedSources.make:
  • wasm/WasmB3IRGenerator.cpp:

(): Deleted.

  • wasm/WasmFunctionParser.h:

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

  • wasm/WasmValidate.cpp:
  • wasm/generateWasm.py:

(isBinary):
(isSimple):

  • wasm/generateWasmB3IRGeneratorInlinesHeader.py: Added.

(generateSimpleCode):

  • wasm/generateWasmOpsHeader.py:

(opcodeMacroizer):

  • wasm/generateWasmValidateInlinesHeader.py:
3:32 PM Changeset in webkit [208820] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking inspector/worker/debugger-pause.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=164833

Unreviewed test gardening.

  • platform/mac/TestExpectations:
3:18 PM Changeset in webkit [208819] by mark.lam@apple.com
  • 6 edits in trunk/Source/JavaScriptCore

ExceptionFuzz functions should use its client's ThrowScope.
https://bugs.webkit.org/show_bug.cgi?id=164834

Reviewed by Geoffrey Garen.

This is because ExceptionFuzz's purpose is to throw exceptions from its client at
exception check sites. Using the client's ThrowScope solves 2 problems:

  1. If ExceptionFuzz instantiates its own ThrowScope, the simulated throw will be mis-attributed to ExceptionFuzz when it should be attributed to its client.
  1. One way exception scope verification works is by having ThrowScopes assert that there are no unchecked simulated exceptions when the ThrowScope is instantiated. However, ExceptionFuzz necessarily works by inserting doExceptionFuzzingIfEnabled() in between a ThrowScope that simulated a throw and an exception check. If we declare a ThrowScope in ExceptionFuzz's code, we will be instantiating the ThrowScope between the point where a simulated throw occurs and where the needed exception check can occur. Hence, having ExceptionFuzz instantiate its own ThrowScope will fail exception scope verification every time.

Changing ExceptionFuzz to use its client's ThrowScope resolves both problems.

Also fixed the THROW() macro in CommonSlowPaths.cpp to use the ThrowScope that
already exists in every slow path function instead of creating a new one.

  • jit/JITOperations.cpp:
  • llint/LLIntSlowPaths.cpp:
  • runtime/CommonSlowPaths.cpp:
  • runtime/ExceptionFuzz.cpp:

(JSC::doExceptionFuzzing):

  • runtime/ExceptionFuzz.h:

(JSC::doExceptionFuzzingIfEnabled):

3:17 PM Changeset in webkit [208818] by Simon Fraser
  • 2 edits in trunk/Tools

Hard to write reliable UIScriptController scrollingTreeAsText tests
https://bugs.webkit.org/show_bug.cgi?id=164764

Reviewed by Wenson Hsieh.

Fix one cause of flakiness by resetting the WKWebView's UIScrollView scale
and scroll position between tests.

  • WebKitTestRunner/ios/TestControllerIOS.mm:

(WTR::TestController::platformResetStateToConsistentValues):

3:06 PM Changeset in webkit [208817] by rniwa@webkit.org
  • 9 edits
    2 adds in trunk

slotchange event should bubble and dispatched once
https://bugs.webkit.org/show_bug.cgi?id=164770

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Rebaselined the test. Some test cases fail as they do on Chrome because it's testing an outdated version of the spec.
Will fix the test upstream later.

  • web-platform-tests/shadow-dom/slotchange-event-expected.txt:

Source/WebCore:

Updated our implementation of slotchange event to match the latest specification after:
https://github.com/w3c/webcomponents/issues/571
https://dom.spec.whatwg.org/#signal-a-slot-change
The new behavior matches that of Google Chrome Canary.

In the latest specification, we no longer dispatch a separate event on ancestor slots.
Instead, we fire a single slotchange event to which a new node is assigned or from which
an existing assigned node is removed. This patch mostly removes the code that existed to
locate ancestor slot elements, and makes the event bubble up by changing a single line in
HTMLSlotElement::dispatchSlotChangeEvent.

Test: fast/shadow-dom/slotchange-event-bubbling.html

  • dom/ShadowRoot.h:
  • dom/SlotAssignment.cpp:

(WebCore::recursivelyFireSlotChangeEvent): Deleted.
(WebCore::SlotAssignment::didChangeSlot): Removed ChangeType from the arguments since we
no longer notify the ancestor slot elements.
(WebCore::SlotAssignment::hostChildElementDidChange):

  • dom/SlotAssignment.h:

(WebCore::ShadowRoot::didRemoveAllChildrenOfShadowHost):
(WebCore::ShadowRoot::didChangeDefaultSlot):
(WebCore::ShadowRoot::hostChildElementDidChangeSlotAttribute):
(WebCore::ShadowRoot::innerSlotDidChange): Deleted.

  • html/HTMLDetailsElement.cpp:

(WebCore::DetailsSlotAssignment::hostChildElementDidChange):

  • html/HTMLSlotElement.cpp:

(WebCore::HTMLSlotElement::dispatchSlotChangeEvent): Make slotchange event bubble.

LayoutTests:

  • fast/shadow-dom/slotchange-event-bubbling-expected.txt: Added.
  • fast/shadow-dom/slotchange-event-bubbling.html: Added.
3:05 PM Changeset in webkit [208816] by Simon Fraser
  • 6 edits
    2 copies
    6 moves
    1 add in trunk

UIScriptController: script with no async tasks fails if an earlier script registered a callback
https://bugs.webkit.org/show_bug.cgi?id=164762

Reviewed by Wenson Hsieh.

Tools:

Make TestRunner::callUIScriptCallback() async in DumpRenderTree to match WebKitTestRunner behavior.
This fixes ui-side-script-with-callback.html in WK1, which failed because the second runUIScript()
would occur inside the completion callback from the first. This no longer happens.

  • DumpRenderTree/TestRunner.cpp:

(TestRunner::callUIScriptCallback):

  • TestRunnerShared/UIScriptContext/UIScriptContext.cpp:

(UIScriptContext::tryToCompleteUIScriptForCurrentParentCallback):

LayoutTests:

Move the tests that use runUIScript into their own directory for easier TestExpectations management,
and fix TestExpectations to match.

  • TestExpectations:
  • fast/harness/uiscriptcontroller/concurrent-ui-side-scripts-expected.txt: Renamed from LayoutTests/fast/harness/concurrent-ui-side-scripts-expected.txt.
  • fast/harness/uiscriptcontroller/concurrent-ui-side-scripts.html: Renamed from LayoutTests/fast/harness/concurrent-ui-side-scripts.html.
  • fast/harness/uiscriptcontroller/ui-side-script-unregister-callback-expected.txt: Copied from LayoutTests/fast/harness/ui-side-script-unregister-callback-expected.txt.
  • fast/harness/uiscriptcontroller/ui-side-script-unregister-callback.html: Copied from LayoutTests/fast/harness/ui-side-script-unregister-callback.html.
  • fast/harness/uiscriptcontroller/ui-side-script-with-callback-expected.txt: Renamed from LayoutTests/fast/harness/ui-side-script-unregister-callback-expected.txt.
  • fast/harness/uiscriptcontroller/ui-side-script-with-callback.html: Renamed from LayoutTests/fast/harness/ui-side-script-unregister-callback.html.
  • fast/harness/uiscriptcontroller/ui-side-scripts-expected.txt: Renamed from LayoutTests/fast/harness/ui-side-scripts-expected.txt.
  • fast/harness/uiscriptcontroller/ui-side-scripts.html: Renamed from LayoutTests/fast/harness/ui-side-scripts.html.
  • platform/mac/TestExpectations:
2:53 PM Changeset in webkit [208815] by commit-queue@webkit.org
  • 6 edits in trunk

REGRESSION (r207162): [debug] loader/stateobjects LayoutTests timing out
https://bugs.webkit.org/show_bug.cgi?id=163307

Patch by Alex Christensen <achristensen@webkit.org> on 2016-11-16
Reviewed by Alexey Proskuryakov.

Source/WebCore:

  • platform/URLParser.cpp:

Removed some unnecessary and redundant assertions in iterators, which are inside inner loops.
(WebCore::URLParser::parsedDataView):
(WebCore::URLParser::parse):
Add a parsedDataView that just returns a UChar instead of a StringView for 1-length views.
This speeds up debug builds considerably, which spent most of the time parsing the path
making and destroying these 1-length StringViews. It can't hurt release builds.

  • platform/URLParser.h:

LayoutTests:

  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
2:35 PM Changeset in webkit [208814] by achristensen@apple.com
  • 2 edits in trunk/LayoutTests

Unreviewed gardening.
https://bugs.webkit.org/show_bug.cgi?id=163127

  • platform/ios-simulator/TestExpectations:

Unskip passing tests.

2:30 PM Changeset in webkit [208813] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Micro-optimize ContainerNode::removeBetween()
https://bugs.webkit.org/show_bug.cgi?id=164832

Reviewed by Sam Weinig.

Micro-optimize ContainerNode::removeBetween() by updating pointers only
when strictly needed and reducing branching.

No new tests, no Web-exposed behavior change.

  • dom/ContainerNode.cpp:

(WebCore::ContainerNode::removeBetween):

2:28 PM Changeset in webkit [208812] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Micro-optimize AtomicHTMLToken::initializeAttributes()
https://bugs.webkit.org/show_bug.cgi?id=164826

Reviewed by Sam Weinig.

Micro-optimize AtomicHTMLToken::initializeAttributes():

  • Use uncheckedAppend() instead of append() since we reserve capacity before the loop.
  • Use a more efficient findAttribute() that only checks the local names since this function only adds attributes that have to namespace or prefix.

No new tests, no Web-exposed behavior change.

  • html/parser/AtomicHTMLToken.h:

(WebCore::hasAttribute):
(WebCore::AtomicHTMLToken::initializeAttributes):

2:24 PM Changeset in webkit [208811] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Slight Octane regression from concurrent GC's eager object zero-fill
https://bugs.webkit.org/show_bug.cgi?id=164823

Reviewed by Geoffrey Garen.

During concurrent GC, we need to eagerly zero-fill objects we allocate prior to
executing the end-of-allocation fence. This causes some regressions. This is an attempt
to fix those regressions by making them conditional on whether the mutator is fenced.

This is a slight speed-up on raytrace and boyer, and hopefully it will fix the
regression.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileMaterializeNewObject):
(JSC::FTL::DFG::LowerDFGToB3::splatWordsIfMutatorIsFenced):
(JSC::FTL::DFG::LowerDFGToB3::allocatePropertyStorage):
(JSC::FTL::DFG::LowerDFGToB3::reallocatePropertyStorage):
(JSC::FTL::DFG::LowerDFGToB3::allocateObject):
(JSC::FTL::DFG::LowerDFGToB3::mutatorFence):
(JSC::FTL::DFG::LowerDFGToB3::setButterfly):

2:12 PM Changeset in webkit [208810] by Joseph Pecoraro
  • 3 edits in trunk/LayoutTests

Fix typo in LayoutTest.

Unreviewed follow-up comment.

  • inspector/page/setEmulatedMedia-expected.txt:
  • inspector/page/setEmulatedMedia.html:
1:10 PM Changeset in webkit [208809] by Beth Dakin
  • 2 edits in trunk/Source/WebCore

Another build fix.

  • platform/mac/WebPlaybackSessionInterfaceMac.mm:
1:05 PM Changeset in webkit [208808] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix exception scope checking in JSGlobalObject.cpp.
https://bugs.webkit.org/show_bug.cgi?id=164831

Reviewed by Saam Barati.

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

  • Use a CatchScope here because we don't ever expect JSGlobalObject initialization to fail with errors.

(JSC::JSGlobalObject::put):

  • Fix exception check requirements.
1:02 PM Changeset in webkit [208807] by Yusuke Suzuki
  • 2 edits in trunk/LayoutTests

js/dom/domjit-function-get-element-by-id-licm.html and js/dom/domjit-function-get-element-by-id-changed.html are flaky timeouts
https://bugs.webkit.org/show_bug.cgi?id=164797

Reviewed by Saam Barati.

The performance of the both tests rely on PureGetById.
However, PureGetById is rolled out temporary[1], these tests become timed out.
This patch makes the both tests [ PASS TIMEOUT ] until PureGetById patch[1] is
relanded or impure object optimization patch[2] is landed.

[1]: https://bugs.webkit.org/show_bug.cgi?id=163305
[2]: https://bugs.webkit.org/show_bug.cgi?id=164175

1:00 PM Changeset in webkit [208806] by clopez@igalia.com
  • 2 edits in trunk/Source/WTF

[JSC] Build broken for 32-bit x86 after r208306 with GCC 4.9
https://bugs.webkit.org/show_bug.cgi?id=164588

Reviewed by Mark Lam.

Provide assembly for executing the cpuid instruction when compiling
in PIC mode with the GCC 4.9 EBX on 32-bit x86.

Note that the values returned by cpuid here are not used. The purpose
of calling this instruction is to force the CPU to complete and sync
any buffered modifications on registers, memory or flags before
fetching and executing the next instruction.

  • wtf/Atomics.h:

(WTF::x86_cpuid):

12:58 PM Changeset in webkit [208805] by Beth Dakin
  • 2 edits in trunk/Source/WebCore

Attempted build fix.

  • platform/mac/WebPlaybackSessionInterfaceMac.mm:

(WebCore::WebPlaybackSessionInterfaceMac::durationChanged):
(WebCore::WebPlaybackSessionInterfaceMac::currentTimeChanged):
(WebCore::WebPlaybackSessionInterfaceMac::rateChanged):
(WebCore::WebPlaybackSessionInterfaceMac::beginScrubbing):
(WebCore::WebPlaybackSessionInterfaceMac::seekableRangesChanged):
(WebCore::WebPlaybackSessionInterfaceMac::audioMediaSelectionOptionsChanged):
(WebCore::WebPlaybackSessionInterfaceMac::legibleMediaSelectionOptionsChanged):
(WebCore::WebPlaybackSessionInterfaceMac::ensureControlsManager):

12:43 PM Changeset in webkit [208804] by beidson@apple.com
  • 7 edits in trunk/Source/WebCore

Re-indent some old headers.

Rubberstamped by Alex Christensen

No new tests (No behavior change).

(Also #pragma once a few of them)

  • loader/DocumentLoader.h:
  • loader/FrameLoaderClient.h:
  • page/Frame.h:
  • page/FrameTree.h:
  • page/PageGroup.h:
  • platform/Cursor.h:
12:26 PM Changeset in webkit [208803] by Darin Adler
  • 2 edits in trunk/Source/WebCore

REGRESSION (r208672): Crash in com.apple.WebCore: WebCore::DatabaseContext::stopDatabases + 34
https://bugs.webkit.org/show_bug.cgi?id=164820

Reviewed by Sam Weinig.

Crash seen in existing regression tests; reliably reproducible in some test configurations.

  • Modules/webdatabase/DatabaseContext.cpp:

(WebCore::DatabaseContext::contextDestroyed): Call through to base class before calling
stopDatabases, since that might cause this object to be deallocated.
(WebCore::DatabaseContext::stopDatabases): Be sure not to clear the possibly-last reference
to this database context until after all code that accesses data members, since it might
cause this object to be deallocated.

12:23 PM Changeset in webkit [208802] by Beth Dakin
  • 5 edits in trunk/Source/WebCore

Implement WebPlaybackControlsManager
https://bugs.webkit.org/show_bug.cgi?id=164789
-and corresponding-
rdar://problem/29275082

Reviewed by Dan Bernstein.

  • platform/mac/WebPlaybackControlsManager.h:
  • platform/mac/WebPlaybackControlsManager.mm:

(-[WebPlaybackControlsManager dealloc]):
(-[WebPlaybackControlsManager cancelThumbnailAndAudioAmplitudeSampleGeneration]):
(-[WebPlaybackControlsManager generateFunctionBarThumbnailsForTimes:size:completionHandler:]):
(-[WebPlaybackControlsManager generateFunctionBarAudioAmplitudeSamples:completionHandler:]):
(-[WebPlaybackControlsManager canBeginFunctionBarScrubbing]):
(-[WebPlaybackControlsManager beginFunctionBarScrubbing]):
(-[WebPlaybackControlsManager endFunctionBarScrubbing]):
(-[WebPlaybackControlsManager audioFunctionBarMediaSelectionOptions]):
(-[WebPlaybackControlsManager setAudioFunctionBarMediaSelectionOptions:]):
(-[WebPlaybackControlsManager currentAudioFunctionBarMediaSelectionOption]):
(-[WebPlaybackControlsManager setCurrentAudioFunctionBarMediaSelectionOption:]):
(-[WebPlaybackControlsManager legibleFunctionBarMediaSelectionOptions]):
(-[WebPlaybackControlsManager setLegibleFunctionBarMediaSelectionOptions:]):
(-[WebPlaybackControlsManager currentLegibleFunctionBarMediaSelectionOption]):
(-[WebPlaybackControlsManager setCurrentLegibleFunctionBarMediaSelectionOption:]):
(mediaSelectionOptions):
(-[WebPlaybackControlsManager setAudioMediaSelectionOptions:withSelectedIndex:]):
(-[WebPlaybackControlsManager setLegibleMediaSelectionOptions:withSelectedIndex:]):
(-[WebPlaybackControlsManager webPlaybackSessionInterfaceMac]):
(-[WebPlaybackControlsManager setWebPlaybackSessionInterfaceMac:]):
(-[WebPlaybackControlsManager togglePlayback]):
(-[WebPlaybackControlsManager setPlaying:]):
(-[WebPlaybackControlsManager isPlaying]):

  • platform/mac/WebPlaybackSessionInterfaceMac.h:
  • platform/mac/WebPlaybackSessionInterfaceMac.mm:

(WebCore::WebPlaybackSessionInterfaceMac::durationChanged):
(WebCore::WebPlaybackSessionInterfaceMac::currentTimeChanged):
(WebCore::WebPlaybackSessionInterfaceMac::rateChanged):
(WebCore::WebPlaybackSessionInterfaceMac::playBackControlsManager):

12:18 PM Changeset in webkit [208801] by jiewen_tan@apple.com
  • 3 edits
    20 adds in trunk

Add more tests for SubtleCrypto::importKey and SubtleCrypto::exportKey
https://bugs.webkit.org/show_bug.cgi?id=164815
<rdar://problem/29281660>

Reviewed by Brent Fulgham.

Source/WebCore:

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

crypto/subtle/aes-import-jwk-key-export-raw-key.html
crypto/subtle/aes-import-raw-key-export-jwk-key.html
crypto/subtle/aes-import-raw-key-export-raw-key.html
crypto/subtle/hmac-import-jwk-key-export-jwk-key.html
crypto/subtle/hmac-import-jwk-key-export-raw-key.html
crypto/subtle/hmac-import-raw-key-export-jwk-key.html
crypto/subtle/hmac-import-raw-key-export-raw-key.html
crypto/subtle/rsa-import-jwk-key-export-jwk-key-private.html
crypto/subtle/rsa-import-jwk-key-export-jwk-key-public.html

  • crypto/mac/CryptoKeyRSAMac.cpp:

(WebCore::CryptoKeyRSA::create):
Add a comment.

LayoutTests:

  • crypto/subtle/aes-import-jwk-key-export-jwk-key.html: Added.
  • crypto/subtle/aes-import-jwk-key-export-raw-key.html: Added.
  • crypto/subtle/aes-import-raw-key-export-jwk-key.html: Added.
  • crypto/subtle/aes-import-raw-key-export-raw-key.html: Added.
  • crypto/subtle/hmac-import-jwk-key-export-jwk-key.html: Added.
  • crypto/subtle/hmac-import-jwk-key-export-raw-key.html: Added.
  • crypto/subtle/hmac-import-raw-key-export-jwk-key.html: Added.
  • crypto/subtle/hmac-import-raw-key-export-raw-key.html: Added.
  • crypto/subtle/rsa-import-jwk-key-export-jwk-key-private.html: Added.
  • crypto/subtle/rsa-import-jwk-key-export-jwk-key-public.html: Added.
12:09 PM Changeset in webkit [208800] by mitz@apple.com
  • 8 copies
    1 add in releases/Apple/Safari Technology Preview 18

Added a tag for Safari Technology Preview release 18.

11:13 AM Changeset in webkit [208799] by Simon Fraser
  • 4 edits in trunk/Source/WebKit2

Add logging support to VisibleContentRectUpdateInfo
https://bugs.webkit.org/show_bug.cgi?id=164825

Reviewed by Zalan Bujtas.

Add TextStream output to VisibleContentRectUpdateInfo. Just piping it into a logging
stream does single-line output, so also make a convenience dump() function that will
product multiline output. Result look like:

(VisibleContentRectUpdateInfo

(lastLayerTreeTransactionID 54)
(exposedContentRect (523.44,1258.63) width=676.20 height=901.60)
(unobscuredContentRect (523.44,1293.41) width=676.20 height=866.82)
(unobscuredRectInScrollViewCoordinates (0,39.50) width=768 height=984.50)
(customFixedPositionRect (219.64,935) width=980 height=1225)
(obscuredInset width=0 height=39.50)
(scale 1.14)
(inStableState 0)
(timestamp 736446.61)
(verticalVelocity -11.36))

  • Shared/VisibleContentRectUpdateInfo.cpp:

(WebKit::VisibleContentRectUpdateInfo::dump):
(WebKit::operator<<):

  • Shared/VisibleContentRectUpdateInfo.h:
  • UIProcess/ios/WKContentView.mm:

(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):

11:03 AM Changeset in webkit [208798] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Updating TestExpectations for two http/tests/security/module-crossorigin tests.
https://bugs.webkit.org/show_bug.cgi?id=164539

Unreviewed test gardening.

10:08 AM Changeset in webkit [208797] by Antti Koivisto
  • 4 edits in trunk/Source/WebCore

Remove getMutableCachedPseudoStyle
https://bugs.webkit.org/show_bug.cgi?id=164819

Reviewed by Zalan Bujtas.

It is only used by styleForFirstLetter.

  • rendering/RenderBlock.cpp:

(WebCore::styleForFirstLetter):

Clone the original style before mutations.

(WebCore::RenderBlock::updateFirstLetterStyle):
(WebCore::RenderBlock::createFirstLetterRenderer):

Since we have a clone already just move it in place.

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::getMutableCachedPseudoStyle): Deleted.

  • rendering/RenderElement.h:
10:07 AM Changeset in webkit [208796] by dbates@webkit.org
  • 4 edits
    1 add in trunk/LayoutTests

Make test sandbox-should-not-persist-on-navigation.html more representative of real-world scenario
https://bugs.webkit.org/show_bug.cgi?id=164752

Reviewed by Brent Fulgham.

Modify the test http-0.9/sandbox-should-not-persist-on-navigation.html so that it loads
a document on a default port using HTTP 0.9 to trigger the HTTP 0.9 sandbox as this
is more representative of a real-world scenario where we want a sandbox to be applied
and is the scenario that is currently covered by our HTTP 0.9 sandbox machinery.

Currently this test makes use of the pre r208549 behavior where the HTTP 0.9 sandbox
was applied to a document if one of its subresources loaded on a non-default port
using HTTP 0.9 in addition to the behavior where the sandbox is applied to a document
that loads on a default port using HTTP 0.9. Following r208549 we no longer apply the
sandbox to the document for the former case as this did not improve security much, if
any. The latter case is more representative of a real-world scenario where we want to
apply the sandbox policy and reflects our behavior following r208549.

  • http/tests/security/http-0.9/resources/nph-sandbox-should-not-persist-on-navigation.pl: Added.
  • http/tests/security/http-0.9/sandbox-should-not-persist-on-navigation-expected.txt:
  • http/tests/security/http-0.9/sandbox-should-not-persist-on-navigation.html:
  • platform/wk2/TestExpectations: Skip the HTTP-0.9 tests in WebKit2 as it uses internals.registerDefaultPortForProtocol().
10:00 AM Changeset in webkit [208795] by Ryan Haddad
  • 3 edits
    2 deletes in trunk

Unreviewed, rolling out r208770.

The test added with this change is timing out on mac-wk1.

Reverted changeset:

"UIScriptController: script with no async tasks fails if an
earlier script registered a callback"
https://bugs.webkit.org/show_bug.cgi?id=164762
http://trac.webkit.org/changeset/208770

9:29 AM Changeset in webkit [208794] by matthew_hanson@apple.com
  • 5 edits in trunk/Source

Versioning.

9:18 AM Changeset in webkit [208793] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-603.1.13

New tag.

8:19 AM Changeset in webkit [208792] by Simon Fraser
  • 2 edits in trunk/LayoutTests

Fix typo in bug url.

  • platform/mac/TestExpectations:
8:18 AM Changeset in webkit [208791] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, ARM build fix.

  • b3/B3LowerToAir.cpp:

(JSC::B3::Air::LowerToAir::lower):
(JSC::B3::Air::LowerToAir::lowerX86Div):
(JSC::B3::Air::LowerToAir::lowerX86UDiv):

6:00 AM Changeset in webkit [208790] by commit-queue@webkit.org
  • 7 edits in trunk

[Readable Streams API] Implement ReadableByteStreamController close()
https://bugs.webkit.org/show_bug.cgi?id=164413

Patch by Romain Bellessort <romain.bellessort@crf.canon.fr> on 2016-11-16
Reviewed by Darin Adler.

Source/WebCore:

Implemented close() method of ReadableByteStreamController.

Updated test expectations for close() tests and added tests
to ensure errors are thrown in various cases defined by spec.

  • Modules/streams/ReadableByteStreamController.js:

(close): Added.

  • Modules/streams/ReadableByteStreamInternals.js:

(readableByteStreamControllerClose): Added.

  • bindings/js/WebCoreBuiltinNames.h: Added bytesFilled.

LayoutTests:

Updated test expectations for close() tests and added tests
to ensure errors are thrown in various cases defined by spec.

  • streams/readable-byte-stream-controller.js: Updated.
4:00 AM Changeset in webkit [208789] by Philippe Normand
  • 2 edits in trunk/Source/WebCore

[GStreamer][GL] build broken when using gst-plugins-bad from git
https://bugs.webkit.org/show_bug.cgi?id=164776

Reviewed by Xabier Rodriguez-Calvar.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::requestGLContext): The
GStreamer GL context GType was renamed, add an ifdef taking this
into account.

3:39 AM Changeset in webkit [208788] by Yusuke Suzuki
  • 31 edits
    5 copies
    136 adds in trunk

[ES6] Integrate ES6 Modules into WebCore
https://bugs.webkit.org/show_bug.cgi?id=148897

Reviewed by Ryosuke Niwa.

Source/WebCore:

This patch introduces ES6 Modules into WebCore. We integrate JSC's JSModuleLoader into WebCore.
JSC constructs the module loader pipeline by the chains of the promises. To handle this,
the following components are added.

  1. CachedModuleScript

CachedModuleScript wraps the promise based JSModuleLoader pipeline and offers
similar APIs to CachedScript. ScriptElement and PendingScript interact with
CachedModuleScript when the script tag is the module tag instead of CachedScript.
ScriptElement and PendingScript will receive the notification from
CachedModuleScript by implementing CachedModuleScriptClient.

  1. ScriptModuleLoader

This is the module loader instantiated per document. It manages fetching and
offers the callbacks for the JSC's JSModuleLoader implementation. ScriptModuleLoader
will fetch the resource by creating CachedModuleScriptLoader per resource. ScriptModuleLoader
will receive the notification by implementing CachedModuleScriptLoaderClient. When the
resource is fetched, the module loader will drive the promise resolve/reject chain.

  1. CachedModuleScriptLoader

This fetches the resource by using CachedScript. Using CachedScript means that it
automatically reports the resource to the inspector. CachedModuleScriptLoader notify to
ScriptModuleLoader when the resource is fetched.

One tricky point is that the fetch requests issued from one module-graph should share the same
nonce, crossorigin attributes etc.

Here, we wrote the module graph like A -> B (A depends on B).

<script tag> -> A -> B -> C -> D

When fetching A, B, C, and D modules, we need to set the same nonce, crossorigin etc. configuration
derived from the original script tag. So per module-graph information should be shared throughout
the module loader pipeline. To do so, JSC's module loader implementation can take the value called
initiator. Since the loader will propagate & share this initiator throughout the pipeline,
we can transfer and share some metadata. Currently, we pass the JSWrapper of the script tag as the
initiator. Each fetch request is created by using this initiator script element.

More integration into the inspector should be done in the subsequent patch.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/CachedModuleScript.cpp: Added.

CachedModuleScript offers similar interface to CachedScript to make ScriptElement things easier. It encapsulates the
detail of the JSC JSModuleLoader that this module loader is driven by the chain of the promises. CachedModuleScript's
callbacks are called from the promise's handlers configured in ScriptController::loadModuleScript.
(WebCore::CachedModuleScript::create):
(WebCore::CachedModuleScript::CachedModuleScript):
(WebCore::CachedModuleScript::load):
(WebCore::CachedModuleScript::notifyLoadCompleted):
(WebCore::CachedModuleScript::notifyLoadFailed):
(WebCore::CachedModuleScript::notifyLoadWasCanceled):
(WebCore::CachedModuleScript::notifyClientFinished):
(WebCore::CachedModuleScript::addClient):
(WebCore::CachedModuleScript::removeClient):

  • bindings/js/CachedModuleScript.h: Added.

(WebCore::CachedModuleScript::moduleKey):
(WebCore::CachedModuleScript::error):
(WebCore::CachedModuleScript::wasCanceled):
(WebCore::CachedModuleScript::isLoaded):
(WebCore::CachedModuleScript::nonce):
(WebCore::CachedModuleScript::crossOriginMode):
Save nonce and crossorigin attributes when we start ScriptElement::prepareScript.

  • bindings/js/CachedModuleScriptClient.h: Copied from Source/WebCore/dom/LoadableScript.h.

(WebCore::CachedModuleScriptClient::~CachedModuleScriptClient):

  • bindings/js/CachedModuleScriptLoader.cpp: Added.

CachedModuleScriptLoader is responsible to fetching the resource for the module script. It uses propagated initiator
to create the request. This initiator is the JS wrapper of the script element issuing this fetching request. The name
initiator is derived from the request.setInitiator(). Once the resource is fetched, the fetcher will notify to the
client. Currently, ScriptModuleLoader implements this client interface.
(WebCore::CachedModuleScriptLoader::create):
(WebCore::CachedModuleScriptLoader::CachedModuleScriptLoader):
(WebCore::CachedModuleScriptLoader::~CachedModuleScriptLoader):
(WebCore::CachedModuleScriptLoader::load):
Create the request. We call ScriptElement::requestCachedScript to initiate a new fetching request. At that time,
nonce and crossorigin (and charset) attributes of this element are applied to the new request.
(WebCore::CachedModuleScriptLoader::notifyFinished):

  • bindings/js/CachedModuleScriptLoader.h: Copied from Source/WebCore/bindings/js/ScriptModuleLoader.h.
  • bindings/js/CachedModuleScriptLoaderClient.h: Copied from Source/WebCore/dom/LoadableScript.h.

(WebCore::CachedModuleScriptLoaderClient::~CachedModuleScriptLoaderClient):

  • bindings/js/CachedScriptSourceProvider.h:

(WebCore::CachedScriptSourceProvider::create):
(WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider):
(WebCore::makeSource):

  • bindings/js/JSBindingsAllInOne.cpp:
  • bindings/js/JSDOMBinding.cpp:

(WebCore::retrieveErrorMessage):
(WebCore::reportException):

  • bindings/js/JSDOMBinding.h:
  • bindings/js/JSMainThreadExecState.h:

(WebCore::JSMainThreadExecState::loadModule):
(WebCore::JSMainThreadExecState::linkAndEvaluateModule):

  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::evaluateInWorld):
(WebCore::ScriptController::loadModuleScriptInWorld):
(WebCore::ScriptController::loadModuleScript):
This just performs loading and not executing the module graph. Once the module graph is loaded, it is notified to
the given CachedModuleScript.
(WebCore::ScriptController::linkAndEvaluateModuleScriptInWorld):
(WebCore::ScriptController::linkAndEvaluateModuleScript):
This executes the linking and evaluation of the already instantiated module graph. After loading the module graph,
we call this function for the module to evaluate it. This is called from ScriptElement::executeModuleScript.
(WebCore::ScriptController::evaluateModule):
Every time we evaluate the module, the ScriptModuleLoader::evaluate hook is called. So the loader calls this function
to actually evaluate the module.
(WebCore::jsValueToModuleKey):
(WebCore::ScriptController::setupModuleScriptHandlers):
The JSC's module loader is driven by the chain of the promise. So here, we convert this to CachedModuleScript /
CachedModuleScriptClient style and encapsulate the details. This encapsulation makes CachedModuleScript similar
to CachedScript and it makes things simple in the rest of WebCore. If the propagated error is already reported
to the inspector, we receive moduleLoaderAlreadyReportedErrorSymbol as the error value. So at that case, we
don't report it twice. If the rejection is caused due to the canceled fetching, moduleLoaderFetchingIsCanceledSymbol
appears as the error value. In that case, we will call CachedModuleScript::notifyLoadWasCanceled.
(WebCore::ScriptController::executeScript):

  • bindings/js/ScriptController.h:

(WebCore::ScriptController::moduleLoaderAlreadyReportedErrorSymbol):
(WebCore::ScriptController::moduleLoaderFetchingIsCanceledSymbol):

  • bindings/js/ScriptModuleLoader.cpp:

We use DeferredWrapper to resolve promises used for the module pipeline. Thus, once the active DOM objects are
suspended, the module loader propagation stops.
(WebCore::ScriptModuleLoader::~ScriptModuleLoader):
Clear the clients of the fetchers issued from this loader.
(WebCore::isRootModule):
(WebCore::ScriptModuleLoader::resolve):
Resolve the module specifier (that is written in import from "XXX") to the unique module key. We use URL
string as module key. The edge case is that the module is inlined one. In that case, we don't have any URL
for that. Instead of URL, we use symbol at that time.
(WebCore::ScriptModuleLoader::fetch):
Start fetching for the requested module. It returns the promise that is resolved when the fetching is done.
The loader creates the fetcher, and the fetcher start loading the resource. Once the fetcher loads the resource,
it notify to the loader through CachedModuleScriptLoaderClient interface. Since we pass the original script
element as the initiator here, the fetcher can use this initiator to create the request. While the result of
CachedResource has 3 variations (loaded, canceled, error occurred), Promise only tells us whether it is resolved
or rejected. When CachedModuleScript gets the result from the promise chain, it needs to know which the result is.
To transfer the canceled information, we reject the promise with the special symbol moduleLoaderAlreadyReportedErrorSymbol.
This offers the way to distinguish the canceled error from the other errors.
(WebCore::ScriptModuleLoader::evaluate):
This is the hook function that is called when JSC's JSModuleLoader attempts to execute each module.
(WebCore::ScriptModuleLoader::notifyFinished):
This function is called when the fetcher completes. We will resolve the promise with the result of the fetching.
The module loader pipeline is constructed as a chain of promises.
Rejecting a promise when some error occurs is important because the execution flow of
the promise chain is driven by "rejected" or "fulfilled" events.
If the promise is not rejected while error occurs, reject handler won't be executed
and all the subsequent promise chain will wait the result forever.
As a result, even if the error is already reported to the inspector elsewhere,
it should be propagated in the pipeline. For example, the error of loading
CachedResource is already reported to the inspector by the loader. But we still need
to reject the promise to propagate this error to the script element.
At that time, we don't want to report the same error twice. When we propagate the error
that is already reported to the inspector, we throw moduleLoaderAlreadyReportedErrorSymbol
symbol instead. By comparing the thrown error with this symbol, we can distinguish errors raised
when checking syntax of a module script from errors reported already.
In the reject handler of the promise, we only report a error that is not this symbol.
And mime type checking is done here since the module script always require this check.

  • bindings/js/ScriptModuleLoader.h:

(WebCore::ScriptModuleLoader::document): Deleted.

  • bindings/js/ScriptSourceCode.h:

(WebCore::ScriptSourceCode::ScriptSourceCode):

  • dom/CurrentScriptIncrementer.h:

(WebCore::CurrentScriptIncrementer::CurrentScriptIncrementer):

  • dom/LoadableClassicScript.cpp:

(WebCore::LoadableClassicScript::error):
(WebCore::LoadableClassicScript::execute):
(WebCore::LoadableClassicScript::wasErrored): Deleted.

  • dom/LoadableClassicScript.h:
  • dom/LoadableModuleScript.cpp: Copied from Source/WebCore/dom/LoadableScript.h.

This is the derived class from LoadableScript. It is used for the script module graphs.
(WebCore::LoadableModuleScript::create):
(WebCore::LoadableModuleScript::LoadableModuleScript):
(WebCore::LoadableModuleScript::~LoadableModuleScript):
(WebCore::LoadableModuleScript::isLoaded):
(WebCore::LoadableModuleScript::error):
(WebCore::LoadableModuleScript::wasCanceled):
(WebCore::LoadableModuleScript::notifyFinished):
(WebCore::LoadableModuleScript::execute):

  • dom/LoadableModuleScript.h: Copied from Source/WebCore/dom/LoadableScript.h.

(isType):

  • dom/LoadableScript.h:

(WebCore::LoadableScript::isModuleScript):
(WebCore::LoadableScript::isModuleGraph): Deleted.

  • dom/PendingScript.cpp:

(WebCore::PendingScript::error):
(WebCore::PendingScript::wasErrored): Deleted.

  • dom/PendingScript.h:
  • dom/ScriptElement.cpp:

(WebCore::ScriptElement::ScriptElement):
(WebCore::ScriptElement::determineScriptType):
(WebCore::ScriptElement::prepareScript):
prepareScript is aligned to whatwg spec: the last sequence to setup flags has one-on-one correspondence to
the spec now. And prepareScript recognizes the type="module" case and call the requestModuleScript to setup
the CachedModuleScript.
(WebCore::ScriptElement::requestClassicScript):
(WebCore::ScriptElement::requestModuleScript):
We use the nonce and crossorigin attributes at the time of preparing the script tag. To do so, we store the
above values in CachedModuleScript.
Since inlined module scripts does not have "src" attribute, it is also affected by Content Security Policy's
inline script rules.
(WebCore::ScriptElement::requestScriptWithCacheForModuleScript):
The module loader will construct the fetching request by calling this function. This should be here since we
would like to set this Element to the initiator of the request. And nonce and crossorigin attributes of this
script tag will be used.
(WebCore::ScriptElement::requestScriptWithCache):
(WebCore::ScriptElement::executeScript):
(WebCore::ScriptElement::executeModuleScript):
The entry point to execute the module graph. Since the module graph is beyond the multiple CachedScript code,
we have the different entry point from ScriptElement::executeScript.
(WebCore::ScriptElement::executeScriptAndDispatchEvent):
(WebCore::ScriptElement::executeScriptForScriptRunner):

  • dom/ScriptElement.h:

(WebCore::ScriptElement::scriptType):

  • html/parser/CSSPreloadScanner.cpp:

(WebCore::CSSPreloadScanner::emitRule):

  • html/parser/HTMLPreloadScanner.cpp:

(WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest):
According to the spec, the module tag ignores the "charset" attribute as the same to the worker's
importScript. But WebKit supports the "charset" for importScript intentionally. So to be consistent,
even for the module tags, we handle the "charset" attribute. We explicitly note about it in the preloader.
(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):

  • html/parser/HTMLResourcePreloader.cpp:

(WebCore::PreloadRequest::resourceRequest):

  • html/parser/HTMLResourcePreloader.h:

(WebCore::PreloadRequest::PreloadRequest):

  • html/parser/HTMLScriptRunner.h:
  • loader/cache/CachedResourceRequest.cpp:

(WebCore::CachedResourceRequest::setAsPotentiallyCrossOrigin):

  • xml/parser/XMLDocumentParser.cpp:

(WebCore::XMLDocumentParser::notifyFinished):

LayoutTests:

  • TestExpectations:
  • http/tests/misc/module-absolute-url-expected.txt: Added.
  • http/tests/misc/module-absolute-url.html: Added.
  • http/tests/misc/module-script-async-expected.txt: Added.
  • http/tests/misc/module-script-async.html: Added.
  • http/tests/misc/resources/module-absolute-url.js: Added.
  • http/tests/misc/resources/module-absolute-url2.js: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-allowed-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-allowed.html: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-and-scripthash-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-and-scripthash.html: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-basic-blocked-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-basic-blocked.html: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-blocked-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-blocked.html: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-ignore-unsafeinline-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-ignore-unsafeinline.html: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-in-enforced-policy-and-not-in-report-only-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-in-enforced-policy-and-not-in-report-only.html: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-in-one-enforced-policy-neither-in-another-enforced-policy-nor-report-policy-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-in-one-enforced-policy-neither-in-another-enforced-policy-nor-report-policy.html: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-invalidnonce-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-invalidnonce.html: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-multiple-policies-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-multiple-policies.html: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-redirect-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-redirect-same-origin-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-redirect-same-origin.html: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-redirect.html: Added.
  • http/tests/security/contentSecurityPolicy/1.1/resources/module-scriptnonce-in-enforced-policy-and-not-in-report-only.php: Added.
  • http/tests/security/contentSecurityPolicy/1.1/resources/module-scriptnonce-in-one-enforced-policy-neither-in-another-enforced-policy-nor-report-policy.php: Added.
  • http/tests/security/contentSecurityPolicy/module-eval-blocked-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/module-eval-blocked-in-external-script-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/module-eval-blocked-in-external-script.html: Added.
  • http/tests/security/contentSecurityPolicy/module-eval-blocked.html: Added.
  • http/tests/security/contentSecurityPolicy/resources/echo-module-script-src.pl: Added.
  • http/tests/security/contentSecurityPolicy/resources/multiple-iframe-module-test.js: Added.

(testPreescapedPolicy):
(testExperimentalPolicy):
(test):
(iframe.onload):
(testImpl):
(finishTesting):

  • http/tests/security/module-correct-mime-types-expected.txt: Added.
  • http/tests/security/module-correct-mime-types.html: Added.
  • http/tests/security/module-crossorigin-error-event-information-expected.txt: Added.
  • http/tests/security/module-crossorigin-error-event-information.html: Added.
  • http/tests/security/module-crossorigin-loads-correctly-credentials-expected.txt: Added.
  • http/tests/security/module-crossorigin-loads-correctly-credentials.html: Added.
  • http/tests/security/module-crossorigin-loads-omit-expected.txt: Added.
  • http/tests/security/module-crossorigin-loads-omit.html: Added.
  • http/tests/security/module-crossorigin-loads-same-origin-expected.txt: Added.
  • http/tests/security/module-crossorigin-loads-same-origin.html: Added.
  • http/tests/security/module-crossorigin-onerror-information-expected.txt: Added.
  • http/tests/security/module-crossorigin-onerror-information.html: Added.
  • http/tests/security/module-incorrect-mime-types-expected.txt: Added.
  • http/tests/security/module-incorrect-mime-types.html: Added.
  • http/tests/security/module-no-mime-type-expected.txt: Added.
  • http/tests/security/module-no-mime-type.html: Added.
  • http/tests/security/resources/cors-script.php:
  • http/tests/security/resources/module-local-script.js: Added.
  • js/dom/modules/module-and-dom-content-loaded-expected.txt: Added.
  • js/dom/modules/module-and-dom-content-loaded.html: Added.
  • js/dom/modules/module-and-window-load-expected.txt: Added.
  • js/dom/modules/module-and-window-load.html: Added.
  • js/dom/modules/module-async-and-window-load-expected.txt: Added.
  • js/dom/modules/module-async-and-window-load.html: Added.
  • js/dom/modules/module-document-write-expected.txt: Added.
  • js/dom/modules/module-document-write-src-expected.txt: Added.
  • js/dom/modules/module-document-write-src.html: Added.
  • js/dom/modules/module-document-write.html: Added.
  • js/dom/modules/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror-expected.txt: Added.
  • js/dom/modules/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror.html: Added.
  • js/dom/modules/module-execution-error-should-be-propagated-to-onerror-expected.txt: Added.
  • js/dom/modules/module-execution-error-should-be-propagated-to-onerror.html: Added.
  • js/dom/modules/module-execution-order-inline-expected.txt: Added.
  • js/dom/modules/module-execution-order-inline.html: Added.
  • js/dom/modules/module-execution-order-mixed-expected.txt: Added.
  • js/dom/modules/module-execution-order-mixed-with-classic-scripts-expected.txt: Added.
  • js/dom/modules/module-execution-order-mixed-with-classic-scripts.html: Added.
  • js/dom/modules/module-execution-order-mixed.html: Added.
  • js/dom/modules/module-incorrect-relative-specifier-expected.txt: Added.
  • js/dom/modules/module-incorrect-relative-specifier.html: Added.
  • js/dom/modules/module-incorrect-tag-expected.txt: Added.
  • js/dom/modules/module-incorrect-tag.html: Added.
  • js/dom/modules/module-inline-current-script-expected.txt: Added.
  • js/dom/modules/module-inline-current-script.html: Added.
  • js/dom/modules/module-inline-dynamic-expected.txt: Added.
  • js/dom/modules/module-inline-dynamic.html: Added.
  • js/dom/modules/module-inline-simple-expected.txt: Added.
  • js/dom/modules/module-inline-simple.html: Added.
  • js/dom/modules/module-load-event-expected.txt: Added.
  • js/dom/modules/module-load-event-with-src-expected.txt: Added.
  • js/dom/modules/module-load-event-with-src.html: Added.
  • js/dom/modules/module-load-event.html: Added.
  • js/dom/modules/module-load-same-module-from-different-entry-point-dynamic-expected.txt: Added.
  • js/dom/modules/module-load-same-module-from-different-entry-point-dynamic.html: Added.
  • js/dom/modules/module-load-same-module-from-different-entry-point-expected.txt: Added.
  • js/dom/modules/module-load-same-module-from-different-entry-point.html: Added.
  • js/dom/modules/module-not-found-error-event-expected.txt: Added.
  • js/dom/modules/module-not-found-error-event-with-src-and-import-expected.txt: Added.
  • js/dom/modules/module-not-found-error-event-with-src-and-import.html: Added.
  • js/dom/modules/module-not-found-error-event-with-src-expected.txt: Added.
  • js/dom/modules/module-not-found-error-event-with-src.html: Added.
  • js/dom/modules/module-not-found-error-event.html: Added.
  • js/dom/modules/module-src-current-script-expected.txt: Added.
  • js/dom/modules/module-src-current-script.html: Added.
  • js/dom/modules/module-src-dynamic-expected.txt: Added.
  • js/dom/modules/module-src-dynamic.html: Added.
  • js/dom/modules/module-src-simple-expected.txt: Added.
  • js/dom/modules/module-src-simple.html: Added.
  • js/dom/modules/module-type-case-insensitive-expected.txt: Added.
  • js/dom/modules/module-type-case-insensitive.html: Added.
  • js/dom/modules/module-will-fire-beforeload-expected.txt: Added.
  • js/dom/modules/module-will-fire-beforeload.html: Added.
  • js/dom/modules/script-tests/module-document-write-src.js: Added.
  • js/dom/modules/script-tests/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror-throw.js: Added.
  • js/dom/modules/script-tests/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror.js: Added.
  • js/dom/modules/script-tests/module-execution-order-mixed-2.js: Added.
  • js/dom/modules/script-tests/module-execution-order-mixed-cappuccino.js: Added.
  • js/dom/modules/script-tests/module-execution-order-mixed-cocoa.js: Added.
  • js/dom/modules/script-tests/module-execution-order-mixed-matcha.js: Added.
  • js/dom/modules/script-tests/module-execution-order-mixed-with-classic-scripts-2.js: Added.
  • js/dom/modules/script-tests/module-execution-order-mixed-with-classic-scripts-cappuccino.js: Added.
  • js/dom/modules/script-tests/module-execution-order-mixed-with-classic-scripts-cocoa.js: Added.
  • js/dom/modules/script-tests/module-execution-order-mixed-with-classic-scripts-matcha.js: Added.
  • js/dom/modules/script-tests/module-execution-order-mixed-with-classic-scripts.js: Added.
  • js/dom/modules/script-tests/module-execution-order-mixed.js: Added.
  • js/dom/modules/script-tests/module-inline-dynamic.js: Added.

(export.default.Cocoa.prototype.taste):
(export.default.Cocoa):

  • js/dom/modules/script-tests/module-inline-simple.js: Added.

(export.default.Cocoa.prototype.taste):
(export.default.Cocoa):

  • js/dom/modules/script-tests/module-load-event-with-src.js: Added.
  • js/dom/modules/script-tests/module-load-same-module-from-different-entry-point.js: Added.
  • js/dom/modules/script-tests/module-not-found-error-event-with-src-and-import.js: Added.
  • js/dom/modules/script-tests/module-src-current-script.js: Added.
  • js/dom/modules/script-tests/module-src-dynamic-cocoa.js: Added.

(Cocoa.prototype.taste):
(Cocoa):

  • js/dom/modules/script-tests/module-src-dynamic.js: Added.
  • js/dom/modules/script-tests/module-src-simple-cocoa.js: Added.

(Cocoa.prototype.taste):
(Cocoa):

  • js/dom/modules/script-tests/module-src-simple.js: Added.
  • js/dom/modules/script-tests/module-will-fire-beforeload.js: Added.
1:08 AM Changeset in webkit [208787] by pvollan@apple.com
  • 2 edits in trunk/Tools

[Win] WebCore test is failing.
https://bugs.webkit.org/show_bug.cgi?id=164772

Reviewed by Brent Fulgham.

The value of CGRectInfinite is not the same on Windows as on Mac.

  • TestWebKitAPI/Tests/WebCore/FloatRect.cpp:

(TestWebKitAPI::TEST):

Note: See TracTimeline for information about the timeline view.