WebKit-https.git
23 months agoAdd test to ensure that text-overflow: ellipsis text is scrollable
dbates@webkit.org [Wed, 18 Oct 2017 23:14:34 +0000 (23:14 +0000)]
Add test to ensure that text-overflow: ellipsis text is scrollable
https://bugs.webkit.org/show_bug.cgi?id=178395

Reviewed by Zalan Bujtas.

* fast/text/scroll-text-overflow-ellipsis-expected.html: Added.
* fast/text/scroll-text-overflow-ellipsis.html: Added.
* platform/ios-wk1/TestExpectations: For now, skip the test in legacy WebKit on iOS
as eventSender.keyDown() does not seem to be dispatching a keyboard event to the
focused field. See <https://bugs.webkit.org/show_bug.cgi?id=178490>.
* resources/ui-helper.js:
(window.UIHelper.keyDown.return.new.Promise):
(window.UIHelper.keyDown):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223639 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months ago[Service Worker] Add stubs for Client / WindowClient / Clients
cdumez@apple.com [Wed, 18 Oct 2017 22:31:55 +0000 (22:31 +0000)]
[Service Worker] Add stubs for Client / WindowClient / Clients
https://bugs.webkit.org/show_bug.cgi?id=178469

Reviewed by Youenn Fablet.

Source/WebCore:

Add stubs for Client / WindowClient / Clients:
- https://w3c.github.io/ServiceWorker/v1/#clients
- https://w3c.github.io/ServiceWorker/v1/#client-interface

* CMakeLists.txt:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreBuiltinNames.h:
* dom/Document.cpp:
(WebCore::Document::visibilityState const):
* dom/Document.h:
* dom/Document.idl:
* dom/VisibilityState.h: Renamed from Source/WebCore/page/PageVisibilityState.h.
* dom/VisibilityState.idl: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.
* page/Page.cpp:
(WebCore::Page::visibilityState const):
* page/Page.h:
* workers/service/ServiceWorkerClient.cpp: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.
(WebCore::ServiceWorkerClient::ServiceWorkerClient):
(WebCore::ServiceWorkerClient::activeDOMObjectName const):
(WebCore::ServiceWorkerClient::canSuspendForDocumentSuspension const):
(WebCore::ServiceWorkerClient::url const):
(WebCore::ServiceWorkerClient::frameType const):
(WebCore::ServiceWorkerClient::id const):
(WebCore::ServiceWorkerClient::postMessage):
* workers/service/ServiceWorkerClient.h: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.
* workers/service/ServiceWorkerClient.idl: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.
* workers/service/ServiceWorkerClients.cpp: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp.
(WebCore::ServiceWorkerClients::ServiceWorkerClients):
(WebCore::ServiceWorkerClients::activeDOMObjectName const):
(WebCore::ServiceWorkerClients::canSuspendForDocumentSuspension const):
(WebCore::ServiceWorkerClients::get):
(WebCore::ServiceWorkerClients::matchAll):
(WebCore::ServiceWorkerClients::openWindow):
(WebCore::ServiceWorkerClients::claim):
* workers/service/ServiceWorkerClients.h: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.h.
(WebCore::ServiceWorkerClients::create):
* workers/service/ServiceWorkerClients.idl: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.
* workers/service/ServiceWorkerGlobalScope.cpp:
(WebCore::ServiceWorkerGlobalScope::ServiceWorkerGlobalScope):
* workers/service/ServiceWorkerGlobalScope.h:
(WebCore::ServiceWorkerGlobalScope::clients):
* workers/service/ServiceWorkerGlobalScope.idl:
* workers/service/ServiceWorkerWindowClient.cpp: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.
(WebCore::ServiceWorkerWindowClient::ServiceWorkerWindowClient):
(WebCore::ServiceWorkerWindowClient::visibilityState const):
(WebCore::ServiceWorkerWindowClient::isFocused const):
(WebCore::ServiceWorkerWindowClient::focus):
(WebCore::ServiceWorkerWindowClient::navigate):
* workers/service/ServiceWorkerWindowClient.h: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.
* workers/service/ServiceWorkerWindowClient.idl: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.

Source/WebKit:

Rename PageVisibilityState to VisibilityState.

* Shared/API/c/WKSharedAPICast.h:
(WebKit::toVisibilityState):
* WebProcess/WebPage/WebPage.h:

Source/WebKitLegacy/mac:

Rename PageVisiblityState to VisibilityState.

* WebView/WebView.mm:
(kit):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223634 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months ago[FrameView::layout cleanup] Use SetForScope to protect m_needsFullRepaint's value...
zalan@apple.com [Wed, 18 Oct 2017 22:27:55 +0000 (22:27 +0000)]
[FrameView::layout cleanup] Use SetForScope to protect m_needsFullRepaint's value on reentrancy
https://bugs.webkit.org/show_bug.cgi?id=178479
<rdar://problem/35056950>

Reviewed by Simon Fraser.

No change in functionality.

* page/FrameView.cpp:
(WebCore::FrameView::layout):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223633 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoMake failing WebGL tests produce debug output
dino@apple.com [Wed, 18 Oct 2017 22:01:49 +0000 (22:01 +0000)]
Make failing WebGL tests produce debug output
https://bugs.webkit.org/show_bug.cgi?id=178421

Reviewed by Jon Lee.

If a WebGL conformance test fails, we just get the word "FAIL". Instead,
have it log the actual output of the test, so we can see what happens
on bots.

Drive-by fix where I noticed a test file was missing, that causes
two tests to timeout. They may still timeout, but now because they
take a long time to run rather than they have a JS error.

* platform/mac/TestExpectations:
* webgl/1.0.2/resources/webgl_test_files/conformance/resources/iterable-test.js: Added.
* webgl/1.0.2/resources/webkit-webgl-test-harness.js:
(window.webglTestHarness.notifyFinished):
* webgl/resources/webkit-webgl-test-harness.js:
(window.webglTestHarness.notifyFinished):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223632 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months ago[FrameView::layout cleanup] Remove InPreLayoutStyleUpdate.
zalan@apple.com [Wed, 18 Oct 2017 21:54:28 +0000 (21:54 +0000)]
[FrameView::layout cleanup] Remove InPreLayoutStyleUpdate.
https://bugs.webkit.org/show_bug.cgi?id=178483
<rdar://problem/35058800>

Reviewed by Simon Fraser.

Its client, updateCompositingLayersAfterStyleChange only needs to know if there's a upcoming
layer update (part of FrameView::layout()).

No change in functionality.

* page/FrameView.cpp:
(WebCore::FrameView::updateCompositingLayersAfterStyleChange):
(WebCore::FrameView::layout):
* page/FrameView.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223631 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agowebkitpy tests should have --json-output option
aakash_jain@apple.com [Wed, 18 Oct 2017 21:52:09 +0000 (21:52 +0000)]
webkitpy tests should have --json-output option
https://bugs.webkit.org/show_bug.cgi?id=178481

Reviewed by Alexey Proskuryakov.

* Scripts/webkitpy/test/main.py:
(Tester._parse_args): Added json-output argument.
(Tester._run_tests): Write output to json file.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223630 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoGlobal constructors exposed to service workers should go on ServiceWorkerGlobalScope...
cdumez@apple.com [Wed, 18 Oct 2017 21:37:33 +0000 (21:37 +0000)]
Global constructors exposed to service workers should go on ServiceWorkerGlobalScope interface
https://bugs.webkit.org/show_bug.cgi?id=178482

Reviewed by Sam Weinig.

Global constructors exposed to service workers should go on ServiceWorkerGlobalScope interface,
not the ServiceWorker interface.

* bindings/scripts/preprocess-idls.pl:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223629 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoAdd an argument indicating the type of insertion to Node::insertedInto
rniwa@webkit.org [Wed, 18 Oct 2017 21:34:25 +0000 (21:34 +0000)]
Add an argument indicating the type of insertion to Node::insertedInto
https://bugs.webkit.org/show_bug.cgi?id=178431

Reviewed by Antti Koivisto.

Added InsertionType as the first argument to Node::insertedInto, which contains two booleans indicating
whether the node just become newly connected to a document, and whether node's tree scope had changed or not.

These boolean flags simplifie the logic in insertedInto implementations, and are required to have a better
guarantee about the correctness of node flags during calls to insertedInto. Right now, isConnected() and
isInShadowTree() are both outdated until Node::insertedInto is called.

Also renamed the second argument from insertionPoint to parentOfInsertedTree to make the semantics clear,
and renamed finishedInsertingSubtree to didFinishInsertingNode, and renamed InsertionNotificationRequest
to InsertedIntoResult using enum class.

Note that in some implementations of insertedInto, we check whether isConnected() was false to decide whether
the node is newly connected to a document. This extra check is no longer necessary since no node will be inserted
into a document without first being completely removed after r223458.

No new tests since there should be no behavioral changes.

* dom/ContainerNode.cpp:
(WebCore::ContainerNode::notifyChildInserted):
* dom/ContainerNodeAlgorithms.cpp:
(WebCore::notifyNodeInsertedIntoDocument): Replaced the check that the node had not been disconnected by scripts
by a release assert now that we believe we've eliminated all causes of these unwanted DOM mutations in r223458.
(WebCore::notifyNodeInsertedIntoTree): Removed NoEventDispatchAssertion since notifyChildNodeInserted has it
already since r223458.
(WebCore::notifyChildNodeInserted): Made this function return NodeVector (copy elision).
* dom/ContainerNodeAlgorithms.h:
* dom/Element.cpp:
(WebCore::Element::insertedInto): Use insertionType.connectedToDocument to detect when this element had become
connected to some document. Similarly, use insertionType.treeScopeChanged to detect when this element had been
inserted into a new tree scope. Removed the comment which became obsolete due to this cleanup.
(WebCore::Element::addShadowRoot): Simplified the code here since we never attach a ShadowRoot with children.
* dom/Element.h:
* dom/Node.cpp:
(WebCore::Node::insertedInto):
* dom/Node.h:
(WebCore::Node::InsertedIntoResult): Renamed from InsertionNotificationRequest, and turned into an enum class.
(WebCore::Node::InsertionType): Added. We pass this object by value to insertedInto as a performance optimization
as passing two booleans by value is faster than passing a pointer and then de-referencing it in a virtual callee.
(WebCore::Node::didFinishInsertingNode): Renamed from finishedInsertingSubtree.
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::insertedInto):
(WebCore::ProcessingInstruction::didFinishInsertingNode): Renamed from finishedInsertingSubtree.
* dom/ProcessingInstruction.h:
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::shouldCallFinishedInsertingSubtree): Deleted.
(WebCore::ScriptElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.
* dom/ScriptElement.h:
(WebCore::ScriptElement::insertedInto const): Added. Extracted from shouldCallFinishedInsertingSubtree.
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::insertedInto): The extra isConnected() check is no longer needed. See the description above.
* dom/ShadowRoot.h:
* html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::insertedInto):
* html/FormAssociatedElement.h:
* html/HTMLBaseElement.cpp:
(WebCore::HTMLBaseElement::insertedInto):
* html/HTMLBaseElement.h:
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::insertedInto):
(WebCore::HTMLBodyElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.
* html/HTMLBodyElement.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::insertedInto):
(WebCore::HTMLFormControlElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.
* html/HTMLFormControlElement.h:
* html/HTMLFormControlElementWithState.cpp:
(WebCore::HTMLFormControlElementWithState::insertedInto):
* html/HTMLFormControlElementWithState.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::insertedInto):
* html/HTMLFormElement.h:
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::insertedInto):
(WebCore::HTMLFrameElementBase::didFinishInsertingNode): Renamed from finishedInsertingSubtree.
* html/HTMLFrameElementBase.h:
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::insertedInto):
* html/HTMLFrameSetElement.h:
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::insertedInto):
* html/HTMLImageElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::insertedInto):
(WebCore::HTMLInputElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.
* html/HTMLInputElement.h:
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::insertedInto): The extra isConnected() check is no longer needed. See above.
(WebCore::HTMLLinkElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.
* html/HTMLLinkElement.h:
* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::insertedInto):
* html/HTMLMapElement.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::insertedInto):
(WebCore::HTMLMediaElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.
* html/HTMLMediaElement.h:
* html/HTMLMetaElement.cpp:
(WebCore::HTMLMetaElement::insertedInto):
* html/HTMLMetaElement.h:
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::insertedInto):
(WebCore::HTMLObjectElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.
* html/HTMLObjectElement.h:
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::insertedInto):
* html/HTMLOptionElement.h:
* html/HTMLScriptElement.cpp:
(WebCore::HTMLScriptElement::insertedInto):
(WebCore::HTMLScriptElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.
* html/HTMLScriptElement.h:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::insertedInto):
* html/HTMLSelectElement.h:
* html/HTMLSlotElement.cpp:
(WebCore::HTMLSlotElement::insertedInto): Replaced a cumbersome condition by a boolean check on insertionType's
treeScopeChanged and removed the accompanying comment which is no longer needed.
* html/HTMLSlotElement.h:
* html/HTMLSourceElement.cpp:
(WebCore::HTMLSourceElement::insertedInto):
* html/HTMLSourceElement.h:
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::insertedInto): The extra isConnected() check is no longer needed. See above.
* html/HTMLStyleElement.h:
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::insertedInto):
* html/HTMLTextFormControlElement.h:
* html/HTMLTitleElement.cpp:
(WebCore::HTMLTitleElement::insertedInto):
* html/HTMLTitleElement.h:
* html/HTMLTrackElement.cpp:
(WebCore::HTMLTrackElement::insertedInto): Added a FIXME since this code is clearly wrong.
* html/HTMLTrackElement.h:
* svg/SVGElement.cpp:
(WebCore::SVGElement::insertedInto):
* svg/SVGElement.h:
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::insertedInto):
(WebCore::SVGFEImageElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.
* svg/SVGFEImageElement.h:
* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::insertedInto):
* svg/SVGFontFaceElement.h:
* svg/SVGFontFaceUriElement.cpp:
(WebCore::SVGFontFaceUriElement::insertedInto):
* svg/SVGFontFaceUriElement.h:
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::insertedInto):
* svg/SVGImageElement.h:
* svg/SVGMPathElement.cpp:
(WebCore::SVGMPathElement::insertedInto):
(WebCore::SVGMPathElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.
* svg/SVGMPathElement.h:
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::insertedInto):
* svg/SVGPathElement.h:
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::insertedInto):
* svg/SVGSVGElement.h:
* svg/SVGScriptElement.cpp:
(WebCore::SVGScriptElement::insertedInto):
(WebCore::SVGScriptElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.
* svg/SVGScriptElement.h:
* svg/SVGStyleElement.cpp:
(WebCore::SVGStyleElement::insertedInto): The extra isConnected() check is no longer needed. See above description.
* svg/SVGStyleElement.h:
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::insertedInto):
(WebCore::SVGTRefElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.
* svg/SVGTRefElement.h:
* svg/SVGTextPathElement.cpp:
(WebCore::SVGTextPathElement::insertedInto):
(WebCore::SVGTextPathElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.
* svg/SVGTextPathElement.h:
* svg/SVGTitleElement.cpp:
(WebCore::SVGTitleElement::insertedInto):
* svg/SVGTitleElement.h:
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::insertedInto):
* svg/SVGUseElement.h:
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::insertedInto):
(WebCore::SVGSMILElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.
* svg/animation/SVGSMILElement.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223628 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoKey events should not update Document.lastHandledUserGestureTimestamp unless key...
eric.carlson@apple.com [Wed, 18 Oct 2017 20:26:38 +0000 (20:26 +0000)]
Key events should not update Document.lastHandledUserGestureTimestamp unless key event is handled
https://bugs.webkit.org/show_bug.cgi?id=178473
<rdar://problem/34869935>

Reviewed by Brent Fulgham.

Source/WebCore:

No new tests, updated media/restricted-audio-playback-with-document-gesture.html for this change.

* page/EventHandler.cpp:
(WebCore::EventHandler::keyEvent): Restore the current Document's "lastHandledUserGestureTimestamp"
if the key event was not handled.

LayoutTests:

* media/restricted-audio-playback-with-document-gesture.html: Pass true to runWithKeyDown so
it consumes the keydown event.
* media/video-test.js:
(runWithKeyDown): Take optional parameter which causes event handler to call preventDefault.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223626 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoUnreviewed, rolling out r223291.
wenson_hsieh@apple.com [Wed, 18 Oct 2017 20:20:37 +0000 (20:20 +0000)]
Unreviewed, rolling out r223291.

Source/WebCore:

After further investigation, this removed codepath is
something Mail may want to re-adopt. Additionally, the
original breaking change was rolled out in r223408, so
this test once again passes on ToT.

Reverted changeset:

"Remove Editor::simplifyMarkup"
https://bugs.webkit.org/show_bug.cgi?id=178271
https://trac.webkit.org/changeset/223291

Source/WebKitLegacy/mac:

See WebCore ChangeLog for more detail.

Reverted changeset:

"Remove Editor::simplifyMarkup"
https://bugs.webkit.org/show_bug.cgi?id=178271
https://trac.webkit.org/changeset/223291

Tools:

See WebCore ChangeLog for more detail.

Reverted changeset:

"Remove Editor::simplifyMarkup"
https://bugs.webkit.org/show_bug.cgi?id=178271
https://trac.webkit.org/changeset/223291

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223625 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months ago[Settings] Move remaining simple settings to Settings.in
commit-queue@webkit.org [Wed, 18 Oct 2017 20:18:38 +0000 (20:18 +0000)]
[Settings] Move remaining simple settings to Settings.in
https://bugs.webkit.org/show_bug.cgi?id=177730
<rdar://problem/34763346>

Patch by Sam Weinig <sam@webkit.org> on 2017-10-18
Reviewed by Daniel Bates.

* Scripts/GenerateSettings/Settings.py:
(Setting.__init__):
(Setting.__str__):
(Setting.getterFunctionName):
(parseInput):

    Add support for parsing the 'getter' option.

* page/Settings.in:

    Migrate simple settings from SettingsBase to here.

* page/SettingsBase.cpp:
(WebCore::SettingsBase::SettingsBase):
(WebCore::SettingsBase::setJavaEnabled): Deleted.
(WebCore::SettingsBase::setJavaEnabledForLocalFiles): Deleted.
(WebCore::SettingsBase::setPreferMIMETypeForImages): Deleted.
(WebCore::SettingsBase::setForcePendingWebGLPolicy): Deleted.
(WebCore::SettingsBase::setNeedsAdobeFrameReloadingQuirk): Deleted.
(WebCore::SettingsBase::setFontRenderingMode): Deleted.
(WebCore::SettingsBase::fontRenderingMode const): Deleted.
(WebCore::SettingsBase::setShowTiledScrollingIndicator): Deleted.
(WebCore::SettingsBase::setFontFallbackPrefersPictographs): Deleted.
* page/SettingsBase.h:
(WebCore::SettingsBase::isJavaEnabled const): Deleted.
(WebCore::SettingsBase::isJavaEnabledForLocalFiles const): Deleted.
(WebCore::SettingsBase::preferMIMETypeForImages const): Deleted.
(WebCore::SettingsBase::needsAcrobatFrameReloadingQuirk const): Deleted.
(WebCore::SettingsBase::showTiledScrollingIndicator const): Deleted.
(WebCore::SettingsBase::setTouchEventEmulationEnabled): Deleted.
(WebCore::SettingsBase::isTouchEventEmulationEnabled const): Deleted.
(WebCore::SettingsBase::setTimeWithoutMouseMovementBeforeHidingControls): Deleted.
(WebCore::SettingsBase::timeWithoutMouseMovementBeforeHidingControls const): Deleted.
(WebCore::SettingsBase::fontFallbackPrefersPictographs const): Deleted.
(WebCore::SettingsBase::setMediaKeysStorageDirectory): Deleted.
(WebCore::SettingsBase::mediaKeysStorageDirectory const): Deleted.
(WebCore::SettingsBase::setMediaDeviceIdentifierStorageDirectory): Deleted.
(WebCore::SettingsBase::mediaDeviceIdentifierStorageDirectory const): Deleted.
(WebCore::SettingsBase::applePayEnabled const): Deleted.
(WebCore::SettingsBase::setApplePayEnabled): Deleted.
(WebCore::SettingsBase::applePayCapabilityDisclosureAllowed const): Deleted.
(WebCore::SettingsBase::setApplePayCapabilityDisclosureAllowed): Deleted.
(WebCore::SettingsBase::isForcePendingWebGLPolicy const): Deleted.

    Remove simple settings.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223624 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoediting/deleting/delete-emoji-9.html is failing consistently.
mmaxfield@apple.com [Wed, 18 Oct 2017 19:30:28 +0000 (19:30 +0000)]
editing/deleting/delete-emoji-9.html is failing consistently.
https://bugs.webkit.org/show_bug.cgi?id=178478

Unreviewed.

* platform/mac/editing/deleting/delete-emoji-9-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223623 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months ago[FrameView::layout cleanup] Move root/body marking dirty logic to a separate function
zalan@apple.com [Wed, 18 Oct 2017 19:19:38 +0000 (19:19 +0000)]
[FrameView::layout cleanup] Move root/body marking dirty logic to a separate function
https://bugs.webkit.org/show_bug.cgi?id=178477
<rdar://problem/35056478>

Reviewed by Simon Fraser.

No change in functionality.

* page/FrameView.cpp:
(WebCore::FrameView::markRootOrBodyRendererDirty const):
(WebCore::FrameView::layout):
* page/FrameView.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223622 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoSetup WebCore build to start using unified sources.
keith_miller@apple.com [Wed, 18 Oct 2017 19:14:51 +0000 (19:14 +0000)]
Setup WebCore build to start using unified sources.
https://bugs.webkit.org/show_bug.cgi?id=178362

Reviewed by Tim Horton.

.:

Pass features to the unified source bundler script.

* Source/cmake/WebKitCommon.cmake:
* Source/cmake/WebKitFeatures.cmake:
* Source/cmake/WebKitMacros.cmake:

Source/JavaScriptCore:

Change comments in source list files. Also, pass explicit names for build files.

* CMakeLists.txt:
* PlatformGTK.cmake:
* PlatformMac.cmake:
* Sources.txt:
* SourcesGTK.txt:
* SourcesMac.txt:

Source/WebCore:

This patch adds all the long tooling needed to start adding
unified sources to WebCore. Most of the source list files
are empty to start but will be filled over the next few days.

I started by moving all the non-derived bindings code to
unified sources to make sure everything worked correctly.

* CMakeLists.txt:
* Configurations/GenerateUnifiedSources.xcconfig: Added.
* Configurations/WebCore.xcconfig:
* PlatformMac.cmake:
* Sources.txt: Added.
* SourcesCocoa.txt: Added.
* SourcesIOS.txt: Added.
* SourcesMac.txt: Added.
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this...

Source/WTF:

There are a number of changes to the bundler script. First, it is
now possible to enable or disable building files based on if the
associated feature flag is enabled or not. The syntax for this is
similar to how we do #ifs in C++ code. e.g.

#if ENABLE_APPLE_PAY
    myApplePayFile.cpp
#endif

would enable myApplePayFile.cpp if and only if the APPLE_PAY
feature define is set.

I also changed comments from # to // to make it less likely they
would be confused with a #if.

Finally, this patch enables bundling files in the same relative
directory across source list files. Previously, if
SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had
platform/cf/bar.cpp those files would not be put in the same
unified source bundle. Now, those files will be put into the same
bundle but bar.cpp will always follow foo.cpp. The idea is that by
putting more specific files after more general files we can avoid
random build failures.

* Scripts/generate-unified-source-bundles.rb:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months ago[GTK] Web Inspector: Add Layers.svg
commit-queue@webkit.org [Wed, 18 Oct 2017 18:39:04 +0000 (18:39 +0000)]
[GTK] Web Inspector: Add Layers.svg
https://bugs.webkit.org/show_bug.cgi?id=178430

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2017-10-18
Reviewed by Michael Catanzaro.

* UserInterface/Images/gtk/Layers.svg: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223619 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoUnreviewed, rolling out r223321.
commit-queue@webkit.org [Wed, 18 Oct 2017 18:28:20 +0000 (18:28 +0000)]
Unreviewed, rolling out r223321.
https://bugs.webkit.org/show_bug.cgi?id=178476

This protocol change broke some internal builds (Requested by
brrian__ on #webkit).

Reverted changeset:

"Web Inspector: provide a way to enable/disable event
listeners"
https://bugs.webkit.org/show_bug.cgi?id=177451
https://trac.webkit.org/changeset/223321

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223618 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoRoll out r223316.
aestes@apple.com [Wed, 18 Oct 2017 18:23:09 +0000 (18:23 +0000)]
Roll out r223316.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223617 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoCheck notifyPagesWhenTelemetryWasCaptured before notifying pages if there is no WebPa...
wilander@apple.com [Wed, 18 Oct 2017 18:21:16 +0000 (18:21 +0000)]
Check notifyPagesWhenTelemetryWasCaptured before notifying pages if there is no WebPageProxy
https://bugs.webkit.org/show_bug.cgi?id=178470
<rdar://problem/34417518>

Reviewed by Brian Burg.

* UIProcess/WebResourceLoadStatisticsTelemetry.cpp:
(WebKit::WebResourceLoadStatisticsTelemetry::calculateAndSubmit):
    Add a missing check of notifyPagesWhenTelemetryWasCaptured.
    The page notification is only for testing purposes.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223616 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoThe compiler should always register a structure when it adds its transitionWatchPointSet.
mark.lam@apple.com [Wed, 18 Oct 2017 17:41:55 +0000 (17:41 +0000)]
The compiler should always register a structure when it adds its transitionWatchPointSet.
https://bugs.webkit.org/show_bug.cgi?id=178420
<rdar://problem/34814024>

Reviewed by Saam Barati and Filip Pizlo.

JSTests:

* stress/regress-178420.js: Added.
(new.Array.10000.map):

Source/JavaScriptCore:

Instead of invoking addLazily() to add a structure's transitionWatchpointSet, we
now invoke Graph::registerAndWatchStructureTransition() on the structure.
registerAndWatchStructureTransition() both registers the structure and add its
transitionWatchpointSet to the plan desired watchpoints.

Graph::registerAndWatchStructureTransition() is based on Graph::registerStructure()
except registerAndWatchStructureTransition() adds the structure's
transitionWatchpointSet unconditionally.

* dfg/DFGArgumentsEliminationPhase.cpp:
* dfg/DFGArrayMode.cpp:
(JSC::DFG::ArrayMode::refine const):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):

* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::registerAndWatchStructureTransition):
* dfg/DFGGraph.h:

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileGetByValOnString):
- The second set of addLazily()s is redundant.  This set is executed only when
  prototypeChainIsSane is true, and prototypeChainIsSane can only be true if and
  only if we've executed the if statement above it.  That preceding if statement
  already registerAndWatchStructureTransition() the same 2 structures.  Hence,
  this second set can be deleted.

* dfg/DFGWatchpointCollectionPhase.cpp:
(JSC::DFG::WatchpointCollectionPhase::addLazily):
- Deleted an unused function.

* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileStringCharAt):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223614 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agohttp/tests/loading/basic-auth-resend-wrong-credentials.html is still a flaky failure...
achristensen@apple.com [Wed, 18 Oct 2017 17:16:41 +0000 (17:16 +0000)]
http/tests/loading/basic-auth-resend-wrong-credentials.html is still a flaky failure after proposed fix.
https://bugs.webkit.org/show_bug.cgi?id=178467

Reviewed by Andy Estes.

* http/tests/loading/basic-auth-resend-wrong-credentials-expected.txt:
* http/tests/loading/basic-auth-resend-wrong-credentials.html:
* platform/wk2/http/tests/loading/basic-auth-resend-wrong-credentials-expected.txt:
Use setTimeout to make the loading order deterministic.
The important part of this test is that the passwords shown in the delegate callbacks are correct,
and this doesn't change that.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223613 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months ago[Settings] Miscellaneous cleanup of the settings generation scripts
commit-queue@webkit.org [Wed, 18 Oct 2017 17:10:16 +0000 (17:10 +0000)]
[Settings] Miscellaneous cleanup of the settings generation scripts
https://bugs.webkit.org/show_bug.cgi?id=178462

Patch by Sam Weinig <sam@webkit.org> on 2017-10-18
Reviewed by Daniel Bates.

- Stop generating and remove now unused SettingsMacros.h
- Make functions operating on the python Setting object member functions
- Add predicate to determine if a Setting's type is a value type, allowing
  us to exclude those from using const references.

* CMakeLists.txt:
* DerivedSources.make:
* Scripts/GenerateSettings.py:
* Scripts/GenerateSettings/GenerateInternalSettingsHeaderFile.py:
* Scripts/GenerateSettings/GenerateInternalSettingsIDLFile.py:
* Scripts/GenerateSettings/GenerateInternalSettingsImplementationFile.py:
* Scripts/GenerateSettings/GenerateSettings.py:
* Scripts/GenerateSettings/GenerateSettingsHeaderFile.py:
* Scripts/GenerateSettings/GenerateSettingsImplementationFile.py:
* Scripts/GenerateSettings/GenerateSettingsMacrosHeader.py: Removed.
* Scripts/GenerateSettings/Settings.py:
* WebCoreMacros.cmake:
* WebCore.xcodeproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223612 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoAlign ImageData constructor with the specification
cdumez@apple.com [Wed, 18 Oct 2017 16:59:52 +0000 (16:59 +0000)]
Align ImageData constructor with the specification
https://bugs.webkit.org/show_bug.cgi?id=178406

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Rebaseline test now that one more check is passing.

* web-platform-tests/html/semantics/embedded-content/the-canvas-element/imagedata-expected.txt:

Source/WebCore:

Align ImageData constructor with the specification:
- https://html.spec.whatwg.org/multipage/canvas.html#dom-imagedata

It sometimes throws the wrong exception.

No new tests, rebaselined existing test.

* html/ImageData.cpp:
(WebCore::ImageData::create):
* html/ImageData.h:
* html/ImageData.idl:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223611 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoUnreviewed, fix build error after r223608 with some SDKs.
cdumez@apple.com [Wed, 18 Oct 2017 16:54:36 +0000 (16:54 +0000)]
Unreviewed, fix build error after r223608 with some SDKs.

* StorageProcess/StorageProcess.cpp:
(WebKit::StorageProcess::ensureSWOriginStoreForSession):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223610 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months ago[GTK] Test gardening.
Ms2ger@igalia.com [Wed, 18 Oct 2017 16:20:19 +0000 (16:20 +0000)]
[GTK] Test gardening.
https://bugs.webkit.org/show_bug.cgi?id=178461

Unreviewed test gardening.

* platform/gtk/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223609 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoAdd an efficient data structure for WebCore to query if there is a Service Worker...
cdumez@apple.com [Wed, 18 Oct 2017 16:12:11 +0000 (16:12 +0000)]
Add an efficient data structure for WebCore to query if there is a Service Worker registered for a given origin
https://bugs.webkit.org/show_bug.cgi?id=177876
<rdar://problem/34813129>

Reviewed by Ryosuke Niwa.

Source/WebCore:

No new tests, updatdd existing test.

* dom/Document.h:
* testing/Internals.cpp:
(WebCore::Internals::hasServiceWorkerRegisteredForOrigin):
* testing/Internals.h:
* testing/Internals.idl:
* workers/service/ServiceWorkerProvider.h:
* workers/service/context/SWContextManager.cpp:
(WebCore::SWContextManager::startServiceWorkerContext):
* workers/service/server/SWClientConnection.h:
* workers/service/server/SWServer.cpp:
(WebCore::SWServer::Connection::scriptContextStarted):
(WebCore::SWServer::scriptContextStarted):
* workers/service/server/SWServer.h:
* workers/service/server/SWServerRegistration.cpp:
(WebCore::SWServerRegistration::scriptContextFailedToStart):
(WebCore::SWServerRegistration::scriptContextStarted):
* workers/service/server/SWServerRegistration.h:

Source/WebKit:

Introduce a Service Worker origin store which gets populated / updated on the StorageProcess side
and queried on the WebContent process side via the WebSWOriginTable so that the WebProcess can
efficiently check if there is a ServiceWorker registered for a given origin without actually doing
an IPC to the StorageProcess.

For efficiency, the hash table is backed by SharedMemory so we only pass shared memory handles
between the StorageProcess and the WebProcesses.

We currently add entries to the WebSWOriginStore whenever a service worker registration succeeds
on the StorageProcess side. We also clear this store whenever the API to clear service worker
registrations is called. Code to query the WebSWOriginTable from the WebContent process side is
there but currently only used by Internals for testing. We will later leverage this code when
integrating with Fetch API.

* CMakeLists.txt:
* Shared/SharedStringHashStore.h:
(WebKit::SharedStringHashStore::Client::didUpdateSharedStringHashes):
* Shared/SharedStringHashTable.cpp:
(WebKit::SharedStringHashTable::clear):
* StorageProcess/ServiceWorker/WebSWOriginStore.cpp: Copied from Source/WebKit/WebProcess/Storage/WebServiceWorkerProvider.cpp.
(WebKit::WebSWOriginStore::WebSWOriginStore):
(WebKit::WebSWOriginStore::add):
(WebKit::WebSWOriginStore::remove):
(WebKit::WebSWOriginStore::clear):
(WebKit::WebSWOriginStore::registerSWServerConnection):
(WebKit::WebSWOriginStore::unregisterSWServerConnection):
(WebKit::WebSWOriginStore::sendStoreHandle):
(WebKit::WebSWOriginStore::didInvalidateSharedMemory):
* StorageProcess/ServiceWorker/WebSWOriginStore.h: Copied from Source/WebKit/WebProcess/Storage/WebServiceWorkerProvider.h.
* StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
(WebKit::WebSWServerConnection::WebSWServerConnection):
(WebKit::WebSWServerConnection::resolveJobInClient):
* StorageProcess/ServiceWorker/WebSWServerConnection.h:
(WebKit::WebSWServerConnection::sessionID const):
* StorageProcess/StorageProcess.cpp:
(WebKit::StorageProcess::deleteWebsiteData):
(WebKit::StorageProcess::deleteWebsiteDataForOrigins):
(WebKit::StorageProcess::ensureSWOriginStoreForSession):
(WebKit::StorageProcess::swOriginStoreForSession const):
(WebKit::StorageProcess::serviceWorkerContextStarted):
(WebKit::StorageProcess::registerSWServerConnection):
(WebKit::StorageProcess::unregisterSWServerConnection):
* StorageProcess/StorageProcess.h:
* StorageProcess/StorageProcess.messages.in:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/Storage/WebSWClientConnection.cpp:
(WebKit::WebSWClientConnection::WebSWClientConnection):
(WebKit::WebSWClientConnection::hasServiceWorkerRegisteredForOrigin const):
(WebKit::WebSWClientConnection::setSWOriginTableSharedMemory):
* WebProcess/Storage/WebSWClientConnection.h:
* WebProcess/Storage/WebSWClientConnection.messages.in:
* WebProcess/Storage/WebSWOriginTable.cpp: Copied from Source/WebKit/WebProcess/Storage/WebServiceWorkerProvider.h.
(WebKit::WebSWOriginTable::contains const):
(WebKit::WebSWOriginTable::setSharedMemory):
* WebProcess/Storage/WebSWOriginTable.h: Copied from Source/WebKit/WebProcess/Storage/WebServiceWorkerProvider.h.
* WebProcess/Storage/WebServiceWorkerProvider.cpp:
(WebKit::WebServiceWorkerProvider::serviceWorkerConnectionForSession):
* WebProcess/Storage/WebServiceWorkerProvider.h:
* WebProcess/Storage/WebToStorageProcessConnection.cpp:
(WebKit::WebToStorageProcessConnection::serviceWorkerConnectionForSession):
* WebProcess/Storage/WebToStorageProcessConnection.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::startServiceWorkerContext):

Tools:

Clear service worker registrations between test runs to avoid flakiness.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):

LayoutTests:

Add layout test coverage. Also rebaseline a few tests now that registration succeeds.

* http/tests/workers/service/basic-register-exceptions-expected.txt:
* http/tests/workers/service/basic-register-expected.txt:
* http/tests/workers/service/registration-task-queue-scheduling-1-expected.txt:
* http/tests/workers/service/resources/basic-register.js:
* http/tests/workers/service/resources/registration-task-queue-scheduling-1.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223608 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months ago[Settings] Replace macros in Settings.h/cpp with generated code
commit-queue@webkit.org [Wed, 18 Oct 2017 15:16:35 +0000 (15:16 +0000)]
[Settings] Replace macros in Settings.h/cpp with generated code
https://bugs.webkit.org/show_bug.cgi?id=178419

Patch by Sam Weinig <sam@webkit.org> on 2017-10-18
Reviewed by Antti Koivisto.

* Scripts/GenerateSettings/GenerateSettingsHeaderFile.py:
* Scripts/GenerateSettings/GenerateSettingsImplementationFile.py:

    Rather than use macros in the generated Settings class, generate the code the macros
    would expand to.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223607 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoREGRESSION(r217771): nullTerminatedWCharToString loses last character of input string
annulen@yandex.ru [Wed, 18 Oct 2017 14:57:13 +0000 (14:57 +0000)]
REGRESSION(r217771): nullTerminatedWCharToString loses last character of input string
https://bugs.webkit.org/show_bug.cgi?id=178444

Reviewed by Per Arne Vollan.

* wtf/text/win/WCharStringExtras.h:
(WTF::nullTerminatedWCharToString):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223606 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months ago[FrameView::layout cleanup] Move frame flattening layout logic to a separate function
zalan@apple.com [Wed, 18 Oct 2017 14:18:24 +0000 (14:18 +0000)]
[FrameView::layout cleanup] Move frame flattening layout logic to a separate function
https://bugs.webkit.org/show_bug.cgi?id=178425
<rdar://problem/35045836>

Reviewed by Antti Koivisto.

No change in functionality.

* page/FrameView.cpp:
(WebCore::FrameView::handleLayoutWithFrameFlatteningIfNeeded):
(WebCore::FrameView::layout):
(WebCore::FrameView::startLayoutAtMainFrameViewIfNeeded):
* page/FrameView.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223605 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoResolve ::before and ::after pseudo elements during style resolution
antti@apple.com [Wed, 18 Oct 2017 13:41:04 +0000 (13:41 +0000)]
Resolve ::before and ::after pseudo elements during style resolution
https://bugs.webkit.org/show_bug.cgi?id=178339
Source/WebCore:

Reviewed by Ryosuke Niwa.

They are currently resolved during render tree building which creates problems with display:contents and animations.

* dom/PseudoElement.cpp:
(WebCore::PseudoElement::PseudoElement):

    Call InspectorInstrumentation from constructor.

* style/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::Parent::Parent):
(WebCore::RenderTreeUpdater::updateRenderTree):
(WebCore::RenderTreeUpdater::pushParent):

    Push the full update to the parent stack.

(WebCore::RenderTreeUpdater::popParent):
(WebCore::RenderTreeUpdater::updateBeforeDescendants):
(WebCore::RenderTreeUpdater::updateAfterDescendants):
(WebCore::RenderTreeUpdater::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded):
* style/RenderTreeUpdater.h:
* style/RenderTreeUpdaterGeneratedContent.cpp:
(WebCore::RenderTreeUpdater::GeneratedContent::updatePseudoElement):

    No need to resolve pseudo style, we have it already.

(WebCore::RenderTreeUpdater::GeneratedContent::needsPseudoElement):
(WebCore::RenderTreeUpdater::GeneratedContent::updateBeforePseudoElement): Deleted.
(WebCore::RenderTreeUpdater::GeneratedContent::updateAfterPseudoElement): Deleted.
* style/RenderTreeUpdaterGeneratedContent.h:
* style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::resolveElement):
(WebCore::Style::TreeResolver::resolvePseudoStyle):

    Resolve pseudos.

(WebCore::Style::TreeResolver::createAnimatedElementUpdate):

    Make a private member function.

(WebCore::Style::TreeResolver::resolveComposedTree):
* style/StyleTreeResolver.h:
* style/StyleUpdate.cpp:
(WebCore::Style::Update::elementUpdates const):
(WebCore::Style::Update::elementUpdates):

    Bundle the style update for an element and the associated before/after pseudos.

(WebCore::Style::Update::elementStyle const):
(WebCore::Style::Update::elementStyle):
(WebCore::Style::Update::addElement):
(WebCore::Style::Update::elementUpdate const): Deleted.
(WebCore::Style::Update::elementUpdate): Deleted.
* style/StyleUpdate.h:

LayoutTests:

<rdar://problem/35025601>

Reviewed by Ryosuke Niwa.

Add a test verifying a crash noticed with earlier version of this patch.

* fast/css-generated-content/svg-use-crash-expected.html: Added.
* fast/css-generated-content/svg-use-crash.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223604 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months ago[JSC] Remove unused private name structure
utatane.tea@gmail.com [Wed, 18 Oct 2017 12:53:30 +0000 (12:53 +0000)]
[JSC] Remove unused private name structure
https://bugs.webkit.org/show_bug.cgi?id=178436

Reviewed by Sam Weinig.

It is no longer used. This patch just removes it.

* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::numberObjectStructure const):
(JSC::JSGlobalObject::privateNameStructure const): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223603 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoUpdate the signatures of texSubImage3D.
Ms2ger@igalia.com [Wed, 18 Oct 2017 12:47:17 +0000 (12:47 +0000)]
Update the signatures of texSubImage3D.
https://bugs.webkit.org/show_bug.cgi?id=178435

Reviewed by Sam Weinig.

Update the signatures of texSubImage3D.

No new tests: not much point in adding tests now; this method doesn't
do anything anyway.

* html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::texSubImage3D):
* html/canvas/WebGL2RenderingContext.h:
* html/canvas/WebGL2RenderingContext.idl:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223602 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoRemove remnants of OpenWebRTC
zandobersek@gmail.com [Wed, 18 Oct 2017 12:04:10 +0000 (12:04 +0000)]
Remove remnants of OpenWebRTC
https://bugs.webkit.org/show_bug.cgi?id=178437

Reviewed by Alejandro G. Castro.

.:

Remove the FindOpenWebRTC.cmake file and the searches for it in both
OptionsGTK and OptionsWPE.

* Source/cmake/FindOpenWebRTC.cmake: Removed.
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsWPE.cmake:

Tools:

Drop OpenWebRTC packages from the GTK's Jhbuild modules file. Relevant
patches are also removed.

* gtk/jhbuild.modules:
* gtk/patches/libnice-0001-TURN-allow-REALM-to-be-empty.patch: Removed.
* gtk/patches/libnice-0001-nicesrc-spin-the-agent-mainloop-in-a-separate-thread.patch: Removed.
* gtk/patches/rtspsrc-timeout-on-udpsrc-is-in-nanoseconds.patch: Removed.
* gtk/patches/udpsrc-improve-timeouts.patch: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223601 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoUse LazyNeverDestroyed instead of DEFINE_GLOBAL for WebKitFontFamilyNames
commit-queue@webkit.org [Wed, 18 Oct 2017 11:05:40 +0000 (11:05 +0000)]
Use LazyNeverDestroyed instead of DEFINE_GLOBAL for WebKitFontFamilyNames
https://bugs.webkit.org/show_bug.cgi?id=175106

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2017-10-18
Reviewed by Yusuke Suzuki.

No new tests because there is no behavior change.

* css/CSSFontFaceSet.cpp:
(WebCore::CSSFontFaceSet::familyNameFromPrimitive): Call get() method of LazyNeverDestroyed.
* dom/make_names.pl: Use LazyNeverDestroyed for font names.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223600 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months ago[MSE] Move SourceBuffer's pending append data into the platform implementations
zandobersek@gmail.com [Wed, 18 Oct 2017 08:30:13 +0000 (08:30 +0000)]
[MSE] Move SourceBuffer's pending append data into the platform implementations
https://bugs.webkit.org/show_bug.cgi?id=178003

Reviewed by Jer Noble.

In SourceBuffer::appendBufferTimerFired(), we can use move semantics to
pass the pending append data into the platform layer, where it can then
be used more efficiently.

Resources in the m_pendingAppendData member are moved into the append()
call on the SourceBufferPrivate object. The m_pendingAppendData is still
cleared out manually in case the underlying implementation doesn't clear
it out through a move operation. The SourceBufferPrivate interface is
updated to accept a Vector rvalue reference as the only parameter of the
append() method.

For the GStreamer implementation, signature of the append() method in
MediaSourceClientGStreamerMSE class is also updated. The implementation
now moves the Vector resources over to a on-heap Vector object that is
then wrapped into a GstBuffer object by using the
gst_buffer_new_wrapped_full() API and specifying the custom deleter.

The AVFoundation implementation of SourceBufferPrivate is only updated
to reflect the changes in the interface. The Vector data that is passed
in is still copied into the NSData allocation.

MockSourceBufferPrivate is also updated, with the append data still
being copied into the m_inputBuffer Vector.

No new tests -- no change in behavior.

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::appendBufferTimerFired):
* platform/graphics/SourceBufferPrivate.h:
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::append):
* platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp:
(WebCore::MediaSourceClientGStreamerMSE::append):
* platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.h:
* platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp:
(WebCore::SourceBufferPrivateGStreamer::append):
* platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h:
* platform/mock/mediasource/MockSourceBufferPrivate.cpp:
(WebCore::MockSourceBufferPrivate::append):
* platform/mock/mediasource/MockSourceBufferPrivate.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223596 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoFix macOS and iOS builds after r223594.
rniwa@webkit.org [Wed, 18 Oct 2017 08:12:17 +0000 (08:12 +0000)]
Fix macOS and iOS builds after r223594.

* JavaScriptCore.xcodeproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223595 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months ago[JSC] __proto__ getter should be fast
utatane.tea@gmail.com [Wed, 18 Oct 2017 07:12:53 +0000 (07:12 +0000)]
[JSC] __proto__ getter should be fast
https://bugs.webkit.org/show_bug.cgi?id=178067

Reviewed by Saam Barati.

JSTests:

* stress/dfg-object-proto-accessor.js: Added.
(shouldBe):
(shouldThrow):
(target):
* stress/dfg-object-proto-getter.js: Added.
(shouldBe):
(shouldThrow):
(target):
* stress/dfg-object-prototype-of.js: Added.
(shouldBe):
(shouldThrow):
(target):
* stress/dfg-reflect-get-prototype-of.js: Added.
(shouldBe):
(shouldThrow):
(target):
* stress/intrinsic-getter-with-poly-proto.js: Added.
(shouldBe):
(makePolyProtoObject.foo.C):
(makePolyProtoObject.foo):
(makePolyProtoObject):
(target):
* stress/object-get-prototype-of-filtered.js: Added.
(shouldBe):
(shouldThrow):
(target):
(i.Cocoa):
* stress/object-get-prototype-of-mono-proto.js: Added.
(shouldBe):
(makePolyProtoObject.foo.C):
(makePolyProtoObject.foo):
(makePolyProtoObject):
(target):
* stress/object-get-prototype-of-poly-mono-proto.js: Added.
(shouldBe):
(makePolyProtoObject.foo.C):
(makePolyProtoObject.foo):
(makePolyProtoObject):
(target):
* stress/object-get-prototype-of-poly-proto.js: Added.
(shouldBe):
(makePolyProtoObject.foo.C):
(makePolyProtoObject.foo):
(makePolyProtoObject):
(target):
* stress/object-proto-getter-filtered.js: Added.
(shouldBe):
(shouldThrow):
(target):
(i.Cocoa):
* stress/object-proto-getter-poly-mono-proto.js: Added.
(shouldBe):
(makePolyProtoObject.foo.C):
(makePolyProtoObject.foo):
(makePolyProtoObject):
(target):
* stress/object-proto-getter-poly-proto.js: Added.
(shouldBe):
(makePolyProtoObject.foo.C):
(makePolyProtoObject.foo):
(makePolyProtoObject):
(target):
* stress/object-prototype-proto-accessors-should-throw-on-undefined-this.js:
* stress/string-proto.js: Added.
(shouldBe):
(target):

Source/JavaScriptCore:

In our ES6 class implementation, we access __proto__ field to retrieve super constructor.
Currently, it is handled as an usual getter call to a generic function. And DFG just emits
Call node for this. It is inefficient since typically we know the `prototype` of the given
object when accessing `object.__proto__` since we emit CheckStructure for this `object`.
If Structure has mono proto, we can immediately fold it to constant value. If it is poly proto,
we can still change this to efficient access to poly proto slot.

This patch implements GetPrototypeOf DFG node. This node efficiently accesses to prototype of
the given object. And in AI and ByteCodeParser phase, we attempt to fold it to constant.
ByteCodeParser's folding is a bit important since we have `callee.__proto__` code to get super
constructor. If we can change this to constant, we can reify CallLinkInfo with this constant.
This paves the way to optimizing ArrayConstructor super calls[1], which is particularly important
for ARES-6 ML.

And we also optimize Reflect.getPrototypeOf and Object.getPrototypeOf with this GetPrototypeOf node.

Currently, __proto__ access for poly proto object is not handled well in IC. But we add code handling
poly proto in GetPrototypeOf since Reflect.getPrototypeOf and Object.getPrototypeOf can use it.
Once IC starts handling poly proto & intrinsic getter well, this code will be used for that too.

This patch improves SixSpeed super.es6 by 3.42x.

                         baseline                  patched

super.es6           123.6666+-3.9917     ^     36.1684+-1.0351        ^ definitely 3.4192x faster

[1]: https://bugs.webkit.org/show_bug.cgi?id=178064

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
(JSC::DFG::ByteCodeParser::handleIntrinsicGetter):
(JSC::DFG::ByteCodeParser::handleGetById):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::fixupGetPrototypeOf):
* dfg/DFGHeapLocation.cpp:
(WTF::printInternal):
* dfg/DFGHeapLocation.h:
* dfg/DFGNode.h:
(JSC::DFG::Node::hasHeapPrediction):
(JSC::DFG::Node::shouldSpeculateFunction):
* dfg/DFGNodeType.h:
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::speculateFunction):
(JSC::DFG::SpeculativeJIT::speculateFinalObject):
(JSC::DFG::SpeculativeJIT::compileGetPrototypeOf):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
* 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::compileGetPrototypeOf):
(JSC::FTL::DFG::LowerDFGToB3::compileInstanceOf):
* jit/IntrinsicEmitter.cpp:
(JSC::IntrinsicGetterAccessCase::canEmitIntrinsicGetter):
(JSC::IntrinsicGetterAccessCase::emitIntrinsicGetter):
* jit/JITOperations.h:
* runtime/Intrinsic.cpp:
(JSC::intrinsicName):
* runtime/Intrinsic.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::booleanPrototype const):
(JSC::JSGlobalObject::numberPrototype const):
(JSC::JSGlobalObject::booleanObjectStructure const):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncProtoGetter):
* runtime/JSGlobalObjectFunctions.h:
* runtime/ObjectConstructor.cpp:
* runtime/ReflectObject.cpp:

LayoutTests:

* js/object-literal-shorthand-construction-expected.txt:
* js/script-tests/object-literal-shorthand-construction.js:
(set 2):
(get 1):
* js/script-tests/sloppy-getter-setter-global-object.js:
* js/sloppy-getter-setter-global-object-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223594 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months ago[FrameView::layout cleanup] Remove redundant body->renderer()->setChildNeedsLayout...
zalan@apple.com [Wed, 18 Oct 2017 01:42:26 +0000 (01:42 +0000)]
[FrameView::layout cleanup] Remove redundant body->renderer()->setChildNeedsLayout() call
https://bugs.webkit.org/show_bug.cgi?id=178414
<rdar://problem/35040876>

Reviewed by Simon Fraser.

Since m_size always equals to layoutSize() at this point, we never call setChildNeedsLayout() on the body's renderer.
However a few lines below, when we adjust the frame size and check if oldSize != m_size, we actually
dirty the body's renderer.

Covered by existing tests.

* page/FrameView.cpp:
(WebCore::FrameView::layout):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223590 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months ago[Regression] Webkit "-apple-system" font fallback token handles font weights of PingF...
mmaxfield@apple.com [Wed, 18 Oct 2017 00:34:23 +0000 (00:34 +0000)]
[Regression] Webkit "-apple-system" font fallback token handles font weights of PingFang incorrectly.
https://bugs.webkit.org/show_bug.cgi?id=177345
<rdar://problem/32975942>

Reviewed by Jon Lee.

Source/WebCore:

This bug has a fairly insideous cause. In particular, the system font fallback path follows
system conventions, which are not the same as the CSS fallback path. For example, the Chinese
fallback of San Francisco weight 600 is Ping Fang weight 500. This doesn't match our
assumptions in CSS, because Ping Fang does have a 600 weight, which CSS would think is closer.
However, the whole point of system-ui is that it follows the system fallback path, not CSS's.
Therefore, falling back from a bold system-ui request to a non-bold fallback font is correct
and expected, and we shouldn't synthesize bold in this situation.

Test: fast/text/system-ui-chinese-bold-fallback.html

* platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp:
(WebCore::FontFamilySpecificationCoreText::fontRanges const):

LayoutTests:

* fast/text/system-ui-chinese-bold-fallback.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223589 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoVersioning.
jmarcell@apple.com [Wed, 18 Oct 2017 00:06:54 +0000 (00:06 +0000)]
Versioning.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223588 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agowebgl/1.0.2/conformance/canvas/drawingbuffer-static-canvas-test.html failing
dino@apple.com [Wed, 18 Oct 2017 00:05:15 +0000 (00:05 +0000)]
webgl/1.0.2/conformance/canvas/drawingbuffer-static-canvas-test.html failing
https://bugs.webkit.org/show_bug.cgi?id=178417
<rdar://problem/35042291>

Skip this test while I work out what causes it to fail on older hardware.

* TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223587 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoYou can't vmDeallocate null
fpizlo@apple.com [Tue, 17 Oct 2017 23:49:40 +0000 (23:49 +0000)]
You can't vmDeallocate null
<rdar://problem/35038926>

Reviewed by Michael Saboff.

After failing allocation, we would try to deallocate the thing we failed to allocate. The fix is to
not try to deallocate something that is obviously null.

* bmalloc/Gigacage.cpp:
(Gigacage::ensureGigacage):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223586 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months ago[iOS] Don't turn fields yellow after filling credentials
cpugh@apple.com [Tue, 17 Oct 2017 23:38:26 +0000 (23:38 +0000)]
[iOS] Don't turn fields yellow after filling credentials
https://bugs.webkit.org/show_bug.cgi?id=178411

Reviewed by Wenson Hsieh.

* editing/ios/AutofillElements.cpp:
(WebCore::AutofillElements::autofill): We don't want to turn fields yellow when filling the user name
and password. Remove the code that was causing that to happen.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223585 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoUnreviewed, rolling out r223523.
ryanhaddad@apple.com [Tue, 17 Oct 2017 23:34:29 +0000 (23:34 +0000)]
Unreviewed, rolling out r223523.

A test for this change is failing on debug JSC bots.

Reverted changeset:

"[JSC] __proto__ getter should be fast"
https://bugs.webkit.org/show_bug.cgi?id=178067
https://trac.webkit.org/changeset/223523

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223584 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoFix the Sierra build after r223580.
aestes@apple.com [Tue, 17 Oct 2017 23:10:09 +0000 (23:10 +0000)]
Fix the Sierra build after r223580.

* Modules/applepay/cocoa/PaymentContactCocoa.mm:
(WebCore::subLocality):
(WebCore::setSubLocality):
(WebCore::subAdministrativeArea):
(WebCore::setSubAdministrativeArea):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223583 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoMark fast/text/ellipsis-text-rtl.html as a failure on Windows.
pvollan@apple.com [Tue, 17 Oct 2017 23:03:48 +0000 (23:03 +0000)]
Mark fast/text/ellipsis-text-rtl.html as a failure on Windows.
https://bugs.webkit.org/show_bug.cgi?id=178413

Unreviewed test gardening.

* platform/win/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223582 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months ago[Apple Pay] Add subLocality and subAdministrativeArea to ApplePayPaymentContact and...
aestes@apple.com [Tue, 17 Oct 2017 21:41:57 +0000 (21:41 +0000)]
[Apple Pay] Add subLocality and subAdministrativeArea to ApplePayPaymentContact and ApplePayError
https://bugs.webkit.org/show_bug.cgi?id=178191
<rdar://problem/34906367>

Reviewed by Tim Horton.

Source/WebCore:

Added test cases to http/tests/ssl/applepay/ApplePaySession.html.

* Modules/applepay/ApplePayError.idl:
* Modules/applepay/ApplePayPaymentContact.h:
* Modules/applepay/ApplePayPaymentContact.idl:
* Modules/applepay/ApplePaySessionPaymentRequest.h:
* Modules/applepay/cocoa/PaymentContactCocoa.mm:
(WebCore::subLocality):
(WebCore::setSubLocality):
(WebCore::subAdministrativeArea):
(WebCore::setSubAdministrativeArea):
(WebCore::convert):

Source/WebKit:

* UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
(WebKit::toNSError):

LayoutTests:

* http/tests/ssl/applepay/ApplePayError-expected.txt:
* http/tests/ssl/applepay/ApplePaySession-expected.txt:
* http/tests/ssl/applepay/ApplePaySession.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223580 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoUnreviewed, rolling out r223500.
commit-queue@webkit.org [Tue, 17 Oct 2017 21:29:27 +0000 (21:29 +0000)]
Unreviewed, rolling out r223500.
https://bugs.webkit.org/show_bug.cgi?id=178408

Introduced a crash in CSSAnimationController::updateAnimations
(Requested by rniwa on #webkit).

Reverted changeset:

"Resolve ::before and ::after pseudo elements during style
resolution"
https://bugs.webkit.org/show_bug.cgi?id=178339
https://trac.webkit.org/changeset/223500

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223579 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoDelete button doesn't fully delete certain emoji
mmaxfield@apple.com [Tue, 17 Oct 2017 21:21:32 +0000 (21:21 +0000)]
Delete button doesn't fully delete certain emoji
https://bugs.webkit.org/show_bug.cgi?id=178096
<rdar://problem/34785106>

Reviewed by Simon Fraser.

Source/WebCore:

System infrastructure for handling emoji changes every year. Instead of having
custom code to specifically walk over codepoints, we should delegate to the
system handling.

Tests: editing/deleting/delete-emoji.html
       editing/deleting/delete-emoji-1.html
       editing/deleting/delete-emoji-2.html
       editing/deleting/delete-emoji-3.html
       editing/deleting/delete-emoji-4.html
       editing/deleting/delete-emoji-5.html
       editing/deleting/delete-emoji-6.html
       editing/deleting/delete-emoji-7.html
       editing/deleting/delete-emoji-8.html
       editing/deleting/delete-emoji-9.html

* rendering/RenderText.cpp:
(WebCore::RenderText::previousOffset const):
(WebCore::RenderText::previousOffsetForBackwardDeletion const):
(WebCore::RenderText::nextOffset const):
(WebCore::isHangulLVT): Deleted.
(WebCore::isMark): Deleted.
(WebCore::isRegionalIndicator): Deleted.
(WebCore::isInArmenianToLimbuRange): Deleted.

LayoutTests:

* editing/deleting/delete-emoji-1.html: Added.
* editing/deleting/delete-emoji-2.html: Added.
* editing/deleting/delete-emoji-3.html: Added.
* editing/deleting/delete-emoji-4.html: Added.
* editing/deleting/delete-emoji-5.html: Added.
* editing/deleting/delete-emoji-6.html: Added.
* editing/deleting/delete-emoji-7.html: Added.
* editing/deleting/delete-emoji-8.html: Added.
* editing/deleting/delete-emoji-9.html: Added.
* editing/deleting/delete-emoji.html:
* platform/ios/editing/deleting/delete-emoji-1-expected.txt: Added.
* platform/ios/editing/deleting/delete-emoji-2-expected.txt: Added.
* platform/ios/editing/deleting/delete-emoji-3-expected.txt: Added.
* platform/ios/editing/deleting/delete-emoji-4-expected.txt: Added.
* platform/ios/editing/deleting/delete-emoji-5-expected.txt: Added.
* platform/ios/editing/deleting/delete-emoji-6-expected.txt: Added.
* platform/ios/editing/deleting/delete-emoji-7-expected.txt: Added.
* platform/ios/editing/deleting/delete-emoji-8-expected.txt: Added.
* platform/ios/editing/deleting/delete-emoji-9-expected.txt: Added.
* platform/ios/editing/deleting/delete-emoji-expected.txt:
* platform/mac-elcapitan/editing/deleting/delete-emoji-2-expected.txt: Added.
* platform/mac-elcapitan/editing/deleting/delete-emoji-3-expected.txt: Added.
* platform/mac-elcapitan/editing/deleting/delete-emoji-4-expected.txt: Added.
* platform/mac-elcapitan/editing/deleting/delete-emoji-5-expected.txt: Added.
* platform/mac-elcapitan/editing/deleting/delete-emoji-6-expected.txt: Added.
* platform/mac-elcapitan/editing/deleting/delete-emoji-7-expected.txt: Added.
* platform/mac-elcapitan/editing/deleting/delete-emoji-8-expected.txt: Added.
* platform/mac-elcapitan/editing/deleting/delete-emoji-9-expected.txt: Added.
* platform/mac-elcapitan/editing/deleting/delete-emoji-expected.txt: Added.
* platform/mac-sierra/editing/deleting/delete-emoji-1-expected.txt: Added.
* platform/mac-sierra/editing/deleting/delete-emoji-2-expected.txt: Added.
* platform/mac-sierra/editing/deleting/delete-emoji-3-expected.txt: Added.
* platform/mac-sierra/editing/deleting/delete-emoji-4-expected.txt: Added.
* platform/mac-sierra/editing/deleting/delete-emoji-5-expected.txt: Added.
* platform/mac-sierra/editing/deleting/delete-emoji-6-expected.txt: Added.
* platform/mac-sierra/editing/deleting/delete-emoji-7-expected.txt: Added.
* platform/mac-sierra/editing/deleting/delete-emoji-8-expected.txt: Added.
* platform/mac-sierra/editing/deleting/delete-emoji-9-expected.txt: Added.
* platform/mac-sierra/editing/deleting/delete-emoji-expected.txt: Added.
* platform/mac/editing/deleting/delete-emoji-1-expected.txt: Added.
* platform/mac/editing/deleting/delete-emoji-2-expected.txt: Added.
* platform/mac/editing/deleting/delete-emoji-3-expected.txt: Added.
* platform/mac/editing/deleting/delete-emoji-4-expected.txt: Added.
* platform/mac/editing/deleting/delete-emoji-5-expected.txt: Added.
* platform/mac/editing/deleting/delete-emoji-6-expected.txt: Added.
* platform/mac/editing/deleting/delete-emoji-7-expected.txt: Added.
* platform/mac/editing/deleting/delete-emoji-8-expected.txt: Added.
* platform/mac/editing/deleting/delete-emoji-9-expected.txt: Added.
* platform/mac/editing/deleting/delete-emoji-expected.txt:
* platform/win/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223578 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoAdd preliminary support for fetch event
commit-queue@webkit.org [Tue, 17 Oct 2017 21:19:38 +0000 (21:19 +0000)]
Add preliminary support for fetch event
https://bugs.webkit.org/show_bug.cgi?id=178171

Unreviewed.

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-17

* workers/service/FetchEvent.cpp:
(WebCore::FetchEvent::promiseIsSettled): build fix by removing unnecessary captured this at the moment.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223577 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months ago[CSS Font Loading] Fonts are erroneously invisible when the policy says they should...
mmaxfield@apple.com [Tue, 17 Oct 2017 21:16:42 +0000 (21:16 +0000)]
[CSS Font Loading] Fonts are erroneously invisible when the policy says they should be visible
https://bugs.webkit.org/show_bug.cgi?id=178238

Reviewed by Simon Fraser.

When implementing font-display, I added testing infrastructure (so we don't have to wait for
3 second timeouts to occur). This testing infrastructure covered up a real bug where the wrong
font would be reported to CSSFontAccessor. This patch reverts the erroneous testing
infrastructure and replaces it with a real fix to the problem. The replacement fix is covered
by the same tests that I wrote when implementing the feature.

Covered by existing tests.

* css/CSSFontFace.cpp:
(WebCore::CSSFontFace::pump):
(WebCore::visibility):
(WebCore::CSSFontFace::font):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223576 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoWeb Inspector: [PARITY] Styles Redesign: Add color picker inline widget
nvasilyev@apple.com [Tue, 17 Oct 2017 20:55:23 +0000 (20:55 +0000)]
Web Inspector: [PARITY] Styles Redesign: Add color picker inline widget
https://bugs.webkit.org/show_bug.cgi?id=178354

Reviewed by Joseph Pecoraro.

Show color picker using the existing WI.InlineSwatch.

* UserInterface/Models/Color.js:
* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
(.spreadsheet-style-declaration-editor .property:not(.disabled) .token-comment):
Syntax highlight comments in values.

* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype._renderValue):
(WI.SpreadsheetStyleProperty.prototype._addColorTokens):
Find colors in CodeMirror tokens and replace them with color token elements.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223575 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months ago[Settings] Generate Settings.h/cpp
weinig@apple.com [Tue, 17 Oct 2017 20:45:36 +0000 (20:45 +0000)]
[Settings] Generate Settings.h/cpp
https://bugs.webkit.org/show_bug.cgi?id=178361

Reviewed by Dean Jackson.

Source/WebCore:

This change generates Settings.h and Settings.cpp exactly as they are,
using SettingsMacros.h and everything. In follow up changes, the use of
SettingsMacros.h will be removed.

* CMakeLists.txt:
* DerivedSources.make:
* Scripts/GenerateSettings.py:
* Scripts/GenerateSettings/GenerateSettings.py:
* Scripts/GenerateSettings/GenerateSettingsHeaderFile.py: Added.
* Scripts/GenerateSettings/GenerateSettingsImplementationFile.py: Added.
* WebCore.xcodeproj/project.pbxproj:
* WebCoreMacros.cmake:
* page/Settings.cpp: Removed.
* page/Settings.h: Removed.

Source/WebKit:

* PlatformGTK.cmake:
* PlatformWPE.cmake:

    Delete the old Settings.h from the forwarding
    headers directory to allow the build to work.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223574 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoCreate bindings for WebGL2's versions of texSubImage2D.
Ms2ger@igalia.com [Tue, 17 Oct 2017 20:35:22 +0000 (20:35 +0000)]
Create bindings for WebGL2's versions of texSubImage2D.
https://bugs.webkit.org/show_bug.cgi?id=178382

Reviewed by Ryosuke Niwa.

Create bindings for WebGL2's versions of texSubImage2D.

No new tests: not much point in adding tests now; this method doesn't
do anything anyway.

* html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::texSubImage2D):
* html/canvas/WebGL2RenderingContext.h:
* html/canvas/WebGL2RenderingContext.idl:
* html/canvas/WebGLRenderingContext.idl:
* html/canvas/WebGLRenderingContextBase.idl:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223573 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agowebkitpy: Hang when workers write to the same stack trace file
jbedard@apple.com [Tue, 17 Oct 2017 20:30:18 +0000 (20:30 +0000)]
webkitpy: Hang when workers write to the same stack trace file
https://bugs.webkit.org/show_bug.cgi?id=178402
<rdar://problem/35033432>

Reviewed by Aakash Jain.

Workers can hang if they all write to the same stack trace file when receiving
a SIGTERM. Attach the pid to the stack trace file name so that each worker
writes to a different file.

* Scripts/webkitpy/common/interupt_debugging.py:
(log_stack_trace_on_term.handler): Name stack trace file path/<pid>-filename.
(log_stack_trace_on_cntrl_c.handler): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223572 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoSkip service workers tests on Windows.
pvollan@apple.com [Tue, 17 Oct 2017 20:24:13 +0000 (20:24 +0000)]
Skip service workers tests on Windows.

Unreviewed test gardening.

* platform/win/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223571 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoMark animations/play-state-suspend.html as flaky on Windows.
pvollan@apple.com [Tue, 17 Oct 2017 20:18:21 +0000 (20:18 +0000)]
Mark animations/play-state-suspend.html as flaky on Windows.
https://bugs.webkit.org/show_bug.cgi?id=178341

Unreviewed test gardening.

* platform/win/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223570 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months ago[FrameView::layout cleanup] Subtree should read subtreeLayout.
zalan@apple.com [Tue, 17 Oct 2017 20:09:15 +0000 (20:09 +0000)]
[FrameView::layout cleanup] Subtree should read subtreeLayout.
https://bugs.webkit.org/show_bug.cgi?id=178401

Reviewed by Simon Fraser.

Rename some variables to improve readability.

No change in functionality.

* page/FrameView.cpp:
(WebCore::SubtreeLayoutStateMaintainer::SubtreeLayoutStateMaintainer):
(WebCore::SubtreeLayoutStateMaintainer::~SubtreeLayoutStateMaintainer):
(WebCore::SubtreeLayoutStateMaintainer::shouldDisableLayoutStateForSubtree):
(WebCore::FrameView::reset):
(WebCore::FrameView::willDestroyRenderTree):
(WebCore::FrameView::didDestroyRenderTree):
(WebCore::FrameView::calculateScrollbarModesForLayout):
(WebCore::FrameView::layout):
(WebCore::FrameView::convertSubtreeLayoutToFullLayout):
(WebCore::FrameView::scheduleRelayout):
(WebCore::FrameView::scheduleRelayoutOfSubtree):
(WebCore::FrameView::needsLayout const):
(WebCore::FrameView::autoSizeIfEnabled):
* page/FrameView.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223569 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoWebGL clamps drawingBufferWidth to 4096 pixels on a 5120 monitor/canvas
dino@apple.com [Tue, 17 Oct 2017 19:17:33 +0000 (19:17 +0000)]
WebGL clamps drawingBufferWidth to 4096 pixels on a 5120 monitor/canvas
https://bugs.webkit.org/show_bug.cgi?id=178223
<rdar://problem/34597567>

Reviewed by Antoine Quint.

Source/WebCore:

Remove the limit of 4k on the width/height of the renderbuffer.

Test: fast/canvas/webgl/large-drawing-buffer-resize.html

* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::reshape):

LayoutTests:

Test that resizes an already large buffer to make sure it
doesn't get clamped to 4k.

* fast/canvas/webgl/large-drawing-buffer-resize-expected.txt: Added.
* fast/canvas/webgl/large-drawing-buffer-resize.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223567 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoRoll out r223447.
aestes@apple.com [Tue, 17 Oct 2017 19:04:22 +0000 (19:04 +0000)]
Roll out r223447.

Broke the Sierra build.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223566 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoAdd and remove cookie partition accordingly in intermediary redirect requests
wilander@apple.com [Tue, 17 Oct 2017 18:57:21 +0000 (18:57 +0000)]
Add and remove cookie partition accordingly in intermediary redirect requests
https://bugs.webkit.org/show_bug.cgi?id=178369
<rdar://problem/34467603>

Reviewed by Brent Fulgham.

Source/WebCore:

Tests: http/tests/resourceLoadStatistics/add-partitioning-to-redirect.html
       http/tests/resourceLoadStatistics/remove-partitioning-from-redirect.html

* loader/ResourceLoadObserver.h:
    Now exposes notifyObserver() so that it can be triggered
    by the TestRunner.
    Removed unimplemented ResourceLoadObserver::setShouldThrottleObserverNotifications().

Source/WebKit:

* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::shouldChangePartition):
    Convenience function. Comment documents the logic.
(WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
    Now adds and removes cookie partition based on the
    redirect-to URL's domain.
* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleResourceLoadStatisticsNotifyObserver):
    Test infrastructure.
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:

Tools:

Adds the function statisticsNotifyObserver().

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::statisticsNotifyObserver):
* WebKitTestRunner/InjectedBundle/InjectedBundle.h:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::statisticsNotifyObserver):
* WebKitTestRunner/InjectedBundle/TestRunner.h:

LayoutTests:

This patch adds two new tests, relevant for the code change.
Also makes changes to existing tests to increase speed and
reliability.

* http/tests/resourceLoadStatistics/add-partitioning-to-redirect-expected.txt: Added.
* http/tests/resourceLoadStatistics/add-partitioning-to-redirect.html: Added.
* http/tests/resourceLoadStatistics/non-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html:
* http/tests/resourceLoadStatistics/non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html:
* http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html:
* http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html:
* http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html:
* http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html:
* http/tests/resourceLoadStatistics/remove-partitioning-from-redirect-expected.txt: Added.
* http/tests/resourceLoadStatistics/remove-partitioning-from-redirect.html: Added.
* http/tests/resourceLoadStatistics/resources/get-cookies.php: Added.
* http/tests/resourceLoadStatistics/resources/redirect.php:
* http/tests/resourceLoadStatistics/resources/set-cookie.php: Added.
* http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-ip-to-localhost-to-ip.html:
* http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html:
* http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html:
* http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html:
* http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html:
* http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html:
* platform/ios/TestExpectations:
    The two new tests are marked [ Pass ].
* platform/mac-wk2/TestExpectations:
    The two new tests are marked [ Pass ].
* platform/wk2/TestExpectations:
    The two new tests are marked [ Skip ] because they require cookie partitioning.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223565 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoCorrupted image after looping movie-backed <img>.
jer.noble@apple.com [Tue, 17 Oct 2017 18:53:52 +0000 (18:53 +0000)]
Corrupted image after looping movie-backed <img>.
https://bugs.webkit.org/show_bug.cgi?id=178398

Reviewed by Eric Carlson.

Use the decode-order sample cursor rather than the destination sample cursor when generating
the CMSampleBuffer to decode.

* platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
(WebCore::ImageDecoderAVFObjC::createFrameImageAtIndex):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223564 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoUnreviewed, rolling out r223459.
ryanhaddad@apple.com [Tue, 17 Oct 2017 18:49:11 +0000 (18:49 +0000)]
Unreviewed, rolling out r223459.

This change introduced LayoutTest failures.

Reverted changeset:

"WebGL clamps drawingBufferWidth to 4096 pixels on a 5120
monitor/canvas"
https://bugs.webkit.org/show_bug.cgi?id=178223
https://trac.webkit.org/changeset/223459

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223563 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoAdd preliminary support for fetch event
commit-queue@webkit.org [Tue, 17 Oct 2017 18:39:48 +0000 (18:39 +0000)]
Add preliminary support for fetch event
https://bugs.webkit.org/show_bug.cgi?id=178171

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-17
Reviewed by Chris Dumez.

Source/JavaScriptCore:

Adding events

* runtime/JSPromise.h:

Source/WebCore:

Test: http/wpt/service-workers/fetchEvent.https.html
      http/wpt/service-workers/extendableEvent.https.html

Adding support for ExtendableEvent and FetchEvent as per
https://w3c.github.io/ServiceWorker/v1/#extendableevent-interface and
https://w3c.github.io/ServiceWorker/v1/#fetchevent-interface.

Both events need to handle promises as method parameters.
Beefing up DOMPromise for that purpose by exposing status, result and being able to call then.
Adding a new DOMPromise create method that would be the base for https://heycam.github.io/webidl/#es-promise
which might be implemented in the binding generator as a follow-up.

This patch makes them exposed on Window for test purposes until they can be fully tested on ServiceWorker environment.
It is also adding two internal methods for the same reason. These should be removed once events can be tested in its environment.

* CMakeLists.txt:
* DerivedSources.make:
* Modules/fetch/FetchResponse.idl:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMPromise.cpp: Added.
(WebCore::callFunction):
(WebCore::DOMPromise::create):
(WebCore::DOMPromise::whenSettled):
(WebCore::DOMPromise::result const):
(WebCore::DOMPromise::status const):
* bindings/js/JSDOMPromise.h:
* bindings/js/WebCoreBuiltinNames.h:
* dom/EventNames.in:
* testing/Internals.cpp:
(WebCore::Internals::waitFetchEventToFinish):
(WebCore::Internals::waitExtendableEventToFinish):
* testing/Internals.h:
* testing/Internals.idl:
* workers/service/ExtendableEvent.cpp: Added.
(WebCore::ExtendableEvent::ExtendableEvent):
(WebCore::ExtendableEvent::waitUntil):
(WebCore::ExtendableEvent::addPendingPromise):
* workers/service/ExtendableEvent.h:
(WebCore::ExtendableEvent::onFinishedWaiting):
(WebCore::ExtendableEvent::promiseSettled):
* workers/service/ExtendableEvent.idl: Added.
* workers/service/ExtendableEventInit.h: Added.
* workers/service/ExtendableEventInit.idl: Added.
* workers/service/FetchEvent.cpp: Added.
(WebCore::FetchEvent::FetchEvent):
(WebCore::FetchEvent::respondWith):
(WebCore::FetchEvent::onResponse):
(WebCore::FetchEvent::respondWithError):
(WebCore::FetchEvent::processResponse):
(WebCore::FetchEvent::promiseSettled):
* workers/service/FetchEvent.h:
* workers/service/FetchEvent.idl:

LayoutTests:

Skipping new tests for WK1 and GTK that do not have SW.

* http/wpt/service-workers/extendableEvent.https-expected.txt: Added.
* http/wpt/service-workers/extendableEvent.https.html: Added.
* http/wpt/service-workers/fetchEvent.https-expected.txt: Added.
* http/wpt/service-workers/fetchEvent.https.html: Added.
* platform/gtk/TestExpectations:
* platform/ios-wk1/TestExpectations:
* platform/mac-wk1/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223562 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoWeb Inspector: Styles: Command-click on a property name should jump to definition...
nvasilyev@apple.com [Tue, 17 Oct 2017 18:39:47 +0000 (18:39 +0000)]
Web Inspector: Styles: Command-click on a property name should jump to definition in Resources tab
https://bugs.webkit.org/show_bug.cgi?id=174329
<rdar://problem/33225564>

Reviewed by Joseph Pecoraro.

* UserInterface/Base/Main.js:
Add "meta-key-pressed" class to <body> when Command key is pressed.

* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
(.meta-key-pressed .spreadsheet-css-declaration:not(.locked) :matches(.name, .value):not(.editing):hover):
Use the same styles as in CodeMirrorTokenTrackingController.css.

* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype._update):
(WI.SpreadsheetStyleProperty.prototype._setupJumpToSymbol):
This is very similar to WI.CSSStyleDeclarationTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked,
except it doesn't include special cases for CSS variables and links yet.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223561 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoLeak of one AVSampleCursor inside ImageDecoderAVFObjC::createFrameImageAtIndex()
jer.noble@apple.com [Tue, 17 Oct 2017 18:33:21 +0000 (18:33 +0000)]
Leak of one AVSampleCursor inside ImageDecoderAVFObjC::createFrameImageAtIndex()
https://bugs.webkit.org/show_bug.cgi?id=178397

Reviewed by Eric Carlson.

Explicitly wrap the return value of -copy in a RetainPtr.

* platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
(WebCore::ImageDecoderAVFObjC::createFrameImageAtIndex):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223560 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoRoll out r223247 until we can find a way to not break performance testing.
aestes@apple.com [Tue, 17 Oct 2017 18:30:31 +0000 (18:30 +0000)]
Roll out r223247 until we can find a way to not break performance testing.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223559 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoCache API implementation should be able to compute storage size for WebKit client...
commit-queue@webkit.org [Tue, 17 Oct 2017 18:21:37 +0000 (18:21 +0000)]
Cache API implementation should be able to compute storage size for WebKit client applications.
https://bugs.webkit.org/show_bug.cgi?id=178350

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-17
Reviewed by Chris Dumez.

Source/WebCore:

* page/SecurityOriginData.h:
(WebCore::SecurityOriginData::equals const):

Source/WebKit:

When gathering data from DOM Cache, we compute the size as follows:
- If Caches object is not persistent, size is zero
- If Caches object is persistent, we use the size computed by NetworkCache::Storage.
Covered by updated tests.

* NetworkProcess/cache/CacheStorageEngine.cpp:
(WebKit::CacheStorage::ReadOriginsTaskCounter::create):
(WebKit::CacheStorage::ReadOriginsTaskCounter::addOrigin):
(WebKit::CacheStorage::Engine::fetchEntries):
* NetworkProcess/cache/CacheStorageEngineCaches.cpp:
(WebKit::CacheStorage::Caches::storageSize const):
* NetworkProcess/cache/CacheStorageEngineCaches.h:
* UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
(WKWebsiteDataStoreGetFetchCacheSizeForOrigin):
* UIProcess/API/C/WKWebsiteDataStoreRef.h:

Tools:

Adding support for a domCacheSize getter.

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::domCacheSize):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::FetchCacheSizeForOriginCallbackContext::FetchCacheSizeForOriginCallbackContext):
(WTR::fetchCacheSizeForOriginCallback):
(WTR::TestController::domCacheSize):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

* http/tests/cache-storage/cache-clearing-origin.https.html:
* http/tests/cache-storage/cache-representation.https.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223558 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoAdd expected result file for fast/css/DOMQuad-points-SameObject.html.
ryanhaddad@apple.com [Tue, 17 Oct 2017 18:03:26 +0000 (18:03 +0000)]
Add expected result file for fast/css/DOMQuad-points-SameObject.html.
https://bugs.webkit.org/show_bug.cgi?id=178366

Unreviewed test gardening.

* fast/css/DOMQuad-points-SameObject-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223557 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agode-flakify http/tests/security/cross-frame-access-put.html
achristensen@apple.com [Tue, 17 Oct 2017 17:41:28 +0000 (17:41 +0000)]
de-flakify http/tests/security/cross-frame-access-put.html
https://bugs.webkit.org/show_bug.cgi?id=178371

Reviewed by Tim Horton.

In the iframe, the test was being run after 0ms.  Sometimes, the whole iframe hadn't loaded yet,
so window.innerHeight and window.innerWidth were 0 instead of their intended values.  This changes
the test to wait for the iframe to finish loading before running the test, then post a message to
the parent to tell it to finish running its test instead of just relying on setTimeout(..., 0) to
always work after the iframe had finished loading.

* http/tests/security/cross-frame-access-put-expected.txt:
* http/tests/security/cross-frame-access-put.html:
* http/tests/security/resources/cross-frame-iframe-for-put-test.html:
* platform/mac-wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223556 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoLayout Test http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-invalidstaterro...
achristensen@apple.com [Tue, 17 Oct 2017 17:37:10 +0000 (17:37 +0000)]
Layout Test http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-invalidstaterror.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=150095

Reviewed by Tim Horton.

* http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-invalidstaterror-expected.txt:
* http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-invalidstaterror.html:
* platform/mac-wk2/TestExpectations:
We were mixing jsTestIsAsync with testRunner.notifyDone which caused some flakiness.
Calling finishJSTest on the next runloop iteration causes it to no longer be flaky.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223555 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoDe-flakify http/tests/loading/basic-auth-resend-wrong-credentials.html
achristensen@apple.com [Tue, 17 Oct 2017 17:19:24 +0000 (17:19 +0000)]
De-flakify http/tests/loading/basic-auth-resend-wrong-credentials.html
https://bugs.webkit.org/show_bug.cgi?id=178370

Reviewed by Ryosuke Niwa.

Like r223445, in WebKit2 (and WebKit1 with asynchronous loading) sometimes the iframe would start
loading before the main resource loading finished, sometimes it wouldn't.  This isn't a problem,
and the rest of the test is still valid, but in order to make the dumped delegate callbacks deterministic,
we make it so the iframe always starts loading after the main resource is done loading.

* http/tests/loading/basic-auth-resend-wrong-credentials-expected.txt:
* http/tests/loading/basic-auth-resend-wrong-credentials.html:
* platform/ios-wk2/TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/wk2/http/tests/loading/basic-auth-resend-wrong-credentials-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223554 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoASSERTION FAILED: m_truncation != cFullTruncation in InlineTextBox::clampedOffset()
dbates@webkit.org [Tue, 17 Oct 2017 17:13:56 +0000 (17:13 +0000)]
ASSERTION FAILED: m_truncation != cFullTruncation in InlineTextBox::clampedOffset()
https://bugs.webkit.org/show_bug.cgi?id=178322

Reviewed by Darin Adler.

Source/WebCore:

It is acceptable for InlineTextBox::clampedOffset() to be called for a fully truncated box,
say a person clicks on the ellipsis in a truncated text run. Restore the behavior prior to
r223259 and return the clamped offset.

Test: fast/text/click-ellipsis-assertion-failure.html

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::clampedOffset const):

LayoutTests:

Add a test to ensure that clicking on the ellipsis in a truncated text run does not
cause an assertion failure in a debug build.

* fast/text/click-ellipsis-assertion-failure-expected.txt: Added.
* fast/text/click-ellipsis-assertion-failure.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223553 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoREGRESSION (r222670 and r222732): RTL truncated text may not be drawn
dbates@webkit.org [Tue, 17 Oct 2017 17:04:51 +0000 (17:04 +0000)]
REGRESSION (r222670 and r222732): RTL truncated text may not be drawn
https://bugs.webkit.org/show_bug.cgi?id=178278
<rdar://problem/34982818>

Reviewed by Darin Adler.

Source/WebCore:

Revert r222732 and partially revert r222670. The underlying font rendering machinery implements
text truncation by taking a TextRun object that represents all of the text in the line fragment
and a subrange of the glyphs to render from this fragment. Only the glyphs in this subrange are
drawn and they are drawn in the same position they would be in had the entire line fragment been
drawn. Following r222670 InlineTextBox applies the truncation to the TextRun in InlineTextBox::text().
Together with r222732, which assumed that the number of glyphs to draw is equal to the length of
the TextRun, a truncated text run would be drawn at the wrong position on screen and could give
the impression that the text is not drawn. Instead InlineTextBox::text() should always return
the text for the entire line fragment without considering truncation and when calling TextPainter::paint()
we need to pass the truncated length of the line fragment.

Test: fast/text/ellipsis-text-rtl.html

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint): Compute the truncated length (number of glyphs) and pass this
to TextPainter::paint()
(WebCore::InlineTextBox::text const): Do not apply truncation to the text run. Truncation is
implemented by telling the underlying font rendering machinery to paint the subrange of the
text run that represents the non-truncated (visible) text.
* rendering/InlineTextBox.h:
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintFlow): Pass the entire length of the text run as we did prior
to r222732.
* rendering/TextPainter.cpp:
(WebCore::TextPainter::paint): Take a length that represents the number of glyphs to draw from
the text run as we use to take prior to r222732.
* rendering/TextPainter.h:

LayoutTests:

Add a test to ensure that we draw right-to-left truncated text correctly.

* fast/text/ellipsis-text-rtl-expected.html: Added.
* fast/text/ellipsis-text-rtl.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223552 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months ago[FrameView::layout cleanup] Move text auto sizing logic to a separate function
zalan@apple.com [Tue, 17 Oct 2017 16:34:45 +0000 (16:34 +0000)]
[FrameView::layout cleanup] Move text auto sizing logic to a separate function
https://bugs.webkit.org/show_bug.cgi?id=178391
<rdar://problem/35030264>

Reviewed by Antti Koivisto.

No change in functionality.

* page/FrameView.cpp:
(WebCore::applyTextSizingIfNeeded):
(WebCore::FrameView::layout):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223551 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months ago[Curl] Forward declaration "class Cookie;" in CookieJarCurl.h should be "struct Cookie;"
commit-queue@webkit.org [Tue, 17 Oct 2017 16:20:26 +0000 (16:20 +0000)]
[Curl] Forward declaration "class Cookie;" in CookieJarCurl.h should be "struct Cookie;"
https://bugs.webkit.org/show_bug.cgi?id=178378

Patch by Yoshiaki Jitsukawa <Yoshiaki.Jitsukawa@sony.com> on 2017-10-17
Reviewed by Per Arne Vollan.

No new tests. No change in behaviors.

* platform/network/curl/CookieJarCurl.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223550 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months ago[FrameView::layout cleanup] Merge InPreLayout blocks
zalan@apple.com [Tue, 17 Oct 2017 16:17:38 +0000 (16:17 +0000)]
[FrameView::layout cleanup] Merge InPreLayout blocks
https://bugs.webkit.org/show_bug.cgi?id=178373

Reviewed by Antti Koivisto.

Remove redundant comment and scoping.

No change in functionality.

* page/FrameView.cpp:
(WebCore::FrameView::layout):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223549 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months ago[GStreamer][GTK][WPE] update-webkit-libs-jhbuild fails to detect changes in included...
nael.ouedraogo@crf.canon.fr [Tue, 17 Oct 2017 13:54:55 +0000 (13:54 +0000)]
[GStreamer][GTK][WPE] update-webkit-libs-jhbuild fails to detect changes in included moduleset files
https://bugs.webkit.org/show_bug.cgi?id=178206

Reviewed by Michael Catanzaro.

The update-webkit-libs-jhbuild scripts computes MD5 sum of GTK/WPE jhbuild configuration files to check if it
needs to rebuild the dependencies libraries. This patch fixes a bug when main GTK/WPE jhbuild modules
configuration file includes additional files (for example GStreamer module). It parses jhbuild.modules file to
check if additional files are included. If any, it computes MD5 sum for each of these included files.

* Scripts/update-webkit-libs-jhbuild:
(getJhbuildIncludedFilePaths): New function that returns included files in jhbuild.modules
(jhbuildConfigurationCheckFile): New function to check if MD5 sum file changes.
(jhbuildConfigurationChanged): Add MD5 sum check for included files.
(saveMd5File): New function to save MD5 sum of a file.
(saveJhbuildMd5): Add saving included files MD5 sum.
(deleteJhbuildMd5): Delete included files MD5 sum
* gtk/install-dependencies: Add perl-libXML lib that is used to parse jhbuild file.
* wpe/install-dependencies: Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223536 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months ago[JSC] __proto__ getter should be fast
utatane.tea@gmail.com [Tue, 17 Oct 2017 12:02:01 +0000 (12:02 +0000)]
[JSC] __proto__ getter should be fast
https://bugs.webkit.org/show_bug.cgi?id=178067

Reviewed by Saam Barati.

JSTests:

* stress/dfg-object-proto-accessor.js: Added.
(shouldBe):
(shouldThrow):
(target):
* stress/dfg-object-proto-getter.js: Added.
(shouldBe):
(shouldThrow):
(target):
* stress/dfg-object-prototype-of.js: Added.
(shouldBe):
(shouldThrow):
(target):
* stress/dfg-reflect-get-prototype-of.js: Added.
(shouldBe):
(shouldThrow):
(target):
* stress/object-get-prototype-of-filtered.js: Added.
(shouldBe):
(shouldThrow):
(target):
(i.Cocoa):
* stress/object-get-prototype-of-mono-proto.js: Added.
(shouldBe):
(makePolyProtoObject.foo.C):
(makePolyProtoObject.foo):
(makePolyProtoObject):
(target):
* stress/object-get-prototype-of-poly-mono-proto.js: Added.
(shouldBe):
(makePolyProtoObject.foo.C):
(makePolyProtoObject.foo):
(makePolyProtoObject):
(target):
* stress/object-get-prototype-of-poly-proto.js: Added.
(shouldBe):
(makePolyProtoObject.foo.C):
(makePolyProtoObject.foo):
(makePolyProtoObject):
(target):
* stress/object-proto-getter-filtered.js: Added.
(shouldBe):
(shouldThrow):
(target):
(i.Cocoa):
* stress/object-proto-getter-poly-mono-proto.js: Added.
(shouldBe):
(makePolyProtoObject.foo.C):
(makePolyProtoObject.foo):
(makePolyProtoObject):
(target):
* stress/object-proto-getter-poly-proto.js: Added.
(shouldBe):
(makePolyProtoObject.foo.C):
(makePolyProtoObject.foo):
(makePolyProtoObject):
(target):
* stress/object-prototype-proto-accessors-should-throw-on-undefined-this.js:
* stress/string-proto.js: Added.
(shouldBe):
(target):

Source/JavaScriptCore:

In our ES6 class implementation, we access __proto__ field to retrieve super constructor.
Currently, it is handled as an usual getter call to a generic function. And DFG just emits
Call node for this. It is inefficient since typically we know the `prototype` of the given
object when accessing `object.__proto__` since we emit CheckStructure for this `object`.
If Structure has mono proto, we can immediately fold it to constant value. If it is poly proto,
we can still change this to efficient access to poly proto slot.

This patch implements GetPrototypeOf DFG node. This node efficiently accesses to prototype of
the given object. And in AI and ByteCodeParser phase, we attempt to fold it to constant.
ByteCodeParser's folding is a bit important since we have `callee.__proto__` code to get super
constructor. If we can change this to constant, we can reify CallLinkInfo with this constant.
This paves the way to optimizing ArrayConstructor super calls[1], which is particularly important
for ARES-6 ML.

And we also optimize Reflect.getPrototypeOf and Object.getPrototypeOf with this GetPrototypeOf node.

Currently, __proto__ access for poly proto object is not handled well in IC. But we add code handling
poly proto in GetPrototypeOf since Reflect.getPrototypeOf and Object.getPrototypeOf can use it.
Once IC starts handling poly proto & intrinsic getter well, this code will be used for that too.

This patch improves SixSpeed super.es6 by 3.42x.

                         baseline                  patched

super.es6           123.6666+-3.9917     ^     36.1684+-1.0351        ^ definitely 3.4192x faster

[1]: https://bugs.webkit.org/show_bug.cgi?id=178064

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
(JSC::DFG::ByteCodeParser::handleIntrinsicGetter):
(JSC::DFG::ByteCodeParser::handleGetById):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::fixupGetPrototypeOf):
* dfg/DFGHeapLocation.cpp:
(WTF::printInternal):
* dfg/DFGHeapLocation.h:
* dfg/DFGNode.h:
(JSC::DFG::Node::hasHeapPrediction):
(JSC::DFG::Node::shouldSpeculateFunction):
* dfg/DFGNodeType.h:
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::speculateFunction):
(JSC::DFG::SpeculativeJIT::speculateFinalObject):
(JSC::DFG::SpeculativeJIT::compileGetPrototypeOf):
* 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::compileGetPrototypeOf):
(JSC::FTL::DFG::LowerDFGToB3::compileInstanceOf):
* jit/IntrinsicEmitter.cpp:
(JSC::IntrinsicGetterAccessCase::canEmitIntrinsicGetter):
(JSC::IntrinsicGetterAccessCase::emitIntrinsicGetter):
* runtime/Intrinsic.cpp:
(JSC::intrinsicName):
* runtime/Intrinsic.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncProtoGetter):
* runtime/JSGlobalObjectFunctions.h:
* runtime/ObjectConstructor.cpp:
* runtime/ReflectObject.cpp:

LayoutTests:

* js/object-literal-shorthand-construction-expected.txt:
* js/script-tests/object-literal-shorthand-construction.js:
(set 2):
(get 1):
* js/script-tests/sloppy-getter-setter-global-object.js:
* js/sloppy-getter-setter-global-object-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223523 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoText nodes with display:contents parent should render as if they were wrapped in...
antti@apple.com [Tue, 17 Oct 2017 10:18:19 +0000 (10:18 +0000)]
Text nodes with display:contents parent should render as if they were wrapped in an unstyled <span>
https://bugs.webkit.org/show_bug.cgi?id=178332

Reviewed by Ryosuke Niwa.

Source/WebCore:

According to https://github.com/w3c/csswg-drafts/issues/1118

    <div style="display:contents;color:green">text</div>

must result in green text even though div doesn't generate a box.

This patch implements the behavior by wrapping text renderers with display:contents parent element
in an anonymous inline box that receives its style by inheriting from the parent element.

* dom/Document.cpp:
(WebCore::Document::updateTextRenderer):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::computeFirstLineStyle const):

    Synthesize the first line style in display:contents parent case.

* rendering/RenderObject.cpp:
(WebCore::findDestroyRootIncludingAnonymous):

    Factor into a function.

(WebCore::RenderObject::removeFromParentAndDestroyCleaningUpAnonymousWrappers):

    Get rid of the anonymous wrapper if it exists.

* rendering/RenderText.cpp:
(WebCore::inlineWrapperForDisplayContentsMap):
(WebCore::RenderText::RenderText):
(WebCore::RenderText::willBeDestroyed):
(WebCore::RenderText::inlineWrapperForDisplayContents):
(WebCore::RenderText::setInlineWrapperForDisplayContents):

    Add a weak member (implemented as a rare data map) for holding the wrapper pointer.

(WebCore::RenderText::findByDisplayContentsInlineWrapperCandidate):

    Helper to get the text renderer for a wrapper.

* rendering/RenderText.h:
* style/RenderTreeUpdater.cpp:
(WebCore::createTextRenderer):
(WebCore::RenderTreeUpdater::updateTextRenderer):

    Create the wrapper if needed.

* style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::resolveComposedTree):

    Compute the wrapper style by inheriting from the display:contents parent.

* style/StyleUpdate.h:
(WebCore::Style::TextUpdate::TextUpdate):

LayoutTests:

* TestExpectations: 10 more display:contents tests pass.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223514 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months ago[MSE][GStreamer] Insert parser elements in AppendPipeline when demuxing opus or Vorbis
commit-queue@webkit.org [Tue, 17 Oct 2017 09:40:47 +0000 (09:40 +0000)]
[MSE][GStreamer] Insert parser elements in AppendPipeline when demuxing opus or Vorbis
https://bugs.webkit.org/show_bug.cgi?id=178076

Patch by Alicia Boya García <aboya@igalia.com> on 2017-10-17
Reviewed by Xabier Rodriguez-Calvar.

YouTube does not include durations in the WebM container for files
containing Opus audio, so we need to read them from the contained
stream. Fortunately, GStreamer has an element to do that: opusparse.

The same thing happens with Vorbis contained in WebM files from the
W3C tests, which should also be fixed by the GStreamer element
vorbisparse.

This patch adds an opusparse or vorbisparse element to the
AppendPipeline at the sinkpad of the demuxer when either is found.

Tests: updated expectations.

Source/WebCore:

* platform/graphics/gstreamer/mse/AppendPipeline.cpp:
(WebCore::AppendPipeline::appsinkNewSample):
(WebCore::createOptionalParserForFormat):
(WebCore::AppendPipeline::connectDemuxerSrcPadToAppsinkFromAnyThread):
(WebCore::AppendPipeline::disconnectDemuxerSrcPadFromAppsinkFromAnyThread):
* platform/graphics/gstreamer/mse/AppendPipeline.h:
* platform/graphics/gstreamer/mse/GStreamerMediaSample.cpp:
(WebCore::GStreamerMediaSample::GStreamerMediaSample):
* platform/graphics/gstreamer/mse/PlaybackPipeline.cpp:
(WebCore::PlaybackPipeline::attachTrack):

LayoutTests:

* platform/gtk/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223505 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoUndefined WK_API_ENABLED warning when compiling COCOA content on WebKitGTK+
tpopela@redhat.com [Tue, 17 Oct 2017 09:38:54 +0000 (09:38 +0000)]
Undefined WK_API_ENABLED warning when compiling COCOA content on WebKitGTK+
https://bugs.webkit.org/show_bug.cgi?id=178208

Check whether we are on COCOA platform before checking for
WK_API_ENABLED.

Reviewed by Ryosuke Niwa.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::clearDOMCache):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223502 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoAdd WebGL2 texImage3D overloads.
Ms2ger@igalia.com [Tue, 17 Oct 2017 09:30:44 +0000 (09:30 +0000)]
Add WebGL2 texImage3D overloads.
https://bugs.webkit.org/show_bug.cgi?id=178119

Reviewed by Ryosuke Niwa.

No new tests: not much point in adding tests now; this method doesn't
do anything anyway.

* html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::texImage3D):
* html/canvas/WebGL2RenderingContext.h:
* html/canvas/WebGL2RenderingContext.idl:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223501 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoResolve ::before and ::after pseudo elements during style resolution
antti@apple.com [Tue, 17 Oct 2017 09:21:05 +0000 (09:21 +0000)]
Resolve ::before and ::after pseudo elements during style resolution
https://bugs.webkit.org/show_bug.cgi?id=178339

Reviewed by Ryosuke Niwa.

They are currently resolved during render tree building which creates problems with display:contents and animations.

* dom/PseudoElement.cpp:
(WebCore::PseudoElement::PseudoElement):

    Call InspectorInstrumentation from constructor.

* style/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::Parent::Parent):
(WebCore::RenderTreeUpdater::updateRenderTree):
(WebCore::RenderTreeUpdater::pushParent):

    Push the full update to the parent stack.

(WebCore::RenderTreeUpdater::popParent):
(WebCore::RenderTreeUpdater::updateBeforeDescendants):
(WebCore::RenderTreeUpdater::updateAfterDescendants):
(WebCore::RenderTreeUpdater::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded):
* style/RenderTreeUpdater.h:
* style/RenderTreeUpdaterGeneratedContent.cpp:
(WebCore::RenderTreeUpdater::GeneratedContent::updatePseudoElement):

    No need to resolve pseudo style, we have it already.

(WebCore::RenderTreeUpdater::GeneratedContent::needsPseudoElement):
(WebCore::RenderTreeUpdater::GeneratedContent::updateBeforePseudoElement): Deleted.
(WebCore::RenderTreeUpdater::GeneratedContent::updateAfterPseudoElement): Deleted.
* style/RenderTreeUpdaterGeneratedContent.h:
* style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::resolveElement):
(WebCore::Style::TreeResolver::resolvePseudoStyle):

    Resolve pseudos.

(WebCore::Style::TreeResolver::createAnimatedElementUpdate):

    Make a private member function.

(WebCore::Style::TreeResolver::resolveComposedTree):
* style/StyleTreeResolver.h:
* style/StyleUpdate.cpp:
(WebCore::Style::Update::elementUpdates const):
(WebCore::Style::Update::elementUpdates):

    Bundle the style update for an element and the associated before/after pseudos.

(WebCore::Style::Update::elementStyle const):
(WebCore::Style::Update::elementStyle):
(WebCore::Style::Update::addElement):
(WebCore::Style::Update::elementUpdate const): Deleted.
(WebCore::Style::Update::elementUpdate): Deleted.
* style/StyleUpdate.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223500 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months ago[GStreamer][MSE] Unreviewed microgardening
commit-queue@webkit.org [Tue, 17 Oct 2017 07:12:04 +0000 (07:12 +0000)]
[GStreamer][MSE] Unreviewed microgardening
https://bugs.webkit.org/show_bug.cgi?id=178344

Updates the following expectations:

- imported/w3c/web-platform-tests/media-source/mediasource-is-type-supported.html

  Updated with current output (as a prerequisite to land this:
  https://bugs.webkit.org/show_bug.cgi?id=178160, which improves the
  -expected output a bit)

- imported/w3c/web-platform-tests/media-source/SourceBuffer-abort*.html

  Marked them as passing, as they have been passing for a while.

- imported/w3c/web-platform-tests/media-source/mediasource-play-then-seek-back.html
  imported/w3c/web-platform-tests/media-source/mediasource-sourcebuffer-mode.html

  Marked them as passing. They were crashing on the build bot because
  the changes of https://bugs.webkit.org/show_bug.cgi?id=176804 were
  not being built, but Carlos López is already working on that.

Patch by Alicia Boya García <aboya@igalia.com> on 2017-10-17

* platform/gtk/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223477 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoChange WebCore sources to work with unified source builds
keith_miller@apple.com [Tue, 17 Oct 2017 07:10:58 +0000 (07:10 +0000)]
Change WebCore sources to work with unified source builds
https://bugs.webkit.org/show_bug.cgi?id=178229

Rubber stamped by Tim Horton.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

This patch does the following:

1) Move all “using namespace <name>;” into the WebCore namespace
(They used to go in the global namespace) and change to "using
WebCore::<name>;” in .mm files.

2) Move a bunch of the soft linking library/framework macros out
of the .mm files since those caused name collision problems.

3) Fix minor other naming collisions.

The problem with 1 in a unified source world is generic names
often collide with system header names. For example, WebCore has a
Rect class and that collided with a system header type elsewhere.

This patch shouldn't change behavior so no new tests.

* Configurations/FeatureDefines.xcconfig:
* Modules/cache/CacheStorageConnection.cpp:
* Modules/cache/DOMCache.cpp:
* Modules/cache/DOMCacheStorage.cpp:
* Modules/cache/WorkerCacheStorageConnection.cpp:
* Modules/encryptedmedia/InitDataRegistry.cpp:
* Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp:
* Modules/indexeddb/IDBCursor.cpp:
* Modules/indexeddb/IDBFactory.cpp:
* Modules/indexeddb/IDBIndex.cpp:
* Modules/indexeddb/IDBKeyRange.cpp:
* Modules/indexeddb/IDBObjectStore.cpp:
* Modules/indexeddb/IDBRequest.cpp:
* Modules/indexeddb/IDBTransaction.cpp:
* Modules/indexeddb/server/MemoryObjectStore.cpp:
* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::setReadyState):
(WebCore::toString): Deleted.
* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
* Modules/plugins/QuickTimePluginReplacement.mm:
(WebCore::jsValueWithAVMetadataItemInContext):
* Modules/webdriver/NavigatorWebDriver.cpp:
* PlatformAppleWin.cmake:
* PlatformMac.cmake:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/ios/AccessibilityObjectIOS.mm:
(-[WAKView accessibilityIsIgnored]): Deleted.
* accessibility/ios/WebAccessibilityObjectWrapperIOS.h:
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WAKView accessibilityIsIgnored]):
* accessibility/win/AXObjectCacheWin.cpp:
* bindings/js/CommonVM.cpp:
* bindings/js/DOMWrapperWorld.cpp:
* bindings/js/GCController.cpp:
* bindings/js/IDBBindingUtilities.cpp:
* bindings/js/JSAudioTrackCustom.cpp:
* bindings/js/JSAudioTrackListCustom.cpp:
* bindings/js/JSBlobCustom.cpp:
* bindings/js/JSCSSRuleCustom.cpp:
* bindings/js/JSCSSRuleListCustom.cpp:
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
* bindings/js/JSCallbackData.cpp:
* bindings/js/JSCanvasRenderingContext2DCustom.cpp:
* bindings/js/JSCustomElementInterface.cpp:
* bindings/js/JSCustomElementRegistryCustom.cpp:
* bindings/js/JSCustomEventCustom.cpp:
* bindings/js/JSDOMBindingSecurity.cpp:
* bindings/js/JSDOMBuiltinConstructorBase.cpp:
* bindings/js/JSDOMConstructorBase.cpp:
* bindings/js/JSDOMConstructorWithDocument.cpp:
* bindings/js/JSDOMConvertDate.cpp:
* bindings/js/JSDOMConvertNumbers.cpp:
* bindings/js/JSDOMConvertStrings.cpp:
* bindings/js/JSDOMConvertWebGL.cpp:
* bindings/js/JSDOMExceptionHandling.cpp:
* bindings/js/JSDOMGlobalObject.cpp:
* bindings/js/JSDOMGlobalObjectTask.cpp:
* bindings/js/JSDOMGuardedObject.cpp:
* bindings/js/JSDOMPromiseDeferred.cpp:
* bindings/js/JSDOMQuadCustom.cpp:
* bindings/js/JSDOMWindowBase.cpp:
* bindings/js/JSDOMWindowCustom.cpp:
* bindings/js/JSDOMWindowProxy.cpp:
* bindings/js/JSDOMWrapper.cpp:
* bindings/js/JSDOMWrapperCache.cpp:
* bindings/js/JSDeprecatedCSSOMValueCustom.cpp:
* bindings/js/JSDocumentCustom.cpp:
* bindings/js/JSDocumentFragmentCustom.cpp:
* bindings/js/JSElementCustom.cpp:
* bindings/js/JSErrorHandler.cpp:
* bindings/js/JSEventCustom.cpp:
* bindings/js/JSEventListener.cpp:
* bindings/js/JSEventTargetCustom.cpp:
* bindings/js/JSFileSystemEntryCustom.cpp:
* bindings/js/JSHTMLCollectionCustom.cpp:
* bindings/js/JSHTMLDocumentCustom.cpp:
* bindings/js/JSHTMLTemplateElementCustom.cpp:
* bindings/js/JSHistoryCustom.cpp:
* bindings/js/JSIDBCursorCustom.cpp:
* bindings/js/JSIDBCursorWithValueCustom.cpp:
* bindings/js/JSIDBIndexCustom.cpp:
* bindings/js/JSIDBObjectStoreCustom.cpp:
* bindings/js/JSIDBTransactionCustom.cpp:
* bindings/js/JSImageDataCustom.cpp:
* bindings/js/JSLazyEventListener.cpp:
* bindings/js/JSLocationCustom.cpp:
* bindings/js/JSMediaStreamCapabilitiesCustom.cpp:
* bindings/js/JSMessageEventCustom.cpp:
* bindings/js/JSMessagePortCustom.cpp:
* bindings/js/JSMutationObserverCustom.cpp:
* bindings/js/JSNodeCustom.cpp:
* bindings/js/JSNodeListCustom.cpp:
* bindings/js/JSPerformanceEntryCustom.cpp:
* bindings/js/JSPluginElementFunctions.cpp:
* bindings/js/JSPopStateEventCustom.cpp:
* bindings/js/JSReadableStreamPrivateConstructors.cpp:
* bindings/js/JSReadableStreamSourceCustom.cpp:
* bindings/js/JSSVGPathSegCustom.cpp:
* bindings/js/JSTextTrackCueCustom.cpp:
* bindings/js/JSTextTrackCustom.cpp:
* bindings/js/JSTextTrackListCustom.cpp:
* bindings/js/JSTrackCustom.cpp:
* bindings/js/JSVideoTrackCustom.cpp:
* bindings/js/JSVideoTrackListCustom.cpp:
* bindings/js/JSWebGL2RenderingContextCustom.cpp:
* bindings/js/JSWebGLRenderingContextCustom.cpp:
* bindings/js/JSWebGPURenderPassAttachmentDescriptorCustom.cpp:
* bindings/js/JSWebGPURenderingContextCustom.cpp:
* bindings/js/JSWorkerGlobalScopeBase.cpp:
* bindings/js/JSWorkerGlobalScopeCustom.cpp:
* bindings/js/JSXMLHttpRequestCustom.cpp:
* bindings/js/JSXPathNSResolverCustom.cpp:
* bindings/js/ReadableStream.cpp:
(WebCore::ReadableStream::pipeTo):
(WebCore::ReadableStream::tee):
(WebCore::checkReadableStream):
(WebCore::callFunction): Deleted.
* bindings/js/ScheduledAction.cpp:
* bindings/js/ScriptCachedFrameData.cpp:
* bindings/js/ScriptController.cpp:
* bindings/js/SerializedScriptValue.cpp:
* bindings/js/StructuredClone.cpp:
* bindings/js/WebCoreJSClientData.cpp:
* bindings/js/WorkerScriptController.cpp:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateEnumerationImplementation):
(GenerateImplementation):
(GenerateDictionaryImplementation):
(GenerateCallbackFunctionImplementation):
(GenerateCallbackInterfaceImplementation):
* bindings/scripts/test/JS/JSInterfaceName.cpp:
* bindings/scripts/test/JS/JSMapLike.cpp:
* bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
* bindings/scripts/test/JS/JSTestCEReactions.cpp:
* bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
* bindings/scripts/test/JS/JSTestCallTracer.cpp:
* bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
* bindings/scripts/test/JS/JSTestCallbackFunctionRethrow.cpp:
* bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.cpp:
* bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp:
* bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
* bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
* bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
* bindings/scripts/test/JS/JSTestDOMJIT.cpp:
* bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
* bindings/scripts/test/JS/JSTestException.cpp:
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
* bindings/scripts/test/JS/JSTestGlobalObject.cpp:
* bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
* bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
* bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
* bindings/scripts/test/JS/JSTestIterable.cpp:
* bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
* bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
* bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
* bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
* bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
* bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
* bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
* bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
* bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
* bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
* bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
* bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
* bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
* bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
* bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
* bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
* bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
* bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
* bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
* bindings/scripts/test/JS/JSTestNode.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
* bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
* bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
* bindings/scripts/test/JS/JSTestPluginInterface.cpp:
* bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
* bindings/scripts/test/JS/JSTestSerialization.cpp:
* bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp:
* bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
* bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
* bindings/scripts/test/JS/JSTestStandaloneEnumeration.cpp:
* bindings/scripts/test/JS/JSTestStringifier.cpp:
* bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
* bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
* bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
* bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
* bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
* bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
* bindings/scripts/test/JS/JSTestVoidCallbackFunction.cpp:
* bridge/IdentifierRep.cpp:
* bridge/NP_jsobject.cpp:
(ObjectMap::get): Deleted.
(ObjectMap::add): Deleted.
(ObjectMap::remove): Deleted.
(objectMap): Deleted.
(ObjectMap::RootObjectInvalidationCallback::operator()): Deleted.
(getListFromVariantArgs): Deleted.
(jsAllocate): Deleted.
(jsDeallocate): Deleted.
(_NPN_CreateNoScriptObject): Deleted.
(_NPN_InvokeDefault): Deleted.
(_NPN_Invoke): Deleted.
(_NPN_Evaluate): Deleted.
(_NPN_GetProperty): Deleted.
(_NPN_SetProperty): Deleted.
(_NPN_RemoveProperty): Deleted.
(_NPN_HasProperty): Deleted.
(_NPN_HasMethod): Deleted.
(_NPN_SetException): Deleted.
(_NPN_Enumerate): Deleted.
(_NPN_Construct): Deleted.
* bridge/NP_jsobject.h:
* contentextensions/ContentExtensionParser.cpp:
* crypto/SubtleCrypto.cpp:
* crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
(WebCore::CryptoAlgorithmAES_CBC::encrypt):
(WebCore::CryptoAlgorithmAES_CBC::decrypt):
(WebCore::CryptoAlgorithmAES_CBC::importKey):
(WebCore::CryptoAlgorithmAES_CBC::exportKey):
* crypto/algorithms/CryptoAlgorithmAES_CFB.cpp:
(WebCore::CryptoAlgorithmAES_CFB::encrypt):
(WebCore::CryptoAlgorithmAES_CFB::decrypt):
(WebCore::CryptoAlgorithmAES_CFB::importKey):
(WebCore::CryptoAlgorithmAES_CFB::exportKey):
* crypto/algorithms/CryptoAlgorithmAES_CTR.cpp:
(WebCore::parametersAreValid):
(WebCore::CryptoAlgorithmAES_CTR::importKey):
(WebCore::CryptoAlgorithmAES_CTR::exportKey):
* crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:
(WebCore::tagLengthIsValid):
(WebCore::CryptoAlgorithmAES_GCM::encrypt):
(WebCore::CryptoAlgorithmAES_GCM::decrypt):
(WebCore::CryptoAlgorithmAES_GCM::importKey):
(WebCore::CryptoAlgorithmAES_GCM::exportKey):
* crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
(WebCore::CryptoAlgorithmAES_KW::importKey):
(WebCore::CryptoAlgorithmAES_KW::exportKey):
* crypto/algorithms/CryptoAlgorithmHMAC.cpp:
(WebCore::CryptoAlgorithmHMAC::importKey):
(WebCore::CryptoAlgorithmHMAC::exportKey):
* crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::exportKey):
* crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
(WebCore::CryptoAlgorithmRSA_OAEP::importKey):
(WebCore::CryptoAlgorithmRSA_OAEP::exportKey):
* crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:
(WebCore::CryptoAlgorithmRSA_PSS::importKey):
(WebCore::CryptoAlgorithmRSA_PSS::exportKey):
* crypto/mac/CryptoAlgorithmPBKDF2Mac.cpp:
(WebCore::CryptoAlgorithmPBKDF2::platformDeriveBits):
(WebCore::commonCryptoHMACAlgorithm): Deleted.
* css/CSSBasicShapes.cpp:
* css/CSSPrimitiveValue.cpp:
* css/parser/CSSParser.cpp:
* css/parser/CSSPropertyParser.cpp:
* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::positionFromThreeOrFourValues):
(WebCore::CSSPropertyParserHelpers::consumePosition):
(WebCore::CSSPropertyParserHelpers::createPrimitiveValuePair): Deleted.
* dom/DOMQuad.cpp:
* dom/Document.cpp:
* dom/ErrorEvent.cpp:
* dom/EventListenerMap.cpp:
* dom/EventTarget.cpp:
* dom/PromiseRejectionEvent.cpp:
* dom/RejectedPromiseTracker.cpp:
* dom/ScriptExecutionContext.cpp:
* domjit/JSDocumentDOMJIT.cpp:
* domjit/JSDocumentFragmentDOMJIT.cpp:
* domjit/JSElementDOMJIT.cpp:
* domjit/JSEventDOMJIT.cpp:
* domjit/JSNodeDOMJIT.cpp:
* editing/TextIterator.cpp:
* editing/cocoa/HTMLConverter.mm:
* history/CachedPage.cpp:
* html/HTMLCanvasElement.cpp:
* html/HTMLFontElement.cpp:
* html/HTMLMediaElement.cpp:
* html/HTMLSelectElement.cpp:
* html/TypeAhead.cpp:
* html/parser/HTMLSrcsetParser.cpp:
(WebCore::tokenizeDescriptors):
* html/parser/HTMLTokenizer.cpp:
* html/parser/ParsingUtilities.h:
(WebCore::isNotASCIISpace):
* html/parser/XSSAuditorDelegate.cpp:
* html/track/DataCue.cpp:
* inspector/CommandLineAPIHost.cpp:
* inspector/CommandLineAPIModule.cpp:
* inspector/InspectorApplicationCacheAgent.cpp:
* inspector/InspectorCSSAgent.cpp:
* inspector/InspectorCanvas.cpp:
* inspector/InspectorCanvasAgent.cpp:
* inspector/InspectorClient.cpp:
* inspector/InspectorController.cpp:
* inspector/InspectorDOMAgent.cpp:
* inspector/InspectorDOMDebuggerAgent.cpp:
* inspector/InspectorDOMStorageAgent.cpp:
* inspector/InspectorDatabaseAgent.cpp:
* inspector/InspectorDatabaseResource.cpp:
* inspector/InspectorFrontendClientLocal.cpp:
* inspector/InspectorFrontendHost.cpp:
* inspector/InspectorIndexedDBAgent.cpp:
* inspector/InspectorInstrumentation.cpp:
* inspector/InspectorLayerTreeAgent.cpp:
* inspector/InspectorMemoryAgent.cpp:
* inspector/InspectorNetworkAgent.cpp:
* inspector/InspectorOverlay.cpp:
* inspector/InspectorPageAgent.cpp:
* inspector/InspectorShaderProgram.cpp:
* inspector/InspectorStyleSheet.cpp:
* inspector/InspectorTimelineAgent.cpp:
* inspector/InspectorWorkerAgent.cpp:
* inspector/InstrumentingAgents.cpp:
* inspector/NetworkResourcesData.cpp:
* inspector/PageConsoleAgent.cpp:
* inspector/PageDebuggerAgent.cpp:
* inspector/PageHeapAgent.cpp:
* inspector/PageRuntimeAgent.cpp:
* inspector/PageScriptDebugServer.cpp:
* inspector/TimelineRecordFactory.cpp:
* inspector/WebConsoleAgent.cpp:
* inspector/WebDebuggerAgent.cpp:
* inspector/WebHeapAgent.cpp:
* inspector/WebInjectedScriptHost.cpp:
* inspector/WebInjectedScriptManager.cpp:
* inspector/WorkerConsoleAgent.cpp:
* inspector/WorkerDebuggerAgent.cpp:
* inspector/WorkerInspectorController.cpp:
* inspector/WorkerRuntimeAgent.cpp:
* inspector/WorkerScriptDebugServer.cpp:
* loader/FTPDirectoryParser.cpp:
* loader/TextResourceDecoder.cpp:
* loader/cache/CachedResource.cpp:
* loader/cache/CachedResourceLoader.cpp:
* page/ContextMenuController.cpp:
* page/DOMWindow.cpp:
* page/Navigator.cpp:
* page/PageConsoleClient.cpp:
* page/PageDebuggable.cpp:
* page/cocoa/ResourceUsageOverlayCocoa.mm:
* page/csp/ContentSecurityPolicy.cpp:
* page/csp/ContentSecurityPolicyDirectiveList.cpp:
(WebCore::isNotASCIISpace): Deleted.
* page/csp/ContentSecurityPolicyMediaListDirective.cpp:
(WebCore::isNotASCIISpace): Deleted.
* page/scrolling/ios/ScrollingTreeIOS.cpp:
* page/scrolling/ios/ScrollingTreeIOS.h:
* page/scrolling/mac/ScrollingTreeFixedNode.mm:
(WebCore::ScrollingTreeFixedNode::updateLayersAfterAncestorChange):
(WebCore::operator*): Deleted.
* page/scrolling/mac/ScrollingTreeStickyNode.mm:
(WebCore::ScrollingTreeStickyNode::updateLayersAfterAncestorChange):
(WebCore::operator*): Deleted.
* platform/Length.cpp:
* platform/URL.cpp:
(WebCore::isSchemeFirstChar):
(WebCore::isSchemeChar):
(WebCore::isBadChar):
(WebCore::isTabNewline):
* platform/audio/WebAudioBufferList.cpp:
(WebCore::WebAudioBufferList::WebAudioBufferList):
* platform/audio/mac/AudioSampleDataSource.mm:
(WebCore::AudioSampleDataSource::pushSamples):
* platform/cf/CoreMediaSoftLink.cpp: Removed.
* platform/cf/CoreMediaSoftLink.h: Removed.
* platform/encryptedmedia/clearkey/CDMClearKey.cpp:
* platform/graphics/FloatPolygon.cpp:
(WebCore::areCollinearPoints):
(WebCore::FloatPolygon::FloatPolygon):
(WebCore::VertexPair::intersection const):
(WebCore::determinant): Deleted.
* platform/graphics/FontCache.cpp:
* platform/graphics/FontCascade.cpp:
* platform/graphics/GraphicsContext3DPrivate.cpp:
* platform/graphics/WidthIterator.cpp:
* platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
(WebCore::AudioSourceProviderAVFObjC::process):
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::InbandTextTrackPrivateAVF::processCueAttributes):
(WebCore::InbandTextTrackPrivateAVF::processNativeSamples):
(WebCore::InbandTextTrackPrivateAVF::readNativeSampleBuffer):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
* platform/graphics/avfoundation/objc/AVAssetTrackUtilities.mm:
(WebCore::assetTrackMeetsHardwareDecodeRequirements):
* platform/graphics/avfoundation/objc/AVFoundationMIMETypeCache.mm:
* platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
(WebCore::ImageDecoderAVFObjC::readSampleMetadata):
(WebCore::ImageDecoderAVFObjC::storeSampleBuffer):
(WebCore::ImageDecoderAVFObjC::frameIsCompleteAtIndex const):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createImageGenerator):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
* platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
* platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
* platform/graphics/ca/win/WebTiledBackingLayerWin.cpp:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
* platform/graphics/cairo/ImageBufferCairo.cpp:
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::ImageBuffer):
(WebCore::releaseImageData): Deleted.
* platform/graphics/cg/ImageBufferDataCG.h:
* platform/graphics/cocoa/WebCoreDecompressionSession.mm:
* platform/graphics/gstreamer/ImageGStreamerCairo.cpp:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
* platform/graphics/ios/DisplayRefreshMonitorIOS.mm:
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
* platform/graphics/opentype/OpenTypeMathData.cpp:
* platform/graphics/opentype/OpenTypeVerticalData.cpp:
* platform/graphics/transforms/MatrixTransformOperation.cpp:
(WebCore::MatrixTransformOperation::blend):
(WebCore::createOperation): Deleted.
* platform/graphics/win/FontPlatformDataCairoWin.cpp:
* platform/graphics/win/FontWin.cpp:
* platform/graphics/win/GraphicsContextCGWin.cpp:
* platform/graphics/win/GraphicsContextCairoWin.cpp:
* platform/graphics/win/GraphicsContextDirect2D.cpp:
* platform/graphics/win/GraphicsContextWin.cpp:
* platform/graphics/win/UniscribeController.cpp:
* platform/image-decoders/ScalableImageDecoder.cpp:
(): Deleted.
* platform/ios/LegacyTileLayer.mm:
(-[LegacyTileHostLayer renderInContext:]):
* platform/ios/PlaybackSessionInterfaceAVKit.mm:
* platform/ios/ScrollAnimatorIOS.mm:
* platform/ios/VideoFullscreenInterfaceAVKit.mm:
* platform/ios/WebAVPlayerController.mm:
(-[WebAVPlayerController skipBackwardThirtySeconds:]):
(-[WebAVPlayerController gotoEndOfSeekableRanges:]):
(-[WebAVPlayerController canSeekToBeginning]):
(-[WebAVPlayerController canSeekToEnd]):
(-[WebAVPlayerController observeValueForKeyPath:ofObject:change:context:]):
(-[WebAVPlayerController updateMinMaxTiming]):
* platform/ios/WebEvent.mm:
* platform/ios/WebItemProviderPasteboard.mm:
* platform/ios/wak/WKContentObservation.cpp:
* platform/mac/KeyEventMac.mm:
* platform/mac/PlaybackSessionInterfaceMac.mm:
(WebCore::timeRangesToArray):
* platform/mac/ScrollAnimatorMac.mm:
(macScrollbarTheme): Deleted.
(scrollerImpForScrollbar): Deleted.
* platform/mac/ScrollbarThemeMac.mm:
(WebCore::scrollbarMap):
* platform/mac/VideoFullscreenInterfaceMac.mm:
* platform/mac/WebCoreFullScreenPlaceholderView.mm:
* platform/mac/WebCoreNSURLExtras.mm:
(WebCore::dataForURLComponentType):
* platform/mac/WebPlaybackControlsManager.mm:
* platform/mac/WebVideoFullscreenController.mm:
(SOFT_LINK_CLASS): Deleted.
* platform/mac/WebVideoFullscreenHUDWindowController.mm:
* platform/mac/WebWindowAnimation.mm:
(WebWindowAnimationDurationFromDuration): Deleted.
(scaledRect): Deleted.
(squaredDistance): Deleted.
* platform/mediastream/RealtimeOutgoingVideoSource.cpp:
* platform/mediastream/mac/AVCaptureDeviceManager.mm:
* platform/mediastream/mac/AVMediaCaptureSource.mm:
* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::applyFrameRate):
(WebCore::AVVideoCaptureSource::processNewFrame):
* platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp:
* platform/mediastream/mac/CoreAudioCaptureDevice.cpp:
* platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:
* platform/mediastream/mac/CoreAudioCaptureSource.cpp:
* platform/mediastream/mac/MockRealtimeAudioSourceMac.mm:
* platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:
(WebCore::MockRealtimeVideoSourceMac::CMSampleBufferFromPixelBuffer):
* platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp:
* platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.cpp:
* platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp:
* platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm:
* platform/network/HTTPParsers.cpp:
* platform/text/LocaleICU.cpp:
* platform/text/TextCodecLatin1.cpp:
* platform/text/TextCodecUTF8.cpp:
* platform/text/TextEncodingRegistry.cpp:
* platform/text/win/LocaleWin.cpp:
* platform/win/BString.cpp:
* platform/win/KeyEventWin.cpp:
* platform/win/ScrollbarThemeWin.cpp:
* rendering/BidiRun.cpp:
* rendering/FloatingObjects.cpp:
* rendering/RenderBlock.cpp:
* rendering/RenderListMarker.cpp:
* rendering/RenderQuote.cpp:
* rendering/RenderText.cpp:
* rendering/RenderThemeWin.cpp:
* testing/Internals.cpp:
* testing/js/WebCoreTestSupport.cpp:
* workers/WorkerConsoleClient.cpp:
* workers/WorkerGlobalScope.cpp:
* workers/WorkerInspectorProxy.cpp:
* xml/SoftLinkLibxslt.cpp: Added.
* xml/SoftLinkLibxslt.h: Added.
* xml/XPathGrammar.cpp:
* xml/XPathParser.cpp:
* xml/XSLStyleSheetLibxslt.cpp:
* xml/XSLTExtensions.cpp:
* xml/XSLTProcessorLibxslt.cpp:
* xml/XSLTUnicodeSort.cpp:
(xsltTransformErrorTrampoline):
(WebCore::xsltUnicodeSortFunction):
* xml/parser/XMLDocumentParser.cpp:
(WebCore::XMLDocumentParser::updateLeafTextNode):
(WebCore::toString): Deleted.

Source/WebCore/PAL:

Move soft linking code from WebCore to PAL.

* Configurations/FeatureDefines.xcconfig:
* pal/cf/CoreMediaSoftLink.cpp:
* pal/cf/CoreMediaSoftLink.h:
* pal/spi/cocoa/NSAttributedStringSPI.h:

Source/WebKit:

* Configurations/FeatureDefines.xcconfig:

Source/WebKitLegacy/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

* wtf/Platform.h:
* wtf/cocoa/SoftLinking.h:

Tools:

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223476 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoAllow reading data and blob URLs via DataTransfer when the pasteboard contains files
wenson_hsieh@apple.com [Tue, 17 Oct 2017 06:56:00 +0000 (06:56 +0000)]
Allow reading data and blob URLs via DataTransfer when the pasteboard contains files
https://bugs.webkit.org/show_bug.cgi?id=178377

Reviewed by Ryosuke Niwa.

Source/WebCore:

Adds data and blob URLs, alongside http(s), as URL protocols safe to expose to bindings.

Test: editing/pasteboard/drag-drop-href-as-url.html

* platform/Pasteboard.cpp:
(WebCore::Pasteboard::canExposeURLToDOMWhenPasteboardContainsFiles):

LayoutTests:

Tweaks an existing layout test to test dragging and dropping more URL protocols (ftp:, data: and blob:).

* editing/pasteboard/drag-drop-href-as-url-expected.txt:
* editing/pasteboard/drag-drop-href-as-url.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223471 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoStrip away event handlers and JavaScript URLs when copying
rniwa@webkit.org [Tue, 17 Oct 2017 06:25:55 +0000 (06:25 +0000)]
Strip away event handlers and JavaScript URLs when copying
https://bugs.webkit.org/show_bug.cgi?id=178375

Reviewed by Wenson Hsieh.

Source/WebCore:

Don't serialize event handlers and URLs with javascript protocol when serializing HTML
since they're not safe to be pasted elsewhere.

Test: editing/pasteboard/copying-html-strips-javascript-url-and-event-handler.html

* dom/Element.cpp:
(WebCore::Element::isEventHandlerAttribute const):
(WebCore::isEventHandlerAttribute): Deleted.
* dom/Element.h:
* editing/markup.cpp:
(WebCore::StyledMarkupAccumulator::appendElement):

LayoutTests:

Added a regression test.

* editing/pasteboard/copying-html-strips-javascript-url-and-event-handler-expected.txt: Added.
* editing/pasteboard/copying-html-strips-javascript-url-and-event-handler.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223462 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoWebGL clamps drawingBufferWidth to 4096 pixels on a 5120 monitor/canvas
dino@apple.com [Tue, 17 Oct 2017 06:21:46 +0000 (06:21 +0000)]
WebGL clamps drawingBufferWidth to 4096 pixels on a 5120 monitor/canvas
https://bugs.webkit.org/show_bug.cgi?id=178223
<rdar://problem/34597567>

Reviewed by Antoine Quint.

Source/WebCore:

Remove the limit of 4k on the width/height of the renderbuffer.

Test: fast/canvas/webgl/large-drawing-buffer-resize.html

* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::reshape):

LayoutTests:

Test that resizes an already large buffer to make sure it
doesn't get clamped to 4k.

* fast/canvas/webgl/large-drawing-buffer-resize-expected.txt: Added.
* fast/canvas/webgl/large-drawing-buffer-resize.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223459 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoAssert that Node::insertedInto doesn't fire an event
rniwa@webkit.org [Tue, 17 Oct 2017 05:52:38 +0000 (05:52 +0000)]
Assert that Node::insertedInto doesn't fire an event
https://bugs.webkit.org/show_bug.cgi?id=178376
<rdar://problem/35022857>

Reviewed by Daniel Bates.

Fixed the assertion in notifyChildNodeInserted since this function MUST NOT dispatch an event,
and moved a bunch of event-dispatching code from Node::insertedInto into Node::finishedInsertingSubtree.

No new tests since the existing tests cover the behavioral change.

* dom/ContainerNodeAlgorithms.cpp:
(WebCore::notifyChildNodeInserted): Fixed the assertion.
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::insertedInto):
(WebCore::ProcessingInstruction::finishedInsertingSubtree): Extracted from insertedInto since
checkStyleSheet can dispatch an event.
* dom/ProcessingInstruction.h:
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::insertedInto):
(WebCore::HTMLBodyElement::finishedInsertingSubtree): Extracted from insertedInto since
setIntegralAttribute could dispatch DOMAttrModified synchronously.
* html/HTMLBodyElement.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223458 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoServiceWorkerRegistration should subclass RefCounted<>
cdumez@apple.com [Tue, 17 Oct 2017 05:12:52 +0000 (05:12 +0000)]
ServiceWorkerRegistration should subclass RefCounted<>
https://bugs.webkit.org/show_bug.cgi?id=178374

Reviewed by Ryosuke Niwa.

ServiceWorkerRegistration should subclass RefCounted<> or we end up with an infinite recursion
when constructing such object. This is because ServiceWorkerRegistration subclasses
EventTargetWithInlineData which implements ref() / deref() by calling refEventTarget() /
derefEventTarget(). refEventTarget() / derefEventTarget() are implemented in
ServiceWorkerRegistration so that they call ref() / deref() (which ends up being EventTarget's
methods).

* workers/service/ServiceWorkerRegistration.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223457 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoUnreviewed, fix the iOS build after r223431
wenson_hsieh@apple.com [Tue, 17 Oct 2017 05:00:00 +0000 (05:00 +0000)]
Unreviewed, fix the iOS build after r223431

Remove an unused variable captured in a lambda.

* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223456 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoNo nightlies listed on nightly.webkit.org when using shipping Safari on macOS Sierra...
dbates@webkit.org [Tue, 17 Oct 2017 03:26:36 +0000 (03:26 +0000)]
No nightlies listed on nightly.webkit.org when using shipping Safari on macOS Sierra and OS X El Capitan
https://bugs.webkit.org/show_bug.cgi?id=178372

Reviewed by Tim Horton.

The Build Archive page depends on the collections (e.g. HTMLCollection) being
iterable so as to support iteration using ES6 for-of loop. Such support postdates
the version of WebKit shipped in macOS Sierra and OS X El Capitan. We should
make <https://webkit.org/build-archives/> work for these OSes since we still publish
nightlies for them.

* wp-content/themes/webkit/build-archives.php: Use Array.prototype.slice() to
convert the HTMLCollection to an array that can be iterated using a ES6 for-of loop.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223455 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months ago[Win] Webkit should still be able to build when unable to check if libraries are...
commit-queue@webkit.org [Tue, 17 Oct 2017 02:30:58 +0000 (02:30 +0000)]
[Win] Webkit should still be able to build when unable to check if libraries are up to date
https://bugs.webkit.org/show_bug.cgi?id=178367

Adding a option to skip the check to see if windows libraries are up to date.
This option is useful when testing modified libraries. This option also allows
building webkit when GitHub blocks requests to verify the latest library version.

Patch by Christopher Reid <chris.reid@sony.com> on 2017-10-16
Reviewed by Per Arne Vollan.

* Scripts/build-webkit:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223454 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoWeb Inspector: Styles Redesign: apply syntax highlighting to property values
nvasilyev@apple.com [Tue, 17 Oct 2017 02:25:15 +0000 (02:25 +0000)]
Web Inspector: Styles Redesign: apply syntax highlighting to property values
https://bugs.webkit.org/show_bug.cgi?id=178176

Reviewed by Matt Baker.

- Highlight links blue and CSS strings dark red.
- Truncate URLs and strings over 150 characters.

* UserInterface/Views/CodeMirrorAdditions.js:
Parse CSS values using CodeMirror.

* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
(.spreadsheet-style-declaration-editor .property:not(.disabled) .token-link):
(.spreadsheet-style-declaration-editor .property:not(.disabled) .token-string):

* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype._update):
(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldWillStartEditing):
Replace trancated values with their full version.

(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidCommit):
(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
(WI.SpreadsheetStyleProperty.prototype._renderValue):
Highlight links and CSS strings in values when not editing.

* UserInterface/Views/SpreadsheetTextField.js:
(WI.SpreadsheetTextField.prototype.startEditing):
Disabling of syntax highlighting moved to spreadsheetTextFieldWillStartEditing.

* UserInterface/Views/SyntaxHighlightingDefaultTheme.css:
(.syntax-highlighted a):
* UserInterface/Views/Variables.css:
(:root):
Make link color a variable.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223453 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoImageDecoderAVFObjC fails to create more CMSampleBuffers after creating about 32MB...
jer.noble@apple.com [Tue, 17 Oct 2017 00:35:12 +0000 (00:35 +0000)]
ImageDecoderAVFObjC fails to create more CMSampleBuffers after creating about 32MB worth.
https://bugs.webkit.org/show_bug.cgi?id=178360

Reviewed by Eric Carlson.

AVSampleBufferGenerator has a constrained memory pool of about 32MB in size. Once
CMSampleBuffers representing about 32MB of memory are allocated, no more can be created
until previously created ones are released. So rather than (only) creating the sample
buffers up front in readSampleMetadata(), also create them dynamically, if missing, in
createFrameImageAtIndex(...) and release them in storeSampleBuffer(...) after they have been
decoded.

Drive-by fix: the expected content length was never actually set by the owner of ImageDecoderAVFObjC.
Now that the expected content length is available, we don't have to wait until the data is complete
to respond to requests.

* platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::ensureDecoderAvailable):
* platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h:
* platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
(SOFT_LINK_POINTER_OPTIONAL):
(-[WebCoreSharedBufferResourceLoaderDelegate canFulfillRequest:]):
(-[WebCoreSharedBufferResourceLoaderDelegate fulfillRequest:]):
(-[WebCoreSharedBufferResourceLoaderDelegate resourceLoader:shouldWaitForLoadingOfRequestedResource:]):
(WebCore::imageDecoderAssetOptions):
(WebCore::ImageDecoderAVFObjC::firstEnabledTrack):
(WebCore::ImageDecoderAVFObjC::storeSampleBuffer):
(WebCore::ImageDecoderAVFObjC::createFrameImageAtIndex):
(WebCore::ImageDecoderAVFObjC::setExpectedContentSize):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223452 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoAdd API support for quirk that lets an arbitrary click allow auto-play.
mrajca@apple.com [Tue, 17 Oct 2017 00:30:24 +0000 (00:30 +0000)]
Add API support for quirk that lets an arbitrary click allow auto-play.
https://bugs.webkit.org/show_bug.cgi?id=178227

Reviewed by Alex Christensen.

Source/WebCore:

Added API test.

Instead of hardcoding sites in WebCore, let API clients control which websites opt into the quirk that lets
an arbitrary click allow auto-play via website policies.

* html/MediaElementSession.cpp:
(WebCore::needsArbitraryUserGestureAutoplayQuirk):
* loader/DocumentLoader.h:

Source/WebKit:

Instead of hardcoding sites in WebCore, let API clients control which websites opt into the quirk that lets
an arbitrary click allow auto-play via website policies.

* Shared/WebsitePolicies.h:
* UIProcess/API/C/WKWebsitePolicies.cpp:
(WKWebsitePoliciesSetAllowedAutoplayQuirks):
(WKWebsitePoliciesGetAllowedAutoplayQuirks):
* UIProcess/API/C/WKWebsitePolicies.h:
* UIProcess/API/Cocoa/_WKWebsitePolicies.h:
* UIProcess/API/Cocoa/_WKWebsitePolicies.mm:
(-[_WKWebsitePolicies setAllowedAutoplayQuirks:]):
(-[_WKWebsitePolicies allowedAutoplayQuirks]):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::applyToDocumentLoader):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updateWebsitePolicies):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
(TEST): Added API test.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223451 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoDOMQuad.p1 / p2 / p3 / p4 should behave as [SameObject]
cdumez@apple.com [Tue, 17 Oct 2017 00:03:30 +0000 (00:03 +0000)]
DOMQuad.p1 / p2 / p3 / p4 should behave as [SameObject]
https://bugs.webkit.org/show_bug.cgi?id=178366

Reviewed by Youenn Fablet.

Source/WebCore:

DOMQuad.p1 / p2 / p3 / p4 should behave as [SameObject]. We attempted to do so using JSDOMQuad::visitAdditionalChildren()
but the code did not work because we failed to generate a "isReachableFromOpaqueRoots()" function for JSDOMPoint.

Test: fast/css/DOMQuad-points-SameObject.html

* dom/DOMPoint.idl:

LayoutTests:

Add layout test coverage.

* fast/css/DOMQuad-points-SameObject.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223448 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months ago[Apple Pay] Add subLocality and subAdministrativeArea to ApplePayPaymentContact and...
aestes@apple.com [Tue, 17 Oct 2017 00:00:40 +0000 (00:00 +0000)]
[Apple Pay] Add subLocality and subAdministrativeArea to ApplePayPaymentContact and ApplePayError
https://bugs.webkit.org/show_bug.cgi?id=178191
<rdar://problem/34906367>

Reviewed by Tim Horton.

Source/WebCore:

Added test cases to http/tests/ssl/applepay/ApplePaySession.html.

* Modules/applepay/ApplePayError.idl:
* Modules/applepay/ApplePayPaymentContact.h:
* Modules/applepay/ApplePayPaymentContact.idl:
* Modules/applepay/ApplePaySessionPaymentRequest.h:
* Modules/applepay/cocoa/PaymentContactCocoa.mm:
(WebCore::subLocality):
(WebCore::setSubLocality):
(WebCore::subAdministrativeArea):
(WebCore::setSubAdministrativeArea):
(WebCore::convert):

Source/WebKit:

* UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
(WebKit::toNSError):

LayoutTests:

* http/tests/ssl/applepay/ApplePayError-expected.txt:
* http/tests/ssl/applepay/ApplePaySession-expected.txt:
* http/tests/ssl/applepay/ApplePaySession.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223447 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoAllow modern decoding of URLs
commit-queue@webkit.org [Mon, 16 Oct 2017 23:29:36 +0000 (23:29 +0000)]
Allow modern decoding of URLs
https://bugs.webkit.org/show_bug.cgi?id=178265

Patch by Alex Christensen <achristensen@webkit.org> on 2017-10-16
Reviewed by Chris Dumez.

* platform/URL.h:
(WebCore::URL::decode):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223446 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 months agoDe-flakify http/tests/loading/basic-credentials-sent-automatically.html
achristensen@apple.com [Mon, 16 Oct 2017 23:10:00 +0000 (23:10 +0000)]
De-flakify http/tests/loading/basic-credentials-sent-automatically.html
https://bugs.webkit.org/show_bug.cgi?id=178365

Reviewed by Andy Estes.

* http/tests/loading/basic-credentials-sent-automatically-expected.txt:
* http/tests/loading/basic-credentials-sent-automatically.html:
* platform/ios-wk2/TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/wk2/http/tests/loading/basic-credentials-sent-automatically-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223445 268f45cc-cd09-0410-ab3c-d52691b4dbfc