Timeline



Nov 12, 2016:

11:43 PM Changeset in webkit [208667] by mitz@apple.com
  • 2 edits in trunk/Source/WebCore

Tried to fix the iOS build after r208666.

  • platform/SuddenTermination.h:
11:19 PM Changeset in webkit [208666] by Simon Fraser
  • 26 edits
    2 adds in trunk

Add a way to get the UI-side scrolling tree as text via UIScriptController
https://bugs.webkit.org/show_bug.cgi?id=164697

Reviewed by Zalan Bujtas.

Source/WebCore:

Add dumping to ScrollingTreeNode and subclasses (previously, we could only dump
the scrolling state tree). This re-uses the flags used for state tree dumping.

NodeIDs are not dumped by default because they can depend on earlier tests.

Test: scrollingcoordinator/ios/ui-scrolling-tree.html

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

(WebCore::ScrollingTree::scrollingTreeAsText):

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

(WebCore::ScrollingTreeFrameScrollingNode::dumpProperties):

  • page/scrolling/ScrollingTreeFrameScrollingNode.h:
  • page/scrolling/ScrollingTreeNode.cpp:

(WebCore::ScrollingTreeNode::dumpProperties):
(WebCore::ScrollingTreeNode::dump):

  • page/scrolling/ScrollingTreeNode.h:
  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::dumpProperties):

  • page/scrolling/ScrollingTreeScrollingNode.h:
  • page/scrolling/mac/ScrollingTreeFixedNode.h:
  • page/scrolling/mac/ScrollingTreeFixedNode.mm:

(WebCore::ScrollingTreeFixedNode::dumpProperties):

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

(WebCore::ScrollingTreeStickyNode::dumpProperties):

Source/WebKit2:

Add a property to WKWebView to retrieve the scrolling tree as text, for testing.
Expose it via the RemoteScrollingCoordinatorProxy.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _scrollingTreeAsText]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:

(WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeAsText):

  • UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:

Tools:

Add UIScriptController::scrollingTreeAsText(), which gets the state of the scrolling
tree in the UI process, including the current positions of CALayers. This will be used
to test UI-side scrolling and visual viewports.

  • DumpRenderTree/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::scrollingTreeAsText):

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

(WTR::UIScriptController::scrollingTreeAsText):

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

(WTR::UIScriptController::scrollingTreeAsText):

LayoutTests:

Add a test that dumps the scrolling state tree with a fixed element.

  • scrollingcoordinator/ios/ui-scrolling-tree-expected.txt: Added.
  • scrollingcoordinator/ios/ui-scrolling-tree.html: Added.
9:50 PM Changeset in webkit [208665] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

Incorrect release log message emitted when waiting/not waiting for the WebProcess continue a load
https://bugs.webkit.org/show_bug.cgi?id=164605

Patch by Daniel Bates <dabates@apple.com> on 2016-11-12
Reviewed by Darin Adler.

Currently we emit a release log message of the form "didReceiveResponse: Should wait for
message from WebContent process ..." when we are not waiting for the WebProcess and emit
a message of the form "didReceiveResponse: Should not wait for message from WebContent
process" when we are waiting on the WebProcess. Invert these messages to reflect whether
we are waiting for the WebProcess to send message NetworkResourceLoader::ContinueDidReceiveResponsewhether.

For the main resource NetworkResourceLoader::didReceiveResponse() returns ShouldContinueDidReceiveResponse::No
because we are waiting for the WebProcess to send message NetworkResourceLoader::ContinueDidReceiveResponse
to continue the load. For a subresource we do not need to wait for the WebProcess to allow the load to continue
and hence NetworkResourceLoader::didReceiveResponse() returns ShouldContinueDidReceiveResponse::Yes.

  • NetworkProcess/NetworkResourceLoader.cpp:
9:38 PM Changeset in webkit [208664] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebInspectorUI

Web Inspector: Type Profiler and Code Coverage Profiler should work in Workers
https://bugs.webkit.org/show_bug.cgi?id=164682

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-11-12
Reviewed by Darin Adler.

  • UserInterface/Controllers/BasicBlockAnnotator.js:
  • UserInterface/Models/ScriptSyntaxTree.js:

(WebInspector.ScriptSyntaxTree.prototype.updateTypes):
Use the target associated with the Script.

  • UserInterface/Protocol/Target.js:

(WebInspector.WorkerTarget.prototype.initialize):
When initializing a Worker Target, match the existing state
of the Page for these profilers.

  • UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
  • UserInterface/Views/SourceCodeTextEditor.js:

(WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedJavaScriptTypeInformation):
(WebInspector.SourceCodeTextEditor.prototype.willDismissPopover):
Use the correct target for this Script / Resource.

(WebInspector.SourceCodeTextEditor.prototype._setTypeTokenAnnotatorEnabledState):
(WebInspector.SourceCodeTextEditor.prototype.set _basicBlockAnnotatorEnabled):
Enable / disable for all targets when toggling profilers.

8:52 PM Changeset in webkit [208663] by Darin Adler
  • 9 edits in trunk/Source/WebCore

Remove some use of ExceptionCode in MediaStream
https://bugs.webkit.org/show_bug.cgi?id=164690

Reviewed by Sam Weinig.

  • Modules/mediastream/MediaDevices.cpp:

(WebCore::MediaDevices::MediaDevices): Take a Document&.
(WebCore::MediaDevices::create): Ditto.
(WebCore::MediaDevices::~MediaDevices): Deleted.
(WebCore::MediaDevices::getUserMedia): Check document for null and
pass a reference to UserMediaRequest::start. Removed unused ExceptionCode
argument to UserMediaRequest::start, since the only exception was for
a null document.
(WebCore::MediaDevices::enumerateDevices): Check document for null and
pass a reference to MediaDevicesRequest::create. Removed exception
handling entirely because MediaDevicesRequest::create was not ever
raising an exception before.

  • Modules/mediastream/MediaDevices.h: Updated for above changes.
  • Modules/mediastream/MediaDevices.idl: Removed MayThrowException from

enumerateDevices, because it never throws an exception.

  • Modules/mediastream/MediaDevicesRequest.cpp:

(WebCore::MediaDevicesRequest::MediaDevicesRequest): Take a Document&.
Removed unused ExceptionCode& argument.
(WebCore::MediaDevicesRequest::create): Ditto.

  • Modules/mediastream/MediaDevicesRequest.h: Updated for above changes.
  • Modules/mediastream/NavigatorMediaDevices.cpp:

(WebCore::NavigatorMediaDevices::mediaDevices): Pass a reference.

  • Modules/mediastream/UserMediaRequest.cpp:

(WebCore::UserMediaRequest::start): Use ExceptionOr.
(WebCore::UserMediaRequest::UserMediaRequest): Take a Document& and
a UserMediaController&.

  • Modules/mediastream/UserMediaRequest.h: Updated for above changes.
7:24 PM Changeset in webkit [208662] by Simon Fraser
  • 15 edits
    3 adds in trunk

[iOS WK2] Share some code with Mac for post-async-scroll state reconciliation
https://bugs.webkit.org/show_bug.cgi?id=164694

Reviewed by Zalan Bujtas.

Source/WebCore:

When an async scroll notifications get back to the main thread in
AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll(), we call
syncViewportConstrainedLayerPositions() to poke the new layer positions on the
GraphicsLayers to match the changes made on the scrolling thread.

However, this was not done on iOS, which will be problematic for a future patch
where we require GraphicsLayer positions and the current fixedPositionViewport rect
to have been computed when in a consistent state.

Fix by factoring some code into reconcileScrollingState(), which is called on iOS/WK2
from WebPage::updateVisibleContentRects() rather than setting the FrameView's scroll offset
directly.

Test: scrollingcoordinator/ios/sync-layer-positions-after-scroll.html

  • page/WheelEventDeltaFilter.cpp:

(WebCore::WheelEventDeltaFilter::filteredDelta):

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
(WebCore::AsyncScrollingCoordinator::reconcileScrollingState):
(WebCore::AsyncScrollingCoordinator::syncViewportConstrainedLayerPositions):
(WebCore::AsyncScrollingCoordinator::syncChildPositions): Deleted.

  • page/scrolling/AsyncScrollingCoordinator.h:
  • page/scrolling/ScrollingCoordinator.h:

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

  • page/scrolling/ScrollingTreeFrameScrollingNode.cpp:

(WebCore::ScrollingTreeFrameScrollingNode::layoutViewportForScrollPosition):

  • platform/Logging.h:
  • platform/ScrollView.cpp:

(WebCore::ScrollView::setScrollOffset):

  • platform/graphics/ca/TileController.cpp:

(WebCore::TileController::adjustTileCoverageRect):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::updateLayerPositionsAfterDocumentScroll):

Source/WebKit2:

Rather than calling FrameView directly, call reconcileScrollingState() on the scrolling
coordinator.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::updateVisibleContentRects):

LayoutTests:

Test that pans the page, and dumps GraphicsLayers before letting go.

  • TestExpectations:
  • platform/ios-simulator-wk2/TestExpectations:
  • scrollingcoordinator/ios/sync-layer-positions-after-scroll-expected.txt: Added.
  • scrollingcoordinator/ios/sync-layer-positions-after-scroll.html: Added.
7:08 PM Changeset in webkit [208661] by Alan Bujtas
  • 6 edits in trunk/Source/WebCore

RenderObject::flowThreadState should follow containing block instead of parent.
https://bugs.webkit.org/show_bug.cgi?id=164629

Reviewed by Simon Fraser.

Currently every descendant of a region/multicolumn container is considered to be part of the
flowthread including out-of-flow renderers. They all have the InsideFlowThread flag set.
However since out-of-flow renderers are not really part of the flowthread layout context,
whenever the layout code actually checks for their flowthread containers, we return nullptr and
try to handle this seemingly defective state gracefully (that is, flag indicates "inside the flow thread" state,
but there's no flow tread container).

This patch fixes this confused state by setting the RenderObject::flowThreadState flag based on
the containing block's state instead of the parent's.

Not testable, since we seem to manage out-of-flow elements just fine even
when they have the InsideFlowThread flag set.

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::styleDidChange):

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::setStyle):
(WebCore::RenderElement::adjustFlowThreadStateIncludingDescendants): This is an iterative DFS pre-order traversal so
we set the flow state first on containers.

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

(WebCore::RenderObject::computedFlowThreadState):
(WebCore::RenderObject::initializeFlowThreadStateOnInsertion):

  • rendering/RenderObject.h:
6:43 PM Changeset in webkit [208660] by rniwa@webkit.org
  • 5 edits in trunk

document.currentScript should be null when running a script inside a shadow tree
https://bugs.webkit.org/show_bug.cgi?id=164693

Reviewed by Yusuke Suzuki.

LayoutTests/imported/w3c:

Rebaselined the imported test now that there are no errors.

  • web-platform-tests/shadow-dom/Document-prototype-currentScript-expected.txt:

Source/WebCore:

Fixed the bug that we were returning the old or outer script element in document.currentScript
while executing a script element inside a shadow tree. Return null instead.

New behavior matches the latest HTML5 specification:
https://html.spec.whatwg.org/multipage/scripting.html#execute-the-script-block
where it says for the classic script type, "if the script element's root is not a shadow root, then set
the script element's node document's currentScript attribute to the script element. Otherwise, set it to null."

No new tests. imported/w3c/web-platform-tests/shadow-dom/Document-prototype-currentScript.html covers it.

  • dom/CurrentScriptIncrementer.h:

(WebCore::CurrentScriptIncrementer::CurrentScriptIncrementer): Push nullptr when the script element
is inside a shadow tree.
(WebCore::CurrentScriptIncrementer::~CurrentScriptIncrementer): Changed to use an early exit.

  • dom/Document.cpp:

(WebCore::Document::pushCurrentScript): Removed the assertion since the argument can now be nullptr.

2:31 PM Changeset in webkit [208659] by Darin Adler
  • 23 edits in trunk/Source

Remove a few assorted uses of ExceptionCode
https://bugs.webkit.org/show_bug.cgi?id=164683

Reviewed by Chris Dumez.

Source/WebCore:

  • Modules/applepay/PaymentContact.h: Removed include of ExceptionCode.h.

Also tidied up the constructor and destructor.

  • Modules/indexeddb/IDBFactory.h: Removed typedef of ExceptionCode.
  • Modules/indexeddb/IDBKeyRange.h: Ditto.
  • bindings/js/JSWebGLRenderingContextBaseCustom.cpp:

(WebCore::getObjectParameter): Removed local ExceptionCode variable that
was always 0.
(WebCore::JSWebGLRenderingContextBase::getAttachedShaders): Ditto.
(WebCore::dataFunctionf): Ditto.
(WebCore::dataFunctioni): Ditto.
(WebCore::dataFunctionMatrix): Ditto.

  • dom/ContainerNode.cpp:

(WebCore::ContainerNode::cloneChildNodes): Ditto.

  • dom/Document.h: Removed typedef of ExceptionCode.
  • dom/TreeWalker.h: Ditto.
  • editing/markup.h: Ditto.
  • html/ImageData.h: Ditto.
  • html/InputType.h: Ditto.
  • html/canvas/CanvasRenderingContext2D.h: Ditto.
  • html/canvas/WebGLDebugShaders.h: Ditto.
  • page/DOMWindow.cpp:

(WebCore::DOMWindow::setTimeout): Fixed typo where this was using
ExceptionCode instead of Exception. The code would return an integer
instead of an exception in this case. I could not produce a test that
exercises this code path; I suspect it is an unreachable error condition.
(WebCore::DOMWindow::setInterval): Ditto.

  • replay/MemoizedDOMResult.h: Changed typedef of ExceptionCode into

a using statement. Not sure what the longer term fix is.

  • xml/parser/XMLDocumentParserLibxml2.cpp:

(WebCore::PendingCallbacks::appendStartElementNSCallback): Renamed to use
WebKit-style "numXXX" rather than "nb_xxx".
(WebCore::PendingCallbacks::PendingStartElementNSCallback::~PendingStartElementNSCallback):
Ditto.
(WebCore::handleNamespaceAttributes): Ditto. Replaced ExceptionCode out
argument with a boolean return value.
(WebCore::handleElementAttributes): Ditto.
(WebCore::XMLDocumentParser::startElementNs): Ditto. Updated for changes
to the handle functions above.
(WebCore::startElementNsHandler): More of the same.
(WebCore::attributesStartElementNsHandler): Ditto.

Source/WebKit/mac:

  • DOM/DOMDOMImplementation.mm:

(-[DOMImplementation createDocumentType:publicId:systemId:]):
Use raiseOnDOMError instead of much longer hand written equivalent.
(-[DOMImplementation createDocument:qualifiedName:doctype:]): Ditto.

  • DOM/DOMDocument.mm:

(-[DOMDocument createEntityReference:]): Use raiseNotSupportedErrorException
so we are not using a specific exception code.

  • DOM/DOMHTMLOptionsCollection.mm:

(-[DOMHTMLOptionsCollection add:index:]): Use raiseOnDOMError instead of
much longer hand written equivalent.

  • DOM/DOMHTMLSelectElement.mm:

(-[DOMHTMLSelectElement add:before:]): Ditto. Also removed unneeded return
statement after calling a "no return" function.

  • DOM/ExceptionHandlers.h: Removed overloads of raiseDOMException and

raiseOnDOMError functions that take ExceptionCode; keep the ones that take
Exception and ExceptionOr. Renamed the other overload of raiseDOMException
to raiseDOMErrorException; it is only used as the non-inline implementation
part of the inline raiseOnDOMError function.

  • DOM/ExceptionHandlers.mm:

(raiseDOMErrorException): Renamed. Made the ExceptionCode overload be local
to this source file instead of in the header.
(raiseTypeErrorException): Updated for name change.
(raiseNotSupportedErrorException): Added.

2:30 PM Changeset in webkit [208658] by Darin Adler
  • 101 edits in trunk/Source/WebCore

Remove LegacyException support from bindings script
https://bugs.webkit.org/show_bug.cgi?id=164516

Reviewed by Youenn Fablet.

Besides removing LegacyException support from the bindings script, this patch
also removes most uses of ExceptionCodePlaceholder.h. Also, some call sites of
createElement were using ASSERT_NO_EXCEPTION on an argument that was not even an
ExceptionCode&, so to fix that, this changes most call sites to use specific create
functions for specific element classes, rather than using Document::createElement.

  • Modules/mediasource/SourceBuffer.cpp: Removed include of

ExceptionCodePlaceholder.h.

  • Modules/mediastream/MediaStreamTrack.cpp: Ditto.
  • Modules/websockets/WebSocketChannel.cpp: Ditto.
  • bindings/js/JSBlobCustom.cpp: Ditto.
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation): Removed support for GetterMayThrowLegacyException,
SetterMayThrowLegacyException, and MayThrowLegacyException.
(GenerateParametersCheck): Ditto.
(GenerateImplementationFunctionCall): Ditto.
(GenerateConstructorDefinition): Ditto.

  • bindings/scripts/IDLAttributes.txt: Removed ConstructorMayThrowLegacyException,

GetterMayThrowLegacyException, MayThrowLegacyException, and SetterMayThrowLegacyException.

  • bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
  • bindings/scripts/test/JS/JSTestDOMJIT.cpp:
  • bindings/scripts/test/JS/JSTestEventTarget.cpp:
  • bindings/scripts/test/JS/JSTestInterface.cpp:
  • bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
  • bindings/scripts/test/JS/JSTestNondeterministic.cpp:
  • bindings/scripts/test/JS/JSTestObj.cpp:
  • bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
  • bindings/scripts/test/JS/JSTestTypedefs.cpp:

Updated exepected results.

  • bindings/scripts/test/TestImplements.idl: Use non-legacy exceptions.
  • bindings/scripts/test/TestInterface.idl: Ditto.
  • bindings/scripts/test/TestNamedConstructor.idl: Ditto.
  • bindings/scripts/test/TestObj.idl: Ditto.
  • bindings/scripts/test/TestSupplemental.idl: Ditto.
  • bindings/scripts/test/TestTypedefs.idl: Ditto.
  • dom/ContainerNode.h: Removed include of ExceptionCodePlaceholder.h.
  • editing/AlternativeTextController.cpp: Ditto.
  • editing/AppendNodeCommand.cpp: Ditto.
  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::moveParagraphs): Use specific create function
instead of Document::createElement.

  • editing/DeleteFromTextNodeCommand.cpp: Removed include of

ExceptionCodePlaceholder.h.

  • editing/Editor.cpp: Ditto.
  • editing/EditorCommand.cpp: Ditto.
  • editing/FormatBlockCommand.cpp: Ditto.
  • editing/IndentOutdentCommand.cpp:

(WebCore::IndentOutdentCommand::tryIndentingAsListItem): Use specific create
function instead of Document::createElement.

  • editing/InsertListCommand.cpp: Removed include of ExceptionCodePlaceholder.h.
  • editing/InsertNodeBeforeCommand.cpp: Ditto.
  • editing/RemoveNodeCommand.cpp: Ditto.
  • editing/ReplaceSelectionCommand.cpp: Ditto.
  • editing/TextIterator.cpp: Ditto.
  • editing/WrapContentsInDummySpanCommand.cpp: Ditto.
  • editing/cocoa/EditorCocoa.mm:

(WebCore::Editor::styleForSelectionStart): Use specific create function instead
of Document::createElement.

  • editing/htmlediting.cpp:

(WebCore::createTabSpanElement): Ditto.

  • editing/ios/EditorIOS.mm:

(WebCore::Editor::WebContentReader::readURL): Ditto.

  • editing/mac/EditorMac.mm:

(WebCore::Editor::WebContentReader::readURL): Ditto.

  • editing/markup.cpp: Removed include of ExceptionCodePlaceholder.h.
  • html/FTPDirectoryDocument.cpp:

(WebCore::FTPDirectoryDocumentParser::appendEntry): Use specific create function
instead of Document::createElement.
(WebCore::FTPDirectoryDocumentParser::createTDForFilename): Ditto.
(WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate): Ditto.
(WebCore::FTPDirectoryDocumentParser::createBasicDocument): Ditto.

  • html/HTMLEmbedElement.cpp:

(WebCore::HTMLEmbedElement::create): Added overload that just takes a Document.

  • html/HTMLEmbedElement.h: Updated for above.
  • html/HTMLMediaElement.cpp: Removed include of ExceptionCodePlaceholder.h.
  • html/HTMLMetaElement.cpp:

(WebCore::HTMLMetaElement::create): Added overload that just takes a Document.

  • html/HTMLMetaElement.h: Updated for above.
  • html/HTMLOutputElement.cpp: Removed include of ExceptionCodePlaceholder.h.
  • html/HTMLSelectElement.cpp: Ditto.

(WebCore::HTMLSelectElement::setLength): Use specific create function
instead of Document::createElement.

  • html/HTMLSourceElement.cpp:

(WebCore::HTMLSourceElement::create): Added overload that just takes a Document.

  • html/HTMLSourceElement.h: Updated for above.
  • html/HTMLStyleElement.cpp:

(WebCore::HTMLStyleElement::HTMLStyleElement): Moved data member initialization
to class definition.
(WebCore::HTMLStyleElement::create): Added overload that just takes a Document.

  • html/HTMLStyleElement.h: Updated for above. Also made finishParsingChildren public.
  • html/HTMLTableElement.cpp: Removed include of ExceptionCodePlaceholder.h.
  • html/HTMLTextAreaElement.cpp: Ditto.
  • html/HTMLVideoElement.cpp:

(WebCore::HTMLVideoElement::create): Added overload that just takes a Document.

  • html/HTMLVideoElement.h: Updated for above.
  • html/ImageDocument.cpp:

(WebCore::ImageDocument::createDocumentStructure): Use specific create function
instead of Document::createElement.

  • html/InputType.cpp: Removed include of ExceptionCodePlaceholder.h.
  • html/MediaDocument.cpp:

(WebCore::MediaDocumentParser::createDocumentStructure): Use specific create
function instead of Document::createElement.
(WebCore::MediaDocument::replaceMediaElementTimerFired): Ditto.

  • html/PluginDocument.cpp:

(WebCore::PluginDocumentParser::createDocumentStructure): Ditto.

  • html/RangeInputType.cpp: Removed include of ExceptionCodePlaceholder.h.
  • html/RubyElement.cpp:

(WebCore::RubyElement::create): Added overload that just takes a Document.

  • html/RubyElement.h: Updated for above.
  • html/RubyTextElement.cpp:

(WebCore::RubyTextElement::create): Added overload that just takes a Document.

  • html/RubyTextElement.h: Updated for above.
  • html/ValidationMessage.cpp: Removed include of ExceptionCodePlaceholder.h.
  • html/canvas/CanvasRenderingContext2D.cpp: Ditto.
  • html/shadow/MediaControlElementTypes.cpp: Ditto.
  • html/shadow/MediaControlElements.cpp:

(WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu):
Use specific create function instead of Document::createElement.

  • html/shadow/MediaControls.cpp: Removed include of ExceptionCodePlaceholder.h.
  • html/shadow/MediaControlsApple.cpp: Ditto.
  • html/track/InbandDataTextTrack.cpp: Ditto.
  • html/track/InbandGenericTextTrack.cpp: Ditto.
  • html/track/InbandTextTrack.cpp: Ditto.
  • html/track/VTTRegion.cpp: Ditto.
  • html/track/WebVTTElement.cpp:

(WebCore::WebVTTElement::createEquivalentHTMLElement): Use specific create
function instead of Document::createElement.

  • inspector/InspectorCSSAgent.cpp:

(WebCore::InspectorCSSAgent::createInspectorStyleSheetForDocument): Ditto.

  • page/ContextMenuController.cpp: Removed include of ExceptionCodePlaceholder.h.
  • page/DOMWindow.cpp: Ditto.
  • page/DragController.cpp: Ditto.
  • page/EventHandler.cpp: Ditto.
  • page/Page.cpp: Ditto.
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: Ditto.
  • platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm: Ditto.
  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: Ditto.
  • platform/mac/PasteboardMac.mm: Ditto.
  • platform/mac/WebVideoFullscreenHUDWindowController.mm: Ditto.
  • platform/mock/mediasource/MockMediaPlayerMediaSource.cpp: Ditto.
  • platform/mock/mediasource/MockMediaSourcePrivate.cpp: Ditto.
  • rendering/RenderNamedFlowThread.cpp: Ditto.
  • rendering/RenderThemeEfl.cpp: Ditto.
  • rendering/RenderThemeMac.mm: Ditto.
  • rendering/style/SVGRenderStyle.h: Ditto.
  • svg/SVGTRefElement.cpp: Ditto.
  • xml/XMLErrors.cpp:

(WebCore::XMLErrors::XMLErrors): Take a reference and initialize data member
in class definition.
(WebCore::createXHTMLParserErrorHeader): Take a reference, and mostly use
specific create functions instead of createElement.
(WebCore::XMLErrors::insertErrorMessageBlock): Ditto.

  • xml/XMLErrors.h: Updated for above.
  • xml/XMLTreeViewer.cpp: Removed include of ExceptionCodePlaceholder.h.
  • xml/parser/XMLDocumentParser.cpp:

(WebCore::XMLDocumentParser::handleError): Pass a reference.

  • xml/parser/XMLDocumentParserLibxml2.cpp: Removed include of

ExceptionCodePlaceholder.h.

2:24 PM Changeset in webkit [208657] by BJ Burg
  • 4 edits in trunk/Source/WebKit2

Web Automation: terminate the automation session if the web process crashes
https://bugs.webkit.org/show_bug.cgi?id=164671
<rdar://problem/29028964>

Reviewed by Joseph Pecoraro.

  • UIProcess/Automation/WebAutomationSession.h:
  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::disconnect):
(WebKit::WebAutomationSession::terminate):
Factor out code that disconnects the remote, unpairs, and notifies the client.
Then, expose terminate() which can be called without a FrontendChannel.
Calling this causes the _WKAutomationDelegate to clear the local-side session in the
browser, and disconnecting from the remote will hang up the remote-side session.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::processDidCrash):
Terminate the session.

1:34 PM Changeset in webkit [208656] by mitz@apple.com
  • 3 edits in trunk/Source/WebCore

Clean up a couple of macOS *SPI headers
https://bugs.webkit.org/show_bug.cgi?id=164687

Reviewed by Sam Weinig.

  • platform/spi/cocoa/NSTouchBarSPI.h: Replaced hardcoded strings with global declarations.
  • platform/spi/mac/NSSpellCheckerSPI.h: Addressed FIXME by importing private header, and removed declarations that already appear in the SDK.
12:50 PM Changeset in webkit [208655] by Wenson Hsieh
  • 5 edits
    1 add in trunk

The main content heuristic should be robust when handling large media elements
https://bugs.webkit.org/show_bug.cgi?id=164676
<rdar://problem/29211503>

Reviewed by Eric Carlson.

Source/WebCore:

Handles integer overflow gracefully when performing the main content check for very large media elements. If the
heuristic comes across such an element, it will now bail early and reject the video as main content. Also adds a
new API test: VideoControlsManager.VideoControlsManagerPageWithEnormousVideo.

  • html/MediaElementSession.cpp:

(WebCore::isElementRectMostlyInMainFrame):

Tools:

Added a new test verifying that enormous video elements are handled gracefully when put through the main
content heuristic.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/VideoControlsManager.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit2Cocoa/enormous-video-with-sound.html: Added.
11:30 AM Changeset in webkit [208654] by Michael Catanzaro
  • 2 edits in trunk

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

Did not disable anything, just made them public

Reverted changeset:

"[GTK][GStreamer] Disable MEDIA_SOURCE and ENCRYPTED_MEDIA_V2 by default"
https://bugs.webkit.org/show_bug.cgi?id=162623
http://trac.webkit.org/changeset/207872

9:54 AM Changeset in webkit [208653] by Chris Dumez
  • 6 edits in trunk/Source/WebCore

Speed up setting attributes of input elements of type 'text'
https://bugs.webkit.org/show_bug.cgi?id=164674

Reviewed by Ryosuke Niwa.

Speed up setting attributes of input elements of type 'text' by calling
updateInnerTextValue() only when needed. It was previously called
whenever an attribute was set, no matter it could impact its text value
or not.

No new tests, no Web-exposed behavior change.

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::parseAttribute):

  • html/InputType.cpp:

(WebCore::InputType::attributeChanged):

  • html/InputType.h:
  • html/TextFieldInputType.cpp:

(WebCore::TextFieldInputType::attributeChanged):

  • html/TextFieldInputType.h:
9:43 AM Changeset in webkit [208652] by mitz@apple.com
  • 2 edits in trunk/Source/WebCore

Tried to fix the 32-bit build.

  • platform/mac/WebPlaybackControlsManager.mm:
9:40 AM Changeset in webkit [208651] by mitz@apple.com
  • 2 edits in trunk/Source/WebCore

Tried to fix the 32-bit build.

  • platform/mac/WebPlaybackControlsManager.h:
9:33 AM Changeset in webkit [208650] by mitz@apple.com
  • 3 edits in trunk/Source/WebCore

Tried to fix the build

  • platform/mac/WebPlaybackControlsManager.h: Declared conformance to AVFunctionBarPlaybackControlsControlling, which is expected in WebKit::WebViewImpl. Added ivar.
  • platform/mac/WebPlaybackControlsManager.mm: Synthesize seekToTime property needed for AVFunctionBarPlaybackControlsControlling conformance.

(-[WebPlaybackControlsManager isSeeking]): Implement this

AVFunctionBarPlaybackControlsControlling method.

(-[WebPlaybackControlsManager seekToTime:toleranceBefore:toleranceAfter:]): Ditto.

9:13 AM Changeset in webkit [208649] by mitz@apple.com
  • 2 edits in trunk/Source/WebCore

Tried to fix the build

  • platform/spi/cocoa/NSTouchBarSPI.h: Removed duplicate @interface declarations.
6:50 AM Changeset in webkit [208648] by commit-queue@webkit.org
  • 11 edits
    2 adds in trunk

Ensure MathML render tree are clean by the end of FrameView::layout().
https://bugs.webkit.org/show_bug.cgi?id=162824

Patch by Frederic Wang <fwang@igalia.com> on 2016-11-12
Reviewed by Darin Adler.

Source/WebCore:

clearNeedsLayout is not called during the layout of invalid MathML markup. We introduce a new
helper function to perform proper layout of such markup and we now call it from the various
MathML layoutBlock functions. Additionally, we ensure that the preferred width is dirty after
computation in RenderMathMLScripts::computePreferredLogicalWidths.

Test: mathml/invalid-markup.html

  • rendering/mathml/RenderMathMLBlock.cpp:

(WebCore::RenderMathMLBlock::layoutInvalidMarkup): Helper function to layout invalid markup.

  • rendering/mathml/RenderMathMLBlock.h: Declare layoutInvalidMarkup.
  • rendering/mathml/RenderMathMLFraction.cpp:

(WebCore::RenderMathMLFraction::layoutBlock): Call layoutInvalidMarkup.

  • rendering/mathml/RenderMathMLRoot.cpp:

(WebCore::RenderMathMLRoot::layoutBlock): Ditto.

  • rendering/mathml/RenderMathMLScripts.cpp:

(WebCore::RenderMathMLScripts::computePreferredLogicalWidths): Set the preferred width dirty
after computation to avoid that it is computed again and again.
(WebCore::RenderMathMLScripts::layoutBlock): Call layoutInvalidMarkup.

  • rendering/mathml/RenderMathMLUnderOver.cpp:

(WebCore::RenderMathMLUnderOver::layoutBlock): Ditto.

LayoutTests:

  • mathml/invalid-markup-expected.txt: Added.
  • mathml/invalid-markup.html: Added.
  • mathml/mn-as-list-item-assert-expected.txt: Update text expectation now that invalid

subtree appears in the output.

  • mathml/msubsup-fuzz-expected.txt: Ditto.
  • accessibility/mac/mathml-multiscript.txt: Ditto.
4:41 AM Changeset in webkit [208647] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Remove RenderMathMLOperator::shouldAllowStretching
https://bugs.webkit.org/show_bug.cgi?id=164313

Patch by Frederic Wang <fwang@igalia.com> on 2016-11-12
Reviewed by Darin Adler.

RenderMathMLOperator::shouldAllowStretching is an old function from early implementations of
MathML. Its name is now confusing since it also includes non-stretchy large operators.
Moreover, it is not really useful and is actually only used by two functions: useMathOperator
and updateMathOperator. The former is almost equivalent and is used as a replacement of
shouldAllowStretching everywhere else. We rewrite the two remaining calls with the finer
test functions isStretchy() and isLargeOperatorInDisplayStyle().

No new tests, behavior unchanged.

  • rendering/mathml/RenderMathMLOperator.cpp:

(WebCore::RenderMathMLOperator::updateMathOperator): Reorder the conditionals to avoid the
use of RenderMathMLOperator::shouldAllowStretching and match useMathOperator.
(WebCore::RenderMathMLOperator::useMathOperator): Rewrite shouldAllowStretching() using
isStretchy() and isLargeOperatorInDisplayStyle().
(WebCore::RenderMathMLOperator::shouldAllowStretching): Deleted.

  • rendering/mathml/RenderMathMLOperator.h: Remove declaration of shouldAllowStretching.
12:57 AM Changeset in webkit [208646] by commit-queue@webkit.org
  • 465 edits in trunk/Source/WebCore

Use #pragma once in WebCore
https://bugs.webkit.org/show_bug.cgi?id=164373

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-11-12
Reviewed by Darin Adler.

  • Modules/*.h:
  • crypto/*.h:
  • cssjit/*.h:
  • editing/*.h:
  • fileapi/*.h:
  • history/*.h:
  • loader/*.h:
  • mathml/*.h:
  • page/*.h:
  • replay/*.h:
  • storage/*.h:
  • xml/*.h:
  • editing/FrameSelection.cpp:
  • loader/ResourceLoadStatisticsStore.cpp:

Remove unused LOG and DEBUG defines.

12:43 AM Changeset in webkit [208645] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

Follow-up: fix the OpenSource build on Mac after r208642
https://bugs.webkit.org/show_bug.cgi?id=164677

Reviewed by Ryosuke Niwa.

The playbackControlsController property should also be assign.

  • platform/spi/cocoa/AVKitSPI.h:
12:23 AM Changeset in webkit [208644] by mitz@apple.com
  • 3 edits in trunk/Tools

run-safari does not work for open source contributors
https://bugs.webkit.org/show_bug.cgi?id=164667
<rdar://problem/29229894>

Reviewed by Joseph Pecoraro.

  • Scripts/run-api-tests:

(archCommandLineArgumentsForRestrictedEnvironmentVariables): Moved from here…

  • Scripts/webkitdirs.pm:

(archCommandLineArgumentsForRestrictedEnvironmentVariables): …to here
(runMacWebKitApp): Have arch(1) carry the DYLD_* variables we set in our environmet over

to the environment of the app being run.

12:16 AM Changeset in webkit [208643] by Joseph Pecoraro
  • 2 edits in trunk/Source/JavaScriptCore

Follow-up fix to r208639.

Unreviewed fix. This is a straightfoward change where I forgot to
switch from uncheckedArgument() to argument() in once case after
dropping an argumentCount check. All other cases do this properly.
This addresses an ASSERT seen on the bots running tests.

  • runtime/JSDataViewPrototype.cpp:

(JSC::setData):

Nov 11, 2016:

10:31 PM Changeset in webkit [208642] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

SPI imports in AVKitSPI.h should be guarded by USE(APPLE_INTERNAL_SDK)
https://bugs.webkit.org/show_bug.cgi?id=164672

Reviewed by Dan Bernstein.

Fixes the OpenSource build when ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER) is on.

  • platform/spi/cocoa/AVKitSPI.h: Add USE(APPLE_INTERNAL_SDK) guards around AVKit function bar SPI headers.

Additionally, define AVFunctionBarPlaybackControlsProvider in the case where AVKit SPI is unavailable.

9:03 PM Changeset in webkit [208641] by rniwa@webkit.org
  • 5 edits
    2 adds in trunk

event.composedPath() does not include window
https://bugs.webkit.org/show_bug.cgi?id=164609
<rdar://problem/29210383>

Reviewed by Antti Koivisto.

Source/WebCore:

Fixed the bug by including WindowContext be a part of the regular EventPath. This also simplifies
dispatchEventInDOM which used to had a special logic for dispatching an event on the window.

Also fixed a bug in EventDispatcher::dispatchEvent that event.target would be nullptr when an event was
dispatched inside a disconnected shadow tree or prevented from propagating to the document tree.
Preserve the final target by simply saving event.target() prior to invoking the default event handler instead.

Test: fast/shadow-dom/event-path-with-window.html

  • dom/EventDispatcher.cpp:

(WebCore::WindowEventContext): Deleted. Moved to EventPath.cpp.
(WebCore::dispatchEventInDOM): Removed the code for WindowContext. The generic event dispatching logic
will do the same work now.
(WebCore::EventDispatcher::dispatchEvent): Restore the original target instead of using that of WindowContext.

  • dom/EventPath.cpp:

(WebCore::WindowEventContext): Moved from EventDispatcher.cpp. Also made it a subclass of EventContext.
(WebCore::WindowEventContext::handleLocalEvents): Added.
(WebCore::EventPath::EventPath): When the parent's nullptr, check if the current node is Document. If it is,
follow https://dom.spec.whatwg.org/#interface-document where it says:
"A document’s get the parent algorithm, given an event, returns null if event’s type attribute value is 'load'

or document does not have a browsing context, and the document’s associated Window object otherwise."

(WebCore::EventPath::setRelatedTarget): Skip over WindowContext.
(WebCore::EventPath::retargetTouch): Ditto.
(WebCore::EventPath::computePathUnclosedToTarget): When the target is DOMWindow, use its document as the target.
Also, include any event target that is not a node in the event path.

LayoutTests:

Added a W3C style testharness.js test for dispatching an inside a shadow tree connected to a document.

  • fast/shadow-dom/event-path-with-window-expected.txt: Added.
  • fast/shadow-dom/event-path-with-window.html: Added.
  • fast/shadow-dom/resources/event-path-test-helpers.js:

(dispatchEventWithLog): Traverse from document to window. Also include the event object in the log.

8:00 PM Changeset in webkit [208640] by Joseph Pecoraro
  • 4 edits
    1 add in trunk

test262: DataView with explicit undefined byteLength should be the same as it not being present
https://bugs.webkit.org/show_bug.cgi?id=164453

Reviewed by Darin Adler.

JSTests:

  • stress/dataview-construct.js: Added.

(assert):
(shouldThrow):

  • test262.yaml:

Source/JavaScriptCore:

  • runtime/JSGenericTypedArrayViewConstructorInlines.h:

(JSC::constructGenericTypedArrayView):
Handle the special case of DataView construction with an undefined byteLength value.

7:10 PM Changeset in webkit [208639] by Joseph Pecoraro
  • 8 edits in trunk

test262: DataView get methods should allow for missing offset, set methods should allow for missing value
https://bugs.webkit.org/show_bug.cgi?id=164451

Reviewed by Darin Adler.

JSTests:

  • test262.yaml:

Source/JavaScriptCore:

  • runtime/JSDataViewPrototype.cpp:

(JSC::getData):
Missing offset is still valid and will be coerced to 0.

(JSC::setData):
Missing value is still valid and will be coerced to 0.

LayoutTests:

  • fast/canvas/webgl/data-view-test-expected.txt:
  • fast/canvas/webgl/data-view-test.html:

Create a DataView large enough so that the get/set operations don't fail
due to out of bounds access, and assert that they do not throw, because
the undefined offset and value parameters get converted to 0.

  • webgl/1.0.2/conformance/typedarrays/data-view-test-expected.txt:

This test is wrong. Leave the test alone but update our copy.

7:01 PM Changeset in webkit [208638] by matthew_hanson@apple.com
  • 5 edits in branches/safari-602-branch/Source

Versioning.

6:58 PM Changeset in webkit [208637] by sbarati@apple.com
  • 53 edits
    4 copies
    8 adds in trunk

We should have a more concise way of determining when we're varargs calling a function using rest parameters
https://bugs.webkit.org/show_bug.cgi?id=164258

Reviewed by Yusuke Suzuki.

JSTests:

  • microbenchmarks/call-using-spread.js: Added.

(bar):
(foo):

  • microbenchmarks/spread-large-array.js: Added.

(foo):
(arrays.push):

  • microbenchmarks/spread-small-array.js: Added.

(foo):

  • stress/spread-array-iterator-watchpoint-2.js: Added.

(foo):
(arrayIterator.next):

  • stress/spread-array-iterator-watchpoint.js: Added.

(foo):
(Array.prototype.Symbol.iterator):

  • stress/spread-non-array.js: Added.

(assert):
(foo):
(let.customIterator.Symbol.iterator):
(bar):

Source/JavaScriptCore:

This patch adds two new bytecodes and DFG nodes for the following code patterns:

`
foo(a, b, ...c)
let x = [a, b, ...c];
`

To do this, I've introduced two new bytecode operations (and their
corresponding DFG nodes):

op_spread and op_new_array_with_spread.

op_spread takes a single input and performs the ES6 iteration protocol on it.
It returns the result of doing the spread inside a new class I've
made called JSFixedArray. JSFixedArray is a cell with a single 'size'
field and a buffer of values allocated inline in the cell. Abstracting
the protocol into a single node is good because it will make IR analysis
in the future much simpler. For now, it's also good because it allows
us to create fast paths for array iteration (which is quite common).
This fast path allows us to emit really good code for array iteration
inside the DFG/FTL.

op_new_array_with_spread is a variable argument bytecode that also
has a bit vector associated with it. The bit vector indicates if
any particular argument is to be spread or not. Arguments that
are spread are known to be JSFixedArray because we must emit an
op_spread before op_new_array_with_spread consumes the value.
For example, for this array:
[a, b, ...c, d, ...e]
we will have this bit vector:
[0, 0, 1, 0, 1]

The reason I've chosen this IR is that it will make eliminating
a rest allocation for this type of code much easier:

`
function foo(...args) {

return bar(a, b, ...args);

}
`

It will be easier to analyze the IR now that the operations
will be described at a high level.

This patch is an ~8% speedup on ES6SampleBench on my MBP.

  • CMakeLists.txt:
  • DerivedSources.make:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • builtins/IteratorHelpers.js: Added.

(performIteration):

  • bytecode/BytecodeList.json:
  • bytecode/BytecodeUseDef.h:

(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::dumpBytecode):

  • bytecode/ObjectPropertyConditionSet.cpp:

(JSC::generateConditionForSelfEquivalence):

  • bytecode/ObjectPropertyConditionSet.h:
  • bytecode/TrackedReferences.cpp:

(JSC::TrackedReferences::check):

  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedCodeBlock::bitVectors):
(JSC::UnlinkedCodeBlock::bitVector):
(JSC::UnlinkedCodeBlock::addBitVector):
(JSC::UnlinkedCodeBlock::shrinkToFit):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitNewArrayWithSpread):

  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/NodesCodegen.cpp:

(JSC::ArrayNode::emitBytecode):

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::addToGraph):
(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::capabilityLevel):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::watchHavingABadTime):

  • dfg/DFGGraph.h:

(JSC::DFG::Graph::isWatchingArrayIteratorProtocolWatchpoint):

  • dfg/DFGNode.h:

(JSC::DFG::Node::bitVector):

  • dfg/DFGNodeType.h:
  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileSpread):
(JSC::DFG::SpeculativeJIT::compileNewArrayWithSpread):

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::callOperation):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGStructureRegistrationPhase.cpp:

(JSC::DFG::StructureRegistrationPhase::run):

  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileNewArrayWithSpread):
(JSC::FTL::DFG::LowerDFGToB3::compileSpread):
(JSC::FTL::DFG::LowerDFGToB3::allocateVariableSizedCell):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::emitAllocateVariableSizedCell):
(JSC::AssemblyHelpers::emitAllocateVariableSizedJSObject):

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):

  • jit/JIT.h:
  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_new_array_with_spread):
(JSC::JIT::emit_op_spread):

  • jit/JITOperations.h:
  • llint/LLIntData.cpp:

(JSC::LLInt::Data::performAssertions):

  • llint/LLIntSlowPaths.cpp:
  • llint/LowLevelInterpreter.asm:
  • runtime/ArrayIteratorAdaptiveWatchpoint.cpp: Added.

(JSC::ArrayIteratorAdaptiveWatchpoint::ArrayIteratorAdaptiveWatchpoint):
(JSC::ArrayIteratorAdaptiveWatchpoint::handleFire):

  • runtime/ArrayIteratorAdaptiveWatchpoint.h: Added.
  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/CommonSlowPaths.h:
  • runtime/IteratorOperations.h:

(JSC::forEachInIterable):

  • runtime/JSCInlines.h:
  • runtime/JSFixedArray.cpp: Added.

(JSC::JSFixedArray::visitChildren):

  • runtime/JSFixedArray.h: Added.

(JSC::JSFixedArray::createStructure):
(JSC::JSFixedArray::createFromArray):
(JSC::JSFixedArray::get):
(JSC::JSFixedArray::buffer):
(JSC::JSFixedArray::size):
(JSC::JSFixedArray::offsetOfSize):
(JSC::JSFixedArray::offsetOfData):
(JSC::JSFixedArray::create):
(JSC::JSFixedArray::JSFixedArray):
(JSC::JSFixedArray::allocationSize):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::JSGlobalObject):
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
(JSC::JSGlobalObject::objectPrototypeIsSane): Deleted.
(JSC::JSGlobalObject::arrayPrototypeChainIsSane): Deleted.
(JSC::JSGlobalObject::stringPrototypeChainIsSane): Deleted.

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::arrayIteratorProtocolWatchpoint):
(JSC::JSGlobalObject::iteratorProtocolFunction):

  • runtime/JSGlobalObjectInlines.h: Added.

(JSC::JSGlobalObject::objectPrototypeIsSane):
(JSC::JSGlobalObject::arrayPrototypeChainIsSane):
(JSC::JSGlobalObject::stringPrototypeChainIsSane):
(JSC::JSGlobalObject::isArrayIteratorProtocolFastAndNonObservable):

  • runtime/JSType.h:
  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
6:33 PM Changeset in webkit [208636] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Support all the correct blend modes
https://bugs.webkit.org/show_bug.cgi?id=164669

Reviewed by Dean Jackson.

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):

6:31 PM Changeset in webkit [208635] by commit-queue@webkit.org
  • 5 edits in trunk/Tools

Removed unused INCLUDE_OPTIONS_FOR_DEBUGGING
https://bugs.webkit.org/show_bug.cgi?id=164664

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-11-11
Reviewed by Dan Bernstein.

  • Scripts/debug-minibrowser:
  • Scripts/debug-safari:
  • Scripts/debug-test-runner:
  • Scripts/webkitdirs.pm:

(printHelpAndExitForRunAndDebugWebKitAppIfNeeded):
There are no debug specific options anymore.

6:25 PM Changeset in webkit [208634] by keith_miller@apple.com
  • 5 edits
    17 copies
    1 add
    1 delete in trunk/JSTests

Relocate wasm tests and actually add them to the test runner
https://bugs.webkit.org/show_bug.cgi?id=164668

Reviewed by Yusuke Suzuki.

This moves the Wasm tests from their current location down a level.
Without relocating, the tests cannot properly be run by the wasm test runner.

  • wasm.yaml:
  • wasm/Builder.js: Fix typos, yay lazy synatx checking!
  • wasm/LowLevelBinary.js: Fix typos, yay lazy synatx checking!

(export.default.LowLevelBinary.prototype.get return):

  • wasm/function-tests/add-12.js: Renamed from JSTests/wasm/js-api/function-tests/add-12.js.
  • wasm/function-tests/br-if-loop-less-than.js: Renamed from JSTests/wasm/js-api/function-tests/br-if-loop-less-than.js.
  • wasm/function-tests/brTableAsIf.js: Renamed from JSTests/wasm/js-api/function-tests/brTableAsIf.js.
  • wasm/function-tests/brTableManyValues.js: Renamed from JSTests/wasm/js-api/function-tests/brTableManyValues.js.
  • wasm/function-tests/brTableWithLoop.js: Renamed from JSTests/wasm/js-api/function-tests/brTableWithLoop.js.
  • wasm/function-tests/dumb-eq-if-then-else.js: Renamed from JSTests/wasm/js-api/function-tests/dumb-eq-if-then-else.js.
  • wasm/function-tests/dumb-less-than-fallthrough.js: Renamed from JSTests/wasm/js-api/function-tests/dumb-less-than-fallthrough.js.
  • wasm/function-tests/dumb-less-than-ite.js: Renamed from JSTests/wasm/js-api/function-tests/dumb-less-than-ite.js.
  • wasm/function-tests/factorial.js: Renamed from JSTests/wasm/js-api/function-tests/factorial.js.
  • wasm/function-tests/float-sub.js: Renamed from JSTests/wasm/js-api/function-tests/float-sub.js.
  • wasm/function-tests/i32-load.js: Renamed from JSTests/wasm/js-api/function-tests/i32-load.js.
  • wasm/function-tests/i32-load8-s.js: Renamed from JSTests/wasm/js-api/function-tests/i32-load8-s.js.
  • wasm/function-tests/if-then-else-fallthrough.js: Renamed from JSTests/wasm/js-api/function-tests/if-then-else-fallthrough.js.
  • wasm/function-tests/if-then-fallthrough.js: Renamed from JSTests/wasm/js-api/function-tests/if-then-fallthrough.js.
  • wasm/function-tests/loop-mult.js: Renamed from JSTests/wasm/js-api/function-tests/loop-mult.js.
  • wasm/function-tests/loop-sum.js: Renamed from JSTests/wasm/js-api/function-tests/loop-sum.js.
  • wasm/function-tests/ret5.js: Renamed from JSTests/wasm/js-api/function-tests/ret5.js.
  • wasm/self-test/test_BuilderJSON.js: Rebasline
5:18 PM Changeset in webkit [208633] by commit-queue@webkit.org
  • 24 edits in trunk/Source

Use SecurityOriginData as keys in StorageManager
https://bugs.webkit.org/show_bug.cgi?id=159834
<rdar://problem/27346948>

Patch by Alex Christensen <achristensen@webkit.org> on 2016-11-11
Reviewed by Brady Eidson.

Source/WebCore:

No change in behavior.

  • page/SecurityOriginData.h:

(WebCore::SecurityOriginData::SecurityOriginData):
(WebCore::SecurityOriginData::isEmpty):
(WebCore::SecurityOriginData::isHashTableDeletedValue):
(WebCore::SecurityOriginDataHashTraits::isEmptyValue):
(WebCore::SecurityOriginDataHash::hash):
(WebCore::SecurityOriginDataHash::equal):
Add some hash functions so a SecurityOriginData can be used as a key in a HashMap.

Source/WebKit2:

  • Platform/IPC/HandleMessage.h:

(IPC::callMemberFunctionImpl):
Add a missing std::forward so we can use this callMemberFunctionImpl with rvalues.

  • UIProcess/API/C/WKApplicationCacheManager.cpp:

(WKApplicationCacheManagerGetApplicationCacheOrigins):
(WKApplicationCacheManagerDeleteEntriesForOrigin):

  • UIProcess/API/C/WKKeyValueStorageManager.cpp:

(WKKeyValueStorageManagerGetKeyValueStorageOrigins):
(WKKeyValueStorageManagerDeleteEntriesForOrigin):

  • UIProcess/API/C/WKResourceCacheManager.cpp:

(WKResourceCacheManagerGetCacheOrigins):
(WKResourceCacheManagerClearCacheForOrigin):

  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(-[WKWebsiteDataStore _fetchDataRecordsOfTypes:withOptions:completionHandler:]):

  • UIProcess/Databases/DatabaseProcessProxy.cpp:

(WebKit::DatabaseProcessProxy::deleteWebsiteDataForOrigins):

  • UIProcess/Databases/DatabaseProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::getNetworkProcessConnection):
(WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Storage/LocalStorageDatabase.cpp:

(WebKit::LocalStorageDatabase::create):
(WebKit::LocalStorageDatabase::LocalStorageDatabase):
(WebKit::LocalStorageDatabase::openDatabase):
(WebKit::LocalStorageDatabase::close):

  • UIProcess/Storage/LocalStorageDatabase.h:
  • UIProcess/Storage/LocalStorageDatabaseTracker.cpp:

(WebKit::LocalStorageDatabaseTracker::databasePath):
(WebKit::LocalStorageDatabaseTracker::didOpenDatabaseWithOrigin):
(WebKit::LocalStorageDatabaseTracker::deleteDatabaseWithOrigin):
(WebKit::LocalStorageDatabaseTracker::deleteDatabasesModifiedSince):
(WebKit::LocalStorageDatabaseTracker::origins):

  • UIProcess/Storage/LocalStorageDatabaseTracker.h:
  • UIProcess/Storage/StorageManager.cpp:

(WebKit::StorageManager::StorageArea::securityOrigin):
(WebKit::StorageManager::TransientLocalStorageNamespace::getOrCreateStorageArea):
(WebKit::StorageManager::TransientLocalStorageNamespace::origins):
(WebKit::StorageManager::TransientLocalStorageNamespace::clearStorageAreasMatchingOrigin):
(WebKit::StorageManager::StorageArea::StorageArea):
(WebKit::StorageManager::StorageArea::clone):
(WebKit::StorageManager::StorageArea::items):
(WebKit::StorageManager::StorageArea::openDatabaseAndImportItemsIfNeeded):
(WebKit::StorageManager::LocalStorageNamespace::didDestroyStorageArea):
(WebKit::StorageManager::LocalStorageNamespace::clearStorageAreasMatchingOrigin):
(WebKit::StorageManager::LocalStorageNamespace::clearAllStorageAreas):
(WebKit::StorageManager::SessionStorageNamespace::origins):
(WebKit::StorageManager::SessionStorageNamespace::clearStorageAreasMatchingOrigin):
(WebKit::StorageManager::SessionStorageNamespace::cloneTo):
(WebKit::StorageManager::getSessionStorageOrigins):
(WebKit::StorageManager::deleteSessionStorageOrigins):
(WebKit::StorageManager::deleteSessionStorageEntriesForOrigins):
(WebKit::StorageManager::getLocalStorageOrigins):
(WebKit::StorageManager::deleteLocalStorageEntriesForOrigin):
(WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
(WebKit::StorageManager::deleteLocalStorageEntriesForOrigins):
(WebKit::StorageManager::createLocalStorageMap):
(WebKit::StorageManager::createTransientLocalStorageMap):
(WebKit::StorageManager::createSessionStorageMap):
(WebKit::StorageManager::getOrCreateLocalStorageNamespace):
(WebKit::StorageManager::getOrCreateTransientLocalStorageNamespace):
(WebKit::StorageManager::StorageArea::create): Deleted.
(WebKit::StorageManager::LocalStorageNamespace::getOrCreateStorageArea): Deleted.
(WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea): Deleted.

  • UIProcess/Storage/StorageManager.h:
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):

  • UIProcess/WebProcessProxy.h:
  • UIProcess/WebsiteData/WebsiteDataRecord.cpp:

(WebKit::WebsiteDataRecord::displayNameForOrigin):
(WebKit::WebsiteDataRecord::add):

  • UIProcess/WebsiteData/WebsiteDataRecord.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::fetchData):
(WebKit::WebsiteDataStore::removeData):
(WebKit::WebsiteDataStore::mediaKeyOrigins):
(WebKit::WebsiteDataStore::removeMediaKeys):

  • UIProcess/WebsiteData/WebsiteDataStore.h:

Fewer SecurityOrigin uses in the UIProcess! Hooray!

5:13 PM Changeset in webkit [208632] by Ryan Haddad
  • 5 edits in trunk/LayoutTests

Skip editing/input/focus-change-with-marked-text.html everywhere except ios-simulator-wk1.
https://bugs.webkit.org/show_bug.cgi?id=164666

Unreviewed test gardening.

  • TestExpectations:
  • platform/ios-simulator-wk1/TestExpectations:
  • platform/ios-simulator-wk2/TestExpectations:
  • platform/mac/TestExpectations:
5:01 PM Changeset in webkit [208631] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-602.3.11

New tag.

4:48 PM Changeset in webkit [208630] by rniwa@webkit.org
  • 13 edits
    4 adds in trunk

Hovering over a slotted Text node clears hover state
https://bugs.webkit.org/show_bug.cgi?id=164002
<rdar://problem/29040471>

Reviewed by Simon Fraser.

Source/WebCore:

The bug was caused by HitTestResult::innerElement returning the parent element of a Text node without
taking the shadow root or slots into account. For hit testing, we always want to use the "flat tree"
or "composed tree" (imprecisely but close enough in this case).

Fixed the bug by making HitTestResult::innerElement use parentNodeInComposedTree. Also renamed it to
HitTestResult::targetElement to be consistent with HitTestResult::targetNode.

Tests: fast/shadow-dom/activate-over-slotted-content.html

fast/shadow-dom/hover-over-slotted-content.html

  • dom/Document.cpp:

(WebCore::Document::prepareMouseEvent):

  • html/MediaElementSession.cpp:

(WebCore::isMainContentForPurposesOfAutoplay):

  • page/EventHandler.cpp:

(WebCore::EventHandler::eventMayStartDrag):
(WebCore::EventHandler::hitTestResultAtPoint):
(WebCore::EventHandler::handleWheelEvent):
(WebCore::EventHandler::sendContextMenuEventForKey):
(WebCore::EventHandler::hoverTimerFired):
(WebCore::EventHandler::handleDrag):
(WebCore::EventHandler::handleTouchEvent):

  • rendering/HitTestResult.cpp:

(WebCore::HitTestResult::targetElement): Renamed from innerElement.
Now finds the parent element in the composed tree.

  • rendering/HitTestResult.h:

(WebCore::HitTestResult::innerNode):

Source/WebKit/mac:

  • WebView/WebImmediateActionController.mm:

(-[WebImmediateActionController performHitTestAtPoint:]):

Source/WebKit2:

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::determinePrimarySnapshottedPlugIn):

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::performImmediateActionHitTestAtLocation):

LayoutTests:

Added two reference tests for activating and hovering over a Text node.
The text node should activate :hover and :activate rules in the shadow tree respectively.

  • fast/shadow-dom/activate-over-slotted-content-expected.html: Added.
  • fast/shadow-dom/activate-over-slotted-content.html: Added.
  • fast/shadow-dom/hover-over-slotted-content-expected.html: Added.
  • fast/shadow-dom/hover-over-slotted-content.html: Added.
  • platform/ios-simulator/TestExpectations: Skip the newly added tests since iOS doesn't

support :hover or :activate via mouse down.

4:40 PM Changeset in webkit [208629] by Brent Fulgham
  • 2 edits in trunk/Source/WebCore

Unreviewed build fix after r208628

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneDeserializer::readTerminal): Cast pointer arithmetic to
uint32_t to avoid warning.

4:32 PM Changeset in webkit [208628] by Brent Fulgham
  • 3 edits
    2 adds in trunk

Neutered ArrayBuffers are not properly serialized
https://bugs.webkit.org/show_bug.cgi?id=164647
<rdar://problem/29213490>

Reviewed by David Kilzer.

Source/WebCore:

Correct binding logic to handle ImageBuffers being deserialized from neutered ArrayBuffers.

Test: fast/canvas/neutered-imagedata.html

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneDeserializer::readTerminal):

LayoutTests:

  • fast/canvas/neutered-imagedata-expected.txt: Added.
  • fast/canvas/neutered-imagedata.html: Added.
4:29 PM Changeset in webkit [208627] by keith_miller@apple.com
  • 13 edits
    2 moves
    18 adds in trunk

Move Wasm tests to JS
https://bugs.webkit.org/show_bug.cgi?id=164611

Reviewed by Geoffrey Garen.

This patch translates most of the tests from testWasm.cpp to the JS testing api. Most of the
ommited tests were earliest tests, which tested trivial things, like adding two
constants. Some tests are ommited for other reasons, however. These are:

1) Tests using I64 since the testing api does not yet know how to handle 64-bit numbers. 2)
Tests that would validate the memory of the module once wasm was done with it since that's
not really possible in JS.

In order to make such a translation easier this patch also adds some features to the JS
testing api:

1) Blocks can now be done lexically by adding a lambda as the last argument of the block
opcode. For example one can do:

...
.Block("i32", b => b.I32Const(1) )

and the nested lambda will automatically have an end attached.

2) The JS testing api can now handle inline signature types.

3) Relocate some code to make it easier to follow and prevent 44 space indentation.

4) Rename varuint/varint to varuint32/varint32, this lets them be directly called from the
wasm.json without being remapped.

5) Add support for Memory and Function sections to the Builder.

6) Add support for local variables.

On the JSC side, we needed to expose a new function to validate the compiled wasm code
behaves the way we expect. At least until the JS Wasm API is finished. The new validation
function, testWasmModuleFunctions, takes an array buffer containing the wasm binary, the
number of functions in the blob and tests for each of those functions.

JSTests:

  • wasm/Builder.js:

(const._maybeRegisterType):
(const): Deleted.
(switch.typeof): Deleted.

  • wasm/Builder_WebAssemblyBinary.js:

(const.emitters.Type):
(const.emitters.Import):
(const.emitters.Function):
(const.emitters.Memory):
(const.emitters.Code):
(export.const.Binary):

  • wasm/LowLevelBinary.js:

(export.default.LowLevelBinary.prototype.get return):
(export.default.LowLevelBinary.prototype.varuint32):
(export.default.LowLevelBinary.prototype.varint32):
(export.default.LowLevelBinary.prototype.varuint1):
(export.default.LowLevelBinary.prototype.varint7):
(export.default.LowLevelBinary.prototype.varuint7):
(export.default.LowLevelBinary.prototype.inline_signature_type):
(export.default.LowLevelBinary.prototype.string):
(export.default.LowLevelBinary.prototype.getVaruint32):
(export.default.LowLevelBinary.prototype.getVarint32):
(export.default.LowLevelBinary.prototype.getVaruint7):
(export.default.LowLevelBinary.prototype.getString):
(export.default.LowLevelBinary):
(export.default.LowLevelBinary.prototype.varuint): Deleted.
(export.default.LowLevelBinary.prototype.varint): Deleted.
(export.default.LowLevelBinary.prototype.getVaruint): Deleted.
(export.default.LowLevelBinary.prototype.getVarint): Deleted.

  • wasm/js-api/test_old_tests.js: Added.

(ret5):
(brTableWithLoop):
(brTableManyValues):
(run.brTableManyValues.brTableAsIf):
(ifThenFallthrough):
(ifThenElseFallthrough):
(dumbLessThanFallthrough):
(run.dumbLessThanFallthrough.floatSub):
(run.floatSub.add12):
(run.add12.factorial):
(i32load):
(run.i32load.i32load8s):
(run.i32load8s.dumbEqIfThenElse):
(run.dumbEqIfThenElse.dumbEqIfThenElse):
(run.dumbEqIfThenElse.dumbLessThanIfThenElse):
(run.dumbLessThanIfThenElse.loopSum):
(run.loopSum.loopMult):
(brIfLoopLessThan):
(run.brIfLoopLessThan.run):

  • wasm/self-test/test_LowLevelBinary_varint32.js: Renamed from JSTests/wasm/self-test/test_LowLevelBinary_varint.js.
  • wasm/self-test/test_LowLevelBinary_varuint32.js: Renamed from JSTests/wasm/self-test/test_LowLevelBinary_varuint.js.
  • wasm/Builder.js:

(const._maybeRegisterType):
(const): Deleted.
(switch.typeof): Deleted.

  • wasm/Builder_WebAssemblyBinary.js:

(const.emitters.Type):
(const.emitters.Import):
(const.emitters.Function):
(const.emitters.Memory):
(const.emitters.Code):
(export.const.Binary):

  • wasm/LowLevelBinary.js:

(export.default.LowLevelBinary.prototype.get return):
(export.default.LowLevelBinary.prototype.varuint32):
(export.default.LowLevelBinary.prototype.varint32):
(export.default.LowLevelBinary.prototype.varuint1):
(export.default.LowLevelBinary.prototype.varint7):
(export.default.LowLevelBinary.prototype.varuint7):
(export.default.LowLevelBinary.prototype.inline_signature_type):
(export.default.LowLevelBinary.prototype.string):
(export.default.LowLevelBinary.prototype.getVaruint32):
(export.default.LowLevelBinary.prototype.getVarint32):
(export.default.LowLevelBinary.prototype.getVaruint7):
(export.default.LowLevelBinary.prototype.getString):
(export.default.LowLevelBinary):
(export.default.LowLevelBinary.prototype.varuint): Deleted.
(export.default.LowLevelBinary.prototype.varint): Deleted.
(export.default.LowLevelBinary.prototype.getVaruint): Deleted.
(export.default.LowLevelBinary.prototype.getVarint): Deleted.

  • wasm/js-api/function-tests/add-12.js: Added.
  • wasm/js-api/function-tests/br-if-loop-less-than.js: Added.
  • wasm/js-api/function-tests/brTableAsIf.js: Added.
  • wasm/js-api/function-tests/brTableManyValues.js: Added.
  • wasm/js-api/function-tests/brTableWithLoop.js: Added.
  • wasm/js-api/function-tests/dumb-eq-if-then-else.js: Added.
  • wasm/js-api/function-tests/dumb-less-than-fallthrough.js: Added.
  • wasm/js-api/function-tests/dumb-less-than-ite.js: Added.
  • wasm/js-api/function-tests/factorial.js: Added.
  • wasm/js-api/function-tests/float-sub.js: Added.
  • wasm/js-api/function-tests/i32-load.js: Added.
  • wasm/js-api/function-tests/i32-load8-s.js: Added.
  • wasm/js-api/function-tests/if-then-else-fallthrough.js: Added.
  • wasm/js-api/function-tests/if-then-fallthrough.js: Added.
  • wasm/js-api/function-tests/loop-mult.js: Added.
  • wasm/js-api/function-tests/loop-sum.js: Added.
  • wasm/js-api/function-tests/ret5.js: Added.
  • wasm/self-test/test_LowLevelBinary_varint32.js: Renamed from JSTests/wasm/self-test/test_LowLevelBinary_varint.js.
  • wasm/self-test/test_LowLevelBinary_varuint32.js: Renamed from JSTests/wasm/self-test/test_LowLevelBinary_varuint.js.

Source/JavaScriptCore:

  • jsc.cpp:

(GlobalObject::finishCreation):
(box):
(callWasmFunction):
(functionTestWasmModuleFunctions):

  • testWasm.cpp:

(checkPlan):
(runWasmTests):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::parseAndCompile):

  • wasm/WasmFunctionParser.h:

(JSC::Wasm::FunctionParser<Context>::parse):
(JSC::Wasm::FunctionParser<Context>::parseBody):
(JSC::Wasm::FunctionParser<Context>::parseBlock): Deleted.

  • wasm/WasmModuleParser.cpp:

(JSC::Wasm::ModuleParser::parseMemory):
(JSC::Wasm::ModuleParser::parseExport):

  • wasm/WasmPlan.cpp:

(JSC::Wasm::Plan::Plan):
(JSC::Wasm::Plan::run):

  • wasm/WasmPlan.h:
  • wasm/js/WebAssemblyModuleConstructor.cpp:

(JSC::constructJSWebAssemblyModule):

4:28 PM Changeset in webkit [208626] by rik@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Whitespace in Editor should be less visible than regular content
https://bugs.webkit.org/show_bug.cgi?id=164660

Reviewed by Matt Baker.

  • UserInterface/Views/CodeMirrorOverrides.css:

(.show-whitespace-characters .CodeMirror .cm-whitespace::before):

4:26 PM Changeset in webkit [208625] by matthew_hanson@apple.com
  • 5 edits in branches/safari-602-branch/Source

Versioning.

4:20 PM Changeset in webkit [208624] by Wenson Hsieh
  • 39 edits
    2 copies
    1 move
    4 adds in trunk

[WK2] autocorrect and autocapitalize attributes do not work in contenteditable elements
https://bugs.webkit.org/show_bug.cgi?id=164538
<rdar://problem/8418711>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Adds autocorrect and autocapitalize getters and setters to HTMLElements. These check the autocorrect and
autocapitalize attributes and return whether or not the element supports autocorrect, and the
autocapitalization type, respectively. By default, autocorrection is enabled and autocapitalization is enabled
on the sentence level for elements. Also refactors/renames WebAutocapitalizeType so that in WebCore, we deal
solely with AutocapitalizeTypes and WebKit1 converts from AutocapitalizeType to WebAutocapitalizeType as needed
for UIKit.

Tests: fast/events/ios/contenteditable-autocapitalize.html

fast/events/ios/contenteditable-autocorrect.html

  • WebCore.xcodeproj/project.pbxproj:
  • html/Autocapitalize.cpp:

(WebCore::autocapitalizeTypeForAttributeValue):
(WebCore::stringForAutocapitalizeType):

  • html/Autocapitalize.h:
  • html/AutocapitalizeTypes.h: Renamed from Source/WebCore/html/WebAutocapitalize.h.

Move WebAutocapitalizeType into AutocapitalizeTypes.h as simply AutocapitalizeType.

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::autocapitalize):
(WebCore::HTMLElement::autocapitalizeType):
(WebCore::HTMLElement::setAutocapitalize):
(WebCore::HTMLElement::shouldAutocorrect):
(WebCore::HTMLElement::setAutocorrect):

  • html/HTMLElement.h:

(WebCore::HTMLElement::autocorrect):

  • html/HTMLElement.idl:
  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::shouldAutocorrect):
(WebCore::HTMLFormControlElement::autocapitalizeType):
(WebCore::HTMLFormControlElement::autocorrect): Deleted.
(WebCore::HTMLFormControlElement::setAutocorrect): Deleted.
(WebCore::HTMLFormControlElement::autocapitalize): Deleted.
(WebCore::HTMLFormControlElement::setAutocapitalize): Deleted.

Fold autocorrect/autocapitalize member functions into HTMLElement and remove element-specific code in
HTML(FormControl|Form)Element.cpp.

  • html/HTMLFormControlElement.h:
  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::shouldAutocorrect):
(WebCore::HTMLFormElement::autocorrect): Deleted.
(WebCore::HTMLFormElement::setAutocorrect): Deleted.
(WebCore::HTMLFormElement::autocapitalizeType): Deleted.
(WebCore::HTMLFormElement::autocapitalize): Deleted.
(WebCore::HTMLFormElement::setAutocapitalize): Deleted.

  • html/HTMLFormElement.h:
  • html/HTMLFormElement.idl:
  • html/HTMLInputElement.idl:
  • html/HTMLTextAreaElement.idl:

Source/WebKit:

Introduce WebAutocapitalizeTypes.h to WebKit.

  • WebKit.xcodeproj/project.pbxproj:

Source/WebKit/mac:

Account for renaming HTMLElement::autocorrect to HTMLElement::shouldAutocorrect, as well as moving
WebAutocapitalizeType to WebKit from WebCore. Additionally, moves the -autocorrect and -autocapitalize SPIs out
of HTML(Input|Form|TextArea)ElementPrivate.h and into HTMLElementPrivate.h. This also means removing redundant
code for interfacing with the unwrapped HTMLElement's autocorrect and autocapitalize attributes.

  • DOM/DOMHTML.mm:

(webAutocapitalizeType):
(-[DOMHTMLInputElement _autocapitalizeType]):
(-[DOMHTMLTextAreaElement _autocapitalizeType]):

  • DOM/DOMHTMLElement.mm:

(-[DOMHTMLElement autocorrect]):
(-[DOMHTMLElement setAutocorrect:]):
(-[DOMHTMLElement autocapitalize]):
(-[DOMHTMLElement setAutocapitalize:]):

  • DOM/DOMHTMLElementPrivate.h: Copied from Source/WebCore/html/Autocapitalize.h.
  • DOM/DOMHTMLFormElement.mm:

(-[DOMHTMLFormElement autocorrect]): Deleted.
(-[DOMHTMLFormElement setAutocorrect:]): Deleted.
(-[DOMHTMLFormElement autocapitalize]): Deleted.
(-[DOMHTMLFormElement setAutocapitalize:]): Deleted.

  • DOM/DOMHTMLInputElement.mm:

(-[DOMHTMLInputElement autocorrect]): Deleted.
(-[DOMHTMLInputElement setAutocorrect:]): Deleted.
(-[DOMHTMLInputElement autocapitalize]): Deleted.
(-[DOMHTMLInputElement setAutocapitalize:]): Deleted.

  • DOM/DOMHTMLInputElementPrivate.h:
  • DOM/DOMHTMLTextAreaElement.mm:

(-[DOMHTMLTextAreaElement autocorrect]): Deleted.
(-[DOMHTMLTextAreaElement setAutocorrect:]): Deleted.
(-[DOMHTMLTextAreaElement autocapitalize]): Deleted.
(-[DOMHTMLTextAreaElement setAutocapitalize:]): Deleted.

  • DOM/DOMHTMLTextAreaElementPrivate.h:

We need to import DOMHTMLElementPrivate.h here to avoid breaking UIKit. We should follow this up with a UIKit
change to import DOMHTMLElementPrivate.h directly.

  • DOM/DOMPrivate.h:
  • DOM/WebAutocapitalizeTypes.h: Copied from Tools/WebKitTestRunner/ios/UIKitSPI.h.
  • MigrateHeaders.make:

Source/WebKit2:

Consult HTMLElement::autocorrect() and HTMLElement::autocapitalizeType() when assembling the assisted node
information for the currently assisted node.

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

(toUITextAutocapitalize):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::getAssistedNodeInformation):

Tools:

Adds support for being able to test autocorrect and autocapitalize attributes in contenteditable areas. To do
this, we add removeAllDynamicDictionaries to UIScriptController in order to ensure that autocorrect suggestions
are reset to their defaults prior to running contenteditable-autocorrect-off.html.

  • DumpRenderTree/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::removeAllDynamicDictionaries):

  • Scripts/webkitpy/port/ios.py:

(IOSSimulatorPort._createSimulatorApp):

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

(WTR::UIScriptController::removeAllDynamicDictionaries):

  • TestRunnerShared/UIScriptContext/UIScriptController.h:
  • WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:

(-[TestRunnerWKWebView _keyboardDidShow:]):
(-[TestRunnerWKWebView _keyboardDidHide:]):

Work around an issue where consecutive UIKeyboardDidShowNotification would cause keyboard appearance callbacks
to be fired multiple times. This was causing a single key press to cause two characters to be typed. While this
does not affect the correctness of existing tests, the new autocorrection test requires this workaround.

  • WebKitTestRunner/ios/UIKitSPI.h:
  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::waitForTextPredictionsViewAndSelectCandidateAtIndex):
(WTR::UIScriptController::removeAllDynamicDictionaries):

LayoutTests:

Adds new layout tests verifying that autocorrect and autocapitalize attributes can be used to opt out of
autocapitalization and autocorrection in a contenteditable area in WK2. Additionally, tests that autocorrection
and autocapitalization attributes may be changed by setting element.autocorrect and element.autocapitalize,
respectively.

  • fast/events/ios/contenteditable-autocapitalize-none-expected.txt: Added.
  • fast/events/ios/contenteditable-autocapitalize-none.html: Added.
  • fast/events/ios/contenteditable-autocorrect-off-expected.txt: Added.
  • fast/events/ios/contenteditable-autocorrect-off.html: Added.
4:06 PM Changeset in webkit [208623] by Beth Dakin
  • 4 edits in trunk/Source

Move to modern TouchBar methods
https://bugs.webkit.org/show_bug.cgi?id=164655
-and corresponding-
rdar://problem/29226911

Reviewed by Wenson Hsieh.

customizationDefaultItemIdentifiers -> defaultItemIdentifiers
itemIdentifiers -> defaultItemIdentifiers
defaultItems -> templateItems

Source/WebKit/mac:

  • WebView/WebView.mm:

(-[WebView _plainTextTouchBarDefaultItemIdentifiers]):
(-[WebView _richTextTouchBarDefaultItemIdentifiers]):
(-[WebView setUpTextTouchBar:]):
(-[WebView updateTextTouchBar]):
(-[WebView _plainTextTouchBarCustomizationDefaultItemIdentifiers]): Deleted.
(-[WebView _richTextTouchBarCustomizationDefaultItemIdentifiers]): Deleted.

Source/WebKit2:

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::plainTextTouchBarDefaultItemIdentifiers):
(WebKit::richTextTouchBarDefaultItemIdentifiers):
(WebKit::WebViewImpl::setUpTextTouchBar):
(WebKit::WebViewImpl::updateTextTouchBar):
(WebKit::plainTextTouchBarCustomizationDefaultItemIdentifiers): Deleted.
(WebKit::richTextTouchBarCustomizationDefaultItemIdentifiers): Deleted.

3:50 PM Changeset in webkit [208622] by matthew_hanson@apple.com
  • 2 edits in branches/safari-602-branch/Source/JavaScriptCore

Merge r208619. rdar://problem/29225966

3:50 PM Changeset in webkit [208621] by matthew_hanson@apple.com
  • 3 edits
    1 add in branches/safari-602-branch

Merge r208614. rdar://problem/29225966

3:43 PM Changeset in webkit [208620] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Add support for paths as basic shapes.
https://bugs.webkit.org/show_bug.cgi?id=164661

Reviewed by Dean Jackson.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeBasicShapePath):
(WebCore::consumeBasicShape):

3:42 PM Changeset in webkit [208619] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed try to fix windows build after https://bugs.webkit.org/show_bug.cgi?id=164650

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

3:28 PM Changeset in webkit [208618] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Support margin-box in shape parsing.
https://bugs.webkit.org/show_bug.cgi?id=164658

Reviewed by Sam Weinig.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeBasicShapeOrBox):

3:18 PM Changeset in webkit [208617] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Add support for -webkit-mask-source-type
https://bugs.webkit.org/show_bug.cgi?id=164657

Reviewed by Dean Jackson.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeWebkitMaskSourceType):
(WebCore::consumeBackgroundComponent):
(WebCore::CSSPropertyParser::parseSingleValue):

3:08 PM Changeset in webkit [208616] by Antti Koivisto
  • 9 edits
    2 adds in trunk

Updating class name doesn't update the slotted content's style
https://bugs.webkit.org/show_bug.cgi?id=164577
<rdar://problem/29205873>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Test: fast/shadow-dom/css-scoping-slotted-invalidation.html

Teach style invalidation code for attribute/class/id mutations about slotted rules.

  • dom/ShadowRoot.cpp:

(WebCore::assignedShadowRootsIfSlotted):

Helper to find all assigned shadow roots (there may be more than one if slots are assigned to slots).

  • dom/ShadowRoot.h:
  • style/AttributeChangeInvalidation.cpp:

(WebCore::Style::mayBeAffectedByAttributeChange):
(WebCore::Style::mayBeAffectedByHostRules):
(WebCore::Style::mayBeAffectedBySlottedRules):
(WebCore::Style::AttributeChangeInvalidation::invalidateStyle):
(WebCore::Style::mayBeAffectedByHostStyle): Deleted.

  • style/ClassChangeInvalidation.cpp:

(WebCore::Style::mayBeAffectedByHostRules):
(WebCore::Style::mayBeAffectedBySlottedRules):
(WebCore::Style::ClassChangeInvalidation::invalidateStyle):
(WebCore::Style::mayBeAffectedByHostStyle): Deleted.

  • style/ClassChangeInvalidation.h:
  • style/IdChangeInvalidation.cpp:

(WebCore::Style::mayBeAffectedByHostRules):
(WebCore::Style::mayBeAffectedBySlottedRules):
(WebCore::Style::IdChangeInvalidation::invalidateStyle):
(WebCore::Style::mayBeAffectedByHostStyle): Deleted.

  • style/StyleSharingResolver.cpp:

(WebCore::Style::SharingResolver::canShareStyleWithElement):

Fix a bug in style sharing where we were checking wrong element for host rules.
Tested by the included test too (the last empty div).

LayoutTests:

  • fast/shadow-dom/css-scoping-slotted-invalidation-expected.html: Added.
  • fast/shadow-dom/css-scoping-slotted-invalidation.html: Added.
3:04 PM Changeset in webkit [208615] by hyatt@apple.com
  • 3 edits in trunk/Source/WebCore

[CSS Parser] Support the spring animation timing function
https://bugs.webkit.org/show_bug.cgi?id=164654

Reviewed by Dean Jackson.

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

(WebCore::consumeSpringFunction):
(WebCore::consumeAnimationTimingFunction):
(WebCore::consumeAnimationValue):

3:03 PM Changeset in webkit [208614] by sbarati@apple.com
  • 3 edits
    1 add in trunk

We recursively grab a lock in the DFGBytecodeParser causing us to deadlock
https://bugs.webkit.org/show_bug.cgi?id=164650

Reviewed by Geoffrey Garen.

JSTests:

  • stress/dont-dead-lock-put-by-val-as-put-by-id.js: Added.

(ident):
(let.o.set foo):
(foo):

Source/JavaScriptCore:

Some code was incorrectly holding a lock when recursively calling
back into the bytecode parser's via inlining a put_by_val as a put_by_id.
This can cause a deadlock if the inlinee CodeBlock is something we're
already holding a lock for. I've changed the range of the lock holder
to be as narrow as possible.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

2:53 PM Changeset in webkit [208613] by Chris Dumez
  • 67 edits in trunk

WorkerGlobalScope's indexedDB property should be on the prototype, not the instance
https://bugs.webkit.org/show_bug.cgi?id=164644

Reviewed by Brady Eidson.

Source/WebCore:

WorkerGlobalScope's indexedDB property should be on the prototype, not the instance
as per:

This is because WorkerGlobalScope is not marked as [Global] or [PrimaryGlobal] in
the IDL:

DedicatedWorkerGlobalScope is the one that is marked as [Global] and that should
have its attributes on the instance:

We were getting this mostly right, except for runtime-enabled attributes / operations
which would end up on the instance instead of the prototype. This patch adds support
for [PrimaryGlobal] / [Global] IDL extended attributes which determine the location
of properties. It also improves support for runtime-enabled properties so that they
can now be on either the instance or the prototype, exactly as if they were not
runtimed-enabled.

This gives us 100% pass rate on:

No new tests, updated existing test.

  • bindings/scripts/CodeGeneratorJS.pm:

(IsGlobalOrPrimaryGlobalInterface):
(InterfaceRequiresAttributesOnInstance):
(AttributeShouldBeOnInstance):
(OperationShouldBeOnInstance):
(GenerateHeader):
(GeneratePropertiesHashTable):
(GenerateImplementation):

  • bindings/scripts/IDLAttributes.txt:
  • bindings/scripts/test/JS/JSInterfaceName.cpp:

(WebCore::JSInterfaceName::finishCreation):

  • bindings/scripts/test/JS/JSInterfaceName.h:
  • bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:

(WebCore::JSTestActiveDOMObject::finishCreation):

  • bindings/scripts/test/JS/JSTestActiveDOMObject.h:
  • bindings/scripts/test/JS/JSTestCEReactions.cpp:

(WebCore::JSTestCEReactions::finishCreation):

  • bindings/scripts/test/JS/JSTestCEReactions.h:
  • bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:

(WebCore::JSTestCEReactionsStringifier::finishCreation):

  • bindings/scripts/test/JS/JSTestCEReactionsStringifier.h:
  • bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:

(WebCore::JSTestClassWithJSBuiltinConstructor::finishCreation):

  • bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h:
  • bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:

(WebCore::JSTestCustomConstructorWithNoInterfaceObject::finishCreation):

  • bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h:
  • bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:

(WebCore::JSTestCustomNamedGetter::finishCreation):

  • bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
  • bindings/scripts/test/JS/JSTestDOMJIT.cpp:

(WebCore::JSTestDOMJIT::finishCreation):

  • bindings/scripts/test/JS/JSTestDOMJIT.h:
  • bindings/scripts/test/JS/JSTestEventConstructor.cpp:

(WebCore::JSTestEventConstructor::finishCreation):

  • bindings/scripts/test/JS/JSTestEventConstructor.h:
  • bindings/scripts/test/JS/JSTestEventTarget.cpp:

(WebCore::JSTestEventTarget::finishCreation):

  • bindings/scripts/test/JS/JSTestEventTarget.h:
  • bindings/scripts/test/JS/JSTestException.cpp:

(WebCore::JSTestException::finishCreation):

  • bindings/scripts/test/JS/JSTestException.h:
  • bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:

(WebCore::JSTestGenerateIsReachable::finishCreation):

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

(WebCore::JSTestGlobalObject::finishCreation):

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

(WebCore::JSTestInterface::finishCreation):

  • bindings/scripts/test/JS/JSTestInterface.h:
  • bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:

(WebCore::JSTestInterfaceLeadingUnderscore::finishCreation):

  • bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.h:
  • bindings/scripts/test/JS/JSTestIterable.cpp:

(WebCore::JSTestIterable::finishCreation):

  • bindings/scripts/test/JS/JSTestIterable.h:
  • bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:

(WebCore::JSTestJSBuiltinConstructor::finishCreation):

  • bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
  • bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:

(WebCore::JSTestMediaQueryListListener::finishCreation):

  • bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
  • bindings/scripts/test/JS/JSTestNamedConstructor.cpp:

(WebCore::JSTestNamedConstructor::finishCreation):

  • bindings/scripts/test/JS/JSTestNamedConstructor.h:
  • bindings/scripts/test/JS/JSTestNode.cpp:

(WebCore::JSTestNode::finishCreation):

  • bindings/scripts/test/JS/JSTestNode.h:
  • bindings/scripts/test/JS/JSTestNondeterministic.cpp:

(WebCore::JSTestNondeterministic::finishCreation):

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

(WebCore::JSTestObj::finishCreation):

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

(WebCore::JSTestOverloadedConstructors::finishCreation):

  • bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
  • bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:

(WebCore::JSTestOverloadedConstructorsWithSequence::finishCreation):

  • bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.h:
  • bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:

(WebCore::JSTestOverrideBuiltins::finishCreation):

  • bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
  • bindings/scripts/test/JS/JSTestSerialization.cpp:

(WebCore::JSTestSerialization::finishCreation):

  • bindings/scripts/test/JS/JSTestSerialization.h:
  • bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:

(WebCore::JSTestSerializedScriptValueInterface::finishCreation):

  • bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
  • bindings/scripts/test/JS/JSTestTypedefs.cpp:

(WebCore::JSTestTypedefs::finishCreation):

  • bindings/scripts/test/JS/JSTestTypedefs.h:
  • bindings/scripts/test/TestGlobalObject.idl:
  • page/DOMWindow.idl:
  • workers/DedicatedWorkerGlobalScope.idl:

LayoutTests:

Extend layout test coverage to check that:

  • WorkerGlobalScope.indexedDB is on the prototype.
  • WorkerGlobalScope.IDBDatabase constructor is on the instance

Both are enabled at runtime properties.

  • fast/workers/WorkerGlobalScope-properties-prototype-expected.txt:
  • fast/workers/WorkerGlobalScope-properties-prototype.html:
  • fast/workers/self-hasOwnProperty-expected.txt:
  • fast/workers/self-hasOwnProperty.html:
2:52 PM Changeset in webkit [208612] by eric.carlson@apple.com
  • 3 edits in trunk/Source/WebKit/win

[MediaStream] defer resolution of getUserMedia promise made in a background tab
https://bugs.webkit.org/show_bug.cgi?id=164643
<rdar://problem/29048317>

Unreviewed build fix after r208606.

  • Plugins/PluginView.cpp:

(WebCore::PluginView::mediaCanStart):

  • Plugins/PluginView.h:
2:16 PM Changeset in webkit [208611] by Brent Fulgham
  • 6 edits in trunk/Source/WebKit2

Get rid of old sandbox rules for OS's we no longer support
https://bugs.webkit.org/show_bug.cgi?id=164638

Reviewed by Simon Fraser.

Clean up the various sandbox profiles to get rid of rules that applied to operating system
versions we no longer support, or were added in support of bugs that have long since been
fixed.

This should introduce no change in behavior.

  • DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in:
  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
  • PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
  • Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb:
  • WebProcess/com.apple.WebProcess.sb.in:
1:59 PM Changeset in webkit [208610] by Antti Koivisto
  • 6 edits
    2 adds in trunk

Shadow DOM: Toggling class in .class ::slotted(*) does not trigger style recalc
https://bugs.webkit.org/show_bug.cgi?id=160864

Reviewed by Ryosuke Niwa.

Source/WebCore:

Also fix similar issue with ::host

Test: fast/shadow-dom/css-scoping-host-and-slotted-context-invalidation.html

  • css/StyleInvalidationAnalysis.cpp:

(WebCore::StyleInvalidationAnalysis::invalidateIfNeeded):

If we have ::slotted rules and encounter a <slot>, invalidate the slotted host children.

(WebCore::StyleInvalidationAnalysis::invalidateStyle):

Invalidate the shadow host if we have ::host rules.

  • css/StyleInvalidationAnalysis.h:
  • dom/InlineStyleSheetOwner.cpp:

(WebCore::InlineStyleSheetOwner::createSheet):

Fix a bug where it was possible to mutate stylesheets in the inline stylesheet cache.
The included test covers this.

  • style/StyleScope.cpp:

(WebCore::Style::Scope::updateActiveStyleSheets):

Handle the full invalidation case.

LayoutTests:

  • fast/shadow-dom/css-scoping-host-and-slotted-context-invalidation-expected.html: Added.
  • fast/shadow-dom/css-scoping-host-and-slotted-context-invalidation.html: Added.
1:57 PM Changeset in webkit [208609] by beidson@apple.com
  • 25 edits in trunk

IndexedDB 2.0: "close pending flag" and firing blocked events all need fixing.
https://bugs.webkit.org/show_bug.cgi?id=164641

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

  • web-platform-tests/IndexedDB/idbobjectstore-rename-store-expected.txt:

Source/WebCore:

No new tests (Covered by at least 3 existing tests).

  • Modules/indexeddb/IDBDatabase.cpp:

(WebCore::IDBDatabase::close):
(WebCore::IDBDatabase::maybeCloseInServer):

  • Modules/indexeddb/client/IDBConnectionProxy.cpp:

(WebCore::IDBClient::IDBConnectionProxy::databaseConnectionPendingClose):

  • Modules/indexeddb/client/IDBConnectionProxy.h:
  • Modules/indexeddb/client/IDBConnectionToServer.cpp:

(WebCore::IDBClient::IDBConnectionToServer::databaseConnectionPendingClose):

  • Modules/indexeddb/client/IDBConnectionToServer.h:
  • Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
  • Modules/indexeddb/server/IDBServer.cpp:

(WebCore::IDBServer::IDBServer::databaseConnectionPendingClose):

  • Modules/indexeddb/server/IDBServer.h:
  • Modules/indexeddb/server/ServerOpenDBRequest.cpp:

(WebCore::IDBServer::ServerOpenDBRequest::maybeNotifyRequestBlocked):
(WebCore::IDBServer::ServerOpenDBRequest::notifyRequestBlocked): Deleted.

  • Modules/indexeddb/server/ServerOpenDBRequest.h:

(WebCore::IDBServer::ServerOpenDBRequest::hasNotifiedBlocked): Deleted.

  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::UniqueIDBDatabase::allConnectionsAreClosedOrClosing):
(WebCore::IDBServer::UniqueIDBDatabase::maybeNotifyConnectionsOfVersionChange):
(WebCore::IDBServer::UniqueIDBDatabase::notifyCurrentRequestConnectionClosedOrFiredVersionChangeEvent):

  • Modules/indexeddb/server/UniqueIDBDatabase.h:
  • Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:

(WebCore::IDBServer::UniqueIDBDatabaseConnection::connectionPendingCloseFromClient):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::connectionClosedFromClient):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::connectionIsClosing):

  • Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
  • Modules/indexeddb/shared/InProcessIDBServer.cpp:

(WebCore::InProcessIDBServer::databaseConnectionPendingClose):

  • Modules/indexeddb/shared/InProcessIDBServer.h:

Source/WebKit2:

  • DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:

(WebKit::WebIDBConnectionToClient::databaseConnectionPendingClose):

  • DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
  • DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:
  • WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:

(WebKit::WebIDBConnectionToServer::databaseConnectionPendingClose):

  • WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
1:55 PM Changeset in webkit [208608] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Fix time unit parsing
https://bugs.webkit.org/show_bug.cgi?id=164649

Reviewed by Dean Jackson.

Make sure that a unitless value gets changed to milliseconds properly.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::consumeTime):

1:50 PM Changeset in webkit [208607] by Keith Rollin
  • 3 edits in trunk/Source/WebCore

Reduce number of platformMemoryUsage calls
https://bugs.webkit.org/show_bug.cgi?id=164375

Reviewed by Andreas Kling.

platformMemoryUsage was being called all the time while logging the
results of various memory-purging operations. This logging is
subordinate to the needs of performance and so can be removed.
Behavior is now as follows:

  • If memory-pressure relief logging is enabled, logging includes

memory usage information. On Cocoa, this logging is disabled by
default but can be enabled by setting LogMemoryJetsamDetails in
defaults.

  • Otherwise, if release-logging is enabled (as it is on Cocoa),

abbreviated memory pressure relief logging is performed: the logging
lines are printed but without any memory usage information.

  • Otherwise, no logging is performed.

No new tests -- no tests for logging.

  • platform/MemoryPressureHandler.cpp:

(WebCore::MemoryPressureHandler::ReliefLogger::logMemoryUsageChange):

  • platform/MemoryPressureHandler.h:

(WebCore::MemoryPressureHandler::ReliefLogger::ReliefLogger):
(WebCore::MemoryPressureHandler::ReliefLogger::~ReliefLogger):

1:45 PM Changeset in webkit [208606] by eric.carlson@apple.com
  • 16 edits
    2 adds in trunk

[MediaStream] defer resolution of getUserMedia promise made in a background tab
https://bugs.webkit.org/show_bug.cgi?id=164643
<rdar://problem/29048317>

Reviewed by Brady Eidson.

Source/WebCore:

Test: fast/mediastream/get-user-media-background-tab.html

Do not start producing data when the document does not allow media
to start playing. Instead, register with the document for a callback
when playback is allowed and start then.

  • Modules/mediastream/MediaStream.cpp:

(WebCore::MediaStream::~MediaStream):
(WebCore::MediaStream::mediaCanStart):
(WebCore::MediaStream::startProducingData):
(WebCore::MediaStream::stopProducingData):
(WebCore::MediaStream::pageMutedStateDidChange):

  • Modules/mediastream/MediaStream.h:
  • Modules/webaudio/AudioContext.cpp:

(WebCore::AudioContext::mediaCanStart): Deal with API change.

  • Modules/webaudio/AudioContext.h:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaCanStart): Ditto.

  • html/HTMLMediaElement.h:
  • page/MediaCanStartListener.h:
  • page/Page.cpp:

(WebCore::Page::takeAnyMediaCanStartListener): Return the listener and document.
(WebCore::Page::setCanStartMedia): Pass the document to the listener.

  • page/Page.h:

Source/WebKit2:

Do not ask for user for access to capture devices when the document does not
allow media to play, wait until playback is allowed.

  • WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:

(WebKit::UserMediaPermissionRequestManager::startUserMediaRequest):
(WebKit::UserMediaPermissionRequestManager::sendUserMediaRequest):
(WebKit::UserMediaPermissionRequestManager::mediaCanStart):
(WebKit::UserMediaPermissionRequestManager::grantUserMediaDevicesSandboxExtension):

  • WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::mediaCanStart):

  • WebProcess/Plugins/PluginView.h:

LayoutTests:

  • fast/mediastream/get-user-media-background-tab-expected.txt: Added.
  • fast/mediastream/get-user-media-background-tab.html: Added.
1:20 PM Changeset in webkit [208605] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

RenderFlowThread's containing block cache should be invalidated before calling styleDidChange.
https://bugs.webkit.org/show_bug.cgi?id=164646

Reviewed by Simon Fraser.

We have to invalidate the containing block cache for RenderFlowThreads soon after the containing block context
changes. Invalidating it in RenderBlock::styleDidChange is too late since we might run some code in some
of the subclasses that use this stale containing block cache.

No known behaviour change.

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::styleDidChange): This change could trigger double invalidation.
However running this code twice shouldn't impact performance greatly.
(WebCore::RenderBlock::resetFlowThreadContainingBlockAndChildInfoIncludingDescendants):
(WebCore::RenderBlock::invalidateFlowThreadContainingBlockIncludingDescendants): Deleted.

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

(WebCore::RenderElement::setStyle): We don't need to call the invalidation from initializeStyle(), since
we don't yet have cache at that point.

  • rendering/RenderInline.cpp:

(WebCore::RenderInline::splitInlines):

12:38 PM Changeset in webkit [208604] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Call RuntimeAgent.disableControlFlowProfiler when Code Coverage Profiler is turned off
https://bugs.webkit.org/show_bug.cgi?id=163407
<rdar://problem/28764230>

Reviewed by Timothy Hatcher.

Turning Type Profiler off by clicking [T] icon now disables its backend by calling RuntimeAgent.disableTypeProfiler().

  • UserInterface/Views/SourceCodeTextEditor.js:

(WebInspector.SourceCodeTextEditor.prototype._setTypeTokenAnnotatorEnabledState):

12:16 PM Changeset in webkit [208603] by Darin Adler
  • 96 edits in trunk/Source

Move Node from ExceptionCode to ExceptionOr
https://bugs.webkit.org/show_bug.cgi?id=164515

Reviewed by Sam Weinig.

Source/WebCore:

  • bindings/js/JSHTMLSelectElementCustom.cpp:

(WebCore::selectElementIndexSetter): Call remove instead of removeByIndex.
Was renamed now that there is no conflict.

  • bindings/js/JSNodeCustom.cpp:

(WebCore::JSNode::insertBefore): Use ExceptionOr.
(WebCore::JSNode::replaceChild): Ditto.
(WebCore::JSNode::removeChild): Ditto.
(WebCore::JSNode::appendChild): Ditto.

  • dom/Attr.cpp:

(WebCore::Attr::Attr): Take a reference.
(WebCore::Attr::create): Ditto.
(WebCore::Attr::createTextChild): Use a Ref.
(WebCore::Attr::setPrefix): Use ExceptionOr.
(WebCore::Attr::setNodeValue): Ditto.
(WebCore::Attr::attachToElement): Take a reference.

  • dom/Attr.h: Updated for above. Also made setPrefix private.
  • dom/CharacterData.cpp:

(WebCore::CharacterData::setNodeValue): Use ExceptionOr.

  • dom/CharacterData.h: Updated for the above.
  • dom/ContainerNode.cpp:

(WebCore::collectChildrenAndRemoveFromOldParent): Use ExceptionOr.
(WebCore::checkAcceptChild): Ditto.
(WebCore::checkAcceptChildGuaranteedNodeTypes): Ditto.
(WebCore::ContainerNode::ensurePreInsertionValidity): Ditto.
(WebCore::checkPreReplacementValidity): Ditto.
(WebCore::ContainerNode::insertBefore): Ditto.
(WebCore::ContainerNode::replaceChild): Ditto.
(WebCore::ContainerNode::removeChild): Ditto.
(WebCore::ContainerNode::appendChild): Ditto.
(WebCore::ContainerNode::appendChildWithoutPreInsertionValidityCheck): Ditto.
(WebCore::ContainerNode::cloneChildNodes): Ditto.
(WebCore::ContainerNode::append): Ditto.
(WebCore::ContainerNode::prepend): Ditto.

  • dom/ContainerNode.h: Updated for above changes.
  • dom/Document.cpp:

(WebCore::Document::setTitle): Removed unneeded ASSERT_NO_EXCEPTION.
(WebCore::Document::setBodyOrFrameset): Removed unneeded ignored
exception code.

  • dom/Element.cpp:

(WebCore::Element::setPrefix): Use ExceptionOr.
(WebCore::Element::setAttributeNode): Updated for changes to Attr.
(WebCore::Element::setAttributeNodeNS): Ditto.
(WebCore::Element::setOuterHTML): Use ExceptionOr.
(WebCore::Element::ensureAttr): Updated for changes to Attr.
(WebCore::Element::insertAdjacent): Use ExceptionOr.

  • dom/Element.h: Updated for above.
  • dom/Node.cpp:

(WebCore::Node::setNodeValue): Use ExceptionOr.
(WebCore::Node::insertBefore): Ditto.
(WebCore::Node::replaceChild): Ditto.
(WebCore::Node::removeChild): Ditto.
(WebCore::Node::appendChild): Ditto.
(WebCore::Node::convertNodesOrStringsIntoNode): Ditto.
(WebCore::Node::before): Ditto.
(WebCore::Node::after): Ditto.
(WebCore::Node::replaceWith): Ditto.
(WebCore::Node::remove): Ditto.
(WebCore::Node::cloneNodeForBindings): Ditto.
(WebCore::Node::setPrefix): Ditto.
(WebCore::Node::checkSetPrefix): Ditto.
(WebCore::Node::setTextContent): Ditto.

  • dom/Node.h: Updated for above.
  • dom/Node.idl: Use non-legacy exceptions.
  • dom/Range.cpp:

(WebCore::Range::processContents): Use ExceptionOr.
(WebCore::processContentsBetweenOffsets): Ditto.
(WebCore::processNodes): Ditto.
(WebCore::processAncestorsAndTheirSiblings): Ditto.
(WebCore::Range::insertNode): Ditto.
(WebCore::Range::surroundContents): Ditto.

  • dom/Text.cpp:

(WebCore::Text::splitText): Use ExceptionOr.
(WebCore::Text::replaceWholeText): Removed unneeded IGNORE_EXCEPTION.

  • editing/AppendNodeCommand.cpp:

(WebCore::AppendNodeCommand::doApply): Removed unneeded IGNORE_EXCEPTION.

  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::insertNewDefaultParagraphElementAt): Ditto.

  • editing/EditorCommand.cpp:

(WebCore::executeInsertNode): Use ExceptionOr.

  • editing/InsertNodeBeforeCommand.cpp:

(WebCore::InsertNodeBeforeCommand::doApply): Removed unneeded IGNORE_EXCEPTION.

  • editing/MergeIdenticalElementsCommand.cpp:

(WebCore::MergeIdenticalElementsCommand::doApply): Ditto.
(WebCore::MergeIdenticalElementsCommand::doUnapply): Use ExceptionOr.

  • editing/RemoveNodeCommand.cpp:

(WebCore::RemoveNodeCommand::doUnapply): Removed unneeded IGNORE_EXCEPTION.

  • editing/ReplaceNodeWithSpanCommand.cpp:

(WebCore::swapInNodePreservingAttributesAndChildren): Removed unneeded
ASSERT_NO_EXCEPTION.

  • editing/ReplaceSelectionCommand.cpp:

(WebCore::ReplacementFragment::removeNode): Ditto.
(WebCore::ReplacementFragment::insertNodeBefore): Ditto.
(WebCore::ReplacementFragment::insertFragmentForTestRendering): Ditto.
(WebCore::ReplacementFragment::restoreAndRemoveTestRenderingNodesToFragment): Ditto.
(WebCore::ReplaceSelectionCommand::insertAsListItems): Ditto.

  • editing/SplitElementCommand.cpp:

(WebCore::SplitElementCommand::executeApply): Use ExceptionOr.
(WebCore::SplitElementCommand::doUnapply): Removed unneeded IGNORE_EXCEPTION.

  • editing/SplitTextNodeCommand.cpp:

(WebCore::SplitTextNodeCommand::insertText1AndTrimText2): Use ExceptionOr.

  • editing/WrapContentsInDummySpanCommand.cpp:

(WebCore::WrapContentsInDummySpanCommand::executeApply): Removed unneeded
IGNORE_EXCEPTION.
(WebCore::WrapContentsInDummySpanCommand::doUnapply): Ditto.

  • editing/cocoa/EditorCocoa.mm:

(WebCore::Editor::styleForSelectionStart): Removed unneeded ASSERT_NO_EXCEPTION
and IGNORE_EXCEPTION.

  • editing/htmlediting.cpp:

(WebCore::createTabSpanElement): Ditto.

  • editing/markup.cpp:

(WebCore::fillContainerFromString): Ditto.
(WebCore::createFragmentFromText): Ditto.
(WebCore::removeElementFromFragmentPreservingChildren): Ditto.
(WebCore::replaceChildrenWithFragment): Use ExceptionOr.
(WebCore::replaceChildrenWithText): Ditto.

  • editing/ios/EditorIOS.mm:

(WebCore::Editor::WebContentReader::addFragment): Removed unneeded exception
ignoring code.
(WebCore::Editor::setDictationPhrasesAsChildOfElement): Ditto.
(WebCore::Editor::setTextAsChildOfElement): Ditto.

  • html/ColorInputType.cpp:

(WebCore::ColorInputType::createShadowSubtree): Removed unneeded
ASSERT_NO_EXCEPTION.

  • html/FTPDirectoryDocument.cpp:

(WebCore::FTPDirectoryDocumentParser::appendEntry): Removed unneeded
IGNORE_EXCEPTION.
(WebCore::FTPDirectoryDocumentParser::createTDForFilename): Ditto.
(WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate): Ditto.
(WebCore::FTPDirectoryDocumentParser::createBasicDocument): Ditto.

  • html/FileInputType.cpp:

(WebCore::FileInputType::createShadowSubtree): Ditto.

  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::setText): Removed unneeded ASSERT_NO_EXCEPTION.

  • html/HTMLDetailsElement.cpp:

(WebCore::HTMLDetailsElement::didAddUserAgentShadowRoot): Ditto.

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::textToFragment): Use ExceptionOr.
(WebCore::HTMLElement::setOuterText): Ditto.

  • html/HTMLKeygenElement.cpp:

(WebCore::HTMLKeygenElement::HTMLKeygenElement): Removed unneeded
ASSERT_NO_EXCEPTION and IGNORE_EXCEPTION.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::createMediaControls): Ditto.

  • html/HTMLMeterElement.cpp:

(WebCore::HTMLMeterElement::didAddUserAgentShadowRoot): Ditto.

  • html/HTMLOptionElement.cpp:

(WebCore::HTMLOptionElement::createForJSConstructor): Use ExceptionOr.
(WebCore::HTMLOptionElement::setText): Removed unneeded
ASSERT_NO_EXCEPTION and IGNORE_EXCEPTION.

  • html/HTMLOptionsCollection.cpp:

(WebCore::HTMLOptionsCollection::remove): Call remove, not removeByIndex,
since we were able to change the name.

  • html/HTMLOutputElement.cpp:

(WebCore::HTMLOutputElement::setTextContentInternal): Removed unneeded
ASSERT_NO_EXCEPTION and IGNORE_EXCEPTION.

  • html/HTMLProgressElement.cpp:

(WebCore::HTMLProgressElement::didAddUserAgentShadowRoot): Ditto.

  • html/HTMLScriptElement.cpp:

(WebCore::HTMLScriptElement::setText): Ditto.

  • html/HTMLSelectElement.cpp:

(WebCore::HTMLSelectElement::add): Use ExceptionOr.
(WebCore::HTMLSelectElement::remove): Renamed from removeByIndex since
there is no conflict with remove any more.
(WebCore::HTMLSelectElement::setOption): Call remove.

  • html/HTMLSelectElement.h: Updated for above.
  • html/HTMLSelectElement.idl: Got rid of ImplementedAs=removeByIndex.
  • html/HTMLSummaryElement.cpp:

(WebCore::HTMLSummaryElement::didAddUserAgentShadowRoot): Removed unneeded
ASSERT_NO_EXCEPTION and IGNORE_EXCEPTION.

  • html/HTMLTableElement.cpp:

(WebCore::HTMLTableElement::HTMLTableElement): Initialize data members in
class definition instead of here.
(WebCore::HTMLTableElement::caption): Simplified using childrenOfType.
(WebCore::HTMLTableElement::setCaption): Use ExceptionOr.
(WebCore::HTMLTableElement::setTHead): Ditto.
(WebCore::HTMLTableElement::setTFoot): Ditto.
(WebCore::HTMLTableElement::deleteTFoot): Removed unneeded ASSERT_NO_EXCEPTION
and IGNORE_EXCEPTION.
(WebCore::HTMLTableElement::createTBody): Ditto.
(WebCore::HTMLTableElement::deleteCaption): Ditto.
(WebCore::HTMLTableElement::insertRow): Use ExceptionOr.

  • html/HTMLTableElement.h: Updated for above.
  • html/HTMLTableRowElement.cpp:

(WebCore::HTMLTableRowElement::insertCell): Use ExceptionOr.
(WebCore::HTMLTableRowElement::deleteCell): Ditto.

  • html/HTMLTableSectionElement.cpp:

(WebCore::HTMLTableSectionElement::insertRow): Ditto.
(WebCore::HTMLTableSectionElement::deleteRow): Ditto.

  • html/HTMLTextAreaElement.cpp:

(WebCore::HTMLTextAreaElement::didAddUserAgentShadowRoot): Removed unneeded
ASSERT_NO_EXCEPTION and IGNORE_EXCEPTION.
(WebCore::HTMLTextAreaElement::setDefaultValue): Ditto.
(WebCore::HTMLTextAreaElement::updatePlaceholderText): Ditto.

  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::setInnerTextValue): Ditto.

  • html/HTMLTitleElement.cpp:

(WebCore::HTMLTitleElement::setText): Ditto.

  • html/MediaDocument.cpp:

(WebCore::MediaDocumentParser::createDocumentStructure): Ditto.
(WebCore::MediaDocument::replaceMediaElementTimerFired): Ditto.

  • html/PluginDocument.cpp:

(WebCore::PluginDocumentParser::createDocumentStructure): Ditto.

  • html/RangeInputType.cpp:

(WebCore::RangeInputType::createShadowSubtree): Ditto.

  • html/SearchInputType.cpp:

(WebCore::SearchInputType::createShadowSubtree): Ditto.

  • html/TextFieldInputType.cpp:

(WebCore::TextFieldInputType::createShadowSubtree): Ditto.
(WebCore::TextFieldInputType::updatePlaceholderText): Ditto.
(WebCore::TextFieldInputType::createContainer): Ditto.
(WebCore::TextFieldInputType::createAutoFillButton): Ditto.

  • html/ValidationMessage.cpp:

(WebCore::ValidationMessage::setMessageDOMAndStartTimer): Ditto.
(WebCore::ValidationMessage::buildBubbleTree): Ditto.
(WebCore::ValidationMessage::deleteBubbleTree): Ditto.

  • html/shadow/MediaControlElements.cpp:

(WebCore::MediaControlTextTrackContainerElement::updateDisplay): Ditto.

  • html/shadow/MediaControls.cpp:

(WebCore::MediaControls::createTextTrackDisplay): Ditto.

  • html/shadow/MediaControlsApple.cpp:

(WebCore::MediaControlsApple::MediaControlsApple): Initialize data members
in class definition instead of here.
(WebCore::MediaControlsApple::tryCreateControls): Use ExceptionOr.

  • html/shadow/MediaControlsApple.h: Updated for above.
  • html/track/VTTCue.cpp:

(WebCore::VTTCue::copyWebVTTNodeToDOMTree): Removed unneeded ASSERT_NO_EXCEPTION
and IGNORE_EXCEPTION.
(WebCore::VTTCue::getDisplayTree): Ditto.

  • html/track/VTTRegion.cpp:

(WebCore::VTTRegion::appendTextTrackCueBox): Ditto.

  • inspector/DOMEditor.cpp: Use ExceptionOr in action classes.

(WebCore::DOMEditor::DOMEditor): Take a reference.
(WebCore::DOMEditor::insertBefore): Use ExceptionOr.
(WebCore::DOMEditor::removeChild): Ditto.
(WebCore::DOMEditor::setAttribute): Ditto.
(WebCore::DOMEditor::removeAttribute): Ditto.
(WebCore::DOMEditor::setOuterHTML): Ditto.
(WebCore::DOMEditor::replaceWholeText): Ditto.
(WebCore::DOMEditor::replaceChild): Ditto.
(WebCore::DOMEditor::setNodeValue): Ditto.
(WebCore::populateErrorString): Ditto.

  • inspector/DOMEditor.h: Updated for above changes.
  • inspector/DOMPatchSupport.cpp:

(WebCore::DOMPatchSupport::patchDocument): Updated to use references,
to use ExceptionOr, and to use a struct without a constructor for Digest.
(WebCore::DOMPatchSupport::DOMPatchSupport): Ditto.
(WebCore::DOMPatchSupport::patchNode): Ditto.
(WebCore::DOMPatchSupport::innerPatchNode): Ditto.
(WebCore::DOMPatchSupport::diff): Ditto.
(WebCore::DOMPatchSupport::innerPatchChildren): Ditto.
(WebCore::DOMPatchSupport::createDigest): Ditto.
(WebCore::DOMPatchSupport::insertBeforeAndMarkAsUsed): Ditto.
(WebCore::DOMPatchSupport::removeChildAndMoveToNew): Ditto.
(WebCore::DOMPatchSupport::markNodeAsUsed): Ditto.

  • inspector/DOMPatchSupport.h: Updated for above.
  • inspector/InspectorCSSAgent.cpp: Use ExceptionOr in the action classes.

(WebCore::InspectorCSSAgent::getStyleSheetText): Use ExceptionOr.
(WebCore::InspectorCSSAgent::setStyleSheetText): Ditto.
(WebCore::InspectorCSSAgent::setStyleText): Ditto.
(WebCore::InspectorCSSAgent::setRuleSelector): Ditto.
(WebCore::InspectorCSSAgent::createInspectorStyleSheetForDocument): Ditto.
(WebCore::InspectorCSSAgent::addRule): Ditto.

  • inspector/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::didCreateFrontendAndBackend): Ditto.
(WebCore::InspectorDOMAgent::setAttributeValue): Ditto.
(WebCore::InspectorDOMAgent::setAttributesAsText): Ditto.
(WebCore::InspectorDOMAgent::removeAttribute): Ditto.
(WebCore::InspectorDOMAgent::setOuterHTML): Ditto.
(WebCore::InspectorDOMAgent::setNodeValue): Ditto.
(WebCore::InspectorDOMAgent::undo): Ditto.
(WebCore::InspectorDOMAgent::redo): Ditto.

  • inspector/InspectorHistory.cpp:

(WebCore::InspectorHistory::Action::Action): Moved to header.
(WebCore::InspectorHistory::Action::~Action): Ditto.
(WebCore::InspectorHistory::Action::toString): Ditto.
(WebCore::InspectorHistory::Action::isUndoableStateMark): Ditto.
(WebCore::InspectorHistory::Action::mergeId): Ditto.
(WebCore::InspectorHistory::Action::merge): Ditto.
(WebCore::InspectorHistory::InspectorHistory): Deleted.
(WebCore::InspectorHistory::~InspectorHistory): Deleted.
(WebCore::InspectorHistory::perform): Updated exception handling.
(WebCore::InspectorHistory::markUndoableState): Ditto.
(WebCore::InspectorHistory::undo): Ditto.
(WebCore::InspectorHistory::redo): Ditto.

  • inspector/InspectorHistory.h: Updated for above.
  • inspector/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::setDocumentContent): Use reference.

  • inspector/InspectorStyleSheet.cpp:

(WebCore::InspectorStyle::text): Use ExceptionOr and renamed from
getText since this now has a return value.
(WebCore::InspectorStyle::populateAllProperties): Updated for above.
(WebCore::InspectorStyle::setText): Use ExceptionOr.
(WebCore::InspectorStyleSheet::setText): Ditto.
(WebCore::InspectorStyleSheet::ruleSelector): Ditto.
(WebCore::InspectorStyleSheet::setRuleSelector): Ditto.
(WebCore::InspectorStyleSheet::addRule): Ditto.
(WebCore::InspectorStyleSheet::deleteRule): Ditto.
(WebCore::InspectorStyleSheet::buildObjectForStyleSheet): Ditto.
(WebCore::InspectorStyleSheet::buildObjectForStyle): Ditto.
(WebCore::InspectorStyleSheet::setStyleText): Ditto.
(WebCore::InspectorStyleSheet::text): Use ExceptionOr and renamed.
(WebCore::InspectorStyleSheet::checkPageStyleSheet): Deleted.
Just wrote this code inline in each place this was called since it's
just a single null check.
(WebCore::InspectorStyleSheetForInlineStyle::text): Use ExceptionOr
and renamed.
(WebCore::InspectorStyleSheetForInlineStyle::setStyleText): Ditto.
(WebCore::InspectorStyle::getText): Deleted.

  • inspector/InspectorStyleSheet.h: Updated for above changes.
  • page/DragController.cpp:

(WebCore::documentFragmentFromDragData): Removed unneeded
ASSERT_NO_EXCEPTION and IGNORE_EXCEPTION.

  • page/ios/FrameIOS.mm:

(WebCore::Frame::initWithSimpleHTMLDocument): Ditto.

  • svg/SVGTRefElement.cpp:

(WebCore::SVGTRefElement::updateReferencedText): Ditto.
(WebCore::SVGTRefElement::detachTarget): Ditto.

  • xml/XMLTreeViewer.cpp:

(WebCore::XMLTreeViewer::transformDocumentToTreeView): Ditto.

Source/WebKit/mac:

  • DOM/DOMHTMLSelectElement.mm:

(-[DOMHTMLSelectElement remove:]): Call remove instead of removeByIndex
now that it was renamed.

  • DOM/DOMNode.mm:

(-[DOMNode setNodeValue:]): Updated exception handling.
(-[DOMNode setPrefix:]): Ditto.
(-[DOMNode setTextContent:]): Ditto.
(-[DOMNode insertBefore:refChild:]): Ditto.
(-[DOMNode replaceChild:oldChild:]): Ditto.
(-[DOMNode removeChild:]): Ditto.
(-[DOMNode appendChild:]): Ditto.
(-[DOMNode cloneNode:]): Ditto.

Source/WebKit/win:

  • DOMCoreClasses.cpp:

(DOMNode::insertBefore): Update exception handling.
(DOMNode::removeChild): Ditto.

Source/WebKit2:

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp:

(webkit_dom_html_select_element_remove): Updated exception handling.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.cpp:

(webkit_dom_node_insert_before): Ditto.
(webkit_dom_node_replace_child): Ditto.
(webkit_dom_node_remove_child): Ditto.
(webkit_dom_node_append_child): Ditto.
(webkit_dom_node_clone_node_with_error): Ditto.
(webkit_dom_node_set_node_value): Ditto.
(webkit_dom_node_set_text_content): Ditto.

  • WebProcess/InjectedBundle/API/mac/WKDOMNode.mm:

(-[WKDOMNode insertNode:before:]): Ditto.
(-[WKDOMNode appendChild:]): Ditto.
(-[WKDOMNode removeChild:]): Ditto.

  • WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:

(WebKit::PDFPlugin::PDFPlugin): Removed unneeded ASSERT_NO_EXCEPTION.

  • WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:

(WebKit::PDFPluginChoiceAnnotation::createAnnotationElement): Ditto.

12:12 PM Changeset in webkit [208602] by jiewen_tan@apple.com
  • 44 edits
    1 copy in trunk

Rename CryptoKeyUsage to CryptoKeyUsageBitmap and CryptoKey::Usage to CryptoKeyUsage
https://bugs.webkit.org/show_bug.cgi?id=164624
<rdar://problem/29210140>

Reviewed by Brent Fulgham.

Source/WebCore:

This patch allows IDLType CryptoKeyUsage to be shared among different IDLs, i.e. CryptoKey.idl,
SubtleCrypto.idl and JsonWebKey.idl such that it can simplify the customized binding codes.

Covered by existing tests.

  • CMakeLists.txt:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSCryptoKeySerializationJWK.cpp:
  • bindings/js/JSCryptoKeySerializationJWK.h:
  • bindings/js/JSSubtleCryptoCustom.cpp:

(WebCore::toCryptoKeyUsageBitmap):
(WebCore::cryptoKeyUsageBitmapFromJSValue):
(WebCore::toKeyData):
(WebCore::jsSubtleCryptoFunctionGenerateKeyPromise):
(WebCore::jsSubtleCryptoFunctionImportKeyPromise):
(WebCore::cryptoKeyUsageFromString): Deleted.
(WebCore::cryptoKeyUsagesFromJSValue): Deleted.

  • bindings/js/JSWebKitSubtleCryptoCustom.cpp:
  • bindings/js/SerializedScriptValue.cpp:
  • crypto/CryptoAlgorithm.cpp:
  • crypto/CryptoAlgorithm.h:
  • crypto/CryptoKey.cpp:
  • crypto/CryptoKey.h:
  • crypto/CryptoKey.idl:
  • crypto/CryptoKeySerialization.h:
  • crypto/CryptoKeyUsage.h:
  • crypto/CryptoKeyUsage.idl: Added.
  • crypto/gnutls/CryptoKeyRSAGnuTLS.cpp:
  • crypto/JsonWebKey.h:
  • crypto/JsonWebKey.idl:
  • crypto/SubtleCrypto.idl:
  • crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
  • crypto/algorithms/CryptoAlgorithmAES_CBC.h:
  • crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
  • crypto/algorithms/CryptoAlgorithmAES_KW.h:
  • crypto/algorithms/CryptoAlgorithmHMAC.cpp:
  • crypto/algorithms/CryptoAlgorithmHMAC.h:
  • crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
  • crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h:
  • crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
  • crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
  • crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
  • crypto/algorithms/CryptoAlgorithmRSA_OAEP.h:
  • crypto/keys/CryptoKeyAES.cpp:
  • crypto/keys/CryptoKeyAES.h:
  • crypto/keys/CryptoKeyHMAC.cpp:
  • crypto/keys/CryptoKeyHMAC.h:
  • crypto/keys/CryptoKeyRSA.cpp:
  • crypto/keys/CryptoKeyRSA.h:
  • crypto/keys/CryptoKeySerializationRaw.cpp:
  • crypto/keys/CryptoKeySerializationRaw.h:
  • crypto/mac/CryptoKeyRSAMac.cpp:

LayoutTests:

  • crypto/subtle/generate-key-malformed-parameters-expected.txt:
  • crypto/subtle/import-key-malformed-parameters-expected.txt:
11:46 AM Changeset in webkit [208601] by commit-queue@webkit.org
  • 3 edits in trunk/Tools

Build all Mac API tests
https://bugs.webkit.org/show_bug.cgi?id=164633

Patch by Alex Christensen <achristensen@webkit.org> on 2016-11-11
Reviewed by Gyuyoung Kim.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/mac/NavigatorLanguage.mm:
11:11 AM Changeset in webkit [208600] by achristensen@apple.com
  • 4 edits in trunk

Allow mutable lambdas in HashMap::ensure
https://bugs.webkit.org/show_bug.cgi?id=164642

Reviewed by Sam Weinig.

Source/WTF:

  • wtf/HashMap.h:

(WTF::HashMapEnsureTranslator::translate):
(WTF::X>::removeIf):

Tools:

  • TestWebKitAPI/Tests/WTF/HashMap.cpp:

(TestWebKitAPI::TEST):

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

[CSS Parser] Fix basic shape parsing
https://bugs.webkit.org/show_bug.cgi?id=164645

Reviewed by Dean Jackson.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeBasicShape):

11:02 AM Changeset in webkit [208598] by Ryan Haddad
  • 1 edit
    1 add in trunk/LayoutTests

Add ios-simulator baseline for compositing/tiling/visiblerect-accumulated-offset.html.

Unreviewed test gardening.

  • platform/ios-simulator/compositing/tiling/visiblerect-accumulated-offset-expected.txt: Added.
10:56 AM Changeset in webkit [208597] by Alan Bujtas
  • 14 edits in trunk/Source/WebCore

RenderFlowThread::removeLineRegionInfo shouldn't call HashMap::contains before HashMap::remove
https://bugs.webkit.org/show_bug.cgi?id=164639

Reviewed by Simon Fraser.

Also instead of asserting that the incoming renderer is not nullptr, we could just pass a reference in.

No change in functionality.

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::invalidateFlowThreadContainingBlockIncludingDescendants):
(WebCore::canComputeRegionRangeForBox):
(WebCore::RenderBlock::computeRegionRangeForBoxChild):
(WebCore::RenderBlock::estimateRegionRangeForBoxChild):
(WebCore::RenderBlock::updateRegionRangeForBoxChild):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::hasRegionRangeInFlowThread):

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::removeFromRenderFlowThreadIncludingDescendants):

  • rendering/RenderFlowThread.cpp:

(WebCore::RenderFlowThread::removeFlowChildInfo):
(WebCore::RenderFlowThread::validateRegions):
(WebCore::RenderFlowThread::removeRenderBoxRegionInfo):
(WebCore::RenderFlowThread::removeLineRegionInfo):
(WebCore::RenderFlowThread::clearRenderBoxRegionInfoAndCustomStyle):
(WebCore::RenderFlowThread::setRegionRangeForBox):
(WebCore::RenderFlowThread::hasCachedRegionRangeForBox):
(WebCore::RenderFlowThread::computedRegionRangeForBox):
(WebCore::RenderFlowThread::checkLinesConsistency):

  • rendering/RenderFlowThread.h:
  • rendering/RenderMultiColumnFlowThread.cpp:

(WebCore::RenderMultiColumnFlowThread::setRegionRangeForBox):

  • rendering/RenderMultiColumnFlowThread.h:
  • rendering/RenderNamedFlowFragment.cpp:

(WebCore::RenderNamedFlowFragment::clearObjectStyleInRegion):

  • rendering/RenderNamedFlowFragment.h:
  • rendering/RenderNamedFlowThread.cpp:

(WebCore::RenderNamedFlowThread::clearRenderObjectCustomStyle):
(WebCore::RenderNamedFlowThread::removeFlowChildInfo):

  • rendering/RenderNamedFlowThread.h:
  • rendering/RenderRegion.cpp:

(WebCore::RenderRegion::removeRenderBoxRegionInfo):

  • rendering/RenderRegion.h:
10:54 AM Changeset in webkit [208596] by commit-queue@webkit.org
  • 5 edits in trunk/Source

[Cocoa] Support wide gamut for Drag Image UI
https://bugs.webkit.org/show_bug.cgi?id=164490

Patch by Megan Gardner <Megan Gardner> on 2016-11-11
Reviewed by Tim Horton.

Source/WebCore:

Fixed an error in the support define for wide gamut on Mac.

The testing infrastructure to test this does not exist, and will be landing in another patch.

  • platform/graphics/cg/GraphicsContextCG.cpp:

(WebCore::extendedSRGBColorSpaceRef):

Source/WebKit2:

Fixed an error in the gating for the new wide gamut support in ShareableBitmap.
We should always respect the flags straight out, and not make decisions later, it can lead to mismatched data and data storage.
Added support for wide gamut in createCGImage.

  • Shared/cg/ShareableBitmapCG.cpp:

(WebKit::bitmapInfo):
(WebKit::colorSpace):
(WebKit::ShareableBitmap::createGraphicsContext):
(WebKit::ShareableBitmap::createCGImage):

  • WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:

(WebKit::convertImageToBitmap):
(WebKit::WebDragClient::startDrag):

10:54 AM Changeset in webkit [208595] by Beth Dakin
  • 8 edits in trunk/Source

Get touch bar code building for open source builds
https://bugs.webkit.org/show_bug.cgi?id=164610

Reviewed by Wenson Hsieh.

Source/WebCore:

  • config.h:

Source/WebKit/mac:

  • WebKitPrefix.h:

Source/WebKit2:

  • config.h:

Source/WTF:

  • wtf/Platform.h:
10:52 AM Changeset in webkit [208594] by hyatt@apple.com
  • 3 edits in trunk/Source/WebCore

[CSS Parser] Fix SVG markers and colors
https://bugs.webkit.org/show_bug.cgi?id=164640

Reviewed by Dean Jackson.

  • css/StyleBuilderConverter.h:

(WebCore::StyleBuilderConverter::convertSVGColor):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseShorthand):

10:38 AM Changeset in webkit [208593] by Wenson Hsieh
  • 8 edits
    2 moves
    3 adds in trunk

Composition state should be cleared when changing focus to a non-editable element
https://bugs.webkit.org/show_bug.cgi?id=164595
<rdar://problem/26412551>

Reviewed by Enrica Casucci.

Source/WebCore:

When canceling or confirming a composition, always ensure that the composition node and composition underlines
being tracked are reset, even when there is no current selection. This prevents us from getting into a bad state
where focus has already changed from an element with a pending composition to a different element and the
composition is canceled, but the Editor still maintains its composition node.

Test: editing/input/focus-change-with-marked-text.html

  • editing/Editor.cpp:

(WebCore::Editor::setComposition):

Tools:

Adds support for window.textInputController in DumpRenderTree on iOS. So far, only the methods needed for the
new layout test (editing/focus-change-with-marked-text.html) are supported. These are insertText, setMarkedText,
and markedRange.

  • DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
  • DumpRenderTree/TextInputController.h: Renamed from Tools/DumpRenderTree/mac/TextInputController.h.

Remove the PLATFORM(MAC) guard for defining the TextInputController. Also, move the TextInputController header
out of the /mac platform directory.

  • DumpRenderTree/ios/TextInputControllerIOS.m: Added.

(+[TextInputController isSelectorExcludedFromWebScript:]):
(+[TextInputController webScriptNameForSelector:]):
(-[TextInputController initWithWebView:]):
(-[TextInputController markedRange]):
(-[TextInputController insertText:]):
(-[TextInputController setMarkedText:selectedFrom:length:]):

Introduces TextInputControllerIOS.m, which contains an iOS implementation of TextInputController. Only a subset
of the methods available on the Mac version will be available on iOS for now (see above).

  • DumpRenderTree/mac/FrameLoadDelegate.mm:

Remove the PLATFORM(MAC) guard for initializing the TextInputController and binding it to the window object.

(-[FrameLoadDelegate didClearWindowObjectInStandardWorldForFrame:]):

  • DumpRenderTree/mac/TextInputControllerMac.m: Renamed from Tools/DumpRenderTree/mac/TextInputController.m.

(-[WebHTMLView interpretKeyEvents:]):
(-[WebNSRange initWithNSRange:]):
(-[WebNSRange location]):
(-[WebNSRange length]):
(+[WebNSRange isSelectorExcludedFromWebScript:]):
(+[NSMutableAttributedString isSelectorExcludedFromWebScript:]):
(+[NSMutableAttributedString webScriptNameForSelector:]):
(-[NSMutableAttributedString getLength]):
(-[NSMutableAttributedString ranges]):
(-[NSMutableAttributedString attributeNamesAtIndex:]):
(-[NSMutableAttributedString valueOfAttribute:atIndex:]):
(-[NSMutableAttributedString addAttribute:value:]):
(-[NSMutableAttributedString addAttribute:value:from:length:]):
(-[NSMutableAttributedString addColorAttribute:red:green:blue:alpha:]):
(-[NSMutableAttributedString addColorAttribute:red:green:blue:alpha:from:length:]):
(-[NSMutableAttributedString addFontAttribute:fontName:size:]):
(-[NSMutableAttributedString addFontAttribute:fontName:size:from:length:]):
(+[TextInputController isSelectorExcludedFromWebScript:]):
(+[TextInputController webScriptNameForSelector:]):
(-[TextInputController initWithWebView:]):
(-[TextInputController dealloc]):
(-[TextInputController textInput]):
(-[TextInputController insertText:]):
(-[TextInputController doCommand:]):
(-[TextInputController setMarkedText:selectedFrom:length:]):
(-[TextInputController unmarkText]):
(-[TextInputController hasMarkedText]):
(-[TextInputController conversationIdentifier]):
(-[TextInputController substringFrom:length:]):
(-[TextInputController attributedSubstringFrom:length:]):
(-[TextInputController legacyAttributedString:]):
(-[TextInputController markedRange]):
(-[TextInputController selectedRange]):
(-[TextInputController firstRectForCharactersFrom:length:]):
(-[TextInputController characterIndexForPointX:Y:]):
(-[TextInputController validAttributesForMarkedText]):
(-[TextInputController attributedStringWithString:]):
(-[TextInputController stringWithUndoGroupingInsertion:]):
(-[TextInputController dictatedStringWithPrimaryString:alternative:alternativeOffset:alternativeLength:]):
(-[TextInputController setInputMethodHandler:]):
(-[TextInputController interpretKeyEvents:withSender:]):

Fixes miscellaneous style issues.

LayoutTests:

Adds a new layout test to ensure that when changing focus from an element with pending composition text to
another element, the composition is committed and there should not still be a pending composition.

  • editing/input/focus-change-with-marked-text-expected.txt: Added.
  • editing/input/focus-change-with-marked-text.html: Added.
  • platform/ios-simulator-wk2/TestExpectations:
  • platform/mac/TestExpectations:
10:21 AM Changeset in webkit [208592] by Chris Dumez
  • 53 edits
    12 deletes in trunk

Unreviewed, rolling out r208584.

Seems to have regressed Speedometer by 1% on Mac

Reverted changeset:

"We should have a more concise way of determining when we're
varargs calling a function using rest parameters"
https://bugs.webkit.org/show_bug.cgi?id=164258
http://trac.webkit.org/changeset/208584

10:20 AM Changeset in webkit [208591] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Settings tab: make the header smaller to fit more content
https://bugs.webkit.org/show_bug.cgi?id=164613
<rdar://problem/29206007>

Reviewed by Timothy Hatcher.

  • UserInterface/Views/SettingsTabContentView.css:

(.content-view.settings > .header):
Use hv units for margin. 1vh = 1% of viewport height. When Web Inspector window is taller, the margin is larger.

(.content-view.settings > .setting-container):
Convert padding to margin to make spacing between the header and the first section better.

9:31 AM Changeset in webkit [208590] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Support -webkit-svg-shadow
https://bugs.webkit.org/show_bug.cgi?id=164637

Reviewed by Zalan Bujtas.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseSingleValue):

9:18 AM Changeset in webkit [208589] by Brent Fulgham
  • 5 edits
    1 move in trunk/Source/WebKit2

Remove unused FontService from sandbox profile
https://bugs.webkit.org/show_bug.cgi?id=164625
<rdar://problem/26899976>

Reviewed by Alex Christensen.

Part of some general sandbox profile gardening.

Convert the Plugin process sandbox into

  • Configurations/WebKit.xcconfig: Add exclude for com.apple.WebKit.plugin-common.sb.in.
  • DerivedSources.make: Update to generate com.apple.WebKit.plugin-common.sb from .in file
  • PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in: Copied from Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb.
  • Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: Removed.
  • WebKit2.xcodeproj/project.pbxproj: Update for new .in file.
  • WebProcess/com.apple.WebProcess.sb.in: Remove com.apple.FontServer

from macOS Sierra and newer.

8:50 AM Changeset in webkit [208588] by Chris Dumez
  • 29 edits
    4 deletes in trunk

Unreviewed, rolling out r208117 and r208160.

Regressed Speedometer by >1.5%

Reverted changesets:

"We should have a way of profiling when a get_by_id is pure
and to emit a PureGetById in the DFG/FTL"
https://bugs.webkit.org/show_bug.cgi?id=163305
http://trac.webkit.org/changeset/208117

"Debug JSC test microbenchmarks/pure-get-by-id-cse-2.js timing
out"
https://bugs.webkit.org/show_bug.cgi?id=164227
http://trac.webkit.org/changeset/208160

5:09 AM Changeset in webkit [208587] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[WebRTC][OpenWebRTC] Implement device permissions handling solution for owr backend in the UI process
https://bugs.webkit.org/show_bug.cgi?id=164010

Patch by Alejandro G. Castro <alex@igalia.com> on 2016-11-11
Reviewed by Philippe Normand.

Move the capture of the sources for the OWR backend to the
WebProcess. In the UI we continue checking if the user allows
access to the audio and video capture. When device handling is
added in the future we will need some persistent ID and API to
pass from the UI process to the Web process.

  • platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:

(WebCore::RealtimeMediaSourceCenterOwr::validateRequestConstraints):
Add the proper audio and video sources to allow the UI message to
be properly rendered. We are adding the specific devices, even
though the dialog just asks for general audio and video. There was
already a FIXME about improving this.
(WebCore::RealtimeMediaSourceCenterOwr::createMediaStream): We are
capturing the devices here when the allowed message arrived from
the UI process. We store the completion handler to use it later
when the aync owr API finishes capture devices process.
(WebCore::RealtimeMediaSourceCenterOwr::mediaSourcesAvailable): We
now call the completion handler in this callback called when the
owr library finishes the capture of the devices. Now this happens
in the WebProcess for OWR port.

  • platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h:

Add an attribute to store the completion handler.

3:08 AM Changeset in webkit [208586] by Manuel Rego Casasnovas
  • 6 edits
    4 adds in trunk

[css-grid] ASSERTION FAILED: !m_gridIsDirty in WebCore::RenderGrid::gridRowCount
https://bugs.webkit.org/show_bug.cgi?id=163450

Reviewed by Darin Adler.

Source/WebCore:

The issue is that in the test case a simplifiedLayout() is performed.
So in RenderGrid::layoutBlock() we early return and the grid is not populated,
so the m_gridIsDirty flag is not cleared when we try to check the size of the grid
in RenderGrid::layoutPositionedObject().

We should avoid to do a simplified layout if we have to layout
some positioned grid items and the grid is dirty.

The problem was not only the ASSERT, but the current behavior was wrong too.
As we didn't do a proper layout of the grid container, the positioned item
won't be placed on the expected position. Added tests verifying this.

Tests: fast/css-grid-layout/grid-positioned-item-dynamic-change.html

fast/css-grid-layout/grid-simplified-layout-positioned.html

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::canPerformSimplifiedLayout): Check if we can perform or not
a simplified layout.
(WebCore::RenderBlock::simplifiedLayout): Extract initial check
into canPerformSimplifiedLayout().

  • rendering/RenderBlock.h: Add new header for canPerformSimplifiedLayout().
  • rendering/RenderGrid.cpp: Implement our own version of canPerformSimplifiedLayout()

to verify that the grid is not dirty if we have to layout some positioned items.
(WebCore::RenderGrid::canPerformSimplifiedLayout):

  • rendering/RenderGrid.h: Add canPerformSimplifiedLayout() header.

LayoutTests:

The tests shouldn't crash in debug to verify that the bug is fixed.
On top of that the positioned grid items should appear in the right position too.

  • fast/css-grid-layout/grid-positioned-item-dynamic-change-expected.html: Added.
  • fast/css-grid-layout/grid-positioned-item-dynamic-change.html: Added.
  • fast/css-grid-layout/grid-simplified-layout-positioned-expected.html: Added.
  • fast/css-grid-layout/grid-simplified-layout-positioned.html: Added.
1:48 AM Changeset in webkit [208585] by graouts@webkit.org
  • 5 edits
    8 adds in trunk

[Modern Media Controls] Media Controller: media tracks control support
https://bugs.webkit.org/show_bug.cgi?id=164618
<rdar://problem/27989483>

Reviewed by Dean Jackson.

We introduce the TracksSupport class to only enable the media tracks button
in the media controls when text tracks and/or multiple audio tracks are available.

Tests: media/modern-media-controls/tracks-support/tracks-support-audio-tracks.html

media/modern-media-controls/tracks-support/tracks-support-no-tracks.html
media/modern-media-controls/tracks-support/tracks-support-text-tracks.html

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

(MediaController.prototype._updateControlsIfNeeded):

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

(TracksSupport):
(TracksSupport.prototype.destroy):
(TracksSupport.prototype.get control):
(TracksSupport.prototype.get mediaEvents):
(TracksSupport.prototype.buttonWasClicked):
(TracksSupport.prototype.syncControl):

  • WebCore.xcodeproj/project.pbxproj:
12:33 AM Changeset in webkit [208584] by sbarati@apple.com
  • 53 edits
    4 copies
    8 adds in trunk

We should have a more concise way of determining when we're varargs calling a function using rest parameters
https://bugs.webkit.org/show_bug.cgi?id=164258

Reviewed by Yusuke Suzuki.

JSTests:

  • microbenchmarks/call-using-spread.js: Added.

(bar):
(foo):

  • microbenchmarks/spread-large-array.js: Added.

(foo):
(arrays.push):

  • microbenchmarks/spread-small-array.js: Added.

(foo):

  • stress/spread-array-iterator-watchpoint-2.js: Added.

(foo):
(arrayIterator.next):

  • stress/spread-array-iterator-watchpoint.js: Added.

(foo):
(Array.prototype.Symbol.iterator):

  • stress/spread-non-array.js: Added.

(assert):
(foo):
(let.customIterator.Symbol.iterator):
(bar):

Source/JavaScriptCore:

This patch adds two new bytecodes and DFG nodes for the following code patterns:

`
foo(a, b, ...c)
let x = [a, b, ...c];
`

To do this, I've introduced two new bytecode operations (and their
corresponding DFG nodes):

op_spread and op_new_array_with_spread.

op_spread takes a single input and performs the ES6 iteration protocol on it.
It returns the result of doing the spread inside a new class I've
made called JSFixedArray. JSFixedArray is a cell with a single 'size'
field and a buffer of values allocated inline in the cell. Abstracting
the protocol into a single node is good because it will make IR analysis
in the future much simpler. For now, it's also good because it allows
us to create fast paths for array iteration (which is quite common).
This fast path allows us to emit really good code for array iteration
inside the DFG/FTL.

op_new_array_with_spread is a variable argument bytecode that also
has a bit vector associated with it. The bit vector indicates if
any particular argument is to be spread or not. Arguments that
are spread are known to be JSFixedArray because we must emit an
op_spread before op_new_array_with_spread consumes the value.
For example, for this array:
[a, b, ...c, d, ...e]
we will have this bit vector:
[0, 0, 1, 0, 1]

The reason I've chosen this IR is that it will make eliminating
a rest allocation for this type of code much easier:

`
function foo(...args) {

return bar(a, b, ...args);

}
`

It will be easier to analyze the IR now that the operations
will be described at a high level.

This patch is an ~8% speedup on ES6SampleBench on my MBP.

  • CMakeLists.txt:
  • DerivedSources.make:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • builtins/IteratorHelpers.js: Added.

(performIteration):

  • bytecode/BytecodeList.json:
  • bytecode/BytecodeUseDef.h:

(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::dumpBytecode):

  • bytecode/ObjectPropertyConditionSet.cpp:

(JSC::generateConditionForSelfEquivalence):

  • bytecode/ObjectPropertyConditionSet.h:
  • bytecode/TrackedReferences.cpp:

(JSC::TrackedReferences::check):

  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedCodeBlock::bitVectors):
(JSC::UnlinkedCodeBlock::bitVector):
(JSC::UnlinkedCodeBlock::addBitVector):
(JSC::UnlinkedCodeBlock::shrinkToFit):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitNewArrayWithSpread):

  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/NodesCodegen.cpp:

(JSC::ArrayNode::emitBytecode):

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::addToGraph):
(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::capabilityLevel):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::watchHavingABadTime):

  • dfg/DFGGraph.h:

(JSC::DFG::Graph::isWatchingArrayIteratorProtocolWatchpoint):

  • dfg/DFGNode.h:

(JSC::DFG::Node::bitVector):

  • dfg/DFGNodeType.h:
  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileSpread):
(JSC::DFG::SpeculativeJIT::compileNewArrayWithSpread):

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::callOperation):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGStructureRegistrationPhase.cpp:

(JSC::DFG::StructureRegistrationPhase::run):

  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileNewArrayWithSpread):
(JSC::FTL::DFG::LowerDFGToB3::compileSpread):
(JSC::FTL::DFG::LowerDFGToB3::allocateVariableSizedCell):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::emitAllocateVariableSizedCell):
(JSC::AssemblyHelpers::emitAllocateVariableSizedJSObject):

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):

  • jit/JIT.h:
  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_new_array_with_spread):
(JSC::JIT::emit_op_spread):

  • jit/JITOperations.h:
  • llint/LLIntData.cpp:

(JSC::LLInt::Data::performAssertions):

  • llint/LLIntSlowPaths.cpp:
  • llint/LowLevelInterpreter.asm:
  • runtime/ArrayIteratorAdaptiveWatchpoint.cpp: Added.

(JSC::ArrayIteratorAdaptiveWatchpoint::ArrayIteratorAdaptiveWatchpoint):
(JSC::ArrayIteratorAdaptiveWatchpoint::handleFire):

  • runtime/ArrayIteratorAdaptiveWatchpoint.h: Added.
  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/CommonSlowPaths.h:
  • runtime/IteratorOperations.h:

(JSC::forEachInIterable):

  • runtime/JSCInlines.h:
  • runtime/JSFixedArray.cpp: Added.

(JSC::JSFixedArray::visitChildren):

  • runtime/JSFixedArray.h: Added.

(JSC::JSFixedArray::createStructure):
(JSC::JSFixedArray::createFromArray):
(JSC::JSFixedArray::get):
(JSC::JSFixedArray::buffer):
(JSC::JSFixedArray::size):
(JSC::JSFixedArray::offsetOfSize):
(JSC::JSFixedArray::offsetOfData):
(JSC::JSFixedArray::create):
(JSC::JSFixedArray::JSFixedArray):
(JSC::JSFixedArray::allocationSize):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::JSGlobalObject):
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
(JSC::JSGlobalObject::objectPrototypeIsSane): Deleted.
(JSC::JSGlobalObject::arrayPrototypeChainIsSane): Deleted.
(JSC::JSGlobalObject::stringPrototypeChainIsSane): Deleted.

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::arrayIteratorProtocolWatchpoint):
(JSC::JSGlobalObject::iteratorProtocolFunction):

  • runtime/JSGlobalObjectInlines.h: Added.

(JSC::JSGlobalObject::objectPrototypeIsSane):
(JSC::JSGlobalObject::arrayPrototypeChainIsSane):
(JSC::JSGlobalObject::stringPrototypeChainIsSane):
(JSC::JSGlobalObject::isArrayIteratorProtocolFastAndNonObservable):

  • runtime/JSType.h:
  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
12:08 AM Changeset in webkit [208583] by Philippe Normand
  • 2 edits
    5 deletes in trunk/Tools

[GTK][JHbuild] bump libnice version in openwebrtc.modules
https://bugs.webkit.org/show_bug.cgi?id=164586

Reviewed by Michael Catanzaro.

Update to a recent libnice git snapshot and remove patches already
upstream or not applying anymore. The patches not upstream yet
will be reported in Phabricator.

  • gtk/openwebrtc.modules:
  • gtk/patches/libnice-0001-agent-Remove-unnecessary-NULL-check.patch: Removed.
  • gtk/patches/libnice-0002-Do-not-update-a-remote-candidate-s-type.patch: Removed.
  • gtk/patches/libnice-0002-TURN-handle-437-Allocation-Mismatch-responses.patch: Removed.
  • gtk/patches/libnice-0003-Do-not-compare-scope-for-IPv6-address-when-scope-is-.patch: Removed.
  • gtk/patches/libnice-0004-Removing-no-op-assignment.patch: Removed.

Nov 10, 2016:

11:42 PM Changeset in webkit [208582] by Yusuke Suzuki
  • 6 edits in trunk/Source/WebCore

[DOMJIT] DOMJIT accessor attribute in IDL should say like DOMJIT=Getter
https://bugs.webkit.org/show_bug.cgi?id=164632

Reviewed by Sam Weinig.

Currently, DOMJIT patchpoint is only allowed for getter in attributes.
To make it explicit, we use IDL attribute DOMJIT=Getter instead of
DOMJIT.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHeader):
(GenerateImplementation):

  • bindings/scripts/IDLAttributes.txt:
  • bindings/scripts/test/TestDOMJIT.idl:
  • dom/Document.idl:
  • dom/Node.idl:
10:29 PM Changeset in webkit [208581] by commit-queue@webkit.org
  • 27 edits
    1 copy
    1 move in trunk/Source/WebCore

[SVG] Start moving special casing of SVG out of the bindings - SVGPreserveAspectRatio
https://bugs.webkit.org/show_bug.cgi?id=164622

Patch by Sam Weinig <sam@webkit.org> on 2016-11-10
Reviewed by Darin Adler.

Part 2 of moving special casing of SVG out of the bindings.

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

Add new files.

  • bindings/scripts/CodeGenerator.pm:

(GenerateCompileTimeCheckForEnumsIfNeeded):

  • bindings/scripts/IDLAttributes.txt:

Allow specifying a different scope for the constants to be declared in.
This allows us to have only one copy of the constants in the implementation
of SVGAngle/SVGAngleValue and SVGPreserveAspectRatio/SVGPreserveAspectRatioValue.

  • loader/FrameLoader.cpp:
  • rendering/svg/RenderSVGImage.h:

Remove unnecessary #include.

  • svg/SVGAngle.h:

Remove redundant enum declaration.

  • svg/SVGAngle.idl:

Specify a ConstantsScope of SVGAngleValue.

  • rendering/svg/RenderSVGImage.cpp:

(WebCore::RenderSVGImage::updateImageViewport):

  • svg/PatternAttributes.h:

(WebCore::PatternAttributes::preserveAspectRatio):
(WebCore::PatternAttributes::setPreserveAspectRatio):

  • svg/SVGAnimatedPreserveAspectRatio.cpp:

(WebCore::SVGAnimatedPreserveAspectRatioAnimator::constructFromString):
(WebCore::SVGAnimatedPreserveAspectRatioAnimator::calculateAnimatedValue):

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

(WebCore::SVGAnimatedType::createPreserveAspectRatio):

  • svg/SVGAnimatedType.h:

(WebCore::SVGAnimatedType::preserveAspectRatio):

  • svg/SVGFEImageElement.cpp:

(WebCore::SVGFEImageElement::parseAttribute):

  • svg/SVGFitToViewBox.cpp:

(WebCore::SVGFitToViewBox::viewBoxToViewTransform):

  • svg/SVGFitToViewBox.h:

(WebCore::SVGFitToViewBox::parseAttribute):

  • svg/SVGImageElement.cpp:

(WebCore::SVGImageElement::parseAttribute):

  • svg/SVGViewSpec.cpp:

(WebCore::SVGViewSpec::preserveAspectRatioString):
(WebCore::SVGViewSpec::lookupOrCreatePreserveAspectRatioWrapper):
(WebCore::SVGViewSpec::reset):
(WebCore::SVGViewSpec::parseViewSpec):

  • svg/SVGViewSpec.h:
  • svg/graphics/SVGImage.cpp:

(WebCore::SVGImage::computeIntrinsicDimensions):

  • svg/graphics/filters/SVGFEImage.cpp:

(WebCore::FEImage::FEImage):
(WebCore::FEImage::createWithImage):
(WebCore::FEImage::createWithIRIReference):

  • svg/graphics/filters/SVGFEImage.h:

Replace SVGPreserveAspectRatio usage with SVGPreserveAspectRatioValue.

  • svg/SVGPreserveAspectRatio.cpp: Removed.
  • svg/SVGPreserveAspectRatio.h: Replaced.
  • svg/SVGPreserveAspectRatio.idl:
  • svg/SVGPreserveAspectRatioValue.cpp: Copied from Source/WebCore/svg/SVGPreserveAspectRatio.cpp.
  • svg/SVGPreserveAspectRatioValue.h: Copied from Source/WebCore/svg/SVGPreserveAspectRatio.h.

Rename SVGPreserveAspectRatio to SVGPreserveAspectRatioValue and add a new SVGPreserveAspectRatio
that acts as the binding object.

10:16 PM Changeset in webkit [208580] by achristensen@apple.com
  • 4 edits
    1 add in trunk

Fix assertion after r208534.
https://bugs.webkit.org/show_bug.cgi?id=160497

Source/WebKit/mac:

  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]):
(WebInstallMemoryPressureHandler):
WebInstallMemoryPressureHandler can be called before [WebView initWithFrame:frameName:groupName:]
When this happens, we should use the same std::once_flag to make sure we install the MemoryPressureHandler::singleton
only once, otherwise we get an assertion !m_installed in MemoryPressureHandler::setLowMemoryHandler.

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/mac/MemoryPressureHandler.mm: Added.

(TestWebKitAPI::TEST):
Add a regression test.

10:08 PM Changeset in webkit [208579] by Yusuke Suzuki
  • 9 edits
    2 adds in trunk

[DOMJIT] Document#body should have DOMJIT patchpoint
https://bugs.webkit.org/show_bug.cgi?id=164627

Reviewed by Darin Adler.

Source/WebCore:

This patch implements document.body accessor. To implement it, we need,

  1. DOM traversing ability from ASM.
  2. Checking HTMLElement.
  3. Checking HTMLElement's localName.

The above features are already implemented in CSSJIT.
We extract some of utilities from CSSJIT to share them with DOMJIT.

Test: js/dom/domjit-accessor-document-body.html

  • cssjit/SelectorCompiler.cpp:

(WebCore::SelectorCompiler::SelectorCodeGenerator::generateWalkToParentElement):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateWalkToNextAdjacentElement):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateWalkToPreviousAdjacentElement):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeMatching):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueExactMatching):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeFunctionCallValueMatching):
(WebCore::SelectorCompiler::jumpIfElementIsNotEmpty):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasTagName):
(WebCore::SelectorCompiler::testIsElementFlagOnNode): Deleted.
(WebCore::SelectorCompiler::testIsHTMLFlagOnNode): Deleted.

  • dom/Document.idl:
  • dom/Element.h:
  • dom/QualifiedName.h:
  • domjit/DOMJITAbstractHeapRepository.yaml:
  • domjit/DOMJITHelpers.h:

(WebCore::DOMJIT::branchTestIsElementFlagOnNode):
(WebCore::DOMJIT::branchTestIsHTMLFlagOnNode):

  • domjit/JSDocumentDOMJIT.cpp:

(WebCore::DocumentBodyDOMJIT::checkDOM):
(WebCore::loadLocalName):
(WebCore::DocumentBodyDOMJIT::callDOMGetter):

LayoutTests:

  • js/dom/domjit-accessor-document-body-expected.txt: Added.
  • js/dom/domjit-accessor-document-body.html: Added.
8:37 PM Changeset in webkit [208578] by wilander@apple.com
  • 2 edits in trunk/Source/WebCore

Remove unused parameter name to fix build error on iOS
https://bugs.webkit.org/show_bug.cgi?id=163468

No review.

No new tests.

  • platform/ios/PasteboardIOS.mm:

(WebCore::Pasteboard::writeTrustworthyWebURLsPboardType):

Removed parameter name 'pasteboardURL' in unimplemented function.

8:32 PM Changeset in webkit [208577] by Chris Dumez
  • 9 edits in trunk/Source/WebCore

Speed up HTMLInputElement validation
https://bugs.webkit.org/show_bug.cgi?id=164603

Reviewed by Ryosuke Niwa.

Speed up HTMLInputElement validation by doing 1 virtual function call
instead of 9 and calling HTMLInputElement::value() only once per
validation instead of 9 times. Calling value() is expensive because
of sanitization.

No new tests, no Web-exposed behavior change.

  • html/BaseCheckableInputType.cpp:

(WebCore::BaseCheckableInputType::fallbackValue):

  • html/FormAssociatedElement.cpp:

(WebCore::FormAssociatedElement::isValid):

  • html/FormAssociatedElement.h:
  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::isValidFormControlElement):
(WebCore::HTMLFormControlElement::updateValidity):

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::isValid):
(WebCore::HTMLInputElement::value):

  • html/HTMLInputElement.h:
  • html/TextFieldInputType.cpp:

(WebCore::limitLength):

  • html/ValidityState.idl:
8:15 PM Changeset in webkit [208576] by wilander@apple.com
  • 10 edits
    2 adds in trunk

Add link information to data transfer pasteboard for drag and drop links
https://bugs.webkit.org/show_bug.cgi?id=163468
<rdar://problem/20634630>

Reviewed by Brent Fulgham.

Source/WebCore:

Test: editing/pasteboard/drag-link-with-data-transfer-adds-trusted-link-to-pasteboard.html
This test ensures data transfers still work for types 'text' and 'url', i.e. that we don't
regress in-page use of the drag pasteboard.

  • page/DragController.cpp:

(WebCore::DragController::startDrag):

Now adds trustworthy link information to the drag pasteboard.

  • platform/Pasteboard.h:

New function declaration Pasteboard::writeTrustworthyWebURLsPboardType.

  • platform/efl/PasteboardEfl.cpp:

(WebCore::Pasteboard::writeTrustworthyWebURLsPboardType):

Empty, i.e. not implemented.

  • platform/gtk/PasteboardGtk.cpp:

(WebCore::Pasteboard::writeTrustworthyWebURLsPboardType):

Empty, i.e. not implemented.

  • platform/ios/PasteboardIOS.mm:

(WebCore::Pasteboard::writeTrustworthyWebURLsPboardType):

Calls ASSERT_NOT_REACHED() to make sure we don't use this function before we have
decided on a trustrworthy URL pasteboard type on iOS. Currently not used since we
don't support drag & drop on iOS.

  • platform/mac/PasteboardMac.mm:

(WebCore::Pasteboard::writeTrustworthyWebURLsPboardType):

Writes the given URL to the WebURLsWithTitlesPboardType. This pasteboard type
serves as a trusted drop source.

  • platform/win/PasteboardWin.cpp:

(WebCore::Pasteboard::writeTrustworthyWebURLsPboardType):

Empty, i.e. not implemented.

LayoutTests:

  • editing/pasteboard/drag-link-with-data-transfer-adds-trusted-link-to-pasteboard-expected.txt: Added.
  • editing/pasteboard/drag-link-with-data-transfer-adds-trusted-link-to-pasteboard.html: Added.

This test ensures data transfer is not deleted or overwritten for the types 'text' and 'url'.

  • platform/ios-simulator/TestExpectations:

Drag & drop is not supported on iOS.

6:20 PM Changeset in webkit [208575] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

REGRESSION(r207182): [iOS] Crash because of passing freed CFDictionaryRef to CG when decoding a sub-sampled large image
https://bugs.webkit.org/show_bug.cgi?id=164617

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2016-11-10
Reviewed by Tim Horton.

This covered by the test fast/images/image-subsampling.html but it should
run with --guard-malloc --repeat-each=10 to show the bug or to verify the
fix.

imageSourceOptions() returns a non static RetainPtr<CFDictionaryRef> if
the subsamplingLevel is not zero. Because we are assigning the raw pointer
to a local variable in ImageDecoder::createFrameImageAtIndex(), CFRelease()
is called for the CFDictionaryRef immediately after this assignment. This
causes its memory to be freed in this case even before calling CG.

This bug does not happen if the subsamplingLevel is zero because we cache
the returned value in a static NeverDestroyed<RetainPtr<CFDictionaryRef> in
imageSourceOptions(). This cache prevents the CFDictionaryRef from being
freed in ImageDecoder::createFrameImageAtIndex() no matter where CFRelease()
is called.

The fix is hold the returned value in a RetainPtr<CFDictionaryRef>. This
will ensure the CFDictionaryRef raw pointer is valid till the end of
ImageDecoder::createFrameImageAtIndex().

  • platform/graphics/cg/ImageDecoderCG.cpp:

(WebCore::ImageDecoder::createFrameImageAtIndex): Ensure the pointer is retained.

5:27 PM Changeset in webkit [208574] by mark.lam@apple.com
  • 2 edits
    1 add in trunk/JSTests

Fix broken have-a-bad-time-with-arguments.js test.
https://bugs.webkit.org/show_bug.cgi?id=164626

Reviewed by Filip Pizlo.

But also saved a copy of the broken one as broken-have-a-bad-time-with-arguments-for-gc-testing.js
because coincidentally, it stresses the GC in ways that help reveal bugs.

  • stress/broken-have-a-bad-time-with-arguments-for-gc-testing.js: Added.

(testFunction):
(warmupFunction):
(let.argsDeclIndex.in.argumentsDecls.let.indexToReturnIndex.in.indicesToReturn.let.insertElementActionIndex.in.insertElementActions.let.tierWarmupCountIndex.in.tierWarmupCounts.let.testArgsIndex.in.testArgsList.catch):

  • stress/have-a-bad-time-with-arguments.js:
4:59 PM Changeset in webkit [208573] by Brent Fulgham
  • 3 edits in trunk/Source/WebCore

[Win][Direct2D] Add transparency layer support
https://bugs.webkit.org/show_bug.cgi?id=164614

Reviewed by Dean Jackson.

Provide a stackable implementation of transparency layers so that
multiple layers with opacity draw propery.

Tested by fast/layers/opacity-stacking.html and others.

  • platform/graphics/win/GraphicsContextDirect2D.cpp:

(WebCore::GraphicsContext::platformContext): Remove unneeded assertion.
(WebCore::GraphicsContextPlatformPrivate::renderTarget): Return current context taking
into account the presence of transparency layers.
(WebCore::GraphicsContextPlatformPrivate::setAlpha): Added.
(WebCore::GraphicsContextPlatformPrivate::currentGlobalAlpha): Get current global
alpha for current layer.
(WebCore::GraphicsContext::colorWithGlobalAlpha): Compute proper color taking into
account the current layer.
(WebCore::drawWithShadowHelper): Helper function to share code.
(WebCore::GraphicsContext::drawWithShadow): Use new helper function.
(WebCore::GraphicsContextPlatformPrivate::beginTransparencyLayer): Added.
(WebCore::GraphicsContext::beginPlatformTransparencyLayer): Call new implementation.
(WebCore::GraphicsContextPlatformPrivate::endTransparencyLayer): Added.
(WebCore::GraphicsContext::endPlatformTransparencyLayer): Call new implementation.
(WebCore::GraphicsContext::clearRect): Clear to transparent color.
(WebCore::GraphicsContext::setPlatformAlpha): Pass new alpha on to any active
transparency layer.

  • platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h:

(WebCore::GraphicsContextPlatformPrivate::renderTarget): Deleted.

4:49 PM Changeset in webkit [208572] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

Add CSS Color Level 4 to features.

  • features.json:
4:26 PM Changeset in webkit [208571] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

Move update image calls to RenderElement::styleDidChange.
https://bugs.webkit.org/show_bug.cgi?id=164623

Reviewed by Simon Fraser.

There should be no dependency on the image update between ::styleWillChange and ::styleDidChange.

Covered by existing tests.

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::initializeStyle):
(WebCore::RenderElement::setStyle):
(WebCore::RenderElement::styleDidChange):

4:01 PM Changeset in webkit [208570] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

After r207459 ASSERT in CachedResourceLoader under InspectorPageAgent::cachedResource
https://bugs.webkit.org/show_bug.cgi?id=164621

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-11-10
Reviewed by Youenn Fablet.

  • inspector/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::cachedResource):
CachedResourceLoader expects a sanitized URL.

3:59 PM Changeset in webkit [208569] by Chris Dumez
  • 4 edits in trunk

REGRESSION (r208522): LayoutTest fast/loader/reload-zero-byte-plugin.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=164570

Reviewed by Simon Fraser.

Tools:

Properly reset TestController::m_shouldDownloadUndisplayableMIMETypes between tests to
avoid flakiness.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetStateToConsistentValues):

LayoutTests:

Unskip test which should no longer be flaky.

  • platform/mac/TestExpectations:
3:27 PM Changeset in webkit [208568] by beidson@apple.com
  • 9 edits in trunk

IndexedDB 2.0 Support the IDBDatabase.onclose event.
https://bugs.webkit.org/show_bug.cgi?id=164602

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

  • web-platform-tests/IndexedDB/interfaces-expected.txt:

Source/WebCore:

No new tests (Covered by existing tests).

  • Modules/indexeddb/IDBDatabase.cpp:

(WebCore::IDBDatabase::connectionToServerLost): Fire "onclose" after "onerror"

  • Modules/indexeddb/IDBDatabase.idl:

LayoutTests:

  • TestExpectations:
  • storage/indexeddb/modern/handle-user-delete-expected.txt:
  • storage/indexeddb/modern/resources/handle-user-delete.js:
3:07 PM Changeset in webkit [208567] by jfbastien@apple.com
  • 7 edits in trunk

ASSERTION FAILED: length > offset encountered with wasm.yaml/wasm/js-api/test_Module.js.default-wasm
https://bugs.webkit.org/show_bug.cgi?id=164597

Reviewed by Keith Miller.

JSTests:

Trim the array buffer before returning it: it's optimistically
over-allocated to avoid growing all the time, but when parsed it
can't have extra content.

  • wasm/Builder_WebAssemblyBinary.js:

(export.const.Binary):

  • wasm/LowLevelBinary.js:

(export.default.LowLevelBinary.prototype.get return):

Source/JavaScriptCore:

  • wasm/WasmParser.h:

(JSC::Wasm::Parser::parseVarUInt32): move closer to other parsers
(JSC::Wasm::Parser::parseVarUInt64): move closer to other parsers

Source/WTF:

Decoding at end of file should fail, not assert.

  • wtf/LEBDecoder.h:

(WTF::LEBDecoder::decodeUInt):
(WTF::LEBDecoder::decodeInt32):

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

Marking swipe/pushState-cached-back-swipe.html and swipe/main-frame-pinning-requirement.html as failing.
https://bugs.webkit.org/show_bug.cgi?id=164572

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
2:21 PM Changeset in webkit [208565] by rniwa@webkit.org
  • 3 edits
    3 adds in trunk

Copied text would contain text inside CDATA sections and comments
https://bugs.webkit.org/show_bug.cgi?id=164578
Source/WebCore:

<rdar://problem/19834542>

Reviewed by Darin Adler.

The bug was caused by HTMLConverter::_traverseNode always including the content of a Text node.
Since Comment and CDataSection nodes are also Text nodes, we need to exclude them.

In the long term, we should check the visibility of the text as done in MarkupAccumulator.

Test: editing/mac/attributed-string/comment-cdata-section.html

  • editing/cocoa/HTMLConverter.mm:

(HTMLConverter::_traverseNode):

LayoutTests:

Reviewed by Darin Adler.

Added a regression test for creating an attributed string from different kinds of Text nodes.
Comment and CDataSection should not be included in the attributed string.

  • editing/mac/attributed-string/comment-cdata-section-expected.txt: Added.
  • editing/mac/attributed-string/comment-cdata-section.html: Added.
  • platform/mac-yosemite/editing/mac/attributed-string/comment-cdata-section-expected.txt: Added.
2:03 PM Changeset in webkit [208564] by commit-queue@webkit.org
  • 11 edits
    1 add in trunk

test262: DataView / TypedArray methods should throw RangeErrors for negative numbers (ToIndex)
https://bugs.webkit.org/show_bug.cgi?id=164450

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-11-10
Reviewed by Darin Adler.

JSTests:

  • stress/dataview-typedarray-toindex.js: Added.

Tests for all cases where ToIndex should be used.

  • test262.yaml:

New passing tests.

Source/JavaScriptCore:

  • runtime/JSCJSValue.h:
  • runtime/JSCJSValueInlines.h:

(JSC::JSValue::toIndex):
Introduce a method for toIndex, which is used by DataView and TypedArrays
to convert an argument to a number with the possibility of throwing
RangeErrors for negative values. We also throw RangeErrors for large
values, because wherever this is used we expect an unsigned.

  • runtime/JSArrayBufferConstructor.cpp:

(JSC::constructArrayBuffer):

  • runtime/JSDataViewPrototype.cpp:

(JSC::getData):
(JSC::setData):

  • runtime/JSGenericTypedArrayViewConstructorInlines.h:

(JSC::constructGenericTypedArrayViewWithArguments):
(JSC::constructGenericTypedArrayView):
Use toIndex instead of toUint32 where required.

LayoutTests:

  • fast/canvas/webgl/data-view-crash-expected.txt:
  • fast/canvas/webgl/data-view-test-expected.txt:

Better error message.

1:42 PM Changeset in webkit [208563] by mark.lam@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

A few bits of minor code clean up.
https://bugs.webkit.org/show_bug.cgi?id=164523

Reviewed by Yusuke Suzuki.

  • interpreter/StackVisitor.cpp:

(JSC::StackVisitor::Frame::dump):

  • Insert a space to make the dump more legible.
  • runtime/Options.h:
  • Fixed some typos.
  • runtime/StringPrototype.cpp:

(JSC::stringProtoFuncReplaceUsingRegExp):
(JSC::stringProtoFuncReplaceUsingStringSearch):

  • Use the VM& that is already available.
1:40 PM Changeset in webkit [208562] by ggaren@apple.com
  • 2 edits in trunk/Source/bmalloc

bmalloc threads should have a non-default QoS
https://bugs.webkit.org/show_bug.cgi?id=164612

Reviewed by Filip Pizlo.

  • bmalloc/AsyncTask.h:

(bmalloc::Function>::threadEntryPoint): Request user-interactive quality
of service because user-interactive tasks use malloc.

1:31 PM Changeset in webkit [208561] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Call RuntimeAgent.disableControlFlowProfiler when Code Coverage Profiler is turned off
https://bugs.webkit.org/show_bug.cgi?id=163407
<rdar://problem/28764230>

Reviewed by Joseph Pecoraro.

Turning Code Coverage off by clicking [C] icon now disables its backend by calling RuntimeAgent.disableControlFlowProfiler().

  • UserInterface/Views/SourceCodeTextEditor.js:

(WebInspector.SourceCodeTextEditor.prototype.set _basicBlockAnnotatorEnabled):

1:19 PM Changeset in webkit [208560] by mark.lam@apple.com
  • 7 edits
    1 add in trunk

Graph::methodOfGettingAValueProfileFor() should be returning the profile for the operand node.
https://bugs.webkit.org/show_bug.cgi?id=164600
<rdar://problem/28828676>

Reviewed by Filip Pizlo.

JSTests:

  • stress/osr-exit-on-op-negate-should-no-fail-assertions.js: Added.

Source/JavaScriptCore:

Currently, Graph::methodOfGettingAValueProfileFor() assumes that the operand DFG
node that it is provided with always has a different origin than the node that is
using that operand. For example, in a DFG graph that looks like this:

a: ...
b: ArithAdd(@a, ...)

... when emitting speculation checks on @a for the ArithAdd node at @b,
Graph::methodOfGettingAValueProfileFor() is passed @a, and expects @a's to
originate from a different bytecode than @b. The intent here is to get the
profile for @a so that the OSR exit ramp for @b can update @a's profile with the
observed result type from @a so that future type prediction on incoming args for
the ArithAdd node can take this into consideration.

However, op_negate can be compiled into the following series of nodes:

a: ...
b: BooleanToNumber(@a)
c: DoubleRep(@b)
d: ArithNegate(@c)

All 3 nodes @b, @c, and @d maps to the same op_negate bytecode i.e. they have the
same origin. When the speculativeJIT emits a speculationCheck for DoubleRep, it
calls Graph::methodOfGettingAValueProfileFor() to get the ArithProfile for the
BooleanToNumber node. But because all 3 nodes have the same origin,
Graph::methodOfGettingAValueProfileFor() erroneously returns the ArithProfile for
the op_negate. Subsequently, the OSR exit ramp will modify the ArithProfile of
the op_negate and corrupt its profile. Instead, what the OSR exit ramp should be
doing is update the ArithProfile of op_negate's operand i.e. BooleanToNumber's
operand @a in this case.

The fix is to always pass the current node we're generating code for (in addition
to the operand node) to Graph::methodOfGettingAValueProfileFor(). This way, we
know the profile is valid if and only if the current node and its operand node
does not have the same origin.

In this patch, we also fixed the following:

  1. Teach Graph::methodOfGettingAValueProfileFor() to get the profile for BooleanToNumber's operand if the operand node it is given is BooleanToNumber.
  2. Change JITCompiler::appendExceptionHandlingOSRExit() to explicitly pass an empty MethodOfGettingAValueProfile(). It was implicitly doing this before.
  3. Change SpeculativeJIT::emitInvalidationPoint() to pass an empty MethodOfGettingAValueProfile(). It has no child node. Hence, it doesn't make sense to call Graph::methodOfGettingAValueProfileFor() for a child node that does not exist.
  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::methodOfGettingAValueProfileFor):

  • dfg/DFGGraph.h:
  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::appendExceptionHandlingOSRExit):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::speculationCheck):
(JSC::DFG::SpeculativeJIT::emitInvalidationPoint):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::appendOSRExitDescriptor):

12:52 PM Changeset in webkit [208559] by eric.carlson@apple.com
  • 41 edits
    2 deletes in trunk

[MediaStream] apply constraints passed to getUserMedia()
https://bugs.webkit.org/show_bug.cgi?id=164561

Reviewed by Youenn Fablet.
<rdar://problem/29191384>

Source/WebCore:

No new tests, updated existing tests.

  • Modules/mediastream/UserMediaRequest.cpp:

(WebCore::UserMediaRequest::allow): Pass constraints into createMediaStream instead of applying

them after the stream has been created.

  • WebCore.xcodeproj/project.pbxproj: Remove MediaConstraintsMock.cpp/.h.
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updatePausedImage): Remove a bogus assert.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentReadyState): Drive-by fix: a stream

that is receiving media data is as ready as it will ever be so it's readyState should be
at HAVE_ENOUGH_DATA.

Simplify CaptureDeviceManager by removing all code for constraint validation because some
constraints can't be validated without a live capture device. Ports that are able to resolve
constraints without creating a live source can do so in a derived capture device class.

  • platform/mediastream/CaptureDeviceManager.cpp:

(CaptureDeviceManager::bestSourcesForTypeAndConstraints): Return a list of UIDs, not a list

of live sources, because that is all the caller will use. This will allows ports to avoid
source creation in some cases.

(CaptureDeviceManager::sourceWithUID): Add parameters for new source constraints and invalid

constraint.

(CaptureDeviceManager::verifyConstraintsForMediaType): Deleted.
(CaptureDeviceManager::bestDeviceForFacingMode): Deleted.
(facingModeFromString): Deleted.
(CaptureDeviceManager::sessionSupportsConstraint): Deleted.
(CaptureDeviceManager::isSupportedFrameRate): Deleted.

  • platform/mediastream/CaptureDeviceManager.h:

(WebCore::CaptureDeviceManager::defaultCaptureSession): Deleted.

  • platform/mediastream/MediaConstraints.cpp:

(WebCore::FlattenedConstraint::find): New, make it possible to examine resolved constraints.

  • platform/mediastream/MediaConstraints.h:

(WebCore::NumericConstraint::fitnessDistance): Reject invalid constraints.
(WebCore::NumericConstraint::valueForCapabilityRange): New, resolve a constraint for a

capability range.

(WebCore::MediaTrackConstraintSetMap::width): Expose constraints held in the map.
(WebCore::MediaTrackConstraintSetMap::height):
(WebCore::MediaTrackConstraintSetMap::sampleRate):
(WebCore::MediaTrackConstraintSetMap::sampleSize):
(WebCore::MediaTrackConstraintSetMap::aspectRatio):
(WebCore::MediaTrackConstraintSetMap::frameRate):
(WebCore::MediaTrackConstraintSetMap::volume):
(WebCore::MediaTrackConstraintSetMap::echoCancellation):
(WebCore::MediaTrackConstraintSetMap::facingMode):
(WebCore::MediaTrackConstraintSetMap::deviceId):
(WebCore::MediaTrackConstraintSetMap::groupId):

Resolve and apply width, height, and frameRate all at once because the ability to support
one may depend on the value of another.

  • platform/mediastream/RealtimeMediaSource.cpp:

(WebCore::RealtimeMediaSource::supportsSizeAndFrameRate):
(WebCore::applyNumericConstraint): Move the guts of the logic into valueForCapabilityRange.
(WebCore::RealtimeMediaSource::applySizeAndFrameRate):
(WebCore::RealtimeMediaSource::selectSettings):
(WebCore::RealtimeMediaSource::supportsConstraints):
(WebCore::RealtimeMediaSource::applyConstraints): Support null success/failure lambdas.

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

(WebCore::AVAudioCaptureSource::create): Add parameter for creation constraints.
(WebCore::AVAudioCaptureSource::AVAudioCaptureSource): Ditto.

Remove all constraint validation code, it is done by the audio and video capture sources. Add
support for stream creation constraints.

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

(WebCore::AVCaptureDeviceManager::captureDeviceList):
(WebCore::AVCaptureDeviceManager::createMediaSourceForCaptureDeviceWithConstraints):
(WebCore::AVCaptureDeviceManager::bestSourcesForTypeAndConstraints): Deleted.
(WebCore::AVCaptureDeviceManager::sourceWithUID): Deleted.
(WebCore::AVCaptureDeviceManager::verifyConstraintsForMediaType): Deleted.
(WebCore::AVCaptureDeviceManager::defaultCaptureSession): Deleted.
(WebCore::AVCaptureDeviceManager::sessionSupportsConstraint): Deleted.
(WebCore::AVCaptureDeviceManager::isSupportedFrameRate): Deleted.
(WebCore::AVCaptureDeviceManager::supportedConstraints): Deleted.

  • platform/mediastream/mac/AVMediaCaptureSource.h:

(WebCore::AVMediaCaptureSource::constraints): Deleted.

  • platform/mediastream/mac/AVMediaCaptureSource.mm:

(WebCore::AVMediaCaptureSource::AVMediaCaptureSource):
(WebCore::AVMediaCaptureSource::~AVMediaCaptureSource):
(WebCore::AVMediaCaptureSource::startProducingData):
(WebCore::AVMediaCaptureSource::stopProducingData):
(WebCore::AVMediaCaptureSource::beginConfiguration):
(WebCore::AVMediaCaptureSource::commitConfiguration):
(WebCore::AVMediaCaptureSource::capabilities):
(WebCore::AVMediaCaptureSource::setupSession):
(WebCore::AVMediaCaptureSource::reset):

Validate and apply constraints, support source creation constraints, initialize capabilities
and supported constraints by examining device capabilities.

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

(WebCore::AVVideoCaptureSource::create):
(WebCore::AVVideoCaptureSource::AVVideoCaptureSource):
(WebCore::updateSizeMinMax):
(WebCore::updateAspectRatioMinMax):
(WebCore::AVVideoCaptureSource::initializeCapabilities):
(WebCore::AVVideoCaptureSource::initializeSupportedConstraints):
(WebCore::AVVideoCaptureSource::applySize):
(WebCore::AVVideoCaptureSource::setPreset):
(WebCore::AVVideoCaptureSource::applyFrameRate):
(WebCore::AVVideoCaptureSource::applySizeAndFrameRate):
(WebCore::AVVideoCaptureSource::setupCaptureSession):
(WebCore::AVVideoCaptureSource::currentFrameCGImage):
(WebCore::AVVideoCaptureSource::bestSessionPresetForVideoDimensions):
(WebCore::AVVideoCaptureSource::supportsSizeAndFrameRate):

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

(WebCore::MockRealtimeVideoSource::create): Apply creation constraints, return null if they

can not be applied successfully.

(WebCore::MockRealtimeVideoSourceMac::MockRealtimeVideoSourceMac):
(WebCore::MockRealtimeVideoSource::createMuted):

Update RealtimeMediaSourceCenters for API changes.

  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:

(WebCore::RealtimeMediaSourceCenterMac::validateRequestConstraints):
(WebCore::RealtimeMediaSourceCenterMac::createMediaStream):

  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.h:
  • platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:

(WebCore::RealtimeMediaSourceCenterOwr::validateRequestConstraints):
(WebCore::RealtimeMediaSourceCenterOwr::createMediaStream):
(WebCore::RealtimeMediaSourceCenterOwr::mediaSourcesAvailable):

  • platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h:

Mock media sources support constraint validation and application directly so "mock constraints"
are no longer necessary.

  • platform/mock/MediaConstraintsMock.cpp: Removed.
  • platform/mock/MediaConstraintsMock.h: Removed.
  • platform/mock/MockRealtimeAudioSource.cpp:

(WebCore::MockRealtimeAudioSource::create):
(WebCore::MockRealtimeAudioSource::createMuted):
(WebCore::MockRealtimeAudioSource::updateSettings):
(WebCore::MockRealtimeAudioSource::initializeCapabilities):
(WebCore::MockRealtimeAudioSource::initializeSupportedConstraints):

  • platform/mock/MockRealtimeAudioSource.h:
  • platform/mock/MockRealtimeMediaSourceCenter.cpp:

(WebCore::MockRealtimeMediaSourceCenter::validateRequestConstraints):
(WebCore::MockRealtimeMediaSourceCenter::createMediaStream):

  • platform/mock/MockRealtimeMediaSourceCenter.h:
  • platform/mock/MockRealtimeVideoSource.cpp:

(WebCore::MockRealtimeVideoSource::create):
(WebCore::MockRealtimeVideoSource::createMuted):

  • platform/mock/MockRealtimeVideoSource.h:
  • platform/mock/RTCPeerConnectionHandlerMock.cpp:

Source/WebKit2:

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):

LayoutTests:

  • fast/mediastream/MediaDevices-getUserMedia.html:
  • fast/mediastream/MediaStream-video-element-expected.txt:
  • fast/mediastream/MediaStream-video-element-track-stop-expected.txt:
  • fast/mediastream/MediaStreamTrack-getCapabilities-expected.txt:
  • fast/mediastream/MediaStreamTrack-getSettings-expected.txt:
12:52 PM Changeset in webkit [208558] by achristensen@apple.com
  • 27 edits in trunk/Source

Move SecurityOrigin::databaseIdentifier() to SecurityOriginData
https://bugs.webkit.org/show_bug.cgi?id=164573

Reviewed by Brady Eidson.

Source/WebCore:

No change in behavior.

  • Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp:

(WebCore::WebKitMediaKeySession::mediaKeysStorageDirectory):

  • Modules/indexeddb/IDBDatabaseIdentifier.cpp:

(WebCore::IDBDatabaseIdentifier::databaseDirectoryRelativeToRoot):

  • Modules/indexeddb/server/IDBServer.cpp:

(WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesForOrigins):

  • Modules/webdatabase/DatabaseTracker.cpp:

(WebCore::DatabaseTracker::hasEntryForOriginNoLock):
(WebCore::DatabaseTracker::hasEntryForDatabase):
(WebCore::DatabaseTracker::originPath):
(WebCore::DatabaseTracker::fullPathForDatabaseNoLock):
(WebCore::DatabaseTracker::databaseNamesForOriginNoLock):
(WebCore::DatabaseTracker::detailsForNameAndOrigin):
(WebCore::DatabaseTracker::setDatabaseDetails):
(WebCore::DatabaseTracker::originLockFor):
(WebCore::DatabaseTracker::deleteOriginLockFor):
(WebCore::DatabaseTracker::quotaForOriginNoLock):
(WebCore::DatabaseTracker::setQuota):
(WebCore::DatabaseTracker::addDatabase):
(WebCore::DatabaseTracker::deleteOrigin):
(WebCore::DatabaseTracker::deleteDatabase):
(WebCore::DatabaseTracker::removeDeletedOpenedDatabases):

  • Modules/webdatabase/SQLTransactionCoordinator.cpp:

(WebCore::getDatabaseIdentifier):

  • dom/Document.cpp:

(WebCore::Document::origin):

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaPlayerMediaKeysStorageDirectory):

  • loader/appcache/ApplicationCacheStorage.cpp:

(WebCore::ApplicationCacheStorage::calculateQuotaForOrigin):
(WebCore::ApplicationCacheStorage::calculateUsageForOrigin):
(WebCore::ApplicationCacheStorage::calculateRemainingSizeForOriginExcludingCache):
(WebCore::ApplicationCacheStorage::storeUpdatedQuotaForOrigin):
(WebCore::ApplicationCacheStorage::store):
(WebCore::ApplicationCacheStorage::ensureOriginRecord):

  • page/SecurityOrigin.cpp:

(WebCore::SecurityOrigin::databaseIdentifier): Deleted.

  • page/SecurityOrigin.h:
  • page/SecurityOriginData.cpp:

(WebCore::SecurityOriginData::databaseIdentifier):

  • page/SecurityOriginData.h:

Source/WebKit:

  • Storage/StorageAreaImpl.cpp:

(WebKit::StorageAreaImpl::create):

  • Storage/StorageTracker.cpp:

(WebKit::StorageTracker::deleteOrigin):
(WebKit::StorageTracker::diskUsageForOrigin):

Source/WebKit/mac:

  • WebCoreSupport/WebSecurityOrigin.mm:

(-[WebSecurityOrigin databaseIdentifier]):

Source/WebKit2:

  • Shared/API/c/WKSecurityOriginRef.cpp:

(WKSecurityOriginCopyDatabaseIdentifier):

  • UIProcess/Storage/LocalStorageDatabaseTracker.cpp:

(WebKit::LocalStorageDatabaseTracker::databasePath):
(WebKit::LocalStorageDatabaseTracker::didOpenDatabaseWithOrigin):
(WebKit::LocalStorageDatabaseTracker::deleteDatabaseWithOrigin):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::removeMediaKeys):

  • WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:

(WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation):

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

(WKBundlePageCopyOriginsWithApplicationCache):

  • WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:

(WebKit::WebMediaKeyStorageManager::mediaKeyStorageDirectoryForOrigin):

  • WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:

(WebKit::UserMediaPermissionRequestManager::startUserMediaRequest):
(WebKit::UserMediaPermissionRequestManager::enumerateMediaDevices):

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::exceededDatabaseQuota):
(WebKit::WebChromeClient::reachedApplicationCacheOriginQuota):

12:07 PM Changeset in webkit [208557] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking inspector/sampling-profiler tests as flaky timeouts.
https://bugs.webkit.org/show_bug.cgi?id=164388

Unreviewed test gardening.

  • platform/mac/TestExpectations:
12:05 PM Changeset in webkit [208556] by commit-queue@webkit.org
  • 6 edits in trunk/Source

Remove unused CFURLCACHE code
https://bugs.webkit.org/show_bug.cgi?id=164551

Patch by Alex Christensen <achristensen@webkit.org> on 2016-11-10
Reviewed by Antti Koivisto.

Source/WebKit2:

WebKit2 doesn't use CFURLCache, but we still have some unused code that seems to use it.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::fetchDiskCacheEntries):
(WebKit::clearDiskCacheEntries):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::partitionName): Deleted.
(WebKit::NetworkProcess::cfURLCacheOrigins): Deleted.
(WebKit::NetworkProcess::clearCFURLCacheForOrigins): Deleted.

Source/WTF:

  • wtf/Platform.h:
11:44 AM Changeset in webkit [208555] by Alan Bujtas
  • 6 edits in trunk/Source/WebCore

RenderElement::invalidateFlowThreadContainingBlockIncludingDescendants should be on RenderBlock.
https://bugs.webkit.org/show_bug.cgi?id=164601

Reviewed by Simon Fraser.

FlowThread containing blocks are cached at RenderBlocks. It makes no sense to call the invalidate function on a RenderElement.
Move invalidateFlowThreadContainingBlockIncludingDescendants to RenderBlock.

No change in functionality.

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::invalidateFlowThreadContainingBlockIncludingDescendants):

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

(WebCore::RenderElement::invalidateFlowThreadContainingBlockIncludingDescendants): Deleted.

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

(WebCore::RenderInline::splitInlines):

11:43 AM Changeset in webkit [208554] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking http/tests/cache/disk-cache/disk-cache-request-headers.html as flaky on ios-simulator.
https://bugs.webkit.org/show_bug.cgi?id=164594

Unreviewed test gardening.

  • platform/ios-simulator/TestExpectations:
11:38 AM Changeset in webkit [208553] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking fast/loader/reload-zero-byte-plugin.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=164570

Unreviewed test gardening.

  • platform/mac/TestExpectations:
11:00 AM Changeset in webkit [208552] by Brent Fulgham
  • 2 edits in trunk/LayoutTests

Unmarking storage/domstorage/sessionstorage/blocked-file-access.html.
https://bugs.webkit.org/show_bug.cgi?id=164592

Unreviewed test gardening after r208550.

10:56 AM Changeset in webkit [208551] by dbates@webkit.org
  • 1 edit
    2 adds in trunk/LayoutTests

Add test that image load over default port using HTTP 0.9 protocol is blocked when page is
served with a different HTTP version
https://bugs.webkit.org/show_bug.cgi?id=164552

Reviewed by Brent Fulgham.

  • http/tests/security/http-0.9/image-default-port-blocked-expected.txt: Added.
  • http/tests/security/http-0.9/image-default-port-blocked.html: Added.
10:54 AM Changeset in webkit [208550] by Brent Fulgham
  • 2 edits in trunk/Source/WebCore

Local file restrictions should not block sessionStorage access.
https://bugs.webkit.org/show_bug.cgi?id=155609
<rdar://problem/25229461>

Reviewed by Andy Estes.

Re-landing this fix that was lost when the localStorage change was rolled out.

Use of 'sessionStorage' is governed by SecurityOrigin with third party access
set to 'ShouldAllowFromThirdParty::AlwaysAllowFromThirdParty'. We should not
reject local files for this combination of arguments.

Tested by storage/domstorage/sessionstorage/blocked-file-access.html.

  • page/SecurityOrigin.cpp:

(WebCore::SecurityOrigin::canAccessStorage): For the case of sessionStorage,
allow local file access.

10:50 AM Changeset in webkit [208549] by dbates@webkit.org
  • 17 edits
    1 copy
    2 adds in trunk

REGRESSION (r195004): Scripts and plugins blocked for subsequent loads in same WebContent
process after receiving HTTP 0.9 response
https://bugs.webkit.org/show_bug.cgi?id=164387
<rdar://problem/28987537>

Reviewed by Brent Fulgham.

Source/WebCore:

Fixes an issue where the HTTP 0.9 sandbox persisted across subsequent loads in the same
WebContent process.

Currently when an HTTP 0.9 response is received for a request made to a default port
(e.g. 80) we apply a sandbox policy on the FrameLoader for the main resource that
disallows scripts and plugins. A FrameLoader may be re-used for navigations. Therefore,
the sandbox policy applied to one site may be applied to another site. Moreover the
sandbox policy was applied to the FrameLoader of the main resource regardless of whether
the HTTP response was for a subresource. Instead we should apply the sandbox on a per-
Document basis and only if we receive an HTTP 0.9 response for the document when the
corresponding HTTP request was made to a default port.

As a side benefit of this change, we emit exactly one console message to Web Inspector
when the HTTP 0.9 sandbox is applied to a document as opposed to three console messages.
Moreover, we only emit this console message when the document load is not blocked.

Test: http/tests/security/http-0.9/sandbox-should-not-persist-on-navigation.html

  • dom/Document.cpp:

(WebCore::Document::initSecurityContext): Disallow scripts and plugins if an HTTP 0.9
response was received for this document. Note that if this function is called for a
document associated with an HTTP 0.9 response then the corresponding HTTP request was
made to a default port. DocumentLoader::responseReceived() blocks the load for a document
with an HTTP 0.9 response corresponding to an HTTP request made to a non-default port.
This invariant is covered by the tests LayoutTests/http/tests/security/http-0.9/default-port-{plugin, script}-blocked.html.
(WebCore::Document::shouldEnforceHTTP0_9Sandbox): Added. Returns whether an HTTP 0.9 response
was received for this document.

  • dom/Document.h:
  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::responseReceived): Remove logic to apply sandbox policy to the
FrameLoader associated with the main resource. We will apply the sandbox during initialization
of the document.

  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::didReceiveResponse): Ditto.

  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::didReceiveResponse): Ditto.

LayoutTests:

Add a new test to ensure that the HTTP 0.9 sandbox policy does not persist across navigations.

Unskip HTTP 0.9 tests and update expected results for existing tests as needed.

  • TestExpectations: Unskip the HTTP 0.9 tests.
  • http/tests/security/http-0.9/default-port-plugin-blocked-expected.txt: Remove duplicate console

messages now that we emit the console message exactly once per document.

  • http/tests/security/http-0.9/default-port-script-blocked-expected.txt: Ditto.
  • http/tests/security/http-0.9/iframe-blocked-expected.txt: Update expected result now that we

no longer emit a console message for a blocked load.

  • http/tests/security/http-0.9/image-blocked-expected.txt: Ditto.
  • http/tests/security/http-0.9/image-on-HTTP-0.9-default-port-page-allowed-expected.txt: Remove

duplicate console messages now that we emit the console message exactly once per document.

  • http/tests/security/http-0.9/image-on-HTTP-0.9-page-blocked-expected.txt: Ditto.
  • http/tests/security/http-0.9/resources/sandbox-should-not-persist-on-navigation.html: Added.
  • http/tests/security/http-0.9/sandbox-should-not-persist-on-navigation-expected.txt: Added.
  • http/tests/security/http-0.9/sandbox-should-not-persist-on-navigation.html: Added.
  • http/tests/security/http-0.9/worker-connect-src-blocked-expected.txt: Update expected result

now that we no longer apply a sandbox policy to the main resource if a subresource had an HTTP 0.9
response.

  • http/tests/security/http-0.9/worker-importScripts-blocked-expected.txt: Ditto.
  • http/tests/security/http-0.9/xhr-asynchronous-blocked-expected.txt: Ditto.
10:36 AM Changeset in webkit [208548] by jiewen_tan@apple.com
  • 50 edits
    25 copies
    4 moves
    84 adds in trunk

Update SubtleCrypto::importKey to match the latest spec
https://bugs.webkit.org/show_bug.cgi?id=164446
<rdar://problem/29123621>

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

  • WebCryptoAPI/idlharness-expected.txt:

Source/WebCore:

This patch does following few things:

  1. It updates the SubtleCrypto::importKey method to match the latest spec: https://www.w3.org/TR/WebCryptoAPI/#SubtleCrypto-method-importKey. It also refers to the latest Editor's Draft at a certain degree: https://w3c.github.io/webcrypto/Overview.html#SubtleCrypto-method-importKey.
  2. It implements importKey operations of following algorithms: AES-CBC, AES-KW, HMAC, RSAES-PKCS1-V1_5, RSASSA-PKCS1-V1_5, and RSA-OAEP.
  3. It fixes some minor problems of SubtleCrypto::generateKey.
  4. It addes move constructors for CryptoKeyAES, CryptoKeyHMAC, CryptoKeyRSA and CryptoKeyDataRSAComponents.
  5. It renames HmacKeyGenParams to HmacKeyParams to serve the purpose of both HmacKeyGenParams and HmacImportParams which are essentially the same.
  6. It enforces the key length in bits of CryptoKeyHMAC to be multiples of 8.
  7. It also fixes the following bugs: https://bugs.webkit.org/show_bug.cgi?id=126033, https://bugs.webkit.org/show_bug.cgi?id=126034, https://bugs.webkit.org/show_bug.cgi?id=151308.

P.S. We currently only support Raw and Jwk key format.

Tests: crypto/subtle/aes-cbc-import-jwk-key-length-128.html

crypto/subtle/aes-cbc-import-jwk-key-length-192.html
crypto/subtle/aes-cbc-import-jwk-key-length-256.html
crypto/subtle/aes-cbc-import-jwk-key-minimum.html
crypto/subtle/aes-cbc-import-jwk-key-non-extractable.html
crypto/subtle/aes-cbc-import-raw-key-length-128.html
crypto/subtle/aes-cbc-import-raw-key-length-192.html
crypto/subtle/aes-cbc-import-raw-key-length-256.html
crypto/subtle/aes-import-key-malformed-parameters.html
crypto/subtle/aes-kw-import-jwk-key-length-128.html
crypto/subtle/aes-kw-import-jwk-key-length-192.html
crypto/subtle/aes-kw-import-jwk-key-length-256.html
crypto/subtle/aes-kw-import-raw-key.html
crypto/subtle/generate-key-malformed-parameters.html
crypto/subtle/hmac-import-jwk-key-minimum.html
crypto/subtle/hmac-import-jwk-key-non-extractable.html
crypto/subtle/hmac-import-jwk-key-sha1.html
crypto/subtle/hmac-import-jwk-key-sha224.html
crypto/subtle/hmac-import-jwk-key-sha256.html
crypto/subtle/hmac-import-jwk-key-sha384.html
crypto/subtle/hmac-import-jwk-key-sha512.html
crypto/subtle/hmac-import-malformed-parameters.html
crypto/subtle/hmac-import-raw-key-customized-length.html
crypto/subtle/hmac-import-raw-key.html
crypto/subtle/import-key-malformed-parameters.html
crypto/subtle/rsa-import-key-malformed-parameters.html
crypto/subtle/rsa-oaep-import-jwk-private-key.html
crypto/subtle/rsa-oaep-import-jwk-public-key-sha1.html
crypto/subtle/rsa-oaep-import-jwk-public-key-sha224.html
crypto/subtle/rsa-oaep-import-jwk-public-key-sha256.html
crypto/subtle/rsa-oaep-import-jwk-public-key-sha384.html
crypto/subtle/rsa-oaep-import-jwk-public-key-sha512.html
crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-private-key.html
crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key-leading-zero.html
crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key-minimum.html
crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key-non-extractable.html
crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key.html
crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-private-key.html
crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-public-key-sha1.html
crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-public-key-sha224.html
crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-public-key-sha256.html
crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-public-key-sha384.html
crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-public-key-sha512.html
crypto/workers/subtle/aes-import-jwk-key.html
crypto/workers/subtle/aes-import-raw-key.html
crypto/workers/subtle/hmac-import-jwk-key.html
crypto/workers/subtle/hmac-import-raw-key.html
crypto/workers/subtle/rsa-import-jwk-private-key.html
crypto/workers/subtle/rsa-import-jwk-public-key.html

  • CMakeLists.txt:
  • DerivedSources.make:
  • PlatformEfl.cmake:
  • PlatformGTK.cmake:
  • PlatformMac.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSSubtleCryptoCustom.cpp:

(WebCore::normalizeCryptoAlgorithmParameters):
(WebCore::cryptoKeyUsageFromString):
(WebCore::cryptoKeyUsagesFromJSValue):
(WebCore::toKeyData):
(WebCore::jsSubtleCryptoFunctionGenerateKeyPromise):
(WebCore::jsSubtleCryptoFunctionImportKeyPromise):
(WebCore::JSSubtleCrypto::importKey):

  • crypto/CryptoAlgorithm.cpp:

(WebCore::CryptoAlgorithm::importKey):

  • crypto/CryptoAlgorithm.h:
  • crypto/CryptoAlgorithmParameters.h:
  • crypto/JsonWebKey.h: Added.
  • crypto/JsonWebKey.idl: Added.
  • crypto/RsaOtherPrimesInfo.h: Added.
  • crypto/RsaOtherPrimesInfo.idl: Added.
  • crypto/SubtleCrypto.h:
  • crypto/SubtleCrypto.idl:
  • crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:

(WebCore::CryptoAlgorithmAES_CBC::generateKey):
(WebCore::CryptoAlgorithmAES_CBC::importKey):

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

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

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

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

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

(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):

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

(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):

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

(WebCore::CryptoAlgorithmRSA_OAEP::importKey):

  • crypto/algorithms/CryptoAlgorithmRSA_OAEP.h:
  • crypto/keys/CryptoKeyAES.cpp:

(WebCore::CryptoKeyAES::CryptoKeyAES):
(WebCore::CryptoKeyAES::generate):
(WebCore::CryptoKeyAES::importRaw):
(WebCore::CryptoKeyAES::importJwk):

  • crypto/keys/CryptoKeyAES.h:
  • crypto/keys/CryptoKeyDataRSAComponents.cpp:

(WebCore::CryptoKeyDataRSAComponents::CryptoKeyDataRSAComponents):

  • crypto/keys/CryptoKeyDataRSAComponents.h:
  • crypto/keys/CryptoKeyHMAC.cpp:

(WebCore::CryptoKeyHMAC::CryptoKeyHMAC):
(WebCore::CryptoKeyHMAC::generate):
(WebCore::CryptoKeyHMAC::importRaw):
(WebCore::CryptoKeyHMAC::importJwk):
(WebCore::CryptoKeyHMAC::buildAlgorithm):

  • crypto/keys/CryptoKeyHMAC.h:
  • crypto/keys/CryptoKeyRSA.cpp: Added.

(WebCore::CryptoKeyRSA::importJwk):

  • crypto/keys/CryptoKeyRSA.h:
  • crypto/parameters/CryptoAlgorithmHmacKeyParams.h: Renamed from Source/WebCore/crypto/parameters/CryptoAlgorithmHmacKeyGenParams.h.
  • crypto/parameters/CryptoAlgorithmRsaHashedImportParams.h: Added.
  • crypto/parameters/HmacKeyParams.idl: Renamed from Source/WebCore/crypto/parameters/HmacKeyGenParams.idl.
  • crypto/parameters/RsaHashedImportParams.idl: Added.

LayoutTests:

Besides adding test cases for SubtleCrypto::importKey. This patch also corrects a typo:
generate-key-malformed-paramters*.

  • crypto/subtle/aes-cbc-import-jwk-key-length-128-expected.txt: Added.
  • crypto/subtle/aes-cbc-import-jwk-key-length-128.html: Added.
  • crypto/subtle/aes-cbc-import-jwk-key-length-192-expected.txt: Added.
  • crypto/subtle/aes-cbc-import-jwk-key-length-192.html: Added.
  • crypto/subtle/aes-cbc-import-jwk-key-length-256-expected.txt: Added.
  • crypto/subtle/aes-cbc-import-jwk-key-length-256.html: Added.
  • crypto/subtle/aes-cbc-import-jwk-key-minimum-expected.txt: Added.
  • crypto/subtle/aes-cbc-import-jwk-key-minimum.html: Added.
  • crypto/subtle/aes-cbc-import-jwk-key-non-extractable-expected.txt: Added.
  • crypto/subtle/aes-cbc-import-jwk-key-non-extractable.html: Added.
  • crypto/subtle/aes-cbc-import-raw-key-length-128-expected.txt: Added.
  • crypto/subtle/aes-cbc-import-raw-key-length-128.html: Added.
  • crypto/subtle/aes-cbc-import-raw-key-length-192-expected.txt: Added.
  • crypto/subtle/aes-cbc-import-raw-key-length-192.html: Added.
  • crypto/subtle/aes-cbc-import-raw-key-length-256-expected.txt: Added.
  • crypto/subtle/aes-cbc-import-raw-key-length-256.html: Added.
  • crypto/subtle/aes-import-key-malformed-parameters-expected.txt: Added.
  • crypto/subtle/aes-import-key-malformed-parameters.html: Added.
  • crypto/subtle/aes-kw-import-jwk-key-length-128-expected.txt: Added.
  • crypto/subtle/aes-kw-import-jwk-key-length-128.html: Added.
  • crypto/subtle/aes-kw-import-jwk-key-length-192-expected.txt: Added.
  • crypto/subtle/aes-kw-import-jwk-key-length-192.html: Added.
  • crypto/subtle/aes-kw-import-jwk-key-length-256-expected.txt: Added.
  • crypto/subtle/aes-kw-import-jwk-key-length-256.html: Added.
  • crypto/subtle/aes-kw-import-raw-key-expected.txt: Added.
  • crypto/subtle/aes-kw-import-raw-key.html: Added.
  • crypto/subtle/generate-key-malformed-parameters-expected.txt: Renamed from LayoutTests/crypto/subtle/generate-key-malformed-paramters-expected.txt.
  • crypto/subtle/generate-key-malformed-parameters.html: Renamed from LayoutTests/crypto/subtle/generate-key-malformed-paramters.html.
  • crypto/subtle/hmac-generate-key-customized-length-expected.txt:
  • crypto/subtle/hmac-generate-key-customized-length.html:
  • crypto/subtle/hmac-generate-key-malformed-parameters-expected.txt:
  • crypto/subtle/hmac-generate-key-malformed-parameters.html:
  • crypto/subtle/hmac-import-raw-key-customized-length-expected.txt:
  • crypto/subtle/hmac-import-raw-key-customized-length.html:
  • crypto/subtle/hmac-import-jwk-key-minimum-expected.txt: Added.
  • crypto/subtle/hmac-import-jwk-key-minimum.html: Added.
  • crypto/subtle/hmac-import-jwk-key-non-extractable-expected.txt: Added.
  • crypto/subtle/hmac-import-jwk-key-non-extractable.html: Added.
  • crypto/subtle/hmac-import-jwk-key-sha1-expected.txt: Added.
  • crypto/subtle/hmac-import-jwk-key-sha1.html: Added.
  • crypto/subtle/hmac-import-jwk-key-sha224-expected.txt: Added.
  • crypto/subtle/hmac-import-jwk-key-sha224.html: Added.
  • crypto/subtle/hmac-import-jwk-key-sha256-expected.txt: Added.
  • crypto/subtle/hmac-import-jwk-key-sha256.html: Added.
  • crypto/subtle/hmac-import-jwk-key-sha384-expected.txt: Added.
  • crypto/subtle/hmac-import-jwk-key-sha384.html: Added.
  • crypto/subtle/hmac-import-jwk-key-sha512-expected.txt: Added.
  • crypto/subtle/hmac-import-jwk-key-sha512.html: Added.
  • crypto/subtle/hmac-import-malformed-parameters-expected.txt: Added.
  • crypto/subtle/hmac-import-malformed-parameters.html: Added.
  • crypto/subtle/hmac-import-raw-key-customized-length-expected.txt: Added.
  • crypto/subtle/hmac-import-raw-key-customized-length.html: Added.
  • crypto/subtle/hmac-import-raw-key-expected.txt: Added.
  • crypto/subtle/hmac-import-raw-key.html: Added.
  • crypto/subtle/import-key-malformed-parameters-expected.txt: Added.
  • crypto/subtle/import-key-malformed-parameters.html: Added.
  • crypto/subtle/rsa-import-key-malformed-parameters-expected.txt: Added.
  • crypto/subtle/rsa-import-key-malformed-parameters.html: Added.
  • crypto/subtle/rsa-oaep-import-jwk-private-key-expected.txt: Added.
  • crypto/subtle/rsa-oaep-import-jwk-private-key.html: Added.
  • crypto/subtle/rsa-oaep-import-jwk-public-key-sha1-expected.txt: Added.
  • crypto/subtle/rsa-oaep-import-jwk-public-key-sha1.html: Added.
  • crypto/subtle/rsa-oaep-import-jwk-public-key-sha224-expected.txt: Added.
  • crypto/subtle/rsa-oaep-import-jwk-public-key-sha224.html: Added.
  • crypto/subtle/rsa-oaep-import-jwk-public-key-sha256-expected.txt: Added.
  • crypto/subtle/rsa-oaep-import-jwk-public-key-sha256.html: Added.
  • crypto/subtle/rsa-oaep-import-jwk-public-key-sha384-expected.txt: Added.
  • crypto/subtle/rsa-oaep-import-jwk-public-key-sha384.html: Added.
  • crypto/subtle/rsa-oaep-import-jwk-public-key-sha512-expected.txt: Added.
  • crypto/subtle/rsa-oaep-import-jwk-public-key-sha512.html: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-private-key-expected.txt: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-private-key.html: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key-expected.txt: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key-leading-zero-expected.txt: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key-leading-zero.html: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key-minimum-expected.txt: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key-minimum.html: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key-non-extractable-expected.txt: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key-non-extractable.html: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key.html: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-private-key-expected.txt: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-private-key.html: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-public-key-sha1-expected.txt: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-public-key-sha1.html: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-public-key-sha224-expected.txt: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-public-key-sha224.html: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-public-key-sha256-expected.txt: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-public-key-sha256.html: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-public-key-sha384-expected.txt: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-public-key-sha384.html: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-public-key-sha512-expected.txt: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-public-key-sha512.html: Added.
  • crypto/webkitSubtle/hmac-generate-key-expected.txt:
  • crypto/webkitSubtle/hmac-generate-key.html:
  • crypto/webkitSubtle/hmac-import-jwk-expected.txt:
  • crypto/webkitSubtle/hmac-import-jwk.html:
  • crypto/webkitSubtle/hmac-postMessage-expected.txt:
  • crypto/webkitSubtle/hmac-postMessage.html:
  • crypto/webkitSubtle/hmac-sign-verify-expected.txt:
  • crypto/webkitSubtle/hmac-sign-verify.html:
  • crypto/workers/subtle/aes-import-jwk-key-expected.txt: Added.
  • crypto/workers/subtle/aes-import-jwk-key.html: Added.
  • crypto/workers/subtle/aes-import-raw-key-expected.txt: Added.
  • crypto/workers/subtle/aes-import-raw-key.html: Added.
  • crypto/workers/subtle/hmac-import-jwk-key-expected.txt: Added.
  • crypto/workers/subtle/hmac-import-jwk-key.html: Added.
  • crypto/workers/subtle/hmac-import-raw-key-expected.txt: Added.
  • crypto/workers/subtle/hmac-import-raw-key.html: Added.
  • crypto/workers/subtle/hmac-postMessage-worker-expected.txt:
  • crypto/workers/subtle/hmac-postMessage-worker.html:
  • crypto/workers/subtle/resources/aes-import-jwk-key.js: Added.
  • crypto/workers/subtle/resources/aes-import-raw-key.js: Added.
  • crypto/workers/subtle/resources/hmac-import-jwk-key.js: Added.
  • crypto/workers/subtle/resources/hmac-import-raw-key.js: Added.
  • crypto/workers/subtle/resources/hmac-postMessage-worker.js:
  • crypto/workers/subtle/resources/rsa-import-jwk-private-key.js: Added.
  • crypto/workers/subtle/resources/rsa-import-jwk-public-key.js: Added.
  • crypto/workers/subtle/rsa-import-jwk-private-key-expected.txt: Added.
  • crypto/workers/subtle/rsa-import-jwk-private-key.html: Added.
  • crypto/workers/subtle/rsa-import-jwk-public-key-expected.txt: Added.
  • crypto/workers/subtle/rsa-import-jwk-public-key.html: Added.
10:31 AM Changeset in webkit [208547] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-buttons-styles.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=164598

Unreviewed test gardening.

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

Temporarily marking storage/domstorage/sessionstorage/blocked-file-access.html as failing.
https://bugs.webkit.org/show_bug.cgi?id=164592

Unreviewed test gardening.

10:04 AM Changeset in webkit [208545] by beidson@apple.com
  • 3 edits in trunk/Source/WebCore

IndexedDB 2.0: REGRESSION(r208467) Fix flaky crashes in IDB GC-related code.
https://bugs.webkit.org/show_bug.cgi?id=164596

Reviewed by Eric Carlson.

No new tests (Covered by existing tests).

We can't just WTFMove the pointers from the deleted-IDBObject maps...
We need to remove the entries, too.

  • Modules/indexeddb/IDBObjectStore.cpp:

(WebCore::IDBObjectStore::rollbackForVersionChangeAbort):

  • Modules/indexeddb/IDBTransaction.cpp:

(WebCore::IDBTransaction::internalAbort):

9:30 AM Changeset in webkit [208544] by matthew_hanson@apple.com
  • 2 edits in tags/Safari-603.1.12/Source/WebCore

Merge r208504. rdar://problem/29185888

9:30 AM Changeset in webkit [208543] by matthew_hanson@apple.com
  • 2 edits in tags/Safari-603.1.12/Source/WebCore

Merge r208464. rdar://problem/29098431

9:26 AM Changeset in webkit [208542] by commit-queue@webkit.org
  • 16 edits in trunk/Source/WebCore

MediaStreamTrack should use more Ref<> and less RefPtr<>
https://bugs.webkit.org/show_bug.cgi?id=164560

Patch by Youenn Fablet <youennf@gmail.com> on 2016-11-10
Reviewed by Eric Carlson.

No change of behavior.

Make MediaStreamTrack take a Ref<>& instead of a reference.
Using Ref<>&& instead of RefPtr<>&& in MediaStreamTrackPrivate.
Updating constness of some methods accordingly.

  • Modules/mediastream/MediaEndpointPeerConnection.cpp:

(WebCore::MediaEndpointPeerConnection::createReceiver):

  • Modules/mediastream/MediaStreamTrack.cpp:

(WebCore::MediaStreamTrack::create):
(WebCore::MediaStreamTrack::MediaStreamTrack):
(WebCore::MediaStreamTrack::clone):

  • Modules/mediastream/MediaStreamTrack.h:
  • Modules/webaudio/MediaStreamAudioSource.cpp:

(WebCore::MediaStreamAudioSource::capabilities):
(WebCore::MediaStreamAudioSource::settings):

  • Modules/webaudio/MediaStreamAudioSource.h:
  • platform/mediastream/MediaEndpoint.cpp:
  • platform/mediastream/MediaStreamPrivate.cpp:

(WebCore::MediaStreamPrivate::create):

  • platform/mediastream/MediaStreamTrackPrivate.cpp:

(WebCore::MediaStreamTrackPrivate::create):
(WebCore::MediaStreamTrackPrivate::MediaStreamTrackPrivate):
(WebCore::MediaStreamTrackPrivate::clone):

  • platform/mediastream/MediaStreamTrackPrivate.h:

(WebCore::MediaStreamTrackPrivate::setMuted):
(WebCore::MediaStreamTrackPrivate::source):

  • platform/mediastream/RealtimeMediaSource.h:
  • platform/mediastream/mac/AVMediaCaptureSource.h:
  • platform/mediastream/mac/AVMediaCaptureSource.mm:

(WebCore::AVMediaCaptureSource::initializeSettings):
(WebCore::AVMediaCaptureSource::settings):
(WebCore::AVMediaCaptureSource::initializeCapabilities):
(WebCore::AVMediaCaptureSource::capabilities):

  • platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h:

(WebCore::RealtimeMediaSourceOwr::capabilities):
(WebCore::RealtimeMediaSourceOwr::settings):

  • platform/mock/MockRealtimeMediaSource.cpp:

(WebCore::MockRealtimeMediaSource::initializeCapabilities):
(WebCore::MockRealtimeMediaSource::capabilities):
(WebCore::MockRealtimeMediaSource::initializeSettings):
(WebCore::MockRealtimeMediaSource::settings):

  • platform/mock/MockRealtimeMediaSource.h:
9:23 AM Changeset in webkit [208541] by pvollan@apple.com
  • 3 edits in trunk/Source/WebCore

[Win32] Crash in layout tests.
https://bugs.webkit.org/show_bug.cgi?id=164411

Reviewed by Mark Lam.

Use the calling convention expected by the callers of the generated functions.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation):

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

(WebCore::unsafeJsTestDOMJITPrototypeFunctionGetAttribute):
(WebCore::unsafeJsTestDOMJITPrototypeFunctionItem):
(WebCore::unsafeJsTestDOMJITPrototypeFunctionHasAttribute):
(WebCore::unsafeJsTestDOMJITPrototypeFunctionGetElementById):
(WebCore::unsafeJsTestDOMJITPrototypeFunctionGetElementsByName):

9:10 AM Changeset in webkit [208540] by commit-queue@webkit.org
  • 15 edits in trunk

Web Inspector: AXI: clarify button roles (e.g. toggle or popup button)
https://bugs.webkit.org/show_bug.cgi?id=130726
<rdar://problem/16420420>

Patch by Aaron Chu <aaron_chu@apple.com> on 2016-11-10
Reviewed by Brian Burg.

Source/JavaScriptCore:

Add the isPopupButton flag to the AccessibilityProperties type.

  • inspector/protocol/DOM.json:

Source/WebCore:

Test: accessibility/ax-differentiate-button-types.html

Added special case logic to make sure PopUpButtonRole and ToggleButtonRole to user ButtonRole as role.
Added an "isPopUpButton" property to be exposed to the Inspector's use.

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::computedRoleString):

  • inspector/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):

Source/WebInspectorUI:

Updated Inspector to show the button type using the new mapping information.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Models/DOMNode.js:

(WebInspector.DOMNode.prototype.accessibilityProperties.accessibilityPropertiesCallback):
(WebInspector.DOMNode.prototype.accessibilityProperties):

  • UserInterface/Views/DOMNodeDetailsSidebarPanel.js:

(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility.accessibilityPropertiesCallback):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility):

LayoutTests:

Updated related test cases.

  • accessibility/roles-computedRoleString-expected.txt:
  • accessibility/roles-computedRoleString.html:
  • inspector/dom/getAccessibilityPropertiesForNode-expected.txt:
  • inspector/dom/getAccessibilityPropertiesForNode.html:
  • platform/mac/accessibility/roles-computedRoleString-expected.txt:
9:08 AM Changeset in webkit [208539] by zandobersek@gmail.com
  • 14 edits
    34 adds in trunk

[EME] Add no-op Web-facing APIs
https://bugs.webkit.org/show_bug.cgi?id=164028

Reviewed by Jer Noble.

LayoutTests/imported/w3c:

Add the text baseline for the web-platform-tests/encrypted-media/idlharness.html
test. It's the only meaningful test we can run at the moment, and all but one of
the subtests pass.

  • web-platform-tests/encrypted-media/idlharness-expected.txt: Added.

Source/WebCore:

Add no-op implementation of the Web-facing APIs as defined in
the EME specification. This will be the basis for implementing
the various algorithms the same specification defines, and for
implementing the relevant platform abstractions.

Dictionaries and enumerations defined by the specification are
defined in separate headers, and not in the implementation files
for the class where they are used. This will ease their use
across different implementation files.

BufferSource now exposes the Variant object it holds. This is
needed to support the iterable property on the MediaKeyStatusMap
class.

CodeGeneratorJS is fixed to support JS-to-native conversion of
sequences of dictionaries.

  • CMakeLists.txt:
  • DerivedSources.cpp:
  • DerivedSources.make:
  • Modules/encryptedmedia/MediaKeyMessageEvent.cpp: Added.

(WebCore::MediaKeyMessageEvent::MediaKeyMessageEvent):
(WebCore::MediaKeyMessageEvent::eventInterface):

  • Modules/encryptedmedia/MediaKeyMessageEvent.h: Added.
  • Modules/encryptedmedia/MediaKeyMessageEvent.idl: Added.
  • Modules/encryptedmedia/MediaKeyMessageEventInit.h: Added.

(WebCore::MediaKeyMessageEventInit::MediaKeyMessageEventInit):

  • Modules/encryptedmedia/MediaKeyMessageType.h: Added.
  • Modules/encryptedmedia/MediaKeySession.cpp: Added.

(WebCore::MediaKeySession::create):
(WebCore::MediaKeySession::MediaKeySession):
(WebCore::MediaKeySession::sessionId):
(WebCore::MediaKeySession::expiration):
(WebCore::MediaKeySession::keyStatuses):
(WebCore::MediaKeySession::generateRequest):
(WebCore::MediaKeySession::load):
(WebCore::MediaKeySession::update):
(WebCore::MediaKeySession::close):
(WebCore::MediaKeySession::remove):
(WebCore::MediaKeySession::hasPendingActivity):
(WebCore::MediaKeySession::activeDOMObjectName):
(WebCore::MediaKeySession::canSuspendForDocumentSuspension):
(WebCore::MediaKeySession::stop):

  • Modules/encryptedmedia/MediaKeySession.h: Added.
  • Modules/encryptedmedia/MediaKeySession.idl: Added.
  • Modules/encryptedmedia/MediaKeySessionType.h: Added.
  • Modules/encryptedmedia/MediaKeyStatus.h: Added.
  • Modules/encryptedmedia/MediaKeyStatusMap.cpp: Added.

(WebCore::MediaKeyStatusMap::size):
(WebCore::MediaKeyStatusMap::has):
(WebCore::MediaKeyStatusMap::get):
(WebCore::MediaKeyStatusMap::Iterator::Iterator):
(WebCore::MediaKeyStatusMap::Iterator::next):

  • Modules/encryptedmedia/MediaKeyStatusMap.h: Added.

(WebCore::MediaKeyStatusMap::create):
(WebCore::MediaKeyStatusMap::createIterator):

  • Modules/encryptedmedia/MediaKeyStatusMap.idl: Added.
  • Modules/encryptedmedia/MediaKeySystemAccess.cpp: Added.

(WebCore::MediaKeySystemAccess::keySystem):
(WebCore::MediaKeySystemAccess::getConfiguration):
(WebCore::MediaKeySystemAccess::createMediaKeys):

  • Modules/encryptedmedia/MediaKeySystemAccess.h: Added.

(WebCore::MediaKeySystemAccess::create):

  • Modules/encryptedmedia/MediaKeySystemAccess.idl: Added.
  • Modules/encryptedmedia/MediaKeySystemConfiguration.h: Added.
  • Modules/encryptedmedia/MediaKeySystemConfiguration.idl: Added.
  • Modules/encryptedmedia/MediaKeySystemMediaCapability.h: Added.
  • Modules/encryptedmedia/MediaKeySystemMediaCapability.idl: Added.
  • Modules/encryptedmedia/MediaKeys.cpp: Added.

(WebCore::MediaKeys::createSession):
(WebCore::MediaKeys::setServerCertificate):

  • Modules/encryptedmedia/MediaKeys.h: Added.

(WebCore::MediaKeys::create):

  • Modules/encryptedmedia/MediaKeys.idl: Added.
  • Modules/encryptedmedia/MediaKeysRequirement.h: Added.
  • Modules/encryptedmedia/NavigatorEME.cpp: Added.

(WebCore::NavigatorEME::requestMediaKeySystemAccess):

  • Modules/encryptedmedia/NavigatorEME.h: Added.
  • Modules/encryptedmedia/NavigatorEME.idl: Added.
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/BufferSource.h:

(WebCore::BufferSource::BufferSource):
(WebCore::BufferSource::variant):

  • bindings/js/JSMediaKeySessionCustom.cpp: Added.

(WebCore::JSMediaKeySession::closed):

  • bindings/js/JSMediaKeySystemAccessCustom.cpp: Added.

(WebCore::JSMediaKeySystemAccess::getConfiguration):

  • bindings/scripts/CodeGeneratorJS.pm:

(GetNativeVectorInnerType):

  • dom/EventNames.h:
  • dom/EventNames.in:
  • dom/EventTargetFactory.in:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaKeys):
(WebCore::HTMLMediaElement::setMediaKeys):

  • html/HTMLMediaElement.h:
  • html/HTMLMediaElement.idl:
  • html/MediaEncryptedEvent.cpp: Added.

(WebCore::MediaEncryptedEvent::MediaEncryptedEvent):
(WebCore::MediaEncryptedEvent::eventInterface):
(WebCore::MediaEncryptedEvent::initDataType):
(WebCore::MediaEncryptedEvent::initData):

  • html/MediaEncryptedEvent.h: Added.
  • html/MediaEncryptedEvent.idl: Added.
  • html/MediaEncryptedEventInit.h: Added.

(WebCore::MediaEncryptedEventInit::MediaEncryptedEventInit):

8:03 AM Changeset in webkit [208538] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit2

[Linux] Memory process values shown by the WebMemorySampler in linux are wrong
https://bugs.webkit.org/show_bug.cgi?id=164591

Reviewed by Michael Catanzaro.

It's parsing /proc/self/statm, and returning the values as if they were bytes, but they are number of pages, so
to get the bytes we need to take the page size into account. In r208534 I added a method to get /proc/self/statm
values in bytes to Platform layer, so we can simply use that instead.

  • Shared/linux/WebMemorySamplerLinux.cpp:

(WebKit::WebMemorySampler::sampleWebKit): Use currentProcessMemoryStatus() and update the descriptions to
clarify that values are in bytes.

7:55 AM WebKitGTK/2.14.x edited by Michael Catanzaro
(diff)
7:43 AM Changeset in webkit [208537] by commit-queue@webkit.org
  • 6 edits
    2 adds in trunk

[Modern Media Controls] Media Controller: update controls based on fullscreen playback on macOS
https://bugs.webkit.org/show_bug.cgi?id=164554
<rdar://problem/29183439>

Patch by Antoine Quint <Antoine Quint> on 2016-11-10
Reviewed by Dean Jackson.

Source/WebCore:

When toggling fullscreen on macOS, toggle between MacOSInlineMediaControls and MacOSFullscreenMediaControls.
To facilitate this, support objects are created and destroyed when changing the controls in order for the
right control objects to be hooked up to the media controller. A new destroy() method on MediaControllerSupport
subclasses can be overridden to remove event listeners added by support objects in their constructor.

Test: media/modern-media-controls/media-controller/media-controller-fullscreen-change.html

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

(FullscreenSupport.prototype.destroy):

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

(MediaControllerSupport.prototype.destroy):

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

(MediaController):
(MediaController.prototype.get layoutTraits):
(MediaController.prototype.handleEvent):
(MediaController.prototype._updateControlsIfNeeded):
(MediaController.prototype._controlsClass):

LayoutTests:

Adding a new test to check that we use fullscreen controls on macOS once we've entered fullscreen.

  • media/modern-media-controls/media-controller/media-controller-fullscreen-change-expected.txt: Added.
  • media/modern-media-controls/media-controller/media-controller-fullscreen-change.html: Added.
  • platform/ios-simulator/TestExpectations:
7:02 AM Changeset in webkit [208536] by Carlos Garcia Campos
  • 3 edits
    2 adds in trunk/Source/WebCore

[Linux] Memory values shown by memory pressure handler logger are not useful
https://bugs.webkit.org/show_bug.cgi?id=164589

Reviewed by Michael Catanzaro.

We are currently using the VmSize field from /proc/self/status which is the virtual memory size of the process
and doesn't normally change even when the memory pressure handler manages to release memory. So, most of the
time we see that there's no changes in memory usage in the logs.
We should use the actual memory used by the process, memory that the process can release and then it's relevant
for the memory pressure handler. Using other fields from /proc/self/status we could do something like VmRSS -
(RssFile + RssShme), but there's also /proc/self/statm that provides the same information in a single. The main
different is that statm provides both resident and shared memory directly, but in number of pages, so we need to
multiply by the size of the page.
This patch adds a method to parse /proc/self/statm in its given file, because I plan to use this for the linux
memory sampler that is incorrectly parsing /proc/self/statm.

  • platform/Linux.cmake: Add new files to compilation.
  • platform/linux/CurrentProcessMemoryStatus.cpp: Added.

(WebCore::systemPageSize): Return the page size.
(WebCore::currentProcessMemoryStatus): Parse /proc/self/statm and fill the given ProcessMemoryStatus.

  • platform/linux/CurrentProcessMemoryStatus.h: Added.
  • platform/linux/MemoryPressureHandlerLinux.cpp:

(WebCore::MemoryPressureHandler::processMemoryUsage(): Helper function to return the memory used by the process
in bytes.
(WebCore::MemoryPressureHandler::ReliefLogger::platformMemoryUsage): Use processMemoryUsage().

6:38 AM Changeset in webkit [208535] by magomez@igalia.com
  • 2 edits in trunk/Tools

Unreviewed. Added myself to the list of committers.

  • Scripts/webkitpy/common/config/contributors.json:
6:24 AM Changeset in webkit [208534] by Carlos Garcia Campos
  • 17 edits
    3 adds in trunk/Source

MemoryPressureHandler shouldn't know how to release WebCore memory
https://bugs.webkit.org/show_bug.cgi?id=160497

Reviewed by Michael Catanzaro.

Source/WebCore:

All processes should set their own low memory handler, instead of leaving the web process using the default one
that needs to access APIs that are not in platform layer. This patch fixes all the layering violations in the
MemoryPressureHandler. Since the default implementation, that releases the WebCore memory, is shared by the
WebProcess in WebKit2 and WebKit1 ports, it has been moved to its own file to the WebCore layer.

  • CMakeLists.txt: Add new files to compilation.
  • PlatformMac.cmake: Ditto.
  • WebCore.xcodeproj/project.pbxproj: Ditto.
  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::commitProvisionalLoad): Use WebCore::jettisonExpensiveObjectsOnTopLevelNavigation().

  • page/MemoryRelease.cpp: Added.

(WebCore::releaseNoncriticalMemory):
(WebCore::releaseCriticalMemory):
(WebCore::releaseMemory):
(WebCore::platformReleaseMemory):
(WebCore::jettisonExpensiveObjectsOnTopLevelNavigation):
(WebCore::registerMemoryReleaseNotifyCallbacks):

  • page/MemoryRelease.h: Added.
  • page/cocoa/MemoryReleaseCocoa.mm: Added.

(WebCore::platformReleaseMemory):
(WebCore::jettisonExpensiveObjectsOnTopLevelNavigation):
(WebCore::registerMemoryReleaseNotifyCallbacks):

  • platform/MemoryPressureHandler.cpp:

(WebCore::MemoryPressureHandler::MemoryPressureHandler):
(WebCore::MemoryPressureHandler::beginSimulatedMemoryPressure):
(WebCore::MemoryPressureHandler::releaseMemory): Use the current handler if it has been set.
(WebCore::MemoryPressureHandler::platformReleaseMemory): Deleted.

  • platform/MemoryPressureHandler.h:

(WebCore::MemoryPressureHandler::setLowMemoryHandler):
(WebCore::MemoryPressureHandler::m_releaseMemoryBlock):

  • platform/cocoa/MemoryPressureHandlerCocoa.mm:

(WebCore::MemoryPressureHandler::respondToMemoryPressure): Call releaseMemory() instead of using the handler directly.
(WebCore::MemoryPressureHandler::platformReleaseMemory): Deleted.

  • platform/linux/MemoryPressureHandlerLinux.cpp:
  • platform/win/MemoryPressureHandlerWin.cpp:

(WebCore::MemoryPressureHandler::respondToMemoryPressure): Call releaseMemory() instead of using the handler directly.

Source/WebKit/mac:

Set the low memory handler before installing the memory pressure handler.

  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]):

Source/WebKit/win:

Set the low memory handler before installing the memory pressure handler.

  • WebView.cpp:

(WebView::initWithFrame):

Source/WebKit2:

Set the low memory handler before installing the memory pressure handler.

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):

5:37 AM Changeset in webkit [208533] by Csaba Osztrogonác
  • 2 edits in trunk/Source/JavaScriptCore

[ARM] Unreviewed buildfix after r208450.

  • assembler/MacroAssemblerARM.h:

(JSC::MacroAssemblerARM::load8SignedExtendTo32): Added.

2:15 AM Changeset in webkit [208532] by svillar@igalia.com
  • 5 edits in trunk

[GTK] New API to notify about dynamically added forms
https://bugs.webkit.org/show_bug.cgi?id=164050

Reviewed by Carlos Garcia Campos.

Source/WebKit2:

This new API exports the WebCore event didAssociateFormControls through the web extension
mechanism. This will help clients (mainly web browsers) to implement robust auto filling
mechanisms. It deals nicely with dynamically created forms (and form controls) as many JS
frameworks do nowadays.

  • WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp: Added a FormClient implementation of

API::InjectedBundle::FormClient.
(webkitWebPageFormControlsAssociated): Emit the new signal.
(webkit_web_page_class_init): Added the new signal "forms-controls-associated".
(webkitWebPageCreate): Set the WebPage as a FormClient.

Tools:

Added a new test case to verify that dinamically added forms correctly trigger the
"form-controls-associated" signal from WebPage.

  • TestWebKitAPI/Tests/WebKit2Gtk/TestWebExtensions.cpp:

(didAssociateFormControlsCallback):
(testWebExtensionFormControlsAssociated):
(beforeAll):

  • TestWebKitAPI/Tests/WebKit2Gtk/WebExtensionTest.cpp:

(DelayedSignal::DelayedSignal):
(emitFormControlsAssociated):
(formControlsAssociatedCallback):
(pageCreatedCallback):

2:08 AM Changeset in webkit [208531] by svillar@igalia.com
  • 4 edits
    4 adds in trunk

[css-grid] Fix fr tracks sizing under min|max-size constraints
https://bugs.webkit.org/show_bug.cgi?id=150674

Reviewed by Darin Adler.

Source/WebCore:

The min|max-sizes must be used to compute the flex fraction for indefinite free
spaces. According to the spec "If using this flex fraction would cause the grid to be
smaller than the grid container’s min-width/height (or larger than the grid container’s
max-width/height), then redo this step, treating the free space as definite and the
available grid space as equal to the grid container’s content box size when it’s sized to
its min-width/height (max-width/height)."

This only affects indefinite heights because during layout both definite sizes and any kind
of widths are properly constrained by min|max-width restrictions.

Tests: fast/css-grid-layout/flex-sizing-columns-min-max-width.html

fast/css-grid-layout/flex-sizing-rows-min-max-height.html

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
(WebCore::RenderGrid::computeFlexSizedTracksGrowth):

  • rendering/RenderGrid.h:

LayoutTests:

  • fast/css-grid-layout/flex-sizing-columns-min-max-width-expected.txt: Added.
  • fast/css-grid-layout/flex-sizing-columns-min-max-width.html: Added.
  • fast/css-grid-layout/flex-sizing-rows-min-max-height-expected.txt: Added.
  • fast/css-grid-layout/flex-sizing-rows-min-max-height.html: Added.
1:01 AM Changeset in webkit [208530] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[WebRTC] [OpenWebRTC] RTX default parameters broken after r207952
https://bugs.webkit.org/show_bug.cgi?id=164541

Patch by Alejandro G. Castro <alex@igalia.com> on 2016-11-10
Reviewed by Philippe Normand.

Fixed typo in refactoring.

  • platform/mediastream/openwebrtc/MediaEndpointOwr.cpp:

(WebCore::MediaEndpointOwr::getDefaultVideoPayloads):

12:46 AM Changeset in webkit [208529] by clopez@igalia.com
  • 2 edits in trunk/Source/WebKit2

[GTK] Allow to use WebMemorySampler feature.
https://bugs.webkit.org/show_bug.cgi?id=164517

Reviewed by Carlos Garcia Campos.

Enable the WebMemorySampler with the environment variable WEBKIT_SAMPLE_MEMORY.

When enabled, it will dump the stats to /tmp each second.

  • UIProcess/API/gtk/WebKitWebContext.cpp:

(webkitWebContextConstructed):

12:01 AM Changeset in webkit [208528] by Philippe Normand
  • 2 edits in trunk/Source/WebKit2

[WK2][GTK][GStreamer] Build fails when -plugins-base and -core headers are not installed in the same directory
https://bugs.webkit.org/show_bug.cgi?id=148894

Reviewed by Carlos Garcia Campos.

The pbutils (gst-plugins-base-utils) headers are needed in
WebKit2/GTK for the permission request API related with the
GStreamer codec installer. It builds fine in most cases without
explicitely requiring the pbutils include directory path because
usually all the GStreamer headers are installed in the same path,
excepted for some distributions, like NixOS.

  • PlatformGTK.cmake: The GStreamer pbutils include directory was

missing in the header search path.

Nov 9, 2016:

11:53 PM Changeset in webkit [208527] by rniwa@webkit.org
  • 22 edits in trunk

WebHTMLView's _attributeStringFromDOMRange should use HTMLConverter instead of NSAttributedString's _initWithDOMRange
https://bugs.webkit.org/show_bug.cgi?id=164501
<rdar://problem/29152282>

Reviewed by Sam Weinig.

Source/WebKit/mac:

Align what [WebHTMLView attributedString] returns to what would be used on copy & paste by using HTMLConverter
instead of _initWithDOMRange in [WebHTMLView _attributeStringFromDOMRange].

  • WebView/WebHTMLView.mm:

(-[WebHTMLView _attributedStringFromDOMRange:]): Renamed from _attributeStringFromDOMRange.
(-[WebHTMLView attributedString]):
(-[WebHTMLView selectedAttributedString]):
(-[WebHTMLView selectedString]): Moved to reduce the number of occurrences of the if-defs.

Tools:

  • DumpRenderTree/mac/TextInputController.m:

(-[TextInputController legacyAttributedString:]):

LayoutTests:

Prior to this patch, attributed-string tests were inadvertently testing NSAttributedString's _initWithDOMRange
instead of HTMLConverter as intended because _attributeStringFromDOMRange was using _initWithDOMRange.

This patch aliens [WebHTMLView attributedString] to what we use on copy & paste by using HTMLConverter instead.
The rebaselined done below highlights the existing behavior difference between AppKit's converter and HTMLConverter.

I've manually confirmed that these test results didn't change across the large refactoring as seen in:
https://trac.webkit.org/log/trunk/Source/WebCore/platform/mac/HTMLConverter.mm?rev=166145

  • editing/mac/attributed-string/anchor-element-expected.txt:
  • editing/mac/attributed-string/basic-expected.txt:
  • editing/mac/attributed-string/font-size-expected.txt:
  • editing/mac/attributed-string/font-style-variant-effect-expected.txt:
  • editing/mac/attributed-string/font-weight-expected.txt:
  • editing/mac/attributed-string/letter-spacing-expected.txt:
  • editing/mac/attributed-string/text-decorations-expected.txt:
  • editing/mac/attributed-string/vertical-align-expected.txt:
  • platform/mac-elcapitan/editing/mac/attributed-string/font-style-variant-effect-expected.txt:
  • platform/mac-yosemite/editing/mac/attributed-string/anchor-element-expected.txt:
  • platform/mac-yosemite/editing/mac/attributed-string/basic-expected.txt:
  • platform/mac-yosemite/editing/mac/attributed-string/font-size-expected.txt:
  • platform/mac-yosemite/editing/mac/attributed-string/font-style-variant-effect-expected.txt:
  • platform/mac-yosemite/editing/mac/attributed-string/font-weight-expected.txt:
  • platform/mac-yosemite/editing/mac/attributed-string/letter-spacing-expected.txt:
  • platform/mac-yosemite/editing/mac/attributed-string/text-decorations-expected.txt:
  • platform/mac-yosemite/editing/mac/attributed-string/vertical-align-expected.txt:
11:46 PM Changeset in webkit [208526] by Chris Dumez
  • 8 edits in trunk

[WK2][!NETWORK_SESSION] Add support for downloading file backed blobs
https://bugs.webkit.org/show_bug.cgi?id=164522

Reviewed by Alex Christensen.

Source/WebKit2:

Add support for downloading file backed blobs for the non-NETWORK_SESSION
code path of WebKit2, which is still use on pre-Sierra macOS.

  • NetworkProcess/Downloads/Download.cpp:

(WebKit::Download::~Download):

  • NetworkProcess/Downloads/Download.h:

(WebKit::Download::setBlobFileReferences):

  • NetworkProcess/Downloads/DownloadManager.cpp:

(WebKit::DownloadManager::startDownload):
(WebKit::DownloadManager::convertNetworkLoadToDownload):

  • NetworkProcess/Downloads/DownloadManager.h:
  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::convertToDownload):

LayoutTests:

Unskip corresponding tests now that they pass on Yosemite and El Capitan.

  • platform/mac-wk2/TestExpectations:
11:46 PM Changeset in webkit [208525] by Philippe Normand
  • 4 edits in trunk

[WebRTC] white-list turns urls from the RTCConfiguration
https://bugs.webkit.org/show_bug.cgi?id=164506

Reviewed by Alejandro G. Castro.

LayoutTests/imported/w3c:

  • web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-constructor-expected.txt: Rebaseline test, since turns servers are now parsed.

Source/WebCore:

  • Modules/mediastream/RTCConfiguration.cpp:

(WebCore::validateIceServerURL): Add the turns URL scheme to the
list of supported relay and signaling server protocols.

10:34 PM Changeset in webkit [208524] by Yusuke Suzuki
  • 42 edits
    8 adds in trunk

[JSC] Avoid cloned arguments allocation in ArrayPrototype methods
https://bugs.webkit.org/show_bug.cgi?id=164502

Reviewed by Saam Barati.

JSTests:

  • stress/argument-intrinsic-basic.js: Added.

(shouldBe):
(builtin.createBuiltin):

  • stress/argument-intrinsic-inlining-with-result-escape.js: Added.

(shouldBe):
(builtin.createBuiltin):
(escape):

  • stress/argument-intrinsic-nested-inlining.js: Added.

(shouldBe):
(builtin.createBuiltin):
(builtinCaller1):
(builtinCaller2):
(escape):

  • stress/argument-intrinsic-not-convert-to-get-argument.js: Added.

(shouldBe):
(builtin.createBuiltin):

  • stress/argument-intrinsic-with-stack-write.js: Added.

(shouldBe):
(builtin.createBuiltin):

Source/JavaScriptCore:

In many builtin functions, we use arguments to just get optional parameters.
While FTL argument elimination can drop arguments allocations, it leaves
the allocations in LLInt, Baseline, and DFG. And we found that DFG compiled
Array#map is heavily used in ES6SampleBench/Basic. And it always creates
a meaningless ClonedArguments.

Using ES6 default parameter here is not a solution. It increases the number
of parameters of the CodeBlock (not function.length). And the optional
parameters in Array.prototype.xxx methods are not typically passed. For
example, we typically do not pass thisArg to Array.prototype.map function.
In this case, the arity check frequently fails. It requires the additional C
call to fixup arguments and it becomes pure overhead.

To solve this problem, this patch introduces a new bytecode intrinsic @argument().
This offers the way to retrieve the argument value without increasing the
arity of the function. And if the argument is not passed (out of bounds), it
just returns undefined. The semantics of this intrinsic is the same to the C++
ExecState::argument(). This operation does not require arguments object. And we
can drop the argument references even in lower 3 tiers.

We implement op_get_argument for this intrinsic. And later this will be converted
to DFG GetArgument node. All the tiers handles this feature.

This patch improves ES6SampleBench/Basic 13.8% in steady state. And in summary,
it improves 4.5%.

In the future, we can improve the implementation of the default parameters.
Currently, the default parameter always increases the arity of the function. So
if you do not pass the argument, the arity check fails. But since it is the default
parameter, it is likely that we don't pass the argument. Using op_get_argument to
implement the default parameter can decrease the case in which the arity check
frequently fails. And it can change the builtin implementation to use the ES6
default parameters instead of using the special @argument() intrinsic in the future.
And at that case, the user code also receives the benefit.

ES6SampleBench/Basic.

Baseline:

Running... Basic ( 1 to go)
firstIteration: 39.38 ms +- 4.48 ms
averageWorstCase: 20.79 ms +- 0.96 ms
steadyState: 1959.22 ms +- 65.55 ms

Patched:

Running... Basic ( 1 to go)
firstIteration: 37.85 ms +- 4.09 ms
averageWorstCase: 18.60 ms +- 0.76 ms
steadyState: 1721.89 ms +- 57.58 ms

All summary.

Baseline:

summary: 164.34 ms +- 5.01 ms

Patched:

summary: 157.26 ms +- 5.96 ms

  • builtins/ArrayConstructor.js:
  • builtins/ArrayPrototype.js:

(reduce):
(reduceRight):
(every):
(forEach):
(filter):
(map):
(some):
(fill):
(find):
(findIndex):
(includes):
(copyWithin):

  • builtins/DatePrototype.js:

(toLocaleString):
(toLocaleDateString):
(toLocaleTimeString):

  • builtins/MapPrototype.js:

(forEach):

  • builtins/NumberPrototype.js:

(toLocaleString):

  • builtins/SetPrototype.js:

(forEach):

  • builtins/StringPrototype.js:

(padStart):
(padEnd):
(localeCompare):

  • builtins/TypedArrayConstructor.js:
  • builtins/TypedArrayPrototype.js:

(every):
(fill):
(find):
(findIndex):
(forEach):
(some):
(reduce):
(reduceRight):
(map):
(filter):

  • bytecode/BytecodeIntrinsicRegistry.h:
  • bytecode/BytecodeList.json:
  • bytecode/BytecodeUseDef.h:

(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::dumpBytecode):
(JSC::CodeBlock::finishCreation):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitGetArgument):

  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/NodesCodegen.cpp:

(JSC::BytecodeIntrinsicNode::emit_intrinsic_argument):

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::capabilityLevel):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGNode.h:

(JSC::DFG::Node::hasHeapPrediction):
(JSC::DFG::Node::hasArgumentIndex):
(JSC::DFG::Node::argumentIndex):

  • dfg/DFGNodeType.h:
  • dfg/DFGPreciseLocalClobberize.h:

(JSC::DFG::PreciseLocalClobberizeAdaptor::readTop):

  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileGetArgument):

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileGetArgument):

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):

  • jit/JIT.h:
  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_get_argument):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_get_argument):

  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
10:07 PM Changeset in webkit [208523] by Joseph Pecoraro
  • 35 edits in trunk

Web Inspector: DebuggerManager.Event.Resumed introduces test flakiness
https://bugs.webkit.org/show_bug.cgi?id=161951
<rdar://problem/28295767>

Reviewed by Brian Burg.

Source/JavaScriptCore:

This removes an ambiguity in the protocol when stepping through
JavaScript. Previously, when paused and issuing a Debugger.step*
command the frontend would always receive a Debugger.resumed event and
then, maybe, a Debugger.paused event indicating we paused again (after
stepping). However, this ambiguity means that the frontend needs to
wait for a short period of time to determine if we really resumed
or not. And even still that decision may be incorrect if the step
takes a sufficiently long period of time.

The new approach removes this ambiguity. Now, in response to a
Debugger.step* command the backend MUST send a single Debugger.paused
event or Debugger.resumed event. Now the frontend knows that the
next Debugger event it receives after issuing the step command is
the result (stepped and paused, or stepped and resumed).

To make resuming consistent in all cases, a Debugger.resume command
will always respond with a Debugger.resumed event.

Finally, Debugger.continueToLocation is treated like a "big step"
in cases where we can resolve the location. If we can't resolve the
location it is treated as a resume, maintaining the old behavior.

  • inspector/agents/InspectorDebuggerAgent.h:
  • inspector/agents/InspectorDebuggerAgent.cpp:

(Inspector::InspectorDebuggerAgent::stepOver):
(Inspector::InspectorDebuggerAgent::stepInto):
(Inspector::InspectorDebuggerAgent::stepOut):
(Inspector::InspectorDebuggerAgent::willStepAndMayBecomeIdle):
(Inspector::InspectorDebuggerAgent::didBecomeIdleAfterStepping):
When stepping register a VM exit observer so that we can issue
a Debugger.resumed event if the step caused us to exit the VM.

(Inspector::InspectorDebuggerAgent::resume):
Set a flag to issue a Debugger.resumed event once we break out
of the nested run loop.

(Inspector::InspectorDebuggerAgent::didPause):
We are issuing Debugger.paused so clear the state to indicate that
we no longer need to issue Debugger.resumed event, we have paused.

(Inspector::InspectorDebuggerAgent::didContinue):
Only issue the Debugger.resumed event if needed (explicitly asked
to resume).

(Inspector::InspectorDebuggerAgent::continueToLocation):
(Inspector::InspectorDebuggerAgent::clearDebuggerBreakpointState):
All places that do continueProgram should be audited. In error cases,
if we are paused and continue we should remember to send Debugger.resumed.

  • inspector/protocol/Debugger.json:

Clarify in the protocol description the contract of these methods.

Source/WebCore:

Covered by existing tests that would ASSERT otherwise.

  • inspector/InspectorClient.cpp:

(WebCore::InspectorClient::doDispatchMessageOnFrontendPage):
When paused on an exception in the inspected page and evaluating
commands in the inspector frontend page (which evaluates JavaScript)
we ASSERT when entering the Global DOM VM with an existing exception.
This makes it so when we evaluate JavaScript in the frontend we
suspend / ignore the state of the VM for the inspected page, and
restore it when we return from the inspector.

Source/WebInspectorUI:

  • UserInterface/Controllers/DebuggerManager.js:

(WebInspector.DebuggerManager.prototype.debuggerDidResume):
Now, Debugger.resumed events really mean the debugger resumed,
so act immediately instead of guessing. We must still guess
in legacy backends.

  • UserInterface/Test/Test.js:

When the inspector frontend encounters an issue, log it.

  • UserInterface/Views/DebuggerSidebarPanel.js:

(WebInspector.DebuggerSidebarPanel.prototype._debuggerDidPause):
(WebInspector.DebuggerSidebarPanel.prototype._debuggerActiveCallFrameDidChange):
Always enable the step out button. I don't think it makes sense to disable
it sometimes, and if there are issues with this we should solve the issues
instead of hiding them.

LayoutTests:

Rewrite tests to be more deterministic. For tests that
relied on a Resumed event to happen after a short amount
of time, instead have the test dispatch an event when it is
appropriate to continue. Take this opportunity to rewrite
some tests using new style and best practices.

  • inspector/debugger/break-in-constructor-before-super.html:
  • inspector/debugger/break-on-exception-throw-in-promise.html:
  • inspector/debugger/break-on-exception.html:
  • inspector/debugger/break-on-uncaught-exception-throw-in-promise.html:
  • inspector/debugger/break-on-uncaught-exception.html:
  • inspector/debugger/breakpoint-syntax-error-top-level.html:
  • inspector/debugger/command-line-api-exception-expected.txt:
  • inspector/debugger/command-line-api-exception-nested-catch.html:
  • inspector/debugger/command-line-api-exception.html:
  • inspector/debugger/csp-exceptions.html:
  • inspector/debugger/didSampleProbe-multiple-probes.html:
  • inspector/debugger/evaluateOnCallFrame-CommandLineAPI.html:
  • inspector/debugger/evaluateOnCallFrame-errors.html:
  • inspector/debugger/pause-reason-expected.txt:
  • inspector/debugger/pause-reason.html:
  • inspector/debugger/paused-scopes-expected.txt:
  • inspector/debugger/paused-scopes.html:
  • inspector/debugger/resources/exceptions.js:
  • inspector/debugger/scriptParsed.html:
  • inspector/debugger/sourceURL-repeated-identical-executions.html:
  • inspector/debugger/sourceURLs.html:
  • inspector/debugger/stepping/stepping-pause-in-inner-step-to-parent.html:
9:28 PM Changeset in webkit [208522] by Chris Dumez
  • 27 edits
    4 adds in trunk

[WK2][NETWORK_SESSION] Add support for downloading file backed blobs
https://bugs.webkit.org/show_bug.cgi?id=164458
<rdar://problem/28905514>

Reviewed by Darin Adler.

Source/WebKit2:

Add support for downloading file backed blobs on WebKit2.
It previously wasn't working because we weren't calling
BlobDataFileReference::prepareForFileAccess() for each blob file before
starting the download, similarly to what is done in NetworkResourceLoader's
consumeSandboxExtensions().

  • NetworkProcess/Downloads/DownloadManager.cpp:

(WebKit::DownloadManager::startDownload):

  • NetworkProcess/Downloads/DownloadManager.h:

(WebKit::DownloadManager::startDownload):

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::startDownload):
(WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):

  • NetworkProcess/NetworkDataTask.cpp:

(WebKit::NetworkDataTask::create):

  • NetworkProcess/NetworkDataTask.h:
  • NetworkProcess/NetworkDataTaskBlob.cpp:

(WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob):
(WebKit::NetworkDataTaskBlob::~NetworkDataTaskBlob):
(WebKit::NetworkDataTaskBlob::download):

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

(WebKit::NetworkLoad::NetworkLoad):

  • NetworkProcess/NetworkLoadParameters.h:
  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::downloadRequest):

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::NetworkResourceLoader):
(WebKit::NetworkResourceLoader::startNetworkLoad):

  • NetworkProcess/PingLoad.h:

Tools:

Add testRunner.setShouldDownloadUndisplayableMIMETypes(bool) API so that layout
tests can request that such resources are downloaded instead of being ignored.

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setShouldDownloadUndisplayableMIMETypes):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::decidePolicyForNavigationResponse):

  • WebKitTestRunner/TestController.h:

(WTR::TestController::setShouldDownloadUndisplayableMIMETypes):

  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):

LayoutTests:

Add layout test coverage for downloading blobs, both via <a download> or
because a load is later converted into a download.

  • fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download-expected.txt: Added.
  • fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download.html: Added.
  • fast/dom/HTMLAnchorElement/anchor-file-blob-download-expected.txt: Added.
  • fast/dom/HTMLAnchorElement/anchor-file-blob-download.html: Added.
  • platform/ios-simulator-wk1/TestExpectations:
  • platform/ios-simulator-wk2/TestExpectations:
  • platform/mac-wk1/TestExpectations:
  • platform/win/TestExpectations:
8:49 PM Changeset in webkit [208521] by commit-queue@webkit.org
  • 21 edits in trunk

NetworkSession: Network process crash when converting main resource to download
https://bugs.webkit.org/show_bug.cgi?id=164220

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2016-11-09
Reviewed by Alex Christensen.

Source/WebKit2:

Right after the main resource load is converted to a download, the web process deletes the ResourceLoader which
sends the RemoveLoadIdentifier to the network process and the load is aborted. Sometimes it happens that
NetworkResourceLoader::abort() is called while the NetworkLoad is still deciding the destination of the
download. In such case, NetworkResourceLoader::didConvertToDownload() has already been called, but not
NetworkResourceLoader::didBecomeDownload(). In NetworkResourceLoader::abort() we already handle the case of
having a NetworkLoad after NetworkResourceLoader::didConvertToDownload() has been called, to avoid canceling the
load in such case, however cleanup() is always called unconditionally and the NetworkLoad is deleted before
NetworkResourceLoader::didBecomeDownload() is called. When the NetworkLoad is destroyed the NetworkDataTask
client becomes nullptr, leaving it in a state where both the client is nullptr and the download hasn't been
created yet. That's not expected to happen and when the response completion handler is called in the
NetworkDataTask it tries to use either the client or the download and it crashes.
We need to cleanup and destroy the ResourceLoader as soon as it becomes a download, because that's the expected
behavior, but at the same time we need to keep the NetworkLoad alive until the NetworkDataTask finishes to become
a download. This patch creates a PendingDownload to take the ownership of the NetworkLoad, so that
ResourceLoader can be cleaned up and destroyed. The DownloadManager now will handle the PendingDownload as if it
was created by startDownload(), but ensuring it's deleted right before the final Download object is added to the
downloads map. That way NetworkDataTask will always have a valid client until the final Download is created,
first the ResourceLoader and then the PendingDownload. Since the DownloadManager is the owner of the
PendingDownload we no longer need the didBecomeDownload() callback to delete the NetworkLoad, because the
NetworkLoad will always be owned by the PendingDownload now that will be deleted by the DownloadManager.

  • NetworkProcess/Downloads/DownloadManager.cpp:

(WebKit::DownloadManager::dataTaskBecameDownloadTask): Change the ASSERT because at this point we should always
have a PendingDownload, and then remove it from the map here before adding the final Download to the map.
(WebKit::DownloadManager::convertNetworkLoadToDownload): This replaces convertHandleToDownload, but it also now
used for the NetworkSession. It creates a PendingDownload for the given NetworkLoad.
(WebKit::DownloadManager::continueDecidePendingDownloadDestination): Do not take the PendingDownload from the
map here, just check it's present, because it will be removed from dataTaskBecameDownloadTask().
(WebKit::DownloadManager::convertHandleToDownload): Deleted.

  • NetworkProcess/Downloads/DownloadManager.h:
  • NetworkProcess/Downloads/PendingDownload.cpp:

(WebKit::PendingDownload::PendingDownload): Add a constructor that receives a NetworkLoad.

  • NetworkProcess/Downloads/PendingDownload.h:
  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload): Just ask the ResourceLoader to be
converted to a download.

  • NetworkProcess/NetworkDataTask.h:
  • NetworkProcess/NetworkDataTaskBlob.cpp:

(WebKit::NetworkDataTaskBlob::download): Do not call didBecomeDownload() and add an assert to ensure the client
has already been removed right after the final Download object is created.

  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::NetworkLoad): Use a pointer for the client instead of a reference because now we need to
change the client when the load is converted to a download. We don't need to null check the client in any case
because the member is only updated internally and always from a passed reference.
(WebKit::NetworkLoad::sharedDidReceiveResponse):
(WebKit::NetworkLoad::sharedWillSendRedirectedRequest):
(WebKit::NetworkLoad::convertTaskToDownload): This now receives a PendingDownload. It updates the client and no
longer sends DidStart, because the PendingDownload sends it now.
(WebKit::NetworkLoad::didReceiveChallenge):
(WebKit::NetworkLoad::didReceiveData):
(WebKit::NetworkLoad::didCompleteWithError):
(WebKit::NetworkLoad::didSendData):
(WebKit::NetworkLoad::wasBlocked):
(WebKit::NetworkLoad::cannotShowURL):
(WebKit::NetworkLoad::didReceiveBuffer):
(WebKit::NetworkLoad::didFinishLoading):
(WebKit::NetworkLoad::didFail):
(WebKit::NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync):
(WebKit::NetworkLoad::didBecomeDownload): Deleted.

  • NetworkProcess/NetworkLoad.h:
  • NetworkProcess/NetworkLoadClient.h: Remove didBecomeDownload().
  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::convertToDownload): This replaces didBecomeDownload() and
didConvertToDownload(). It transfers the NetworkLoad to the DownloadManager.
(WebKit::NetworkResourceLoader::abort): We don't need to check if the load was converted to a download here,
because m_networkLoad will always be null here in such case.
(WebKit::NetworkResourceLoader::didBecomeDownload): Deleted
(WebKit::NetworkResourceLoader::didConvertToDownload): Deleted

  • NetworkProcess/NetworkResourceLoader.h:
  • NetworkProcess/PingLoad.h: Remove didBecomeDownload().
  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.h: Ditto.
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.h: Ditto.
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: Ditto.
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]): Do not call didBecomeDownload().

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::download): Do not call didBecomeDownload() and add an assert to ensure the client
has already been removed right after the final Download object is created.

Tools:

Split /webkit2/Downloads/policy-decision-download in two, one to test the full load when main resource is
converted to a download and another one to test the cancellation as the test was doing before. When doing the
full load, delay a bit the decide destination to ensure the load is aborted before the data task has became a
download.

  • TestWebKitAPI/Tests/WebKit2Gtk/TestDownloads.cpp:

(testPolicyResponseDownload):
(testPolicyResponseDownloadCancel):
(beforeAll):

7:54 PM Changeset in webkit [208520] by Joseph Pecoraro
  • 51 edits
    7 adds
    1 delete in trunk

Web Inspector: Associate Worker Resources with the Worker and not the Page
https://bugs.webkit.org/show_bug.cgi?id=164342
<rdar://problem/29075775>

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

  • inspector/protocol/Network.json:
  • inspector/protocol/Page.json:

Associate Resource data with a target.

Source/WebCore:

Test: inspector/worker/resources-in-worker.html

Provide a way to associate an initiator identifier with a ResourceRequest.
This will allow Web Inspector to identify who started particular resource
loads. This is important to associate Worker(...), importScript(...), and
XMLHttpRequest / Fetch loads with that specific Worker.

  • platform/network/ResourceRequestBase.cpp:

(WebCore::ResourceRequestBase::setAsIsolatedCopy):

  • platform/network/ResourceRequestBase.h:

(WebCore::ResourceRequestBase::initiatorIdentifier):
(WebCore::ResourceRequestBase::setInitiatorIdentifier):
Optional initiator identifier. Currently used only be Web Inspector.

  • dom/ScriptExecutionContext.h:

(WebCore::ScriptExecutionContext::resourceRequestIdentifier):
Non-page execution contexts, like WorkerGlobalScope, should provide
a unique identifier that may be used to distinguish loads initiated
from within that context.

  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::createRequest):

  • Modules/fetch/FetchLoader.cpp:

(WebCore::FetchLoader::start):

  • Modules/fetch/FetchRequest.cpp:

(WebCore::FetchRequest::initializeWith):
XHR / Fetch loads should include the ScriptExecutionContext's
initiator identifier.

  • workers/WorkerScriptLoader.cpp:

(WebCore::WorkerScriptLoader::WorkerScriptLoader):
(WebCore::WorkerScriptLoader::loadSynchronously):
(WebCore::WorkerScriptLoader::loadAsynchronously):
(WebCore::WorkerScriptLoader::createResourceRequest):

  • workers/WorkerScriptLoader.h:

Provide a way to provide initiator identifier information for
Worker script loads. Currently this is new Worker(...) and
importScripts(...) resource loads.

  • workers/Worker.cpp:

(WebCore::Worker::Worker):
(WebCore::Worker::create):

  • workers/Worker.h:
  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::WorkerGlobalScope):
(WebCore::WorkerGlobalScope::importScripts):

  • workers/WorkerGlobalScope.h:

Give Worker itself the unique identifier, because new Worker(...)
loads happen before the WorkerGlobalScript (ScriptExecutionContext)
is actually created, but we want to associate it with this Worker.

  • workers/DedicatedWorkerGlobalScope.cpp:

(WebCore::DedicatedWorkerGlobalScope::create):
(WebCore::DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope):

  • workers/DedicatedWorkerGlobalScope.h:
  • workers/DedicatedWorkerThread.cpp:

(WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
(WebCore::DedicatedWorkerThread::createWorkerGlobalScope):

  • workers/DedicatedWorkerThread.h:
  • workers/WorkerInspectorProxy.cpp:

(WebCore::WorkerInspectorProxy::WorkerInspectorProxy):

  • workers/WorkerInspectorProxy.h:
  • workers/WorkerMessagingProxy.cpp:

(WebCore::WorkerMessagingProxy::WorkerMessagingProxy):
(WebCore::WorkerMessagingProxy::startWorkerGlobalScope):

  • workers/WorkerThread.cpp:

(WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
(WebCore::WorkerThread::WorkerThread):
(WebCore::WorkerThread::workerThread):

  • workers/WorkerThread.h:

Pass the MainThread's Worker identifier through to the WorkerGlobalScope
created on the WorkerThread. They should be the same identifier.

  • inspector/InspectorNetworkAgent.cpp:

(WebCore::InspectorNetworkAgent::willSendRequest):

  • inspector/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::buildObjectForFrameTree):
Pass the initiator identifier data to the frontend. This identifier is
equivalent to a "target identifier" in the frontend. Currently the only
non-Page targets are Workers.

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::shouldContinueAfterNotifyingLoadedFromMemoryCache):
When using the memory cache we create a new resource request. Be sure
to copy over useful inspector data, like the initiator identifier,
from the original request.

  • platform/network/cf/ResourceRequestCFNet.cpp:

(WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties):
When rebuilding a ResourceRequest from NSURLRequest, copy over the
initiator identifier property that wouldn't otherwise have survived
the transition.

Source/WebInspectorUI:

A Target may have its own list of Resource. For example, Workers may
request any resources via XHR/Fetch. So we associate a ResourceCollection
with a Target, and ensure we show them in Web Inspector as you would expect.
At this point, Target starts acting like Frame. Target has a resourceCollection
and extraScriptsCollection just like Frame. Target has events for ResourceAdded
just like Frame.

Even though Resource loads are happening in Workers, the Network data
still comes from the Page's Network agent. The added "targetId" data
with the Resource will let us associate a Resoure with a Target.

When opening inspector after a page has loaded, the frontend loads Resources
via the Page.getResourceTree path. In this case, the frontend may be
informed of Resources for a Target that it does not know about yet. In
these cases, it sets them aside as Orphaned resources for a target. Later,
when that Target is created, it will adopt its Orphaned resources.

Places that used to listen to just Frame.Event.ResourceWasAdded should now
also listen for Target.Event.ResourceAdded to ensure it sees the resources
associated with non-page targets.

  • UserInterface/Protocol/Target.js:

(WebInspector.Target):
(WebInspector.Target.prototype.get identifier):
(WebInspector.Target.prototype.get resourceCollection):
(WebInspector.Target.prototype.get extraScriptCollection):
(WebInspector.Target.prototype.addResource):
(WebInspector.Target.prototype.adoptResource):
(WebInspector.Target.prototype.addScript):
Give Target resource collections.

(WebInspector.MainTarget):
(WebInspector.MainTarget.prototype.get mainResource):
Pass through to the FrameResourceManager for the MainTarget.

(WebInspector.WorkerTarget):
(WebInspector.WorkerTarget.prototype.initialize):
Adopt orphaned resources on creation.

  • UserInterface/Models/Resource.js:

(WebInspector.Resource):
(WebInspector.Resource.prototype.get target):
(WebInspector.Resource.prototype.get type):
Resource now has a Target. During creation, if there is a targetId
then we must produce a Target or null (orphaned).

(WebInspector.Resource.prototype.associateWithScript):
When associating a Resource with a Script, we can use this opportunity
to convert from an XML / Other type to Script.

  • UserInterface/Models/Script.js:

(WebInspector.Script.prototype._resolveResource):
When associating Scripts with a resource we must associate resources
from within the proper Target. If it is the Main target we still use
the FrameResourceManager which keep searches across all Frames.

  • UserInterface/Protocol/NetworkObserver.js:

(WebInspector.NetworkObserver.prototype.requestWillBeSent):

  • UserInterface/Controllers/FrameResourceManager.js:

(WebInspector.FrameResourceManager.prototype.initialize):
(WebInspector.FrameResourceManager.prototype.frameDidNavigate):
(WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent):
(WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache):
(WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse):
(WebInspector.FrameResourceManager.prototype.adoptOrphanedResourcesForTarget):
(WebInspector.FrameResourceManager.prototype._addNewResourceToFrameOrTarget):
(WebInspector.FrameResourceManager.prototype._addResourceToTarget):
(WebInspector.FrameResourceManager.prototype._createResource):
(WebInspector.FrameResourceManager.prototype._addFrameTreeFromFrameResourceTreePayload):
(WebInspector.FrameResourceManager.prototype._addOrphanedResource):
(WebInspector.FrameResourceManager.prototype._mainFrameDidChange):
(WebInspector.FrameResourceManager.prototype._addNewResourceToFrame): Deleted.
When creating Resources from Network events we may now have a targetId.
Once created a Resource must be associated with a Frame, Target, or orphaned.

  • UserInterface/Main.html:
  • UserInterface/Views/TargetTreeElement.js: Removed.
  • UserInterface/Views/WorkerTreeElement.js: Added.

(WebInspector.WorkerTreeElement):
(WebInspector.WorkerTreeElement.prototype.get target):
(WebInspector.WorkerTreeElement.prototype.onexpand):
(WebInspector.WorkerTreeElement.prototype.oncollapse):
(WebInspector.WorkerTreeElement.prototype.onpopulate):
(WebInspector.WorkerTreeElement.prototype.updateSourceMapResources):
(WebInspector.WorkerTreeElement.prototype.onattach):
(WebInspector.WorkerTreeElement.prototype.compareChildTreeElements):
(WebInspector.WorkerTreeElement.prototype._handleContextMenuEvent):
(WebInspector.WorkerTreeElement.prototype._scriptAdded):
(WebInspector.WorkerTreeElement.prototype._resourceAdded):
Convert TargetTreeElement to WorkerTreeElement as that is clearer.
Behave like FrameTreeElement and populate resources on creation,
handle SourceMapResource, etc.

  • UserInterface/Views/FolderizedTreeElement.js:

(WebInspector.FolderizedTreeElement.prototype.registerFolderizeSettings):
(WebInspector.FolderizedTreeElement.prototype._compareTreeElementsByMainTitle):
(WebInspector.FolderizedTreeElement.prototype._parentTreeElementForRepresentedObject):
If the display name for a folder is null then there is no folder,
and place such child tree elements at the top level. This will be
the case for a Worker's Script's, which we choose not to folderize.

  • UserInterface/Controllers/DebuggerManager.js:

(WebInspector.DebuggerManager.prototype.scriptDidParse):

  • UserInterface/Controllers/TargetManager.js:

(WebInspector.TargetManager.prototype.targetForIdentifier):

  • UserInterface/Models/DefaultDashboard.js:

(WebInspector.DefaultDashboard):

  • UserInterface/Controllers/TimelineManager.js:

(WebInspector.TimelineManager):

  • UserInterface/Controllers/WorkerManager.js:

(WebInspector.WorkerManager.prototype.workerCreated):

  • UserInterface/Views/OpenResourceDialog.js:

(WebInspector.OpenResourceDialog.prototype.didDismissDialog):
(WebInspector.OpenResourceDialog.prototype.didPresentDialog):
(WebInspector.OpenResourceDialog.prototype._addScriptsForTarget): Deleted.
(WebInspector.OpenResourceDialog.prototype._addResourcesForTarget): Added.
Ensure those that listen for Frame.Event.ResourceWasAdded now also
listen for Target.Event.ResourceAdded.

  • UserInterface/Views/ContextMenuUtilities.js:

(WebInspector.appendContextMenuItemsForSourceCode):
(WebInspector.appendContextMenuItemsForResource): Deleted.

  • UserInterface/Views/ResourceTimelineDataGridNode.js:

(WebInspector.ResourceTimelineDataGridNode.prototype.appendContextMenuItems):

  • UserInterface/Views/ResourceTreeElement.js:

(WebInspector.ResourceTreeElement.prototype._updateTitles):
(WebInspector.ResourceTreeElement.prototype._handleContextMenuEvent):
Generalize ContextMenu helper to SourceCode so it can be used on a Script or Resource.

  • UserInterface/Views/ResourceDetailsSidebarPanel.js:

(WebInspector.ResourceDetailsSidebarPanel.prototype.inspect):
When looking at a WorkerTarget's mainResource (Script) show the
Resource Details sidebar for its Resource.

  • UserInterface/Views/ResourceSidebarPanel.js:

(WebInspector.ResourceSidebarPanel):
(WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
(WebInspector.ResourceSidebarPanel.prototype._scriptsCleared):
(WebInspector.ResourceSidebarPanel.prototype._addTargetWithMainResource):
(WebInspector.ResourceSidebarPanel.prototype._targetRemoved):
(WebInspector.ResourceSidebarPanel.prototype._addScriptForNonMainTarget): Deleted.
Simplify ResourceSidebarPanel to only handle adding WorkerTreeElements,
which will do the rest of the work for their Resources/Scripts.

  • UserInterface/Views/SourceCodeTreeElement.js:

(WebInspector.SourceCodeTreeElement.prototype.descendantResourceTreeElementTypeDidChange):
When we were changing the type of a resource, it would remove and re-insert.
This would collapse the parent if it was the only child in removal, and not
expand the parent when re-inserting. This ensures we re-expand.

LayoutTests:

  • inspector/worker/resources-in-worker-expected.txt: Added.
  • inspector/worker/resources-in-worker.html: Added.
  • inspector/worker/resources/dataFetch.json: Added.
  • inspector/worker/resources/dataXHR.json: Added.
  • inspector/worker/resources/resource-utilities.js: Added.

(loadResourceXHR):
(loadResourceFetch):

  • inspector/worker/resources/worker-resources.js: Added.

(importScript):
(onmessage):

7:06 PM Changeset in webkit [208519] by hyuki.kim@samsung.com
  • 2 edits in trunk/Tools

[EFL] fix error message caused by eina log
https://bugs.webkit.org/show_bug.cgi?id=164546

Reviewed by Gyuyoung Kim.

Fix error message caused by eina log when MiniBrowser is working with help option.

  • MiniBrowser/efl/main.c:

(quit):

5:42 PM Changeset in webkit [208518] by beidson@apple.com
  • 9 edits in trunk

IndexedDB 2.0: Clean up some exception ordering.
https://bugs.webkit.org/show_bug.cgi?id=164566

LayoutTests/imported/w3c:

Reviewed by NOBODY (OOPS!).

  • IndexedDB-private-browsing/idbcursor_advance_index7-expected.txt:
  • IndexedDB-private-browsing/idbcursor_continue_index7-expected.txt:
  • web-platform-tests/IndexedDB/idbcursor_advance_index7-expected.txt:
  • web-platform-tests/IndexedDB/idbcursor_continue_index7-expected.txt:
  • web-platform-tests/IndexedDB/idbobjectstore_createIndex14-exception_order-expected.txt:

Source/WebCore:

Reviewed by Alex Christensen.

No new tests (Covered by existing tests).

  • Modules/indexeddb/IDBCursor.cpp:

(WebCore::IDBCursor::advance):
(WebCore::IDBCursor::continueFunction):

  • Modules/indexeddb/IDBObjectStore.cpp:

(WebCore::IDBObjectStore::createIndex):

5:36 PM Changeset in webkit [208517] by Brent Fulgham
  • 2 edits in trunk/LayoutTests

Windows localStorage tests will fail until Bug 155185 is fixed.
https://bugs.webkit.org/show_bug.cgi?id=155185

  • platform/win/TestExpectations: Mark localStorage tests as expected

to fail for now.

5:34 PM Changeset in webkit [208516] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking media/modern-media-controls/pip-support/pip-support-enabled.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=164336

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
5:33 PM Changeset in webkit [208515] by Brent Fulgham
  • 2 edits in trunk/Tools

Unreviewed build fix after r208509.

  • DumpRenderTree/win/TestRunnerWin.cpp:

(TestRunner::setNeedsStorageAccessFromFileURLsQuirk): Add missing TestRunner implementation."

5:22 PM Changeset in webkit [208514] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

jsc CLI should work with the remote inspector
https://bugs.webkit.org/show_bug.cgi?id=164569

Reviewed by Joseph Pecoraro.

This patch enables using the remote inspector on the jsc CLI.
In order to use the remote inspector, jsc users need to pass an option.

  • jsc.cpp:

(CommandLine::parseArguments):
(runJSC):

5:21 PM Changeset in webkit [208513] by achristensen@apple.com
  • 28 edits
    4 deletes in trunk

Unreviewed, rolling out r208438.

crashes

Reverted changeset:

"[WK2][NETWORK_SESSION] Add support for downloading file
backed blobs"
https://bugs.webkit.org/show_bug.cgi?id=164458
http://trac.webkit.org/changeset/208438

5:16 PM Changeset in webkit [208512] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Marking two media/modern-media-controls tests as flaky.

Unreviewed test gardening.

5:13 PM Changeset in webkit [208511] by commit-queue@webkit.org
  • 18 edits
    6 adds in trunk

Change the decoding for some animated images to be asynchronous
https://bugs.webkit.org/show_bug.cgi?id=161566

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2016-11-09
Reviewed by Simon Fraser.

Source/WebCore:

Tests: fast/images/slower-animation-than-decoding-image.html

fast/images/slower-decoding-than-animation-image.html
fast/images/stopped-animation-deleted-image.html

Request the next frame before firing the animation timer. The asynchronous
image decoding work queue notifies the BitmapImage when the frame finishes
decoding. If the timer fires before the frame is decoded, no repaint will
be requested. Only when the image frame is ready, the animation will be
advanced and the image will be repainted.

  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::load): Cache the image settings in CachedImage.
(WebCore::CachedImage::createImage): No need to pass allowSubsampling to BitmapImage. It can be retrieved through Image::imageObserver().
(WebCore::CachedImage::changedInRect): Change the parameter to notifyObservers() to be a pointer.

  • loader/cache/CachedImage.h: Cache the settings: allowSubsampling, allowAsyncImageDecoding and showDebugBackground through m_loader.
  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::dataChanged): Fix a logging message.
(WebCore::BitmapImage::draw): Store the current SubsamplingLevel to be used when requesting decoding the image of the next frame.
Draw a debug rectangle if the next frame is missed because it is being decoded and the setting showDebugBackground is on.
(WebCore::BitmapImage::startAnimation): Deleted. Moved to the header file.
(WebCore::BitmapImage::internalStartAnimation): Added. Request asynchronous image decoding for the next frame if required. Return the
result of starting the animation.
(WebCore::BitmapImage::advanceAnimation): Call internalAdvanceAnimation() if the frame image is not being decoded. If it is being decoded
and the setting showDebugBackground is on, force repaint so the debug rectangle is drawn.
(WebCore::BitmapImage::internalAdvanceAnimation): This is the old body of advanceAnimation().
(WebCore::BitmapImage::stopAnimation): Stop the asynchronous image decoding if it is started.
(WebCore::BitmapImage::newFrameNativeImageAvailableAtIndex): This function is called from the async image decoding work queue when finishing decoding a native image frame.

  • platform/graphics/BitmapImage.h:

(WebCore::BitmapImage::startAnimation): Added. It is now calls internalStartAnimation().

  • platform/graphics/Color.h: Define a constant for the yellow color.
  • platform/graphics/ImageFrameCache.cpp:

(WebCore::ImageFrameCache::clearMetadata): Delete unreferenced member.
(WebCore::ImageFrameCache::requestFrameAsyncDecodingAtIndex): Return true if the frame is requested for async decoding.

  • platform/graphics/ImageFrameCache.h:
  • platform/graphics/ImageObserver.h: Add virtual functions for allowSubsampling, allowAsyncImageDecoding and showDebugBackground.
  • platform/graphics/ImageSource.cpp:

(WebCore::ImageSource::maximumSubsamplingLevel): Move checking allowSubsampling() to the caller BitmapImage::draw().

  • platform/graphics/ImageSource.h: Remove the setting allowSubsampling(); it can be retrieved from imageObserver().

(WebCore::ImageSource::setAllowSubsampling): Deleted.

  • rendering/RenderImageResource.cpp:

(WebCore::RenderImageResource::shutdown): Stop the animation of an image when shutting down the resource.

  • rendering/RenderImageResourceStyleImage.cpp:

(WebCore::RenderImageResourceStyleImage::shutdown): Ditto.
svg/graphics/SVGImageClients.h: Change the parameter to ImageObserver::changedInRect() to be a pointer.
(WebCore::SVGImageChromeClient::invalidateContentsAndRootView):

  • testing/Internals.cpp:

(WebCore::Internals::setImageFrameDecodingDuration): Sets a fixed frame decoding duration for testing.

  • testing/Internals.h:
  • testing/Internals.idl: Adds an internal option for ImageFrameDecodingDuration.

LayoutTests:

  • fast/images/slower-animation-than-decoding-image-expected.txt: Added.
  • fast/images/slower-animation-than-decoding-image.html: Added.
  • fast/images/slower-decoding-than-animation-image-expected.txt: Added.
  • fast/images/slower-decoding-than-animation-image.html: Added.

In these tests, CanvasRenderingContext2D.drawImage() is used to better
control advancing the animation of an animated image. A setTimeout() is
used instead of the frame duration to schedule when the drawing happens.
The first test ensures that faster decoding does not overrule the frame
duration; the setTimeout interval in this case. The second test ensures
the animation is not advanced unless decoding the next frame has finished.

  • fast/images/stopped-animation-deleted-image-expected.txt: Added.
  • fast/images/stopped-animation-deleted-image.html: Added.

This test ensures that if an animated image is removed from the document,
its draw() method won't be called even if the animation timer fires or the
decoding new frame availability notification is received.

5:11 PM Changeset in webkit [208510] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Settings tab sections overlap each other in docked Inspector window
https://bugs.webkit.org/show_bug.cgi?id=164564

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/SettingsTabContentView.css:

(.content-view.settings):
Make settings sections non-shrinkable and make the content view vertically scrollable.

(.content-view.settings > .setting-container):
Set vertical padding that looks good for non-shrinkable sections.

4:58 PM Changeset in webkit [208509] by Brent Fulgham
  • 38 edits
    8 adds in trunk

Local HTML should be blocked from localStorage access unless "Disable Local File Restrictions" is checked
https://bugs.webkit.org/show_bug.cgi?id=155185
<rdar://problem/11101440>

Reviewed by Brady Eidson.

Source/WebCore:

Add a new quirk for localStorage that defaults to 'on'. When active, this quirk says that
localStorage access should be granted, without needing to grant universal file access.

If the quirk is turned off, then localStorage is blocked unless the WebKit client explicitly
grants universal file access.

Tests: storage/domstorage/localstorage/blocked-file-access-permitted-by-quirk.html

storage/domstorage/localstorage/blocked-file-access.html

  • dom/Document.cpp:

(WebCore::Document::initSecurityContext): Set localStorage quirk mode based on settings.

  • page/SecurityOrigin.cpp:

(WebCore::SecurityOrigin::SecurityOrigin): Use more C++11 initializers.
(WebCore::SecurityOrigin::canAccessStorage): If the origin is a local file, and we are NOT in
localStorage quirks mode, and we have not been granted universal file access, prevent access
to DOM localStorage.
(WebCore::SecurityOrigin::setNeedsLocalStorageQuirk): Added.

  • page/SecurityOrigin.h:

(WebCore::SecurityOrigin::needsLocalStorageQuirk): Added.

  • page/Settings.in:
  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::WorkerGlobalScope): Make sure Workers know what the
localStorage quirks mode is set to.

Source/WebKit/mac:

Provide SPI to access the new quirk for localStorage. The quirk defaults to 'on'. When active, this
quirk says that localStorage access should be granted, without needing to grant universal file access.

If the quirk is turned off, then localStorage is blocked unless the WebKit client explicitly
grants universal file access.

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

(-[WebPreferences needsLocalStorageQuirk]): Added.
(-[WebPreferences setNeedsLocalStorageQuirk:]): Added.

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

(-[WebView _preferencesChanged:]): Honor the new localStorage quirk.

Source/WebKit2:

Provide SPI to access the new quirk for localStorage. The quirk defaults to 'on'. When active, this
quirk says that localStorage access should be granted, without needing to grant universal file access.

If the quirk is turned off, then localStorage is blocked unless the WebKit client explicitly
grants universal file access.

Tested by existing TestWebKitAPI tests and WebKit2.LocalStorageQuirkTest

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

(WKPreferencesSetNeedsLocalStorageQuirk): Added.
(WKPreferencesGetNeedsLocalStorageQuirk): Added.

  • UIProcess/API/C/WKPreferencesRefPrivate.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]): Honor the new localStorage quirk.

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration init]): Honor the new localStorage quirk flag.
(-[WKWebViewConfiguration copyWithZone:]): Ditto.
(-[WKWebViewConfiguration _needsLocalStorageQuirk]): Added.
(-[WKWebViewConfiguration _setNeedsLocalStorageQuirk:]): Added.

  • UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
  • WebProcess/InjectedBundle/API/c/WKBundle.cpp:

(WKBundleSetNeedsLocalStorageQuirk): Added.

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

(WebKit::InjectedBundle::setNeedsLocalStorageQuirk): Added.

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

(WebKit::WebPage::updatePreferences): Honor the new localStorage quirk flag.

Tools:

  • DumpRenderTree/TestRunner.cpp:

(setNeedsLocalStorageQuirkCallback): Added.
(TestRunner::staticFunctions):

  • DumpRenderTree/TestRunner.h:
  • DumpRenderTree/mac/DumpRenderTree.mm:

(resetWebPreferencesToConsistentValues): Update for new quirk setting.

  • DumpRenderTree/mac/TestRunnerMac.mm:

(TestRunner::setNeedsLocalStorageQuirk):

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2/CloseFromWithinCreatePage.cpp:
  • TestWebKitAPI/Tests/WebKit2Cocoa/LocalStorageClear.mm:
  • TestWebKitAPI/Tests/WebKit2Cocoa/LocalStorageNullEntries.mm:
  • TestWebKitAPI/Tests/WebKit2Cocoa/LocalStorageQuirkEnabled.html: Added.
  • TestWebKitAPI/Tests/WebKit2Cocoa/LocalStorageQuirkTest.mm: Added.

(-[LocalStorageQuirkMessageHandler userContentController:didReceiveScriptMessage:]):

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::beginTesting): Update for new quirk setting.

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setNeedsLocalStorageQuirk): Added.

  • WebKitTestRunner/InjectedBundle/TestRunner.h:

LayoutTests:

  • storage/domstorage/localstorage/blocked-file-access-expected.txt: Added.
  • storage/domstorage/localstorage/blocked-file-access-permitted-by-quirk-expected.txt: Added.
  • storage/domstorage/localstorage/blocked-file-access-permitted-by-quirk.html: Added.
  • storage/domstorage/localstorage/blocked-file-access.html: Added.
  • storage/domstorage/localstorage/resources/allowed-example.html: Added.
  • storage/domstorage/localstorage/resources/blocked-example.html: Added.
4:30 PM Changeset in webkit [208508] by commit-queue@webkit.org
  • 13 edits in trunk

URLParser should not consider path of URLs with no host to start at the first slash after the colon
https://bugs.webkit.org/show_bug.cgi?id=164555

Patch by Alex Christensen <achristensen@webkit.org> on 2016-11-09
Reviewed by Tim Horton.

LayoutTests/imported/w3c:

  • web-platform-tests/url/a-element-expected.txt:
  • web-platform-tests/url/a-element-xhtml-expected.txt:
  • web-platform-tests/url/url-constructor-expected.txt:

Source/WebCore:

When we see a url that is only scheme:// we treated the as the path. Firefox did this with unrecognized schemes,
but based on https://github.com/whatwg/url/issues/148 they seem willing to change. We had added similar behavior to
URL::parse, and I added this to URLParser in r206783 which this effectively reverts.

Covered by API and layout tests.

  • platform/URLParser.cpp:

(WebCore::URLParser::parse):
Don't move m_userStart to m_pathStart back by two when we see an empty host.

Tools:

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):

LayoutTests:

  • fast/url/segments-expected.txt:
  • fast/url/segments-from-data-url-expected.txt:
  • fast/loader/url-parse-1-expected.txt:
  • fetch/fetch-url-serialization-expected.txt:
4:18 PM Changeset in webkit [208507] by achristensen@apple.com
  • 3 edits in trunk/Source/WebCore

Simplify logic of SecurityOrigin::databaseIdentifier
https://bugs.webkit.org/show_bug.cgi?id=164565

Reviewed by Brady Eidson.

No change in behavior.

SecurityOrigins with the file scheme need a special database identifier to be backwards-compatible with existing storage.
Instead of determining whether this is a file SecurityOrigin at parsing time and only using that information when
making the database identifier, just determine whether we need this quirk when making the database identifier.
I'm planning to move this logic to SecurityOriginData in another patch.

  • page/SecurityOrigin.cpp:

(WebCore::SecurityOrigin::SecurityOrigin):
(WebCore::SecurityOrigin::create):
(WebCore::SecurityOrigin::databaseIdentifier):

  • page/SecurityOrigin.h:
4:11 PM Changeset in webkit [208506] by ljaehun.lim@samsung.com
  • 2 edits in trunk/Source/WebCore

Unreviewed, build fix after r208460

isValidColorString() was renamed isValidSimpleColorString().

  • html/ColorInputType.cpp:

(WebCore::ColorInputType::suggestions):

3:59 PM Changeset in webkit [208505] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit/win

Fix Windows build after r208499
https://bugs.webkit.org/show_bug.cgi?id=164562

  • WebKitDLL.cpp:

(shutDownWebKit):

3:51 PM Changeset in webkit [208504] by andersca@apple.com
  • 2 edits in trunk/Source/WebCore

Fix STP build.

  • WebCorePrefix.h:
3:41 PM Changeset in webkit [208503] by Simon Fraser
  • 33 edits
    9 adds in trunk

Implement visual-viewport based position:fixed handling for Mac async scrolling
https://bugs.webkit.org/show_bug.cgi?id=164495

Reviewed by Tim Horton.

Source/WebCore:

Educate the scrolling tree about visual and layout viewports. This is runtime-switchable,
so we push the enable flag to via the root state node, then push the layout viewport,
and the min/max scroll position that contstrain it, through frame state nodes.

When a scroll happens, we compute a new layout viewport when the visual viewport hits
an edge, and push that down through setScrollLayerPosition() since it's used to position
fixed and sticky layers.

When the main thread gets notified about an async scroll, we set the new layout viewport
on the FrameView, but do so in such a way that does not trigger layout. This is OK because
we do a RenderLayer update which udpates all the layoutViewport-dependent state, and is
necessary to avoid repaints every main thread update.

The iOS code is made to compile, but not work yet.

Tests: compositing/tiling/visiblerect-accumulated-offset.html

fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolled-down-then-up.html
fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolled-down.html
fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolling-layers-state.html

  • page/FrameView.cpp:

(WebCore::FrameView::setLayoutViewportOrigin):
(WebCore::FrameView::updateLayoutViewport):
(WebCore::FrameView::visualViewportRect):
(WebCore::FrameView::unscaledMinimumScrollPosition):
(WebCore::FrameView::scrollPositionChanged):

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

(WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
(WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
(WebCore::AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll):
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScrollTimerFired):
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
(WebCore::AsyncScrollingCoordinator::visualViewportEnabled):

  • page/scrolling/AsyncScrollingCoordinator.h:

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

  • page/scrolling/ScrollingStateFrameScrollingNode.cpp:

(WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
(WebCore::ScrollingStateFrameScrollingNode::setLayoutViewport):
(WebCore::ScrollingStateFrameScrollingNode::setMinLayoutViewportOrigin):
(WebCore::ScrollingStateFrameScrollingNode::setMaxLayoutViewportOrigin):
(WebCore::ScrollingStateFrameScrollingNode::setVisualViewportEnabled):
(WebCore::ScrollingStateFrameScrollingNode::dumpProperties):

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

(WebCore::ScrollingTree::viewportChangedViaDelegatedScrolling):
(WebCore::ScrollingTree::scrollPositionChangedViaDelegatedScrolling):
(WebCore::ScrollingTree::commitTreeState):

  • page/scrolling/ScrollingTree.h:

(WebCore::ScrollingTree::visualViewportEnabled):
(WebCore::ScrollingTree::setVisualViewportEnabled):

  • page/scrolling/ScrollingTreeFrameScrollingNode.cpp:

(WebCore::ScrollingTreeFrameScrollingNode::commitStateBeforeChildren):
(WebCore::ScrollingTreeFrameScrollingNode::layoutViewportForScrollPosition):

  • page/scrolling/ScrollingTreeFrameScrollingNode.h:

(WebCore::ScrollingTreeFrameScrollingNode::layoutViewport):
(WebCore::ScrollingTreeFrameScrollingNode::minLayoutViewportOrigin):
(WebCore::ScrollingTreeFrameScrollingNode::maxLayoutViewportOrigin):

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::setScrollPositionWithoutContentEdgeConstraints):

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

(WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):

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

(WebCore::ScrollingTreeFrameScrollingNodeIOS::setScrollPositionWithoutContentEdgeConstraints):
(WebCore::ScrollingTreeFrameScrollingNodeIOS::setScrollLayerPosition):

  • page/scrolling/ios/ScrollingTreeIOS.cpp:

(WebCore::ScrollingTreeIOS::scrollingTreeNodeDidScroll):

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

(WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollPositionWithoutContentEdgeConstraints):
(WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollLayerPosition):

Source/WebKit2:

Educate the scrolling tree about visual and layout viewports. This is runtime-switchable,
so we push the enable flag to via the root state node, then push the layout viewport,
and the min/max scroll position that contstrain it, through frame state nodes.

When a scroll happens, we compute a new layout viewport when the visual viewport hits
an edge, and push that down through setScrollLayerPosition() since it's used to position
fixed and sticky layers.

The iOS code is made to compile, but not work yet.

  • Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:

(ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
(ArgumentCoder<ScrollingStateFrameScrollingNode>::decode):

  • UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:

(WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidScroll):

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

(WebKit::RemoteScrollingTree::scrollingTreeNodeDidScroll):

  • UIProcess/Scrolling/RemoteScrollingTree.h:
  • UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
  • UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:

(WebKit::ScrollingTreeOverflowScrollingNodeIOS::setScrollLayerPosition):

  • WebProcess/Scrolling/RemoteScrollingCoordinator.mm:

(WebKit::RemoteScrollingCoordinator::scrollPositionChangedForNode):

LayoutTests:

Tests that dump the scrolling state tree, and the layer tree.

  • TestExpectations:
  • compositing/tiling/visiblerect-accumulated-offset.html: Added.
  • fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolled-down-expected.txt: Added.
  • fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolled-down-then-up-expected.txt: Added.
  • fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolled-down-then-up.html: Added.
  • fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolled-down.html: Added.
  • fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolling-layers-state-expected.txt: Added.
  • fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolling-layers-state.html: Added.
  • platform/mac-wk2/TestExpectations:
  • platform/mac/compositing/tiling/visiblerect-accumulated-offset-expected.txt: Added.
3:38 PM Changeset in webkit [208502] by Beth Dakin
  • 2 edits in trunk/Source/WebKit2

More attempted build fix.

  • UIProcess/Cocoa/WebViewImpl.mm:
3:34 PM Changeset in webkit [208501] by beidson@apple.com
  • 4 edits in trunk

IndexedDB 2.0: W3C test IndexedDB/idbtransaction_objectStoreNames.html fails.
https://bugs.webkit.org/show_bug.cgi?id=164528

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

  • web-platform-tests/IndexedDB/idbtransaction_objectStoreNames-expected.txt:

Source/WebCore:

No new tests (Covered by existing test).

  • Modules/indexeddb/IDBDatabase.cpp:

(WebCore::IDBDatabase::transaction): De-dupe the input names.

3:29 PM Changeset in webkit [208500] by beidson@apple.com
  • 21 edits
    5 adds in trunk

IndexedDB 2.0: Implement new IDBCursor.continuePrimaryKey function.
https://bugs.webkit.org/show_bug.cgi?id=164404

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

  • web-platform-tests/IndexedDB/idbcursor-continuePrimaryKey-exception-order-expected.txt:

Source/WebCore:

Tests: storage/indexeddb/modern/idbcursor-continue-primary-key-1-private.html

storage/indexeddb/modern/idbcursor-continue-primary-key-1.html
Also covered by existing tests.

  • Modules/indexeddb/IDBCursor.cpp:

(WebCore::IDBCursor::continuePrimaryKey):
(WebCore::IDBCursor::uncheckedIterateCursor):

  • Modules/indexeddb/IDBCursor.h:
  • Modules/indexeddb/IDBCursor.idl:
  • Modules/indexeddb/IDBKeyData.h:

(WebCore::IDBKeyData::operator>):
(WebCore::IDBKeyData::operator<=):
(WebCore::IDBKeyData::operator>=):

  • Modules/indexeddb/server/MemoryCursor.h:
  • Modules/indexeddb/server/MemoryIDBBackingStore.cpp:

(WebCore::IDBServer::MemoryIDBBackingStore::iterateCursor):

  • Modules/indexeddb/server/MemoryIndexCursor.cpp:

(WebCore::IDBServer::MemoryIndexCursor::iterate):

  • Modules/indexeddb/server/MemoryIndexCursor.h:
  • Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:

(WebCore::IDBServer::MemoryObjectStoreCursor::iterate):

  • Modules/indexeddb/server/MemoryObjectStoreCursor.h:
  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::iterateCursor):

  • Modules/indexeddb/server/SQLiteIDBCursor.cpp:

(WebCore::IDBServer::SQLiteIDBCursor::iterate):

  • Modules/indexeddb/server/SQLiteIDBCursor.h:
  • Modules/indexeddb/shared/IDBIterateCursorData.cpp:

(WebCore::IDBIterateCursorData::isolatedCopy):

  • Modules/indexeddb/shared/IDBIterateCursorData.h:

(WebCore::IDBIterateCursorData::encode):
(WebCore::IDBIterateCursorData::decode):

LayoutTests:

  • storage/indexeddb/cursor-basics-expected.txt:
  • storage/indexeddb/cursor-basics-private-expected.txt:
  • storage/indexeddb/modern/idbcursor-continue-primary-key-1-expected.txt: Added.
  • storage/indexeddb/modern/idbcursor-continue-primary-key-1-private-expected.txt: Added.
  • storage/indexeddb/modern/idbcursor-continue-primary-key-1-private.html: Added.
  • storage/indexeddb/modern/idbcursor-continue-primary-key-1.html: Added.
  • storage/indexeddb/modern/resources/idbcursor-continue-primary-key-1.js: Added.
3:28 PM Changeset in webkit [208499] by achristensen@apple.com
  • 31 edits in trunk/Source

Clean up Storage code
https://bugs.webkit.org/show_bug.cgi?id=164562

Reviewed by Brady Eidson.

Source/WebKit:

Some classes were in WebCore namespace instead of WebKit.

  • Storage/StorageAreaImpl.cpp:

(WebKit::StorageAreaImpl::StorageAreaImpl):
(WebKit::StorageAreaImpl::create):
(WebKit::StorageAreaImpl::copy):
(WebCore::StorageAreaImpl::~StorageAreaImpl): Deleted.
(WebCore::StorageAreaImpl::StorageAreaImpl): Deleted.
(WebCore::StorageAreaImpl::create): Deleted.
(WebCore::StorageAreaImpl::copy): Deleted.
(WebCore::StorageAreaImpl::canAccessStorage): Deleted.
(WebCore::StorageAreaImpl::storageType): Deleted.
(WebCore::StorageAreaImpl::length): Deleted.
(WebCore::StorageAreaImpl::key): Deleted.
(WebCore::StorageAreaImpl::item): Deleted.
(WebCore::StorageAreaImpl::setItem): Deleted.
(WebCore::StorageAreaImpl::removeItem): Deleted.
(WebCore::StorageAreaImpl::clear): Deleted.
(WebCore::StorageAreaImpl::contains): Deleted.
(WebCore::StorageAreaImpl::importItems): Deleted.
(WebCore::StorageAreaImpl::close): Deleted.
(WebCore::StorageAreaImpl::clearForOriginDeletion): Deleted.
(WebCore::StorageAreaImpl::sync): Deleted.
(WebCore::StorageAreaImpl::blockUntilImportComplete): Deleted.
(WebCore::StorageAreaImpl::memoryBytesUsedByCache): Deleted.
(WebCore::StorageAreaImpl::incrementAccessCount): Deleted.
(WebCore::StorageAreaImpl::decrementAccessCount): Deleted.
(WebCore::StorageAreaImpl::closeDatabaseTimerFired): Deleted.
(WebCore::StorageAreaImpl::closeDatabaseIfIdle): Deleted.
(WebCore::StorageAreaImpl::dispatchStorageEvent): Deleted.

  • Storage/StorageAreaImpl.h:
  • Storage/StorageAreaSync.cpp:

(WebKit::StorageAreaSync::StorageAreaSync):
(WebKit::StorageAreaSync::create):
(WebCore::StorageAreaSync::StorageAreaSync): Deleted.
(WebCore::StorageAreaSync::create): Deleted.
(WebCore::StorageAreaSync::~StorageAreaSync): Deleted.
(WebCore::StorageAreaSync::scheduleFinalSync): Deleted.
(WebCore::StorageAreaSync::scheduleItemForSync): Deleted.
(WebCore::StorageAreaSync::scheduleClear): Deleted.
(WebCore::StorageAreaSync::scheduleCloseDatabase): Deleted.
(WebCore::StorageAreaSync::syncTimerFired): Deleted.
(WebCore::StorageAreaSync::openDatabase): Deleted.
(WebCore::StorageAreaSync::migrateItemTableIfNeeded): Deleted.
(WebCore::StorageAreaSync::performImport): Deleted.
(WebCore::StorageAreaSync::markImported): Deleted.
(WebCore::StorageAreaSync::blockUntilImportComplete): Deleted.
(WebCore::StorageAreaSync::sync): Deleted.
(WebCore::StorageAreaSync::performSync): Deleted.
(WebCore::StorageAreaSync::deleteEmptyDatabase): Deleted.
(WebCore::StorageAreaSync::scheduleSync): Deleted.

  • Storage/StorageAreaSync.h:
  • Storage/StorageNamespaceImpl.cpp:

(WebKit::StorageNamespaceImpl::createSessionStorageNamespace):
(WebKit::StorageNamespaceImpl::getOrCreateLocalStorageNamespace):
(WebKit::StorageNamespaceImpl::storageArea):
(WebCore::localStorageNamespaceMap): Deleted.
(WebCore::StorageNamespaceImpl::createSessionStorageNamespace): Deleted.
(WebCore::StorageNamespaceImpl::getOrCreateLocalStorageNamespace): Deleted.
(WebCore::StorageNamespaceImpl::StorageNamespaceImpl): Deleted.
(WebCore::StorageNamespaceImpl::~StorageNamespaceImpl): Deleted.
(WebCore::StorageNamespaceImpl::copy): Deleted.
(WebCore::StorageNamespaceImpl::storageArea): Deleted.
(WebCore::StorageNamespaceImpl::close): Deleted.
(WebCore::StorageNamespaceImpl::clearOriginForDeletion): Deleted.
(WebCore::StorageNamespaceImpl::clearAllOriginsForDeletion): Deleted.
(WebCore::StorageNamespaceImpl::sync): Deleted.
(WebCore::StorageNamespaceImpl::closeIdleLocalStorageDatabases): Deleted.

  • Storage/StorageNamespaceImpl.h:
  • Storage/StorageTracker.cpp:

(WebCore::StorageTracker::initializeTracker): Deleted.
(WebCore::StorageTracker::internalInitialize): Deleted.
(WebCore::StorageTracker::tracker): Deleted.
(WebCore::StorageTracker::StorageTracker): Deleted.
(WebCore::StorageTracker::setDatabaseDirectoryPath): Deleted.
(WebCore::StorageTracker::databaseDirectoryPath): Deleted.
(WebCore::StorageTracker::trackerDatabasePath): Deleted.
(WebCore::ensureDatabaseFileExists): Deleted.
(WebCore::StorageTracker::openTrackerDatabase): Deleted.
(WebCore::StorageTracker::importOriginIdentifiers): Deleted.
(WebCore::StorageTracker::finishedImportingOriginIdentifiers): Deleted.
(WebCore::StorageTracker::syncImportOriginIdentifiers): Deleted.
(WebCore::StorageTracker::syncFileSystemAndTrackerDatabase): Deleted.
(WebCore::StorageTracker::setOriginDetails): Deleted.
(WebCore::StorageTracker::syncSetOriginDetails): Deleted.
(WebCore::StorageTracker::origins): Deleted.
(WebCore::StorageTracker::deleteAllOrigins): Deleted.
(WebCore::truncateDatabaseFile): Deleted.
(WebCore::StorageTracker::syncDeleteAllOrigins): Deleted.
(WebCore::StorageTracker::deleteOriginWithIdentifier): Deleted.
(WebCore::StorageTracker::deleteOrigin): Deleted.
(WebCore::StorageTracker::syncDeleteOrigin): Deleted.
(WebCore::StorageTracker::willDeleteAllOrigins): Deleted.
(WebCore::StorageTracker::willDeleteOrigin): Deleted.
(WebCore::StorageTracker::canDeleteOrigin): Deleted.
(WebCore::StorageTracker::cancelDeletingOrigin): Deleted.
(WebCore::StorageTracker::isActive): Deleted.
(WebCore::StorageTracker::setIsActive): Deleted.
(WebCore::StorageTracker::databasePathForOrigin): Deleted.
(WebCore::StorageTracker::diskUsageForOrigin): Deleted.

  • Storage/StorageTracker.h:

(WebCore::StorageTracker::storageDatabaseIdleInterval): Deleted.
(WebCore::StorageTracker::setStorageDatabaseIdleInterval): Deleted.

  • Storage/WebStorageNamespaceProvider.cpp:

(storageNamespaceProviders): Deleted.
(WebStorageNamespaceProvider::create): Deleted.
(WebStorageNamespaceProvider::WebStorageNamespaceProvider): Deleted.
(WebStorageNamespaceProvider::~WebStorageNamespaceProvider): Deleted.
(WebStorageNamespaceProvider::closeLocalStorage): Deleted.
(WebStorageNamespaceProvider::clearLocalStorageForAllOrigins): Deleted.
(WebStorageNamespaceProvider::clearLocalStorageForOrigin): Deleted.
(WebStorageNamespaceProvider::closeIdleLocalStorageDatabases): Deleted.
(WebStorageNamespaceProvider::syncLocalStorage): Deleted.
(WebStorageNamespaceProvider::createSessionStorageNamespace): Deleted.
(WebStorageNamespaceProvider::createLocalStorageNamespace): Deleted.
(WebStorageNamespaceProvider::createTransientLocalStorageNamespace): Deleted.

  • Storage/WebStorageNamespaceProvider.h:
  • WebCoreSupport/WebResourceLoadScheduler.h:
  • WebCoreSupport/WebViewGroup.cpp:

(WebViewGroup::storageNamespaceProvider):

Source/WebKit/mac:

  • Storage/WebStorageManager.mm:

(-[WebStorageManager origins]):
(-[WebStorageManager deleteAllOrigins]):
(-[WebStorageManager deleteOrigin:]):
(-[WebStorageManager diskUsageForOrigin:]):
(-[WebStorageManager syncLocalStorage]):
(-[WebStorageManager syncFileSystemAndTrackerDatabase]):
(+[WebStorageManager setStorageDatabaseIdleInterval:]):
(+[WebStorageManager closeIdleLocalStorageDatabases]):
(WebKitInitializeStorageIfNecessary):

  • WebView/WebView.mm:

(+[WebView _applicationWillTerminate]):

Source/WebKit2:

Use more Refs!

  • NetworkProcess/CustomProtocols/CustomProtocolManager.h:
  • Platform/IPC/Connection.cpp:

(IPC::Connection::addWorkQueueMessageReceiver):

  • Platform/IPC/Connection.h:
  • UIProcess/Storage/LocalStorageDatabase.cpp:

(WebKit::LocalStorageDatabase::create):
(WebKit::LocalStorageDatabase::LocalStorageDatabase):

  • UIProcess/Storage/LocalStorageDatabase.h:
  • UIProcess/Storage/LocalStorageDatabaseTracker.cpp:

(WebKit::LocalStorageDatabaseTracker::create):
(WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker):

  • UIProcess/Storage/LocalStorageDatabaseTracker.h:
  • UIProcess/Storage/StorageManager.cpp:

(WebKit::StorageManager::StorageArea::openDatabaseAndImportItemsIfNeeded):
(WebKit::StorageManager::StorageManager):

  • UIProcess/Storage/StorageManager.h:
  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::processWillOpenConnection):

  • UIProcess/mac/SecItemShimProxy.cpp:

(WebKit::SecItemShimProxy::initializeConnection):

  • WebProcess/Plugins/PluginProcessConnectionManager.cpp:

(WebKit::PluginProcessConnectionManager::initializeConnection):

  • WebProcess/WebPage/EventDispatcher.cpp:

(WebKit::EventDispatcher::initializeConnection):

  • WebProcess/WebPage/ViewUpdateDispatcher.cpp:

(WebKit::ViewUpdateDispatcher::initializeConnection):

3:27 PM Changeset in webkit [208498] by Jonathan Bedard
  • 2 edits in trunk/Tools

test-webkitpy failing test_create_patch_is_full_patch unit test
https://bugs.webkit.org/show_bug.cgi?id=164385

Reviewed by Darin Adler.

  • Scripts/webkitpy/common/checkout/scm/scm_unittest.py: Fixed expected output to match output.
3:25 PM Changeset in webkit [208497] by Beth Dakin
  • 2 edits in trunk/Source/WebKit2

Another attempted build fix.

  • UIProcess/Cocoa/WebViewImpl.mm:
3:23 PM Changeset in webkit [208496] by sbarati@apple.com
  • 3 edits
    1 add in trunk

Math.min()/Math.max() with no arguments is lowered incorrectly in the BytecodeParser
https://bugs.webkit.org/show_bug.cgi?id=164464
<rdar://problem/29131452>

Reviewed by Darin Adler.

JSTests:

  • stress/math-max-min-no-arguments.js: Added.

(assert):
(min):
(max):
(test):

Source/JavaScriptCore:

We were incorrectly matching this pattern inside the bytecode parser
to return NaN. Instead, we must return:

Infinity for Math.min()

-Infinity for Math.max()

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleMinMax):

3:18 PM Changeset in webkit [208495] by Michael Catanzaro
  • 2 edits in trunk/Source/WebKit2

Experimental features should not be enabled by default
https://bugs.webkit.org/show_bug.cgi?id=164367

Reviewed by Darin Adler.

We have two classes of experimental features:

(1) Features that are unstable and should be off by default, except for the developers

currently working on them. This is straightforward to handle; the default value should
be false.

(2) Features that are still not ready for end users, but are stable enough for testing. We

want these features to be enabled in testing environments like the bots, MiniBrowser,
Safari Tech Preview, and so forth, but not in stable release builds.

Implement this. It is better than having all experimental features on unconditionally, and
expecting them to be disabled manually on release branches, which is not something we are
keen to do. An exception is Cocoa ports, which to my knowledge do not currently have any
concept of development builds. These ports seem happy to continue disabling features
manually in release branches, and should continue to do so at least for now.

We also have features that we wish to enumerate at runtime, yet have enabled by default
unconditionally. We do not currently have any infrastructure to support this and should not
abuse the experimental status for this purpose; it requires future work. All settings can
still be toggled at runtime by clients that know about them using the existing runtime
features API.

Lastly, the custom elements feature is ready to be enabled by default, so it's no longer
experimental and can graduate to the list of normal boolean features.

  • Shared/WebPreferencesDefinitions.h:
3:17 PM Changeset in webkit [208494] by Beth Dakin
  • 2 edits in trunk/Source/WebKit2

Build fix.

  • UIProcess/Cocoa/WebViewImpl.mm:
3:03 PM Changeset in webkit [208493] by Beth Dakin
  • 2 edits in trunk/Source/WebKit/mac

Another attempted build fix.

  • WebView/WebView.mm:
2:53 PM Changeset in webkit [208492] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-602.3.10

New tag.

2:34 PM Changeset in webkit [208491] by commit-queue@webkit.org
  • 5 edits
    1 copy
    8 adds in trunk

[Modern Media Controls] Media Controller: set status label according to media state
https://bugs.webkit.org/show_bug.cgi?id=164557
<rdar://problem/29184097>

Patch by Antoine Quint <Antoine Quint> on 2016-11-09
Reviewed by Dean Jackson.

Source/WebCore:

Correctly set the StatusLabel text based on the media loading and network state.

Tests: http/tests/media/modern-media-controls/status-support/status-support-live-broadcast.html

http/tests/media/modern-media-controls/status-support/status-support-loading.html
media/modern-media-controls/status-support/status-support-error.html

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

(MediaController):

  • Modules/modern-media-controls/media/status-support.js: Added.

(StatusSupport.prototype.get control):
(StatusSupport.prototype.get mediaEvents):
(StatusSupport.prototype.syncControl):
(StatusSupport):

  • WebCore.xcodeproj/project.pbxproj:

LayoutTests:

Add new tests to check that we display the expected StatusLabel text when the media is in the
"Loading", "Error" and "Live Broadcast" states.

  • http/tests/media/modern-media-controls/status-support/status-support-live-broadcast-expected.txt: Added.
  • http/tests/media/modern-media-controls/status-support/status-support-live-broadcast.html: Added.
  • http/tests/media/modern-media-controls/status-support/status-support-loading-expected.txt: Added.
  • http/tests/media/modern-media-controls/status-support/status-support-loading.html: Added.
  • media/modern-media-controls/status-support/status-support-error-expected.txt: Added.
  • media/modern-media-controls/status-support/status-support-error.html: Added.
2:29 PM Changeset in webkit [208490] by matthew_hanson@apple.com
  • 1 delete in tags/Safari-603.1.11/trunk

Remove fallout from incorrect tag.

2:27 PM Changeset in webkit [208489] by Beth Dakin
  • 2 edits in trunk/Source/WebKit/mac

Attempted build fix.

  • WebView/WebView.mm:
2:27 PM Changeset in webkit [208488] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-603.1.12

New tag.

2:25 PM Changeset in webkit [208487] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

No need to set setFlowThreadState on RenderText in createTextRenderer.
https://bugs.webkit.org/show_bug.cgi?id=164559

Reviewed by Antti Koivisto.

setFlowThreadState in create*Renderer ensures that by the time we issue the initial call to
styleWillChange/styleDidChange through initializeStyle, the state is already set.
However since RenderText does not have its own style, it's sufficient to have the flow state set
through the normal RenderElement::insertChildInternal code path.

No change in functionality.

  • style/RenderTreeUpdater.cpp:

(WebCore::createTextRenderer):

2:24 PM Changeset in webkit [208486] by beidson@apple.com
  • 30 edits
    2 adds in trunk/Source

IndexedDB 2.0: Encapsulate cursor iteration parameters for easy future expansion.
https://bugs.webkit.org/show_bug.cgi?id=164504

Reviewed by Darin Adler.

Source/WebCore:

No new tests (Refactor, no behavior change).

This patch literally just takes the "key" and "count" arguments and encapsulates them in a struct.
That struct will then be easily expandable in the future (e.g. bug 164404).

  • Modules/indexeddb/IDBCursor.cpp:

(WebCore::IDBCursor::uncheckedIterateCursor):

  • Modules/indexeddb/IDBTransaction.cpp:

(WebCore::IDBTransaction::iterateCursor):
(WebCore::IDBTransaction::iterateCursorOnServer):

  • Modules/indexeddb/IDBTransaction.h:
  • Modules/indexeddb/client/IDBConnectionProxy.cpp:

(WebCore::IDBClient::IDBConnectionProxy::iterateCursor):

  • Modules/indexeddb/client/IDBConnectionProxy.h:
  • Modules/indexeddb/client/IDBConnectionToServer.cpp:

(WebCore::IDBClient::IDBConnectionToServer::iterateCursor):

  • Modules/indexeddb/client/IDBConnectionToServer.h:
  • Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
  • Modules/indexeddb/server/IDBBackingStore.h:
  • Modules/indexeddb/server/IDBServer.cpp:

(WebCore::IDBServer::IDBServer::iterateCursor):

  • Modules/indexeddb/server/IDBServer.h:
  • Modules/indexeddb/server/MemoryIDBBackingStore.cpp:

(WebCore::IDBServer::MemoryIDBBackingStore::iterateCursor):

  • Modules/indexeddb/server/MemoryIDBBackingStore.h:
  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::iterateCursor):

  • Modules/indexeddb/server/SQLiteIDBBackingStore.h:
  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::UniqueIDBDatabase::iterateCursor):
(WebCore::IDBServer::UniqueIDBDatabase::performIterateCursor):

  • Modules/indexeddb/server/UniqueIDBDatabase.h:
  • Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:

(WebCore::IDBServer::UniqueIDBDatabaseTransaction::iterateCursor):

  • Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
  • Modules/indexeddb/shared/IDBIterateCursorData.cpp: Added.

(WebCore::IDBIterateCursorData::isolatedCopy):

  • Modules/indexeddb/shared/IDBIterateCursorData.h: Added.

(WebCore::IDBIterateCursorData::encode):
(WebCore::IDBIterateCursorData::decode):

  • Modules/indexeddb/shared/InProcessIDBServer.cpp:

(WebCore::InProcessIDBServer::iterateCursor):

  • Modules/indexeddb/shared/InProcessIDBServer.h:
  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:

Source/WebKit2:

  • DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:

(WebKit::WebIDBConnectionToClient::iterateCursor):

  • DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
  • DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:
  • WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:

(WebKit::WebIDBConnectionToServer::iterateCursor):

  • WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
2:15 PM Changeset in webkit [208485] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

StyledElement::attributeChanged shouldn't do any work when the attribute value didn't change
https://bugs.webkit.org/show_bug.cgi?id=129476

Reviewed by Andreas Kling.

Avoid calling styleAttributeChanged and setPresentationAttributeStyleIsDirty
when the attribute value didn't change as in r164856.

  • dom/StyledElement.cpp:

(WebCore::StyledElement::attributeChanged):

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

Added a tag for Safari Technology Preview release 17.

2:02 PM Changeset in webkit [208483] by sbarati@apple.com
  • 6 edits
    1 add in trunk

TypeProfiler and running GC collection on another thread don't play nicely with each other
https://bugs.webkit.org/show_bug.cgi?id=164441
<rdar://problem/29132174>

Reviewed by Geoffrey Garen.

JSTests:

  • typeProfiler/type-profiler-gc.js: Added.

(bar):
(foo):

Source/JavaScriptCore:

This fix here is simple: we now treat the type profiler log as a GC root.
GC will make sure that we mark any values/structures that are in the log.
It's easy to reason about the correctness of this, and it also solves
the problem that we were clearing the log on the GC thread. Clearing the
log on the GC thread was a problem because when we clear the log, we may
allocate, which we're not allowed to do from the GC thread.

  • heap/Heap.cpp:

(JSC::Heap::markRoots):
(JSC::Heap::visitTypeProfiler):
(JSC::Heap::collectInThread):

  • heap/Heap.h:
  • runtime/TypeProfilerLog.cpp:

(JSC::TypeProfilerLog::processLogEntries):
(JSC::TypeProfilerLog::visit):

  • runtime/TypeProfilerLog.h:
1:42 PM Changeset in webkit [208482] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WTF

Allow RefPtrs of const ThreadSafeRefCounted types
https://bugs.webkit.org/show_bug.cgi?id=164548

Patch by Alex Christensen <achristensen@webkit.org> on 2016-11-09
Reviewed by Tim Horton.

  • wtf/ThreadSafeRefCounted.h:

Make m_refCount mutable like we did with RefCounted in r203257.

1:33 PM Changeset in webkit [208481] by Yusuke Suzuki
  • 4 edits
    2 adds in trunk

[DOMJIT] Implement Node::ownerDocument
https://bugs.webkit.org/show_bug.cgi?id=164004

Reviewed by Darin Adler.

Source/WebCore:

Test: js/dom/domjit-accessor-owner-document.html

Still I cannot reproduce this crash in x64 environment, according to the crash log, it accesses 0x8 address.
This can happen if document() accidentally returns nullptr. In the C++ ownerDocument implementation,
if document() returns nullptr, it just returns nullptr. But in the DOMJIT implementation, we assume that
document() won't return nullptr and access the member of it.

This patch aligns the DOMJIT implementation strictly to the C++ one.

  • dom/Node.idl:
  • domjit/JSNodeDOMJIT.cpp:

(WebCore::NodeOwnerDocumentDOMJIT::checkDOM):
(WebCore::NodeOwnerDocumentDOMJIT::callDOMGetter):

LayoutTests:

  • js/dom/domjit-accessor-owner-document-expected.txt: Added.
  • js/dom/domjit-accessor-owner-document.html: Added.
1:30 PM Changeset in webkit [208480] by commit-queue@webkit.org
  • 32 edits
    1 copy
    1 move in trunk/Source/WebCore

[SVG] Start moving special casing of SVG out of the bindings - SVGAngle
https://bugs.webkit.org/show_bug.cgi?id=164496

Patch by Sam Weinig <sam@webkit.org> on 2016-11-09
Reviewed by Darin Adler.

There is quite a bit of special casing of SVG types in the bindings that adds
a lot of complexity and is relatively fragile, as it is based on type naming.

Instead of keeping the complexity in the bindings, I am going to move it into
the implementation, where it has also longed to be.

Starting small, with just SVGAngle. It has been split in two, with the existing
SVGAngle being renamed SVGAngleValue, and the bound instance, which used to be name
SVGPropertyTearOff<SVGAngle>, taking the name SVGAngle (and inheriting from
SVGPropertyTearOff<SVGAngleValue>).

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

Add SVGAngleValue.cpp

  • bindings/scripts/CodeGenerator.pm:

Remove SVGAngle as a special case.

  • svg/SVGAngle.cpp: Removed.
  • svg/SVGAngle.h:

Added. Implements the SVGAngle interface explicitly, getting to
the SVGAngleValue through propertyReference().

  • svg/SVGAngle.idl:
  • svg/SVGAngleValue.cpp: Copied from Source/WebCore/svg/SVGAngle.cpp.
  • svg/SVGAngleValue.h: Copied from Source/WebCore/svg/SVGAngle.h.

Move old SVGAngle implementation to SVGAngleValue.

  • svg/SVGAnimatedAngle.cpp:

Replace SVGAngle usage with SVGAngleValue.

  • svg/SVGAnimatedAngle.h:

Switch SVGAnimatedAngle to be a type alias. This remains SVGAnimatedPropertyTearOff<SVGAngle>
as SVGAnimatedPropertyTearOff has been changed to take the TearOff type as its parameter.

  • svg/SVGAnimatedLength.h:
  • svg/SVGAnimatedPreserveAspectRatio.h:
  • svg/SVGAnimatedRect.h:

Switch to using type aliases and pass the TearOff to SVGAnimatedPropertyTearOff.

  • svg/SVGAnimatedType.cpp:

(WebCore::SVGAnimatedType::createAngleAndEnumeration):

  • svg/SVGAnimatedType.h:

(WebCore::SVGAnimatedType::angleAndEnumeration):
Use SVGAngleValue.

  • svg/SVGComponentTransferFunctionElement.h:

Add missing include of SVGElement.h (need because it removed from SVGPropertyTearOff).

  • svg/SVGMarkerElement.cpp:

(WebCore::SVGMarkerElement::parseAttribute):
(WebCore::SVGMarkerElement::setOrient):
Switch to take an SVGAngleValue.

(WebCore::SVGMarkerElement::setOrientToAngle):
Update to pull the value out via propertyReference().

  • svg/SVGMarkerElement.h:

Switch to take an SVGAngleValue.

  • svg/SVGLengthList.h:
  • svg/SVGNumberList.h:
  • svg/SVGPathSegList.h:
  • svg/SVGPointList.h:
  • svg/SVGStringList.h:
  • svg/SVGTransformList.h:

Switch to using type aliases in SVGPropertyTraits and add an alias for
ListItemTearOff.

  • svg/SVGSVGElement.cpp:

(WebCore::SVGSVGElement::createSVGAngle):

  • svg/SVGSVGElement.h:

Change createSVGAngle to return a Ref<SVGAngle> and create one.

  • svg/SVGSVGElement.idl:

Annotate IDL to indicate that a new value is being returned.

  • svg/SVGTransform.cpp:

Remove unnecessary include of SVGAngle.h.

  • svg/SVGViewSpec.cpp:

Add missing include of SVGElement.h (need because it removed from SVGPropertyTearOff).

  • svg/properties/SVGAnimatedPropertyTearOff.h:

Change to be parameterized on the TearOffType, rather than the PropertyType itself. Get the
Property type from the TearOffType.

  • svg/properties/SVGListProperty.h:
  • svg/properties/SVGListPropertyTearOff.h:

Fix assumption that all TearOffTypes are just a SVGPropertyTearOff templatized on a property
type. This is no longer true for SVGAngle. Instead, get the TearOffType for lists via SVGPropertyTraits.

  • svg/properties/SVGPropertyTearOff.h:

Make the PropertyType available by exposing it as a type alias.

1:27 PM Changeset in webkit [208479] by Darin Adler
  • 43 edits in trunk/Source

Move Range from ExceptionCode to ExceptionOr
https://bugs.webkit.org/show_bug.cgi?id=164457

Reviewed by Alex Christensen.

Source/WebCore:

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::rangeForNodeContents): Update to use ExceptionOr,
keeping behavior the same.
(WebCore::characterOffsetsInOrder): Ditto.
(WebCore::setRangeStartOrEndWithCharacterOffset): Changed argument to a
reference instead of a pointer. Use a boolean return value to indicate
success rather than an exception, since the callers don't need to know
which exception it is.
(WebCore::AXObjectCache::rangeForUnorderedCharacterOffsets): Updated for
the above.
(WebCore::AXObjectCache::nextBoundary): Ditto.
(WebCore::AXObjectCache::previousBoundary): Ditto.

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::rangeOfStringClosestToRangeInDirection):
Update to use ExceptionOr, keeping behavior the same.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::documentBasedSelectedTextRange): Ditto.

  • accessibility/atk/WebKitAccessibleUtil.cpp:

(selectionBelongsToObject): Ditto.

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper _convertToNSRange:]): Ditto.

  • dom/Node.cpp:

(WebCore::Node::textRects): Ditto.

  • dom/Range.cpp:

(WebCore::Range::~Range): Remove old comment that no longer makes sense now
that the detach function no longer does anything.
(WebCore::checkForDifferentRootContainer): Updated to use ExceptionOr,
keeping behavior the same.
(WebCore::Range::setStart): Ditto.
(WebCore::Range::setEnd): Ditto.
(WebCore::Range::isPointInRange): Ditto.
(WebCore::Range::comparePoint): Ditto.
(WebCore::Range::compareNode): Ditto.
(WebCore::top): Added helper function so that compareBoundaryPoints doesn't
need to have two identical loops in it.
(WebCore::Range::compareBoundaryPoints): Updated to use ExceptionOr,
keeping behavior the same.
(WebCore::Range::compareBoundaryPointsForBindings): Ditto. Also use a switch
instead of relying on the order of the values to check for unsupported values.
(WebCore::Range::boundaryPointsValid): Ditto.
(WebCore::Range::deleteContents): Ditto.
(WebCore::Range::intersectsNode): Ditto.
(WebCore::Range::processContents): Ditto.
(WebCore::deleteCharacterData): Ditto.
(WebCore::processContentsBetweenOffsets): Ditto. Also changed to be a
non-member function and private to this file instead of in the class.
(WebCore::processNodes): Ditto. Also changed one argument to be a RefPtr
since the code relies on using it after mutating the DOM.
(WebCore::processAncestorsAndTheirSiblings): Ditto. Changed one argument type
to use ExceptionOr so the caller doesn't have to check the exception first.
(WebCore::Range::extractContents): Ditto.
(WebCore::Range::cloneContents): Ditto.
(WebCore::Range::insertNode): Ditto. Also fixed to only call nodeType once
instead of three times.
(WebCore::Range::toString): Ditto. Also fixed to call nodeType only once
per node instead of twice, to use downcast instead of static_cast, and to
use the word "node" instead of "n" for the local variable name.
(WebCore::Range::createContextualFragment): Ditto.
(WebCore::Range::checkNodeWOffset): Ditto.
(WebCore::Range::setStartAfter): Ditto.
(WebCore::Range::setEndBefore): Ditto.
(WebCore::Range::setEndAfter): Ditto.
(WebCore::Range::selectNode): Ditto.
(WebCore::Range::selectNodeContents): Ditto.
(WebCore::Range::surroundContents): Ditto.
(WebCore::Range::setStartBefore): Ditto.
(WebCore::Range::contains): Ditto. Except added code to handle exception
case to return false without asserting because I saw at least one crash
that seemed to imply this behavior was needed.
(WebCore::rangesOverlap): Ditto.
(WebCore::rangeOfContents): Ditto.
(WebCore::Range::expand): Ditto.
(WebCore::Range::getClientRects): Ditto.
(WebCore::Range::getBoundingClientRect): Ditto.
(WebCore::Range::borderAndTextQuads): Changed to use return value
instead of out argument, since it's a private function used only
within this class so it was easy to update all call sites.
(WebCore::Range::boundingRect): Updated for above. Also renamed since
there was no need for the name "internal" in this.
(WebCore::Range::absoluteBoundingRect): Ditto.

  • dom/Range.h: Updated for above.
  • dom/Range.idl: Use non-legacy exceptions. Also changed the default value

of the string argument to the expand function to the empty string rather
than "undefined", because the function silently does nothing when passed
any unrecognized string, and so this leaves behavior unchanged. I removed
the comment saying that the "undefined" default is wrong.

  • editing/AlternativeTextController.cpp:

(WebCore::AlternativeTextController::applyAlternativeTextToRange): Updated
to use ExceptionOr but behave the same.

  • editing/Editor.cpp:

(WebCore::Editor::advanceToNextMisspelling): Ditto.
(WebCore::Editor::markAndReplaceFor): Ditto.
(WebCore::isFrameInRange): Ditto. Also made a few style tweaks.
(WebCore::Editor::countMatchesForText): Ditto.

  • editing/EditorCommand.cpp:

(WebCore::unionDOMRanges): Ditto.

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::respondToNodeModification): Ditto.

  • editing/InsertListCommand.cpp:

(WebCore::InsertListCommand::doApplyForSingleParagraph): Ditto.

  • editing/TextCheckingHelper.cpp:

(WebCore::TextCheckingParagraph::offsetTo): Ditto.

  • editing/TextCheckingHelper.h: Updated for above and also deleted

unneeded private function checkingRange, which just churned the
reference count unnecessarily; instead use m_checkingRange directly.

  • editing/TextIterator.cpp:

(WebCore::TextIterator::getLocationAndLengthFromRange): Ditto.

  • editing/VisiblePosition.cpp:

(WebCore::setStart): Ditto.
(WebCore::setEnd): Ditto.

  • editing/VisibleSelection.cpp:

(WebCore::makeSearchRange): Ditto.

  • editing/VisibleUnits.cpp:

(WebCore::suffixLengthForRange): Changed argument from RefPtr to
a reference.
(WebCore::prefixLengthForRange): Ditto.
(WebCore::previousBoundary): Updated for ExceptionOr and the change
above.
(WebCore::nextBoundary): Ditto.

  • editing/VisibleUnits.h: Updated for above.
  • editing/htmlediting.cpp:

(WebCore::comparePositions): Updated to use ExceptionOr but behave
the same.
(WebCore::visiblePositionForIndexUsingCharacterIterator): Ditto.
(WebCore::isNodeVisiblyContainedWithin): Ditto.

  • editing/ios/EditorIOS.mm:

(WebCore::Editor::setDictationPhrasesAsChildOfElement): Ditto.
(WebCore::Editor::setTextAsChildOfElement): Ditto.

  • editing/mac/EditorMac.mm:

(WebCore::Editor::adjustedSelectionRange): Ditto.

  • editing/markup.cpp:

(WebCore::createMarkupInternal): Ditto.

  • page/ContextMenuController.cpp:

(WebCore::ContextMenuController::contextMenuItemSelected): Ditto.

  • page/DOMSelection.cpp:

(WebCore::DOMSelection::addRange): Ditto.
(WebCore::DOMSelection::deleteFromDocument): Ditto.
(WebCore::DOMSelection::containsNode): Ditto.

  • page/EventHandler.cpp:

(WebCore::EventHandler::dispatchMouseEvent): Updated for change to
use ExceptionOr in Ragne::compareNode. Also refactored the function
to make the logic a little mroe straightforward and nest less of it
inside a loop.

  • page/Page.cpp:

(WebCore::Page::findStringMatchingRanges): Updated for ExceptionOr
without changing behavior.

  • page/TextIndicator.cpp:

(WebCore::hasNonInlineOrReplacedElements): Ditto.

  • rendering/RenderNamedFlowThread.cpp:

(WebCore::RenderNamedFlowThread::getRanges): Ditto.

Source/WebKit/mac:

  • DOM/DOMRange.mm:

(-[DOMRange setStart:offset:]): Updated exception handling.
(-[DOMRange setEnd:offset:]): Ditto.
(-[DOMRange setStartBefore:]): Ditto.
(-[DOMRange setStartAfter:]): Ditto.
(-[DOMRange setEndBefore:]): Ditto.
(-[DOMRange setEndAfter:]): Ditto.
(-[DOMRange selectNode:]): Ditto.
(-[DOMRange selectNodeContents:]): Ditto.
(-[DOMRange compareBoundaryPoints:sourceRange:]): Ditto.
(-[DOMRange deleteContents]): Ditto.
(-[DOMRange extractContents]): Ditto.
(-[DOMRange cloneContents]): Ditto.
(-[DOMRange insertNode:]): Ditto.
(-[DOMRange surroundContents:]): Ditto.
(-[DOMRange createContextualFragment:]): Ditto.
(-[DOMRange compareNode:]): Ditto.
(-[DOMRange intersectsNode:]): Ditto.
(-[DOMRange comparePoint:offset:]): Ditto.
(-[DOMRange isPointInRange:offset:]): Ditto.
(-[DOMRange expand:]): Ditto.

  • WebView/WebFrame.mm:

(-[WebFrame _documentFragmentWithMarkupString:baseURLString:]): Ditto.
(-[WebFrame _smartDeleteRangeForProposedRange:]): Deleted.
This function was incorrectly implemented (set both start and end of
the range to the computed start), not declared in any header file,
not used anywhere inside WebKit, and I also could not find a use of it
in outside-WebKit Apple code.

  • mac/DOM/DOMUIKitExtensions.mm:

(-[DOMRange move:inDirection:]): Ditto.
(-[DOMRange extend:inDirection:]): Ditto.

Source/WebKit/win:

  • WebView.cpp:

(WebView::onIMERequestCharPosition): Updated for new exception handling.

Source/WebKit2:

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMRange.cpp:

(webkit_dom_range_set_start): Updated exception handling.
(webkit_dom_range_set_end): Ditto.
(webkit_dom_range_set_start_before): Ditto.
(webkit_dom_range_set_start_after): Ditto.
(webkit_dom_range_set_end_before): Ditto.
(webkit_dom_range_set_end_after): Ditto.
(webkit_dom_range_select_node): Ditto.
(webkit_dom_range_select_node_contents): Ditto.
(webkit_dom_range_compare_boundary_points): Ditto.
(webkit_dom_range_delete_contents): Ditto.
(webkit_dom_range_extract_contents): Ditto.
(webkit_dom_range_clone_contents): Ditto.
(webkit_dom_range_insert_node): Ditto.
(webkit_dom_range_surround_contents): Ditto.
(webkit_dom_range_create_contextual_fragment): Ditto.
(webkit_dom_range_compare_node): Ditto.
(webkit_dom_range_intersects_node): Ditto.
(webkit_dom_range_compare_point): Ditto.
(webkit_dom_range_is_point_in_range): Ditto.
(webkit_dom_range_expand): Ditto.

  • WebProcess/InjectedBundle/API/mac/WKDOMRange.mm:

(-[WKDOMRange setStart:offset:]): Ditto.
(-[WKDOMRange setEnd:offset:]): Ditto.
(-[WKDOMRange selectNode:]): Ditto.
(-[WKDOMRange selectNodeContents:]): Ditto.

  • WebProcess/WebPage/WebFrame.cpp:

(WebKit::WebFrame::contentsAsString): Ditto.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::rangeForWebSelectionAtPosition): Ditto.
(WebKit::WebPage::rangeForBlockAtPoint): Ditto.
(WebKit::WebPage::selectWithGesture): Ditto.
(WebKit::containsRange): Ditto.
(WebKit::unionDOMRanges): Ditto.
(WebKit::WebPage::switchToBlockSelectionAtPoint): Ditto.
(WebKit::WebPage::getPositionInformation): Ditto.

1:27 PM Changeset in webkit [208478] by hyatt@apple.com
  • 5 edits in trunk

[CSS Parser] Fix grid layout parsing
https://bugs.webkit.org/show_bug.cgi?id=164489

Reviewed by Dean Jackson.

Source/WebCore:

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

(WebCore::consumeFitContent):
(WebCore::isGridTrackFixedSized):
(WebCore::consumeGridTrackSize):
(WebCore::consumeGridTrackRepeatFunction):
(WebCore::consumeGridTrackList):
(WebCore::isCustomIdentValue):
(WebCore::CSSPropertyParser::consumeGridItemPositionShorthand):
(WebCore::CSSPropertyParser::consumeGridAreaShorthand):
(WebCore::consumeImplicitGridAutoFlow):
(WebCore::CSSPropertyParser::consumeGridShorthand):

LayoutTests:

  • fast/css-grid-layout/grid-auto-columns-rows-auto-flow-resolution.html:
1:21 PM Changeset in webkit [208477] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Correct a typo in the name of a flaky test.
https://bugs.webkit.org/show_bug.cgi?id=164388

Unreviewed test gardening.

  • platform/mac/TestExpectations:
1:21 PM Changeset in webkit [208476] by Darin Adler
  • 87 edits in trunk/Source

Move EventTarget from ExceptionCode to ExceptionOr
https://bugs.webkit.org/show_bug.cgi?id=164465

Reviewed by Youenn Fablet.

Source/WebCore:

  • Modules/indexeddb/IDBRequest.h: Added now-needed forward

class declarations.

  • Modules/webaudio/AudioContext.h: Ditto.
  • bindings/js/JSEventListener.cpp:

(WebCore::eventHandlerAttribute): Updated for name change of the
attributeEventListener function.
(WebCore::documentEventHandlerAttribute): Ditto.

  • dom/Document.cpp:

(WebCore::Document::getWindowAttributeEventListener): Ditto.

  • dom/EventTarget.cpp:

(WebCore::EventTarget::setAttributeEventListener): Updated for
name change.
(WebCore::EventTarget::attributeEventListener): Ditto.
(WebCore::EventTarget::dispatchEventForBindings): Use ExceptionOr.
(WebCore::legacyType): Use null instead of empty for no type, since
it's more efficient to check for null.
(WebCore::EventTarget::fireEventListeners): Check for null.
Also streamlined logic a little bit and removed a very old comment.
(WebCore::EventTarget::eventListeners): Renamed from getEventListeners.

  • dom/EventTarget.h: Removed lots of unneeded declarations. Renamed

some functions to remove get prefix. Updated for above changes.
Moved one inline function out of the class header. Made the destructor
for EventTarget be inline to make the destructors for derived classes
slightly more efficient.

  • dom/EventTarget.idl: Use non-legacy exception.
  • dom/Node.cpp:

(WebCore::Node::didMoveToNewDocument): Updated for name change.

  • editing/ReplaceSelectionCommand.cpp:

(WebCore::ReplacementFragment::ReplacementFragment): Ditto.

  • inspector/InspectorCSSAgent.h: Added now-needed forward declaration.
  • inspector/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::getEventListeners): Updated for name change.

  • inspector/InspectorInstrumentation.h: Added now-needed forward declaration.
  • page/DOMWindow.h: Ditto.
  • xml/XMLHttpRequest.h: Ditto.

Source/WebKit/mac:

  • DOM/DOMNode.mm:

(-[DOMNode dispatchEvent:]): Updated exception handling.

Source/WebKit/win:

  • DOMCoreClasses.cpp:

(DOMNode::dispatchEvent): Updated exception handling.
(DOMWindow::dispatchEvent): Ditto.

Source/WebKit2:

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMAttr.cpp:

(webkit_dom_attr_dispatch_event): Updated exception handling.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCDATASection.cpp:

(webkit_dom_cdata_section_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCharacterData.cpp:

(webkit_dom_character_data_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMComment.cpp:

(webkit_dom_comment_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp:

(webkit_dom_dom_window_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:

(webkit_dom_document_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentFragment.cpp:

(webkit_dom_document_fragment_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.cpp:

(webkit_dom_document_type_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:

(webkit_dom_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.cpp:

(webkit_dom_html_anchor_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAppletElement.cpp:

(webkit_dom_html_applet_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.cpp:

(webkit_dom_html_area_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElement.cpp:

(webkit_dom_html_br_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElement.cpp:

(webkit_dom_html_base_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElement.cpp:

(webkit_dom_html_body_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.cpp:

(webkit_dom_html_button_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLCanvasElement.cpp:

(webkit_dom_html_canvas_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElement.cpp:

(webkit_dom_html_d_list_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElement.cpp:

(webkit_dom_html_directory_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElement.cpp:

(webkit_dom_html_div_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDocument.cpp:

(webkit_dom_html_document_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.cpp:

(webkit_dom_html_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElement.cpp:

(webkit_dom_html_embed_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFieldSetElement.cpp:

(webkit_dom_html_field_set_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElement.cpp:

(webkit_dom_html_font_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.cpp:

(webkit_dom_html_form_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.cpp:

(webkit_dom_html_frame_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElement.cpp:

(webkit_dom_html_frame_set_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElement.cpp:

(webkit_dom_html_hr_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElement.cpp:

(webkit_dom_html_heading_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElement.cpp:

(webkit_dom_html_head_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.cpp:

(webkit_dom_html_html_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.cpp:

(webkit_dom_html_iframe_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.cpp:

(webkit_dom_html_image_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:

(webkit_dom_html_input_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElement.cpp:

(webkit_dom_html_li_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.cpp:

(webkit_dom_html_label_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElement.cpp:

(webkit_dom_html_legend_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.cpp:

(webkit_dom_html_link_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMapElement.cpp:

(webkit_dom_html_map_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMarqueeElement.cpp:

(webkit_dom_html_marquee_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElement.cpp:

(webkit_dom_html_menu_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElement.cpp:

(webkit_dom_html_meta_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElement.cpp:

(webkit_dom_html_mod_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.cpp:

(webkit_dom_html_o_list_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.cpp:

(webkit_dom_html_object_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElement.cpp:

(webkit_dom_html_opt_group_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElement.cpp:

(webkit_dom_html_option_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElement.cpp:

(webkit_dom_html_paragraph_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElement.cpp:

(webkit_dom_html_param_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElement.cpp:

(webkit_dom_html_pre_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLQuoteElement.cpp:

(webkit_dom_html_quote_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElement.cpp:

(webkit_dom_html_script_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp:

(webkit_dom_html_select_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElement.cpp:

(webkit_dom_html_style_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElement.cpp:

(webkit_dom_html_table_caption_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElement.cpp:

(webkit_dom_html_table_cell_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElement.cpp:

(webkit_dom_html_table_col_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.cpp:

(webkit_dom_html_table_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.cpp:

(webkit_dom_html_table_row_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.cpp:

(webkit_dom_html_table_section_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.cpp:

(webkit_dom_html_text_area_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTitleElement.cpp:

(webkit_dom_html_title_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElement.cpp:

(webkit_dom_html_u_list_element_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.cpp:

(webkit_dom_node_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMProcessingInstruction.cpp:

(webkit_dom_processing_instruction_dispatch_event): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMText.cpp:

(webkit_dom_text_dispatch_event): Ditto.

1:17 PM Changeset in webkit [208475] by dbates@webkit.org
  • 8 edits
    30 adds in trunk

Add test infrastructure and tests for existing HTTP 0.9 sandbox machinery
https://bugs.webkit.org/show_bug.cgi?id=164389
<rdar://problem/29101072>

Reviewed by Alex Christensen.

Source/WebCore:

Add test infrastructure to support registering an arbitrary port as the default port
for a protocol. The behavior of various machinery, including the HTTP 0.9 machinery,
can be effected by whether the resource request was made using the default port for
the protocol. We expose window.internals.registerDefaultPortForProtocol() to allow
a test to override the default port associated with a protocol so as to support
testing these code paths using the existing port 8000 server started by run-webkit-httpd.
Without window.internals.registerDefaultPortForProtocol() we would need to teach
run-webkit-httpd to run a web server on port 80, which requires superuser privileges
(since it is a privileged port number) and is more likely to interfere with an
existing web server setup.

Tests: http/tests/security/http-0.9/default-port-plugin-blocked.html

http/tests/security/http-0.9/default-port-script-blocked.html
http/tests/security/http-0.9/iframe-blocked.html
http/tests/security/http-0.9/image-blocked.html
http/tests/security/http-0.9/image-on-HTTP-0.9-default-port-page-allowed-ref-test.html
http/tests/security/http-0.9/image-on-HTTP-0.9-default-port-page-allowed.html
http/tests/security/http-0.9/image-on-HTTP-0.9-page-blocked.html
http/tests/security/http-0.9/worker-connect-src-blocked.html
http/tests/security/http-0.9/worker-importScripts-blocked.html
http/tests/security/http-0.9/xhr-asynchronous-blocked.html

  • platform/URL.cpp:

(WebCore::defaultPortForProtocolMapForTesting): Added.
(WebCore::registerDefaultPortForProtocolForTesting): Adds the specified (protocol, port) to the
mapping used for testing.
(WebCore::clearDefaultPortForProtocolMapForTesting): Clears the protocol to default port testing map.
We call this function from Internals::resetToConsistentState() so that the mapping is cleared between
test runs.
(WebCore::defaultPortForProtocol): Modified to check the protocol to default port map for testing
before consulting URLParser::defaultPortForProtocol().

  • platform/URL.h:
  • testing/Internals.cpp:

(WebCore::Internals::resetToConsistentState): Clear the default port mapping used for testing.
(WebCore::Internals::registerDefaultPortForProtocol): Added.

  • testing/Internals.h:
  • testing/Internals.idl: Added declaration for registerDefaultPortForProtocol().

LayoutTests:

Add tests for the existing HTTP 0.9 sandbox machinery. Until we fix <https://bugs.webkit.org/show_bug.cgi?id=164387>,
these tests can only be run singly (i.e. pass --run-singly to run-webkit-tests). So, we skip
these tests to avoid test failures when run-webkit-tests runs in parallel mode (the default
mode and the mode used on the buildbots).

  • TestExpectations:
  • http/tests/security/http-0.9/default-port-plugin-blocked-expected.txt: Added.
  • http/tests/security/http-0.9/default-port-plugin-blocked.html: Added.
  • http/tests/security/http-0.9/default-port-script-blocked-expected.txt: Added.
  • http/tests/security/http-0.9/default-port-script-blocked.html: Added.
  • http/tests/security/http-0.9/iframe-blocked-expected.txt: Added.
  • http/tests/security/http-0.9/iframe-blocked.html: Added.
  • http/tests/security/http-0.9/image-blocked-expected.txt: Added.
  • http/tests/security/http-0.9/image-blocked.html: Added.
  • http/tests/security/http-0.9/image-on-HTTP-0.9-default-port-page-allowed-expected.txt: Added.
  • http/tests/security/http-0.9/image-on-HTTP-0.9-default-port-page-allowed-ref-test-expected.html: Added.
  • http/tests/security/http-0.9/image-on-HTTP-0.9-default-port-page-allowed-ref-test.html: Added.
  • http/tests/security/http-0.9/image-on-HTTP-0.9-default-port-page-allowed.html: Added.
  • http/tests/security/http-0.9/image-on-HTTP-0.9-page-blocked-expected.txt: Added.
  • http/tests/security/http-0.9/image-on-HTTP-0.9-page-blocked.html: Added.
  • http/tests/security/http-0.9/resources/blue-square.png: Added.
  • http/tests/security/http-0.9/resources/nph-alert-fail.pl: Added.
  • http/tests/security/http-0.9/resources/nph-fail.pl: Added.
  • http/tests/security/http-0.9/resources/nph-image-on-HTTP-0.9-default-port-page-allowed.pl: Added.
  • http/tests/security/http-0.9/resources/nph-image-on-HTTP-0.9-page-blocked.pl: Added.
  • http/tests/security/http-0.9/resources/nph-image.pl: Added.
  • http/tests/security/http-0.9/resources/nph-load-plugin-fail.pl: Added.
  • http/tests/security/http-0.9/resources/nph-worker-fail.pl: Added.
  • http/tests/security/http-0.9/worker-connect-src-blocked-expected.txt: Added.
  • http/tests/security/http-0.9/worker-connect-src-blocked.html: Added.
  • http/tests/security/http-0.9/worker-importScripts-blocked-expected.txt: Added.
  • http/tests/security/http-0.9/worker-importScripts-blocked.html: Added.
  • http/tests/security/http-0.9/xhr-asynchronous-blocked-expected.txt: Added.
  • http/tests/security/http-0.9/xhr-asynchronous-blocked.html: Added.
1:16 PM Changeset in webkit [208474] by commit-queue@webkit.org
  • 36 edits in trunk/Source/WebCore

[WebIDL] Add proper parsing for Promises
https://bugs.webkit.org/show_bug.cgi?id=164497

Patch by Sam Weinig <sam@webkit.org> on 2016-11-09
Reviewed by Tim Horton.

  • bindings/scripts/IDLParser.pm:

(parseNonAnyType):
(parseStringType):
Require Promise types to declare the type they resolve to.

  • bindings/js/JSDOMPromise.h:

Allow DOMPromise to be be parameterized on void. Add an SFINAE guarded
overload of resolve that takes no arguments when in a DOMPromise<void>.

  • Modules/applepay/ApplePaySession.idl:
  • Modules/fetch/DOMWindowFetch.idl:
  • Modules/fetch/FetchBody.idl:
  • Modules/fetch/FetchResponse.idl:
  • Modules/fetch/WorkerGlobalScopeFetch.idl:
  • Modules/mediastream/MediaDevices.idl:
  • Modules/mediastream/MediaStreamTrack.idl:
  • Modules/mediastream/RTCPeerConnection.idl:
  • Modules/mediastream/RTCRtpSender.idl:
  • Modules/mediastream/RTCStatsReport.idl:
  • Modules/streams/ReadableStream.idl:
  • Modules/streams/ReadableStreamDefaultReader.idl:
  • Modules/streams/ReadableStreamSource.idl:
  • Modules/streams/WritableStream.idl:
  • Modules/webaudio/AudioContext.idl:
  • bindings/scripts/test/TestNode.idl:
  • bindings/scripts/test/TestObj.idl:
  • crypto/SubtleCrypto.idl:
  • crypto/WebKitSubtleCrypto.idl:
  • css/FontFace.idl:
  • css/FontFaceSet.idl:
  • dom/CustomElementRegistry.idl:
  • html/HTMLMediaElement.idl:

Update IDLs to specify the resolve type of promise types.

  • Modules/mediastream/MediaEndpointPeerConnection.cpp:

(WebCore::MediaEndpointPeerConnection::replaceTrack):
(WebCore::MediaEndpointPeerConnection::replaceTrackTask):

  • Modules/mediastream/MediaStreamTrack.cpp:

(WebCore::MediaStreamTrack::applyConstraints):

  • Modules/mediastream/MediaStreamTrack.h:
  • Modules/mediastream/PeerConnectionBackend.cpp:

(WebCore::PeerConnectionBackend::setLocalDescriptionSucceeded):
(WebCore::PeerConnectionBackend::setRemoteDescriptionSucceeded):
(WebCore::PeerConnectionBackend::addIceCandidateSucceeded):

  • Modules/mediastream/PeerConnectionBackend.h:
  • Modules/streams/ReadableStreamSource.h:

(WebCore::ReadableStreamSource::start):
(WebCore::ReadableStreamSource::pull):
(WebCore::ReadableStreamSource::startFinished):
(WebCore::ReadableStreamSource::pullFinished):

  • Modules/webaudio/AudioContext.cpp:

(WebCore::AudioContext::addReaction):
(WebCore::AudioContext::setState):
(WebCore::AudioContext::suspend):
(WebCore::AudioContext::resume):
(WebCore::AudioContext::close):

  • Modules/webaudio/AudioContext.h:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::rejectPendingPlayPromises):
(WebCore::HTMLMediaElement::resolvePendingPlayPromises):
(WebCore::HTMLMediaElement::play):

  • html/HTMLMediaElement.h:

Update implementations to use DOMPromise<void> rather than DOMPromise<nullptr_t>
and use the new resolve() overload.

1:12 PM Changeset in webkit [208473] by Ryan Haddad
  • 2 edits in branches/safari-602-branch/LayoutTests

Land test expectations for rdar://problem/29169239.

1:06 PM Changeset in webkit [208472] by matthew_hanson@apple.com
  • 5 edits in branches/safari-602-branch/Source

Versioning.

12:58 PM Changeset in webkit [208471] by beidson@apple.com
  • 3 edits in trunk/Source/WebCore

Followup to https://bugs.webkit.org/show_bug.cgi?id=164466 - Make an IDBTransaction* be an IDBTransaction&

Rubberstamped by Alex Christensen.

No new tests (No behavior change).

  • Modules/indexeddb/IDBObjectStore.cpp:

(WebCore::IDBObjectStore::IDBObjectStore):
(WebCore::IDBObjectStore::~IDBObjectStore):
(WebCore::IDBObjectStore::hasPendingActivity):
(WebCore::IDBObjectStore::name):
(WebCore::IDBObjectStore::setName):
(WebCore::IDBObjectStore::keyPath):
(WebCore::IDBObjectStore::indexNames):
(WebCore::IDBObjectStore::transaction):
(WebCore::IDBObjectStore::autoIncrement):
(WebCore::IDBObjectStore::openCursor):
(WebCore::IDBObjectStore::openKeyCursor):
(WebCore::IDBObjectStore::get):
(WebCore::IDBObjectStore::putOrAdd):
(WebCore::IDBObjectStore::doDelete):
(WebCore::IDBObjectStore::clear):
(WebCore::IDBObjectStore::createIndex):
(WebCore::IDBObjectStore::index):
(WebCore::IDBObjectStore::deleteIndex):
(WebCore::IDBObjectStore::doCount):
(WebCore::IDBObjectStore::getAll):
(WebCore::IDBObjectStore::getAllKeys):
(WebCore::IDBObjectStore::markAsDeleted):
(WebCore::IDBObjectStore::rollbackForVersionChangeAbort):
(WebCore::IDBObjectStore::ref):
(WebCore::IDBObjectStore::deref):

  • Modules/indexeddb/IDBObjectStore.h:
12:38 PM Changeset in webkit [208470] by Alan Bujtas
  • 8 edits in trunk/Source/WebCore

Move RenderNamedFlowThread nextRendererForElement logic to RenderTreeUpdater.
https://bugs.webkit.org/show_bug.cgi?id=164503

Reviewed by Antti Koivisto.

When we insert a renderer into the render tree, we need to know both its parent
and its next sibling. Normally the parent and the sibling are based on the DOM, but
when this renderer is part of a flow thread, its insertion sibling is not necessarily the DOM sibling.
To find the correct sibling, we call RenderNamedFlowThread's nextRendererForElement().
RenderNamedFlowThread keeps track of its children so that it can compute the next sibling
for the insertion point.

This patch eliminates the need for keeping track of the child renderers of each
flow by moving the 'next sibling' logic to RenderTreePosition.

No change in functionality.

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::insertedIntoTree):
(WebCore::RenderElement::willBeDestroyed):
(WebCore::RenderElement::removeFromRenderFlowThread):
(WebCore::RenderElement::renderNamedFlowThreadWrapper): Deleted.

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

(WebCore::RenderNamedFlowThread::nextRendererForElement): Deleted.
(WebCore::RenderNamedFlowThread::addFlowChild): Deleted.
(WebCore::RenderNamedFlowThread::removeFlowChild): Deleted.

  • rendering/RenderNamedFlowThread.h:
  • style/RenderTreePosition.cpp:

(WebCore::RenderTreePosition::previousSiblingRenderer):
(WebCore::RenderTreePosition::flowThreadInsertionContext):

  • style/RenderTreePosition.h:

(WebCore::RenderTreePosition::RenderTreePosition):
(WebCore::RenderTreePosition::parent):

  • style/RenderTreeUpdater.cpp:

(WebCore::registerElementForFlowThreadIfNeeded): We need to registed the element even when it does not create renderer (display: none).
(WebCore::RenderTreeUpdater::createRenderer):
(WebCore::moveToFlowThreadIfNeeded): Deleted.

12:29 PM Changeset in webkit [208469] by pvollan@apple.com
  • 2 edits in trunk/Source/WebCore

[Win][Direct2D] Incomplete image decoding.
https://bugs.webkit.org/show_bug.cgi?id=164511

Reviewed by Darin Adler.

Create native decoder when all image data has been received.

  • platform/graphics/win/ImageDecoderDirect2D.cpp:

(WebCore::ImageDecoder::setData):

12:25 PM Changeset in webkit [208468] by Beth Dakin
  • 2 edits in trunk/Source/WebCore

Attempted build fix.

  • platform/spi/cocoa/AVKitSPI.h:
12:23 PM Changeset in webkit [208467] by beidson@apple.com
  • 13 edits
    1 add in trunk

IndexedDB 2.0: Clean up more transaction abort behavior, including tweaks to Index/ObjectStore lifetime.
https://bugs.webkit.org/show_bug.cgi?id=164466

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

  • web-platform-tests/IndexedDB/transaction-abort-index-metadata-revert-expected.txt:
  • web-platform-tests/IndexedDB/transaction-abort-multiple-metadata-revert-expected.txt:
  • web-platform-tests/IndexedDB/transaction-abort-object-store-metadata-revert-expected.txt:

Source/WebCore:

No new tests (Covered by existing tests that now pass).

Previously, IDBIndex ref/deref didn't track a traditional ref count but instead kept the owning object store alive.
Now, IDBObjectStore ref/deref do the same thing for the owning transaction.

Now when a version change transaction is rolled back, some object stores and indexes get pulled out of the "deleted"
set and get promoted back up into the "referenced" set.

Now deleted object stores/indexes are considered opaque roots, as live objects in the deleted state *can* get back
to the owning objects.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • Modules/indexeddb/IDBIndex.cpp:

(WebCore::IDBIndex::rollbackInfoForVersionChangeAbort):

  • Modules/indexeddb/IDBObjectStore.cpp:

(WebCore::IDBObjectStore::IDBObjectStore):
(WebCore::IDBObjectStore::indexNames):
(WebCore::IDBObjectStore::transaction):
(WebCore::IDBObjectStore::openCursor):
(WebCore::IDBObjectStore::openKeyCursor):
(WebCore::IDBObjectStore::deleteIndex):
(WebCore::IDBObjectStore::rollbackForVersionChangeAbort):
(WebCore::IDBObjectStore::visitReferencedIndexes):
(WebCore::IDBObjectStore::ref):
(WebCore::IDBObjectStore::deref):
(WebCore::IDBObjectStore::create): Deleted.

  • Modules/indexeddb/IDBObjectStore.h:
  • Modules/indexeddb/IDBTransaction.cpp:

(WebCore::IDBTransaction::objectStore):
(WebCore::IDBTransaction::transitionedToFinishing):
(WebCore::IDBTransaction::internalAbort):
(WebCore::IDBTransaction::createObjectStore):
(WebCore::IDBTransaction::deleteObjectStore):
(WebCore::IDBTransaction::visitReferencedObjectStores):

  • Modules/indexeddb/IDBTransaction.h:
  • Modules/indexeddb/IDBTransaction.idl:
  • bindings/js/JSIDBTransactionCustom.cpp: Added.

(WebCore::JSIDBTransaction::visitAdditionalChildren):

12:22 PM Changeset in webkit [208466] by Simon Fraser
  • 14 edits in trunk/Source/WebCore

Allow customization of TextStream-based logging for geometry types
https://bugs.webkit.org/show_bug.cgi?id=164460

Reviewed by Zalan Bujtas.

TextStream-based logging was constrained by the requirement to maintain compatibility
with DRT-style output, which includes cumbersome rect logging ("at (5,0) size 40x40")
and dumping LayoutRects as IntRects.

Add some formatting flags so that other TextStream clients (e.g. logging) can have
more readable output, and opt into automatic FormatNumberRespectingIntegers behavior.

TextStreams whose output appears in test results are given flags to avoid behavior
changes, but in the longer term test results should be updated.

  • html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::CanvasRenderingContext2D::replayDisplayListAsText):

  • page/scrolling/ScrollingStateNode.cpp:

(WebCore::ScrollingStateNode::scrollingStateTreeAsText):

  • platform/graphics/FloatPoint.cpp:

(WebCore::operator<<):

  • platform/graphics/FloatRect.cpp:

(WebCore::operator<<):

  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::layerTreeAsText):

  • platform/graphics/IntRect.cpp:

(WebCore::operator<<):

  • platform/graphics/LayoutPoint.cpp:

(WebCore::operator<<):

  • platform/graphics/LayoutRect.cpp:

(WebCore::operator<<):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::replayDisplayListAsText):

  • platform/graphics/displaylists/DisplayList.cpp:

(WebCore::DisplayList::DisplayList::asText):

  • platform/text/TextStream.cpp:

(WebCore::TextStream::operator<<):

  • platform/text/TextStream.h:

(WebCore::TextStream::TextStream):
(WebCore::TextStream::formattingFlags):
(WebCore::TextStream::setFormattingFlags):
(WebCore::TextStream::hasFormattingFlag):
(WebCore::TextStream::increaseIndent):
(WebCore::TextStream::decreaseIndent):

  • rendering/RenderTreeAsText.cpp:

(WebCore::externalRepresentation):
(WebCore::counterValueForElement):

12:21 PM Changeset in webkit [208465] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

RenderFlowThread::flowThreadRelativeWillBeRemoved should take RenderObject& instead of RenderObject*
https://bugs.webkit.org/show_bug.cgi?id=164543

Reviewed by Simon Fraser.

No change in functionality.

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::removeChild):

  • rendering/RenderFlowThread.h:
  • rendering/RenderMultiColumnFlowThread.cpp:

(WebCore::RenderMultiColumnFlowThread::handleSpannerRemoval):
(WebCore::RenderMultiColumnFlowThread::flowThreadRelativeWillBeRemoved):

  • rendering/RenderMultiColumnFlowThread.h:
12:18 PM Changeset in webkit [208464] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

REGRESSION (r208149): Media scrubber is not displayed in media controls
https://bugs.webkit.org/show_bug.cgi?id=164514

Reviewed by Darin Adler.

Fixes broken Media Controls API tests.

Added a new PlatformMediaSessionType; need to add that same type to the TYPE_TRAITS section of
MediaElementSession.h so that is<> and downcast<> work correctly.

  • html/MediaElementSession.h:

(isType):

12:13 PM Changeset in webkit [208463] by jfbastien@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

WebAssembly: Silence noisy warning
https://bugs.webkit.org/show_bug.cgi?id=164459

Reviewed by Yusuke Suzuki.

  • wasm/WasmPlan.cpp:

(JSC::Wasm::Plan::Plan):

12:06 PM Changeset in webkit [208462] by Wenson Hsieh
  • 8 edits in trunk

When editing IME, compositionend events should fire after input events
https://bugs.webkit.org/show_bug.cgi?id=164324
<rdar://problem/29050438>

Reviewed by Darin Adler.

Source/WebCore:

Moves where we dispatch compositionend events to after applying editing commands that fire beforeinput or
input events. Also augments existing layout tests to verify the change.

  • editing/Editor.cpp:

(WebCore::Editor::setComposition):

LayoutTests:

Augments fast/events/input-events-ime-recomposition.html and fast/events/input-events-ime-composition.html to
verify that compositionend events are fired after input events. Also rebaselines
fast/events/ime-composition-events-001.html.

  • fast/events/ime-composition-events-001-expected.txt:
  • fast/events/input-events-ime-composition-expected.txt:
  • fast/events/input-events-ime-composition.html:
  • fast/events/input-events-ime-recomposition-expected.txt:
  • fast/events/input-events-ime-recomposition.html:
12:04 PM Changeset in webkit [208461] by Wenson Hsieh
  • 5 edits
    2 adds in trunk

Setting foreground color when text is selected should fire an input event with color data
https://bugs.webkit.org/show_bug.cgi?id=164241
<rdar://problem/29032759>

Reviewed by Darin Adler.

Source/WebCore:

Refactors Editor::applyStyle and Editor::applyParagraphStyle to handle beforeinput and input event dispatch.
Instead of going through the ApplyStyleCommand to dispatch input events, override shouldDispatchInputEvents to
return false. This strategy also has the effect of unifying the way input events are dispatched in applyStyle,
in both codepaths where we computeAndSetTypingStyle and where we create and then apply a style command.

Test: fast/events/input-events-selection-forecolor-data.html

  • editing/ApplyStyleCommand.h:
  • editing/Editor.cpp:

(WebCore::inputEventDataForEditingStyleAndAction):
(WebCore::Editor::applyStyle):
(WebCore::Editor::applyParagraphStyle):
(WebCore::Editor::computeAndSetTypingStyle):

LayoutTests:

Adds a new layout test verifying that selecting text and setting its foreground color will fire input events
with the correct RGB values in the data attribute.

  • fast/events/input-events-selection-forecolor-data-expected.txt: Added.
  • fast/events/input-events-selection-forecolor-data.html: Added.
  • platform/ios-simulator/TestExpectations:
11:56 AM Changeset in webkit [208460] by dino@apple.com
  • 50 edits
    10 adds in trunk

Rendering support for ExtendedColors
https://bugs.webkit.org/show_bug.cgi?id=164443
<rdar://problems/29123243>

Reviewed by Simon Fraser and Darin Adler.

Source/WebCore:

Add support for rendering the new color() syntax, which
ends up as an ExtendedColor.

In order to make rendering code a little more readable, I
changed Color::hasAlpha to Color::isOpaque (since an alpha
of 100% is still an alpha), and added a Color::isVisible
helper (the color isn't completely transparent). These new
helpers support ExtendedColor forms.

Support for painting gradients and blending between colors
is still to come. I also added some FIXME comments
to show other places that don't handle ExtendedColors yet.

Tests: css3/color/backgrounds-and-borders.html

css3/color/box-shadows.html
css3/color/canvas.html
css3/color/composited-solid-backgrounds.html
css3/color/text.html

  • css/CSSGradientValue.cpp: Add some notes that this is broken.

(WebCore::interpolate):
(WebCore::CSSGradientValue::knownToBeOpaque):

  • editing/EditingStyle.cpp: Use new Color helpers.

(WebCore::isTransparentColorValue):

  • editing/mac/EditorMac.mm: Use new Color helpers.

(WebCore::Editor::fontAttributesForSelectionStart):

  • html/ColorInputType.cpp: No need to use the Color class at all here.

(WebCore::isValidSimpleColorString): Renamed from isValidColorString.
(WebCore::ColorInputType::sanitizeValue):
(WebCore::ColorInputType::typeMismatchFor):
(WebCore::isValidColorString): Deleted.

  • html/canvas/CanvasRenderingContext2D.cpp: New helpers.

(WebCore::CanvasRenderingContext2D::shouldDrawShadows):
(WebCore::CanvasRenderingContext2D::didDraw):

  • page/FrameView.cpp: Ditto.

(WebCore::FrameView::recalculateScrollbarOverlayStyle):
(WebCore::FrameView::hasOpaqueBackground):
(WebCore::FrameView::setBaseBackgroundColor):

  • platform/graphics/Color.cpp:

(WebCore::differenceSquared): Support ExtendedColor, but also
add a note to indicate that this method and its call sites
should use floats.
(WebCore::Color::serialized): New helper.
(WebCore::Color::cssText): Ditto.
(WebCore::Color::blend): Ditto.
(WebCore::Color::blendWithWhite):
(WebCore::Color::colorWithAlphaMultipliedBy): Implementation of new function.
(WebCore::Color::colorWithAlpha): Ditto.
(WebCore::Color::opaqueColor): New method to return an opaque version of the given color.
(WebCore::blend):

  • platform/graphics/Color.h:

(WebCore::Color::isOpaque): New helper that is !hasAlpha().
(WebCore::Color::isVisible): New helper.
(WebCore::Color::alphaAsFloat): Gets the alpha value as a float. This replaces
a bunch of places that were calculating it manually each time. Meanwhile, we
might consider always exposing the primaries as floats... or at least
have that option.
(WebCore::isBlackColor): New helper - it was used in a couple of places.
(WebCore::isWhiteColor): Ditto.
(WebCore::Color::hasAlpha): Deleted.

  • platform/graphics/Gradient.cpp: Add FIXME.

(WebCore::Gradient::addColorStop):

  • platform/graphics/Gradient.h:
  • platform/graphics/GraphicsContext.cpp: Use new helpers.

(WebCore::GraphicsContext::computeLineBoundsAndAntialiasingModeForText):

  • platform/graphics/GraphicsContext.h:

(WebCore::GraphicsContext::hasVisibleShadow):

  • platform/graphics/Image.cpp: Ditto.

(WebCore::Image::fillWithSolidColor):

  • platform/graphics/ShadowBlur.cpp: Ditto.

(WebCore::ShadowBlur::updateShadowBlurValues):

  • platform/graphics/ca/GraphicsLayerCA.cpp: Ditto.

(WebCore::GraphicsLayerCA::setContentsToSolidColor):

  • platform/graphics/cg/GradientCG.cpp:

(WebCore::Gradient::platformGradient): Add a FIXME to note that we can
add ExtendedColor support simply by using CGColors, rather than fetching
the components ourselves.

  • platform/graphics/cg/GraphicsContextCG.cpp: New helpers.

(WebCore::calculateDrawingMode):

  • platform/graphics/cocoa/FontCascadeCocoa.mm: New helpers.

(WebCore::FontCascade::drawGlyphs):

  • platform/graphics/mac/ColorMac.mm: Use the new helpers and Color::hash().

(WebCore::nsColor):

  • platform/graphics/texmap/TextureMapperGL.cpp: New helpers.

(WebCore::TextureMapperGL::drawBorder):

  • rendering/BorderEdge.cpp: Ditto.

(WebCore::BorderEdge::obscuresBackgroundEdge):
(WebCore::BorderEdge::obscuresBackground):

  • rendering/RenderBox.cpp: Ditto.

(WebCore::RenderBox::getBackgroundPaintedExtent):
(WebCore::RenderBox::backgroundIsKnownToBeOpaqueInRect):
(WebCore::RenderBox::backgroundHasOpaqueTopLayer):

  • rendering/RenderBoxModelObject.cpp: Ditto.

(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::colorNeedsAntiAliasAtCorner):
(WebCore::willBeOverdrawn):
(WebCore::RenderBoxModelObject::paintTranslucentBorderSides):
(WebCore::RenderBoxModelObject::paintBorder):
(WebCore::RenderBoxModelObject::boxShadowShouldBeAppliedToBackground):
(WebCore::RenderBoxModelObject::paintBoxShadow):

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::paintOutline):

  • rendering/RenderInline.cpp:

(WebCore::RenderInline::paintOutline):

  • rendering/RenderLayerBacking.cpp:

(WebCore::canCreateTiledImage):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::viewHasTransparentBackground):

  • rendering/RenderMenuList.cpp:

(RenderMenuList::getItemBackgroundColor):

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::disabledTextColor):

  • rendering/RenderView.cpp:

(WebCore::RenderView::paintBoxDecorations):

  • rendering/TextDecorationPainter.cpp:

(WebCore::TextDecorationPainter::paintTextDecoration):

  • rendering/TextPainter.cpp:

(WebCore::TextPainter::paintTextWithShadows):

  • rendering/style/BorderValue.h:

(WebCore::BorderValue::isTransparent):

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::visitedDependentColor):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::hasBackground):

  • rendering/svg/RenderSVGResource.cpp:

(WebCore::requestPaintingResource):

  • rendering/svg/SVGInlineTextBox.cpp:

(WebCore::SVGInlineTextBox::paintSelectionBackground):

  • svg/SVGAnimatedColor.cpp: Add a FIXME to note this is broken.

(WebCore::SVGAnimatedColorAnimator::calculateAnimatedValue):

Source/WebKit2:

Implement argument coders for Color.

  • Shared/WebCoreArgumentCoders.cpp:

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

  • Shared/WebCoreArgumentCoders.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _updateScrollViewBackground]):

LayoutTests:

Tests that use the new color() syntax.

  • css3/color/backgrounds-and-borders-expected.html: Added.
  • css3/color/backgrounds-and-borders.html: Added.
  • css3/color/box-shadows-expected.html: Added.
  • css3/color/box-shadows.html: Added.
  • css3/color/canvas-expected.html: Added.
  • css3/color/canvas.html: Added.
  • css3/color/composited-solid-backgrounds-expected.html: Added.
  • css3/color/composited-solid-backgrounds.html: Added.
  • css3/color/text-expected.html: Added.
  • css3/color/text.html: Added.
  • editing/mac/attributed-string/anchor-element-expected.txt: Updated.
  • editing/mac/attributed-string/basic-expected.txt:
11:54 AM Changeset in webkit [208459] by Beth Dakin
  • 2 edits in trunk/Source/WebKit2

Build fix.

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::~WebViewImpl):

11:44 AM Changeset in webkit [208458] by matthew_hanson@apple.com
  • 4 edits
    4 adds in branches/safari-602-branch

Merge r208437. rdar://problem/29032334

11:40 AM Changeset in webkit [208457] by achristensen@apple.com
  • 6 edits in trunk/LayoutTests/imported/w3c

Ignore URL.origin in URL web-platform-tests
https://bugs.webkit.org/show_bug.cgi?id=164553

Reviewed by Tim Horton.

Spec-noncompliance in our SecurityOrigin class is covering up URLParser bugs.
Let's ignore those bugs for now in our copy of the web-platform-tests so we can see URLParser conformance improvement in our results.
I've proposed moving these URL.origin checks to different tests in https://github.com/w3c/web-platform-tests/pull/4182

  • web-platform-tests/url/a-element-expected.txt:
  • web-platform-tests/url/a-element-xhtml-expected.txt:
  • web-platform-tests/url/a-element.js:

(runURLTests):

  • web-platform-tests/url/url-constructor-expected.txt:
  • web-platform-tests/url/url-constructor.html:
11:37 AM Changeset in webkit [208456] by graouts@webkit.org
  • 10 edits
    7 adds in trunk

[Modern Media Controls] UI Library: StatusLabel
https://bugs.webkit.org/show_bug.cgi?id=164544
<rdar://problem/29179541>

Reviewed by Dean Jackson.

We add a new StatusLabel class to display a string of text in place of the TimeControl.
A followup patch will add the logic to display "Error", "Loading" and "Live Broadcast"
test under the right media state.

Tests: media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-status-label.html

media/modern-media-controls/status-label/status-label.html

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

(.media-controls.mac.inline .time-label,):
(.media-controls.mac.inline .time-label): Deleted.

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

(MacOSInlineMediaControls.prototype.layout):

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

(MediaControls.):

  • Modules/modern-media-controls/controls/status-label.css: Added.

(.status-label):

  • Modules/modern-media-controls/controls/status-label.js: Added.

(StatusLabel.prototype.get text):
(StatusLabel.prototype.set text):
(StatusLabel.prototype.commitProperty):

  • Modules/modern-media-controls/js-files:
  • WebCore.xcodeproj/project.pbxproj:
11:31 AM Changeset in webkit [208455] by Chris Dumez
  • 75 edits in trunk

[Mac] Stop using deprecated AppKit enumeration values
https://bugs.webkit.org/show_bug.cgi?id=164494

Reviewed by Darin Adler.

Stop using deprecated AppKit enumeration values.

Source/WebCore:

  • editing/cocoa/HTMLConverter.mm:

(HTMLConverter::computedAttributesForElement):
(HTMLConverter::_processElement):
(HTMLConverter::_addMarkersToList):

  • page/mac/EventHandlerMac.mm:

(WebCore::EventHandler::keyEvent):
(WebCore::lastEventIsMouseUp):
(WebCore::EventHandler::passSubframeEventToSubframe):
(WebCore::EventHandler::widgetDidHandleWheelEvent):
(WebCore::EventHandler::sendFakeEventsAfterWidgetTracking):

  • page/mac/TextIndicatorWindow.mm:

(WebCore::TextIndicatorWindow::setTextIndicator):

  • platform/graphics/mac/IconMac.mm:

(WebCore::Icon::paint):

  • platform/mac/CursorMac.mm:

(WebCore::createCustomCursor):

  • platform/mac/DragImageMac.mm:

(WebCore::dissolveDragImageToFraction):
(WebCore::createDragImageFromImage):

  • platform/mac/EventLoopMac.mm:

(WebCore::EventLoop::cycle):

  • platform/mac/PasteboardMac.mm:

(WebCore::Pasteboard::setDragImage):

  • platform/mac/PlatformEventFactoryMac.mm:

(WebCore::globalPointForEvent):
(WebCore::pointForEvent):
(WebCore::mouseButtonForEvent):
(WebCore::mouseEventTypeForEvent):
(WebCore::clickCountForEvent):
(WebCore::isKeypadEvent):
(WebCore::windowsKeyCodeForKeyEvent):
(WebCore::isKeyUpEvent):
(WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder):

  • platform/mac/ScrollbarThemeMac.mm:

(WebCore::scrollbarControlSizeToNSControlSize):

  • platform/mac/ThemeMac.mm:

(-[WebCoreThemeView window]):
(WebCore::controlSizeForFont):
(WebCore::controlSizeFromPixelSize):
(WebCore::setUpButtonCell):
(WebCore::stepperControlSizeForFont):
(WebCore::paintStepper):
(WebCore::ThemeMac::minimumControlSize):

  • platform/mac/WebVideoFullscreenHUDWindowController.mm:

(-[WebVideoFullscreenHUDWindow initWithContentRect:styleMask:backing:defer:]):
(-[WebVideoFullscreenHUDWindow performKeyEquivalent:]):
(-[WebVideoFullscreenHUDWindowController init]):
(-[WebVideoFullscreenHUDWindowController keyDown:]):
(-[WebVideoFullscreenHUDWindowController windowDidLoad]):

  • platform/mac/WebWindowAnimation.mm:

(WebWindowAnimationDurationFromDuration):

  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::updateCachedSystemFontDescription):
(WebCore::RenderThemeMac::controlSizeForFont):
(WebCore::RenderThemeMac::controlSizeForCell):
(WebCore::RenderThemeMac::controlSizeForSystemFont):
(WebCore::RenderThemeMac::paintProgressBar):
(WebCore::RenderThemeMac::popupMenuSize):
(WebCore::RenderThemeMac::sliderThumbHorizontal):
(WebCore::RenderThemeMac::sliderThumbVertical):

Source/WebKit/mac:

  • Carbon/CarbonWindowAdapter.mm:

(-[CarbonWindowAdapter initWithCarbonWindowRef:takingOwnership:disableOrdering:carbon:]):
(-[CarbonWindowAdapter sendSuperEvent:]):

  • Plugins/Hosted/NetscapePluginHostProxy.mm:

(WebKit::NetscapePluginHostProxy::beginModal):

  • Plugins/Hosted/NetscapePluginInstanceProxy.mm:

(WebKit::NetscapePluginInstanceProxy::syntheticKeyDownWithCommandModifier):

  • Plugins/Hosted/WebHostedNetscapePluginView.mm:

(-[WebHostedNetscapePluginView drawRect:]):

  • Plugins/WebNetscapePluginEventHandlerCocoa.mm:

(WebNetscapePluginEventHandlerCocoa::syntheticKeyDownWithCommandModifier):

  • WebCoreSupport/PopupMenuMac.mm:

(PopupMenuMac::populate):
(PopupMenuMac::show):

  • WebCoreSupport/WebContextMenuClient.mm:

(WebContextMenuClient::showContextMenu):

  • WebCoreSupport/WebFrameLoaderClient.mm:

(WebFrameLoaderClient::actionDictionary):

  • WebCoreSupport/WebInspectorClient.mm:

(WebInspectorFrontendClient::canAttach):
(-[WebInspectorWindowController window]):

  • WebInspector/WebNodeHighlight.mm:

(-[WebNodeHighlight initWithTargetView:inspectorController:]):

  • WebView/WebFrameView.mm:

(-[WebFrameView keyDown:keyDown:]):

  • WebView/WebFullScreenController.mm:

(-[WebFullScreenController init]):
(createBackgroundFullscreenWindow):

  • WebView/WebHTMLView.mm:

(-[WebHTMLView _postFakeMouseMovedEventForFlagsChangedEvent:]):
(-[WebHTMLView _setMouseDownEvent:_setMouseDownEvent:]):
(-[WebHTMLView _updateMouseoverWithFakeEvent]):
(isQuickLookEvent):
(-[WebHTMLView hitTest:]):
(-[WebHTMLView _sendToolTipMouseExited]):
(-[WebHTMLView _sendToolTipMouseEntered]):
(mouseEventIsPartOfClickOrDrag):
(-[WebHTMLView _updateMouseoverWithEvent:]):
(-[WebHTMLView _autoscroll]):
(-[WebHTMLView acceptsFirstResponder]):
(-[WebHTMLView viewDidMoveToWindow]):
(-[WebHTMLView mouseDown:mouseDown:]):
(currentKeyboardEvent):
(-[WebHTMLView _handleStyleKeyEquivalent:]):
(-[WebHTMLView _interpretKeyEvent:savingCommands:]):

  • WebView/WebPDFView.mm:

(-[WebPDFView hitTest:]):
(-[WebPDFView PDFViewWillClickOnLink:withURL:]):
(-[WebPDFView _fakeKeyEventWithFunctionKey:]):

  • WebView/WebTextCompletionController.mm:

(-[WebTextCompletionController _buildUI]):
(-[WebTextCompletionController _placePopupWindow:]):

  • WebView/WebView.mm:

(-[WebView applicationFlags:]):

Source/WebKit2:

  • Shared/mac/ChildProcessMac.mm:

(WebKit::ChildProcess::stopNSAppRunLoop):

  • Shared/mac/WebEventFactory.mm:

(WebKit::mouseButtonForEvent):
(WebKit::mouseEventTypeForEvent):
(WebKit::clickCountForEvent):
(WebKit::globalPointForEvent):
(WebKit::pointForEvent):
(WebKit::textFromEvent):
(WebKit::unmodifiedTextFromEvent):
(WebKit::isKeypadEvent):
(WebKit::isKeyUpEvent):
(WebKit::WebEventFactory::createWebKeyboardEvent):

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::becomeFirstResponder):
(WebKit::WebViewImpl::updateContentInsetsIfAutomatic):
(WebKit::WebViewImpl::viewDidMoveToWindow):
(WebKit::WebViewImpl::postFakeMouseMovedEventForFlagsChangedEvent):
(WebKit::WebViewImpl::createFullScreenWindow):
(WebKit::WebViewImpl::sendToolTipMouseExited):
(WebKit::WebViewImpl::sendToolTipMouseEntered):
(WebKit::applicationFlagsForDrag):
(WebKit::WebViewImpl::setLastMouseDownEvent):
(WebKit::WebViewImpl::doneWithKeyEvent):
(WebKit::WebViewImpl::collectKeyboardLayoutCommandsForEvent):
(WebKit::WebViewImpl::performKeyEquivalent):

  • UIProcess/Plugins/mac/PluginProcessProxyMac.mm:

(WebKit::PluginProcessProxy::beginModal):

  • UIProcess/mac/WebContextMenuProxyMac.mm:

(WebKit::WebContextMenuProxyMac::showContextMenuWithItems):

  • UIProcess/mac/WebInspectorProxyMac.mm:
  • UIProcess/mac/WebPopupMenuProxyMac.mm:

(WebKit::WebPopupMenuProxyMac::populate):
(WebKit::WebPopupMenuProxyMac::showPopupMenu):

  • WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:

(WebKit::modifierFlagsFromWebEvent):
(WebKit::getEventTypeFromWebEvent):

  • WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:

(WebKit::cssAlignmentValueForNSTextAlignment):

  • WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:

(WebKit::convertImageToBitmap):

Source/WTF:

  • wtf/mac/AppKitCompatibilityDeclarations.h:

Tools:

  • DumpRenderTree/mac/EventSendingController.mm:

(eventTypeForMouseButtonAndAction):
(modifierFlags):
(-[EventSendingController mouseMoveToX:Y:]):
(-[EventSendingController contextClick]):
(-[EventSendingController keyDown:withModifiers:withLocation:]):

  • DumpRenderTree/mac/TextInputController.m:

(-[TextInputController interpretKeyEvents:withSender:]):

  • TestWebKitAPI/Tests/WebKit2Cocoa/CommandBackForward.mm:

(simulateCommandArrow):

  • TestWebKitAPI/Tests/WebKit2Cocoa/FullscreenDelegate.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit2Cocoa/FullscreenLayoutConstraints.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit2Cocoa/FullscreenTopContentInset.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit2Cocoa/ShouldOpenExternalURLsInNewWindowActions.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKit2Cocoa/UserInitiatedActionInNavigationAction.mm:

(UserInitiatedActionTest::SetUp):
(UserInitiatedActionTest::click):

  • TestWebKitAPI/Tests/mac/AcceptsFirstMouse.mm:

(TestWebKitAPI::AcceptsFirstMouse::runTest):

  • TestWebKitAPI/Tests/mac/ContextMenuCanCopyURL.mm:

(TestWebKitAPI::contextMenuCopyLink):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/mac/ContextMenuDefaultItemsHaveTags.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/mac/FullscreenZoomInitialFrame.mm:

(TestWebKitAPI::FullscreenZoomInitialFrame::runTest):

  • TestWebKitAPI/Tests/mac/MenuTypesForMouseEvents.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/mac/PlatformUtilitiesMac.mm:

(TestWebKitAPI::Util::isKeyDown):

  • TestWebKitAPI/mac/PlatformWebViewMac.mm:

(TestWebKitAPI::PlatformWebView::initialize):
(TestWebKitAPI::PlatformWebView::simulateSpacebarKeyPress):
(TestWebKitAPI::PlatformWebView::simulateRightClick):
(TestWebKitAPI::PlatformWebView::simulateMouseMove):
(TestWebKitAPI::eventTypeForButton):
(TestWebKitAPI::modifierFlagsForWKModifiers):

  • TestWebKitAPI/mac/TestWKWebViewMac.mm:

(simulated_forceClickAssociatedEventsMask):
(-[TestWKWebViewHostWindow _mouseDownAtPoint:simulatePressure:]):
(-[TestWKWebView _setUpTestWindow:]):
(-[TestWKWebView typeCharacter:]):

  • WebKitTestRunner/mac/EventSenderProxy.mm:

(WTR::eventTypeForMouseButtonAndAction):
(WTR::buildModifierFlags):
(WTR::EventSenderProxy::sendMouseDownToStartPressureEvents):
(WTR::EventSenderProxy::mouseForceClick):
(WTR::EventSenderProxy::startAndCancelMouseForceClick):
(WTR::EventSenderProxy::mouseMoveTo):
(WTR::EventSenderProxy::keyDown):
(WTR::EventSenderProxy::swipeGestureWithWheelAndMomentumPhases):

  • WebKitTestRunner/mac/PlatformWebViewMac.mm:

(WTR::PlatformWebView::PlatformWebView):

  • WebKitTestRunner/mac/TestControllerMac.mm:

(WTR::TestController::platformResetStateToConsistentValues):

11:31 AM Changeset in webkit [208454] by graouts@webkit.org
  • 5 edits
    16 adds in trunk

[Modern Media Controls] UI Library: iOS inline controls
https://bugs.webkit.org/show_bug.cgi?id=164513
<rdar://problem/27989475>

Reviewed by Dean Jackson.

We introduce a new IOSInlineMediaControls class which can be used to instantiate media controls
for inline playback on iOS.

Tests: media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-buttons-styles.html

media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-constructor.html
media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-controls-bar-styles.html
media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-layout.html
media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-time-control-styles.html
media/modern-media-controls/ios-inline-media-controls/ios-inline-media-dropping-controls.html

  • Modules/modern-media-controls/controls/ios-inline-media-controls.css: Added.

(.media-controls.ios.inline > .controls-bar):
(.media-controls.ios.inline .time-control):
(.media-controls.ios.inline button):
(.media-controls.ios.inline button:active):
(.media-controls.ios.inline > .controls-bar button):
(.media-controls.ios.inline .buttons-container.right):
(.media-controls.ios.inline button.play-pause):
(.media-controls.ios.inline button.skip-back):
(.media-controls.ios.inline .scrubber.slider):
(.media-controls.ios.inline button.airplay):
(.media-controls.ios.inline button.pip):
(.media-controls.ios.inline button.fullscreen):
(.media-controls.ios.inline .time-label):
(.media-controls.ios.inline .scrubber.slider > .fill):
(.media-controls.ios.inline .scrubber.slider > input::-webkit-slider-thumb):

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

(IOSInlineMediaControls.prototype.layout):
(IOSInlineMediaControls):

  • Modules/modern-media-controls/images/iOS/slider-thumb@2x.png: Added.
  • Modules/modern-media-controls/js-files:
  • WebCore.xcodeproj/project.pbxproj:
11:20 AM Changeset in webkit [208453] by Simon Fraser
  • 2 edits in trunk/LayoutTests

LayoutTest fast/visual-viewport/rtl-zoomed-rects.html failing
https://bugs.webkit.org/show_bug.cgi?id=164491

Mark fast/visual-viewport/rtl-zoomed-rects.html as failing on Yosemite and El Capitan
in WK1.

  • platform/mac-wk1/TestExpectations:
11:16 AM Changeset in webkit [208452] by Beth Dakin
  • 20 edits
    1 add in trunk

Support TouchBar in WebKit
https://bugs.webkit.org/show_bug.cgi?id=164437
-and corresponding-
rdar://problem/28876524

Reviewed by Darin Adler.

Source/WebCore:

  • WebCore.xcodeproj/project.pbxproj:
  • platform/spi/cocoa/AVKitSPI.h:
  • platform/spi/cocoa/NSTouchBarSPI.h: Added.
  • platform/spi/mac/NSSpellCheckerSPI.h:

Source/WebKit/mac:

  • WebCoreSupport/WebEditorClient.mm:

(WebEditorClient::respondToChangedSelection):
(WebEditorClient::updateEditorStateAfterLayoutIfEditabilityChanged):

  • WebView/WebHTMLView.mm:

(-[WebHTMLView candidateListTouchBarItem]):

  • WebView/WebView.mm:

(-[_WebTextListTouchBarViewController initWithWebView:]):
(-[_WebTextListTouchBarViewController _selectList:]):
(-[_WebTextListTouchBarViewController setCurrentListType:]):
(-[WebTextTouchBarItemController initWithWebView:]):
(-[WebTextTouchBarItemController itemForIdentifier:]):
(-[WebTextTouchBarItemController webTextListTouchBarViewController]):
(-[WebTextTouchBarItemController setTextIsBold:]):
(-[WebTextTouchBarItemController setTextIsItalic:]):
(-[WebTextTouchBarItemController setTextIsUnderlined:]):
(-[WebTextTouchBarItemController _webChangeTextStyle:]):
(-[WebTextTouchBarItemController setCurrentTextAlignment:]):
(-[WebTextTouchBarItemController _webChangeTextAlignment:]):
(-[WebTextTouchBarItemController textColor]):
(-[WebTextTouchBarItemController setTextColor:]):
(-[WebTextTouchBarItemController _webChangeColor:]):
(-[WebTextTouchBarItemController textListViewController]):
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView showCandidates:forString:inRect:forSelectedRange:view:completionHandler:]):
(-[WebView shouldRequestCandidates]):
(-[WebView forceRequestCandidatesForTesting]):
(-[WebView makeTouchBar]):
(-[WebView touchBar:makeItemForIdentifier:]):
(textCheckingResultFromNSTextCheckingResult):
(-[WebView candidateListTouchBarItem:endSelectingCandidateAtIndex:]):
(-[WebView candidateListTouchBarItem:changedCandidateListVisibility:]):
(-[WebView _setUpPlaybackControlsManagerForMediaElement:]):
(-[WebView _clearPlaybackControlsManager]):
(-[WebView _dismissTextTouchBarPopoverItemWithIdentifier:]):
(-[WebView _textTouchBarCustomizationAllowedIdentifiers]):
(-[WebView _plainTextTouchBarCustomizationDefaultItemIdentifiers]):
(-[WebView _richTextTouchBarCustomizationDefaultItemIdentifiers]):
(-[WebView touchBarDidExitCustomization:]):
(-[WebView touchBarWillEnterCustomization:]):
(-[WebView didChangeAutomaticTextCompletion:]):
(-[WebView setUpTextTouchBar:]):
(-[WebView _isRichlyEditable]):
(-[WebView textTouchBar]):
(-[WebView updateTextTouchBar]):
(-[WebView updateMediaTouchBar]):
(-[WebView updateTouchBar]):
(-[WebView prepareForMouseDown]):
(-[WebView prepareForMouseUp]):
(-[WebView webViewAdditionsWillDestroyView]):
(-[WebView candidateList]):
(-[WebView updateWebViewAdditions]): Deleted.

  • WebView/WebViewData.h:
  • WebView/WebViewInternal.h:
  • WebView/WebViewPrivate.h:

Source/WebKit2:

  • UIProcess/API/Cocoa/WKViewPrivate.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView makeTouchBar]):
(-[WKWebView candidateListTouchBarItem]):
(-[WKWebView _web_didAddMediaControlsManager:]):
(-[WKWebView _web_didRemoveMediaControlsManager]):
(-[WKWebView _interactWithMediaControlsForTesting]):
(-[WKWebView _wantsMediaPlaybackControlsView]):
(-[WKWebView _setWantsMediaPlaybackControlsView:]):
(-[WKWebView _mediaPlaybackControlsView]):
(-[WKWebView _addMediaPlaybackControlsView:]):
(-[WKWebView _removeMediaPlaybackControlsView]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/mac/WKView.mm:

(-[WKView makeTouchBar]):
(-[WKView candidateListTouchBarItem]):
(-[WKView _web_didAddMediaControlsManager:]):
(-[WKView _web_didRemoveMediaControlsManager]):
(-[WKView _wantsMediaPlaybackControlsView]):
(-[WKView _setWantsMediaPlaybackControlsView:]):
(-[WKView _mediaPlaybackControlsView]):
(-[WKView _addMediaPlaybackControlsView:]):
(-[WKView _removeMediaPlaybackControlsView]):

  • UIProcess/Cocoa/WebViewImpl.h:

(WebKit::WebViewImpl::currentTouchBar):
(WebKit::WebViewImpl::clientWantsMediaPlaybackControlsView):
(WebKit::WebViewImpl::setClientWantsMediaPlaybackControlsView):
(WebKit::WebViewImpl::setIsCustomizingTouchBar):

  • UIProcess/Cocoa/WebViewImpl.mm:

(-[WKTextListTouchBarViewController initWithWebViewImpl:]):
(-[WKTextListTouchBarViewController didDestroyView]):
(-[WKTextListTouchBarViewController _selectList:]):
(-[WKTextListTouchBarViewController setCurrentListType:]):
(-[WKTextTouchBarItemController initWithWebViewImpl:]):
(-[WKTextTouchBarItemController didDestroyView]):
(-[WKTextTouchBarItemController touchBar:makeItemForIdentifier:]):
(-[WKTextTouchBarItemController itemForIdentifier:]):
(-[WKTextTouchBarItemController candidateListTouchBarItem:endSelectingCandidateAtIndex:]):
(-[WKTextTouchBarItemController candidateListTouchBarItem:changedCandidateListVisibility:]):
(-[WKTextTouchBarItemController textListTouchBarViewController]):
(-[WKTextTouchBarItemController setTextIsBold:]):
(-[WKTextTouchBarItemController setTextIsItalic:]):
(-[WKTextTouchBarItemController setTextIsUnderlined:]):
(-[WKTextTouchBarItemController _wkChangeTextStyle:]):
(-[WKTextTouchBarItemController setCurrentTextAlignment:]):
(-[WKTextTouchBarItemController _wkChangeTextAlignment:]):
(-[WKTextTouchBarItemController textColor]):
(-[WKTextTouchBarItemController setTextColor:]):
(-[WKTextTouchBarItemController _wkChangeColor:]):
(-[WKTextTouchBarItemController textListViewController]):
(WebKit::WebViewImpl::makeTouchBar):
(WebKit::WebViewImpl::candidateListTouchBarItem):
(WebKit::WebViewImpl::mediaPlaybackControlsView):
(WebKit::WebViewImpl::useMediaPlaybackControlsView):
(WebKit::WebViewImpl::dismissTextTouchBarPopoverItemWithIdentifier):
(WebKit::textTouchBarCustomizationAllowedIdentifiers):
(WebKit::plainTextTouchBarCustomizationDefaultItemIdentifiers):
(WebKit::richTextTouchBarCustomizationDefaultItemIdentifiers):
(WebKit::touchBarDidExitCustomization):
(WebKit::touchBarWillEnterCustomization):
(WebKit::didChangeAutomaticTextCompletion):
(WebKit::WebViewImpl::updateTouchBarAndRefreshTextBarIdentifiers):
(WebKit::WebViewImpl::setUpTextTouchBar):
(WebKit::WebViewImpl::isRichlyEditable):
(WebKit::WebViewImpl::textTouchBar):
(WebKit::WebViewImpl::updateTextTouchBar):
(WebKit::WebViewImpl::updateMediaTouchBar):
(WebKit::WebViewImpl::forceRequestCandidatesForTesting):
(WebKit::WebViewImpl::updateTouchBar):
(WebKit::WebViewImpl::shouldRequestCandidates):
(WebKit::WebViewImpl::showCandidates):
(WebKit::WebViewImpl::webViewImplAdditionsWillDestroyView):
(WebKit::WebViewImpl::setEditableElementIsFocused):
(WebKit::WebViewImpl::becomeFirstResponder):
(WebKit::WebViewImpl::selectionDidChange):
(WebKit::WebViewImpl::videoControlsManagerDidChange):
(WebKit::WebViewImpl::updateWebViewImplAdditions): Deleted.

Tools:

This makes MiniBrowser support TouchBar customization.

  • MiniBrowser/mac/AppDelegate.m:

(-[BrowserAppDelegate awakeFromNib]):

11:14 AM Changeset in webkit [208451] by Chris Dumez
  • 7 edits
    4 adds in trunk

Use Blob URL instead of webkit-fake-url when pasting an image
https://bugs.webkit.org/show_bug.cgi?id=49141

Reviewed by Darin Adler.

Source/WebCore:

Use Blob URL instead of webkit-fake-url when pasting an image.

Tests: editing/pasteboard/paste-image-as-blob-url.html

editing/pasteboard/paste-image-using-image-data.html

  • editing/Editor.h:
  • editing/mac/EditorMac.mm:

(WebCore::Editor::WebContentReader::readImage):
(WebCore::Editor::createFragmentForImageAndURL):

LayoutTests:

Add layout test coverage checking that the image shows as expected and that the
resulting URL is indeed a Blob URL.

  • editing/pasteboard/paste-image-as-blob-url-expected.txt: Added.
  • editing/pasteboard/paste-image-as-blob-url.html: Added.
  • editing/pasteboard/paste-image-using-image-data-expected.html: Added.
  • editing/pasteboard/paste-image-using-image-data.html: Added.
11:10 AM Changeset in webkit [208450] by Yusuke Suzuki
  • 11 edits
    3 adds in trunk

[JSC] The implementation of 8 bit operation in MacroAssembler should care about uint8_t / int8_t
https://bugs.webkit.org/show_bug.cgi?id=164432

Reviewed by Michael Saboff.

Source/JavaScriptCore:

Except for X86, our supported MacroAssemblers do not have native 8bit instructions.
It means that all the 8bit instructions are converted to 32bit operations by using
scratch registers. For example, ARM64 branch8 implementation is the following.

Jump branch8(RelationCondition cord, Address left, TrustedImm32 right)
{

TrustedImm32 right8(static_cast<int8_t>(right.m_value));
load8(left, getCachedMemoryTempRegisterIDAndInvalidate());
return branch32(cone, memoryTempRegister, right8);

}

The problem is that we exclusively use zero-extended load instruction (load8). Even
for signed RelationConditions, we do not perform sign extension. It makes signed
operations with negative numbers incorrect! Consider the |left| address holds -1
in int8_t form. However load8 will load it as 255 into 32bit register. On the other hand,
|right| will be sign extended. If you pass 0 as |right| and LessThan condition, this
branch8 should jump based on the answer of -1 < 0. But the current MacroAssembler
performs 255 < 0 in int32_t context and returns the incorrect result.

We should follow the x86 model. So we should select the appropriate load operation and masking
operation based on the RelationCondition. This patch introduces mask8OnCondition and load8OnCondition.
And we use them in 8bit operations including branch8, branchTest8, compare8, and test8.

We intentionally do not change anything on x86 assembler since it has the native signed 8bit operations.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • assembler/AbstractMacroAssembler.h:
  • assembler/MacroAssembler.h:

(JSC::MacroAssembler::isSigned):
(JSC::MacroAssembler::isUnsigned):
(JSC::MacroAssembler::branchTest8):

  • assembler/MacroAssemblerARM.h:

(JSC::MacroAssemblerARM::branch8):
(JSC::MacroAssemblerARM::branchTest8):
(JSC::MacroAssemblerARM::compare8):
(JSC::MacroAssemblerARM::test8):

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::load8SignedExtendTo32):
(JSC::MacroAssemblerARM64::branch8):
(JSC::MacroAssemblerARM64::branchTest8):
(JSC::MacroAssemblerARM64::compare8):
(JSC::MacroAssemblerARM64::test8):

  • assembler/MacroAssemblerARMv7.h:

(JSC::MacroAssemblerARMv7::branch8):
(JSC::MacroAssemblerARMv7::branchTest8):
(JSC::MacroAssemblerARMv7::compare8):
(JSC::MacroAssemblerARMv7::test8):

  • assembler/MacroAssemblerHelpers.h: Added.

(JSC::MacroAssemblerHelpers::isSigned):
(JSC::MacroAssemblerHelpers::isUnsigned):
(JSC::MacroAssemblerHelpers::mask8OnCondition):
(JSC::MacroAssemblerHelpers::load8OnCondition):

  • assembler/MacroAssemblerMIPS.h:

(JSC::MacroAssemblerMIPS::branch8):
(JSC::MacroAssemblerMIPS::compare8):
(JSC::MacroAssemblerMIPS::branchTest8):
(JSC::MacroAssemblerMIPS::test8):

  • assembler/MacroAssemblerSH4.h:

(JSC::MacroAssemblerSH4::branchTest8):
(JSC::MacroAssemblerSH4::branch8):
(JSC::MacroAssemblerSH4::compare8):
(JSC::MacroAssemblerSH4::test8):

  • assembler/MacroAssemblerX86_64.h:

(JSC::MacroAssemblerX86_64::branch8):

LayoutTests:

Use ownerDocument. Once DOMJIT for ownerDocument is landed, this will use branch8.

  • js/dom/domjit-accessor-owner-document-type-check-expected.txt: Added.
  • js/dom/domjit-accessor-owner-document-type-check.html: Added.
11:10 AM Changeset in webkit [208449] by Michael Catanzaro
  • 2 edits in trunk/Source/WebCore

Fix error message when SQLite initialization fails
https://bugs.webkit.org/show_bug.cgi?id=164462

Reviewed by Darin Adler.

  • platform/sql/SQLiteDatabase.cpp:

(WebCore::initializeSQLiteIfNecessary):

11:01 AM Changeset in webkit [208448] by graouts@webkit.org
  • 21 edits
    17 adds in trunk

[Modern Media Controls] UI Library: macOS fullscreen controls
https://bugs.webkit.org/show_bug.cgi?id=164414
<rdar://problem/27989474>

Reviewed by Dean Jackson.

We introduce a new MacOSFullscreenMediaControls class which can be used to instantiate media controls
for fullscreen playback on macOS. These controls can be dragged by the user.

Tests: media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles.html

media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles.html
media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor.html
media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-controls-bar-styles.html
media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-right-container-margin.html
media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-time-control-styles.html
media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-volume-styles.html

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

(Button.prototype.set enabled):

Correctly notify the layoutDelegate when the enabled property changes, regardless of whether
the flag is on.

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

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

Correctly notify the layout delegate when the image metrics have changed so that it may perform
a layout. This issues became apparent with the new tests on Yosemite and caused some flakyness.

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

(const.iconService.new.IconService.prototype._fileNameAndPlatformForIconNameAndLayoutTraits):
(const.iconService.new.IconService):

Fix a typo.

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

(.media-controls.mac.fullscreen > .controls-bar):
(.media-controls.mac.fullscreen .volume.slider):
(.media-controls.mac.fullscreen .buttons-container):
(.media-controls.mac.fullscreen .buttons-container.center):
(.media-controls.mac.fullscreen > .controls-bar button):
(.media-controls.mac.fullscreen button.rewind):
(.media-controls.mac.fullscreen button.play-pause):
(.media-controls.mac.fullscreen button.forward):
(.media-controls.mac.fullscreen .buttons-container.right):
(.media-controls.mac.fullscreen button.airplay):
(.media-controls.mac.fullscreen button.aspect-ratio):
(.media-controls.mac.fullscreen button.pip):
(.media-controls.mac.fullscreen button.tracks):
(.media-controls.mac.fullscreen button.fullscreen):
(.media-controls.mac.fullscreen .time-control):
(.media-controls.mac.fullscreen .time-label):
(.media-controls.mac.fullscreen .scrubber):

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

(MacOSFullscreenMediaControls.prototype.layout):
(MacOSFullscreenMediaControls):

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

(MacOSMediaControls):

Allow the layoutTraits property to be set to something other than just LayoutTraits.macOS
so that MacOSFullscreenMediaControls may set the LayoutTraits.Fullscreen bit.

  • Modules/modern-media-controls/js-files:

Add a reference to the new macos-fullscreen-media-controls.js file.

  • WebCore.xcodeproj/project.pbxproj:

Add references to the new macos-fullscreen-media-controls.js and
macos-fullscreen-media-controls.css files.

10:35 AM Changeset in webkit [208447] by Chris Dumez
  • 1 edit
    2 adds in trunk/LayoutTests

Add test coverage for radiusX / radiusY in WebPlatformTouchPoint.
https://bugs.webkit.org/show_bug.cgi?id=162801
<rdar://problem/28807455>

Reviewed by Darin Adler.

Add test coverage for radiusX / radiusY in WebPlatformTouchPoint.

  • fast/events/touch/ios/touch-event-radius-expected.txt: Added.
  • fast/events/touch/ios/touch-event-radius.html: Added.
10:32 AM Changeset in webkit [208446] by Chris Dumez
  • 4 edits in trunk/Source/WebCore

Shave 16 bytes off HTMLInputElement
https://bugs.webkit.org/show_bug.cgi?id=164488

Reviewed by Sam Weinig.

Shave 16 bytes off HTMLInputElement (232 -> 216) by packing data members
better.

  • html/HTMLFormControlElement.h:
  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::HTMLTextFormControlElement):

  • html/HTMLTextFormControlElement.h:
10:28 AM Changeset in webkit [208445] by commit-queue@webkit.org
  • 7 edits in trunk

[WebRTC] Introduce asynchronous backend for other RTCPeerConnection API
https://bugs.webkit.org/show_bug.cgi?id=164409

Patch by Youenn Fablet <youenn@apple.com> on 2016-11-09
Reviewed by Eric Carlson.

Source/WebCore:

Covered by existing tests.

Following on createOffer changes, applying the same changes to createAnswer, setLocalDescription, setRemoteDescription and addIceCandidate.
Also refactored ICE candidate event generation (done at PeerConnectionBackend).
Updated stop implementation to clean any promise that may be stored in PeerConnectionBackend.

The goal of this is to be more aligned with https://www.w3.org/TR/webrtc/.
Implementation of the various functions such as www.w3.org/TR/webrtc/#set-description would be done in PeerConnectionBackend.
This will require additional code moved from MediaEndpointPeerConnection up to PeerConnectionBackend.

  • Modules/mediastream/MediaEndpointPeerConnection.cpp:

(WebCore::MediaEndpointPeerConnection::createOfferTask):
(WebCore::MediaEndpointPeerConnection::doCreateAnswer):
(WebCore::MediaEndpointPeerConnection::createAnswerTask):
(WebCore::MediaEndpointPeerConnection::doSetLocalDescription):
(WebCore::MediaEndpointPeerConnection::setLocalDescriptionTask):
(WebCore::MediaEndpointPeerConnection::doSetRemoteDescription):
(WebCore::MediaEndpointPeerConnection::setRemoteDescriptionTask):
(WebCore::MediaEndpointPeerConnection::doAddIceCandidate):
(WebCore::MediaEndpointPeerConnection::addIceCandidateTask):
(WebCore::MediaEndpointPeerConnection::doStop):
(WebCore::MediaEndpointPeerConnection::gotIceCandidate):
(WebCore::MediaEndpointPeerConnection::doneGatheringCandidates):
(WebCore::MediaEndpointPeerConnection::createAnswer): Deleted.
(WebCore::MediaEndpointPeerConnection::setLocalDescription): Deleted.
(WebCore::MediaEndpointPeerConnection::setRemoteDescription): Deleted.
(WebCore::MediaEndpointPeerConnection::addIceCandidate): Deleted.
(WebCore::MediaEndpointPeerConnection::stop): Deleted.
(WebCore::MediaEndpointPeerConnection::localDescriptionTypeValidForState): Deleted.
(WebCore::MediaEndpointPeerConnection::remoteDescriptionTypeValidForState): Deleted.

  • Modules/mediastream/MediaEndpointPeerConnection.h:
  • Modules/mediastream/PeerConnectionBackend.cpp:

(WebCore::PeerConnectionBackend::createOffer):
(WebCore::PeerConnectionBackend::createOfferFailed):
(WebCore::PeerConnectionBackend::createAnswer):
(WebCore::PeerConnectionBackend::createAnswerSucceeded):
(WebCore::PeerConnectionBackend::createAnswerFailed):
(WebCore::isLocalDescriptionTypeValidForState):
(WebCore::PeerConnectionBackend::setLocalDescription):
(WebCore::PeerConnectionBackend::setLocalDescriptionSucceeded):
(WebCore::PeerConnectionBackend::setLocalDescriptionFailed):
(WebCore::isRemoteDescriptionTypeValidForState):
(WebCore::PeerConnectionBackend::setRemoteDescription):
(WebCore::PeerConnectionBackend::setRemoteDescriptionSucceeded):
(WebCore::PeerConnectionBackend::setRemoteDescriptionFailed):
(WebCore::PeerConnectionBackend::addIceCandidate):
(WebCore::PeerConnectionBackend::addIceCandidateSucceeded):
(WebCore::PeerConnectionBackend::addIceCandidateFailed):
(WebCore::PeerConnectionBackend::fireICECandidateEvent):
(WebCore::PeerConnectionBackend::doneGatheringCandidates):
(WebCore::PeerConnectionBackend::stop):

  • Modules/mediastream/PeerConnectionBackend.h:

LayoutTests:

Rebasing test as patch changes the order in which error cases are checked in case of setRemoteDescription/setLocalDescription.
New order tries to follow more closely https://www.w3.org/TR/webrtc/#set-description.

  • fast/mediastream/RTCPeerConnection-stable-expected.txt:
10:27 AM Changeset in webkit [208444] by eric.carlson@apple.com
  • 6 edits in trunk/Source/WebCore

[MediaStream][Mac] Mark captured video frames as ready for display immediately
https://bugs.webkit.org/show_bug.cgi?id=164482
<rdar://problem/29139073>

Reviewed by Jer Noble.

  • platform/cf/CoreMediaSoftLink.cpp: Add new constant.
  • platform/cf/CoreMediaSoftLink.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::requestNotificationWhenReadyForMediaData):

New, ask register for a callback when the sample buffer display layer is ready
for more media data.

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSampleBuffer): Don't change

the sample timestamps, assume the caller has configured the sample correctly.

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::prepareVideoSampleBufferFromTrack): Don't

drop frames when the display layer isn't ready.

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::destroyLayer): Call stopRequestingMediaData.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::sampleBufferUpdated):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSampleBufferFromTrack): Deleted.

  • platform/mediastream/mac/AVVideoCaptureSource.mm:

(WebCore::AVVideoCaptureSource::setupCaptureSession): Tell the video output to always discard

late video frames, we don't need them.

(WebCore::AVVideoCaptureSource::processNewFrame): Add a kCMSampleAttachmentKey_DisplayImmediately

attachment.

10:26 AM Changeset in webkit [208443] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Settings tab: Checkbox labels should be clickable
https://bugs.webkit.org/show_bug.cgi?id=164470
<rdar://problem/29133787>

Reviewed by Matt Baker.

  • UserInterface/Views/SettingsTabContentView.js:

(WebInspector.SettingsTabContentView.prototype.initialLayout):
Add a label element to make checkboxes clickable.

10:25 AM Changeset in webkit [208442] by jdiggs@igalia.com
  • 5 edits
    4 adds
    1 delete in trunk

AX: [ATK] Wrong selected element at a given index in a list box (redux)
https://bugs.webkit.org/show_bug.cgi?id=164430

Reviewed by Darin Adler.

Source/WebCore:

This essentially undoes the implementation change resulting from r164577.
As stated in the ATK documentation, atk_selection_ref_selection() takes
"a gint specifying the index in the selection set. (e.g. the ith selection
as opposed to the ith child)." r164577 deliberately modified that, causing
atk_selection_ref_selection() to treat the index as if it were the position
with respect to all of the children. There is different API in ATK, namely
atk_object_ref_accessible_child(), when the ith child from the set of all
children is sought.

Tests: accessibility/aria-listbox-no-selection.html

accessibility/native-listbox-no-selection.html

  • accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:

(optionFromSelection):

LayoutTests:

Add tests to ensure listboxes with no selected children do not report
a selected child. Modify select-element-at-index.html to reflect the
corrected behavior for ATK. Move the Mac port's expectations to the
shared expectations.

  • accessibility/aria-listbox-no-selection-expected.txt: Added.
  • accessibility/aria-listbox-no-selection.html: Added.
  • accessibility/native-listbox-no-selection-expected.txt: Added.
  • accessibility/native-listbox-no-selection.html: Added.
  • accessibility/select-element-at-index-expected.txt: Modified.
  • accessibility/select-element-at-index.html: Modified.
  • platform/mac/accessibility/select-element-at-index-expected.txt: Removed.
10:25 AM Changeset in webkit [208441] by commit-queue@webkit.org
  • 7 edits
    4 adds in trunk/Source/WebInspectorUI

Web Inspector: Allow FolderTreeElement to display content when selected
https://bugs.webkit.org/show_bug.cgi?id=164407

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

  • UserInterface/Main.html:

Add CollectionContentView and TitleView.

  • UserInterface/Base/Main.js:
  • UserInterface/Views/ContentView.js:

(WebInspector.ContentView.createFromRepresentedObject):
(WebInspector.ContentView.isViewable):
Add support for Collection as the representedObject of a content view.

  • UserInterface/Views/CollectionContentView.css: Added.

(.content-view.collection):
(.content-view.collection > .content-view):

  • UserInterface/Views/CollectionContentView.js: Added.

(WebInspector.CollectionContentView):
(WebInspector.CollectionContentView.prototype.initialLayout):
(WebInspector.CollectionContentView.prototype._addContentViewForItem):
(WebInspector.CollectionContentView.prototype._removeContentViewForItem):
(WebInspector.CollectionContentView.prototype._handleItemAdded):
(WebInspector.CollectionContentView.prototype._handleItemRemoved):
(WebInspector.CollectionContentView.prototype._handleContentError):
Takes in a Collection when constructed, and attempts to display a sub-ContentView for each
item in the collection if the type of the collection is viewable en masse. Currently, this
is only supported for WebInspector.Resource.Type.Image collections.

  • UserInterface/Views/ResourceContentView.js:

(WebInspector.ResourceContentView.prototype._contentError):
Dispatch an event whenever the content fails to load.

  • UserInterface/Views/ResourceSidebarPanel.js:

(WebInspector.ResourceSidebarPanel.prototype._treeSelectionDidChange):

  • UserInterface/Views/ResourcesTabContentView.js:

(WebInspector.ResourcesTabContentView.prototype.canShowRepresentedObject):
Allow FolderTreeElements to be selected.

  • UserInterface/Views/TitleView.css: Added.

(.title-view):

  • UserInterface/Views/TitleView.js: Added.

(WebInspector.TitleView):
Basic view that displays the given text in the center of the viewable area.

10:24 AM Changeset in webkit [208440] by Gyuyoung Kim
  • 6 edits in trunk

[EFL] Use libgcrypt instead of GnuTLS for CryptoDigest
https://bugs.webkit.org/show_bug.cgi?id=164461

Reviewed by Michael Catanzaro.

.:

  • Source/cmake/OptionsEfl.cmake: Find LibGcrypt package instead of GnuTLS.

Source/WebCore:

As GTK port in r208297, EFL port starts to use libgcrypt instead of GnuTLS as well.

No new tests, no behavior change.

  • PlatformEfl.cmake:

Tools:

As GTK port in r208297, EFL port starts to use libgcrypt instead of GnuTLS as well.

  • efl/install-dependencies: Add libgcript package dependecy.
10:23 AM Changeset in webkit [208439] by Gyuyoung Kim
  • 2 edits in trunk/Tools

[EFL] Remove unused function in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=164398

Reviewed by Darin Adler.

  • MiniBrowser/efl/main.c:

(window_find_with_elm_window): Deleted because it is not used anywhere.

10:07 AM Changeset in webkit [208438] by Chris Dumez
  • 27 edits
    4 adds in trunk

[WK2][NETWORK_SESSION] Add support for downloading file backed blobs
https://bugs.webkit.org/show_bug.cgi?id=164458
<rdar://problem/28905514>

Reviewed by Darin Adler.

Source/WebKit2:

Add support for downloading file backed blobs on WebKit2.
It previously wasn't working because we weren't calling
BlobDataFileReference::prepareForFileAccess() for each blob file before
starting the download, similarly to what is done in NetworkResourceLoader's
consumeSandboxExtensions().

  • NetworkProcess/Downloads/DownloadManager.cpp:

(WebKit::DownloadManager::startDownload):

  • NetworkProcess/Downloads/DownloadManager.h:

(WebKit::DownloadManager::startDownload):

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::startDownload):
(WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):

  • NetworkProcess/NetworkDataTask.cpp:

(WebKit::NetworkDataTask::create):

  • NetworkProcess/NetworkDataTask.h:
  • NetworkProcess/NetworkDataTaskBlob.cpp:

(WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob):
(WebKit::NetworkDataTaskBlob::~NetworkDataTaskBlob):
(WebKit::NetworkDataTaskBlob::download):

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

(WebKit::NetworkLoad::NetworkLoad):

  • NetworkProcess/NetworkLoadParameters.h:
  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::downloadRequest):

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::NetworkResourceLoader):
(WebKit::NetworkResourceLoader::startNetworkLoad):

  • NetworkProcess/PingLoad.h:

Tools:

Add testRunner.setShouldDownloadUndisplayableMIMETypes(bool) API so that layout
tests can request that such resources are downloaded instead of being ignored.

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setShouldDownloadUndisplayableMIMETypes):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::decidePolicyForNavigationResponse):

  • WebKitTestRunner/TestController.h:

(WTR::TestController::setShouldDownloadUndisplayableMIMETypes):

  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):

LayoutTests:

Add layout test coverage for downloading blobs, both via <a download> or
because a load is later converted into a download.

  • fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download-expected.txt: Added.
  • fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download.html: Added.
  • fast/dom/HTMLAnchorElement/anchor-file-blob-download-expected.txt: Added.
  • fast/dom/HTMLAnchorElement/anchor-file-blob-download.html: Added.
  • platform/ios-simulator-wk1/TestExpectations:
  • platform/ios-simulator-wk2/TestExpectations:
  • platform/mac-wk1/TestExpectations:
  • platform/win/TestExpectations:
10:06 AM Changeset in webkit [208437] by Chris Dumez
  • 4 edits
    4 adds in trunk

[WK2] Network cache speculative revalidation can cause loads to hang
https://bugs.webkit.org/show_bug.cgi?id=164532
<rdar://problem/28519331>

Reviewed by Alex Christensen.

Source/WebKit2:

Network cache speculative revalidation could cause loads to hang when HTTP
authentication was involved because NetworkCacheSpeculativeLoad failed to
call NetworkLoad::continueCanAuthenticateAgainstProtectionSpace() in its
canAuthenticateAgainstProtectionSpaceAsync() callback.

  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:

(WebKit::NetworkCache::SpeculativeLoad::canAuthenticateAgainstProtectionSpaceAsync):

  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:

LayoutTests:

Add layout test coverage. The test hangs without the fix.

  • http/tests/cache/disk-cache/speculative-validation/http-auth-expected.txt: Added.
  • http/tests/cache/disk-cache/speculative-validation/http-auth.html: Added.
  • http/tests/cache/disk-cache/speculative-validation/resources/frame-with-authenticated-resource.php: Added.
  • http/tests/cache/disk-cache/speculative-validation/resources/resource-with-auth.php: Added.
9:53 AM Changeset in webkit [208436] by matthew_hanson@apple.com
  • 5 edits in trunk/Source

Versioning.

9:51 AM Changeset in webkit [208435] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-603.1.11/trunk

New tag.

9:49 AM Changeset in webkit [208434] by Ryan Haddad
  • 9 edits in trunk

Unreviewed, rolling out r208422.

Roll r208382 back in since it was not responsible for the API
test failures seen on macOS.

Reverted changeset:

"Unreviewed, rolling out r208382."
https://bugs.webkit.org/show_bug.cgi?id=164319
http://trac.webkit.org/changeset/208422

9:36 AM Changeset in webkit [208433] by Csaba Osztrogonác
  • 2 edits in trunk/Source/WebCore

One more URTBF after r208361.

  • PlatformMac.cmake:
9:28 AM Changeset in webkit [208432] by Csaba Osztrogonác
  • 2 edits in trunk/Source/WebKit2

URTBF after r208361.

  • PlatformMac.cmake:
9:18 AM Changeset in webkit [208431] by Csaba Osztrogonác
  • 2 edits in trunk/Source/WebKit2

Unreviewed typo fix after r160616 to fix the build on case sensitive file systems.

  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
9:17 AM Changeset in webkit [208430] by Jonathan Bedard
  • 2 edits in trunk/Tools

Make rpaths more robust for iOS Simulators
https://bugs.webkit.org/show_bug.cgi?id=164521

Reviewed by Simon Fraser.

  • Scripts/webkitpy/port/ios.py:

(IOSSimulatorPort._createSimulatorApp): Added more robust path.

8:52 AM Changeset in webkit [208429] by Csaba Osztrogonác
  • 6 edits in trunk/Tools

Fix Tools build on case sensitive file systems
https://bugs.webkit.org/show_bug.cgi?id=164474

Unreviewed buildfix.

  • DumpRenderTree/CMakeLists.txt:
  • DumpRenderTree/PlatformMac.cmake:
  • DumpRenderTree/PlatformWin.cmake:
  • DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt:
  • MiniBrowser/mac/CMakeLists.txt:
8:49 AM Changeset in webkit [208428] by Csaba Osztrogonác
  • 2 edits in trunk/Source/WebCore

Typo fix after r162782
https://bugs.webkit.org/show_bug.cgi?id=164473

Unreviewed trivial fix.

  • platform/ThreadGlobalData.cpp:

Nov 8, 2016:

6:51 PM Changeset in webkit [208427] by rniwa@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

REGRESSION: date-format-tofte.js is super slow
https://bugs.webkit.org/show_bug.cgi?id=164499

Patch by Geoffrey Garen <ggaren@apple.com> on 2016-11-08
Reviewed by Sam Weinig.

  • bytecode/EvalCodeCache.h:

(JSC::EvalCodeCache::CacheKey::operator==): Use character comparison,
not pointer comparison. (This function was always wrong, but I started
calling it in more places.)

6:50 PM Changeset in webkit [208426] by rniwa@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

REGRESSION: Crashes in StringImpl destructor during GC when clearing the HasOwnPropertyCache
https://bugs.webkit.org/show_bug.cgi?id=164433

Patch by Saam Barati <sbarati@apple.com> on 2016-11-08
Reviewed by Mark Lam.

Clearing the HasOwnPropertyCache will call deref() on the StringImpls
in the cache. We were doing this from the collector thread, which is
not allowed. It must be done from the mutator thread. We now clear the
cache in Heap::finalize() which happens before the mutator begins
executing JS after a collection happens.

  • heap/Heap.cpp:

(JSC::Heap::collectInThread):
(JSC::Heap::finalize):

6:02 PM Changeset in webkit [208425] by bshafiei@apple.com
  • 5 edits in tags/Safari-603.1.11.2/Source

Versioning.

5:59 PM Changeset in webkit [208424] by bshafiei@apple.com
  • 1 copy in tags/Safari-603.1.11.2

New tag.

Note: See TracTimeline for information about the timeline view.