Timeline



Oct 23, 2017:

10:13 PM Changeset in webkit [223880] by BJ Burg
  • 6 edits in trunk/Source/WebKit

[Cocoa] Web Automation: add SPI to tell whether the automation session is currently simulating user interactions
https://bugs.webkit.org/show_bug.cgi?id=178616

Reviewed by Joseph Pecoraro.

This is needed to disambiguate whether an action (such as selectAll:) came from
a user clicking on "Edit > Select All" in a menu or whether it was produced by
simulating the keystrokes to produce the chord for "Command + a". Some clients,
such as Safari, would allow the latter but not the former during automation.

  • UIProcess/API/Cocoa/_WKAutomationSession.h:
  • UIProcess/API/Cocoa/_WKAutomationSession.mm:

(-[_WKAutomationSession isSimulatingUserInteraction]):
Add new SPI property that's backed by the same WebAutomationSession method.

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

(WebKit::WebAutomationSession::keyboardEventsFlushedForPage):
(WebKit::WebAutomationSession::performMouseInteraction):
(WebKit::WebAutomationSession::performKeyboardInteractions):
Set m_simulatingUserInteraction prior to sending the synthesized events. It will
be cleared when keyboardEventsFlushedForPage() is called by WebPageProxy.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didReceiveEvent):
Notify the automation session that the key event queue was flushed *after* giving
delegates a chance to do something with the key event. This is necessary so that
any actions that are created from the NSEvent by the delegates are handled prior
to the automation session finishing its keyboard interaction command.

9:23 PM WebKitGTK/Gardening/Calendar edited by Michael Catanzaro
(diff)
9:21 PM Changeset in webkit [223879] by Michael Catanzaro
  • 2 edits in trunk/LayoutTests

Unreviewed WPE test gardening

  • platform/wpe/TestExpectations:
9:17 PM Changeset in webkit [223878] by keith_miller@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed, restore unneeded all in ones.

  • CMakeLists.txt:
8:32 PM Changeset in webkit [223877] by Michael Catanzaro
  • 2 edits in trunk/Source/bmalloc

Unreviewed, roll out r222731
https://bugs.webkit.org/show_bug.cgi?id=177745
<rdar://problem/34773148>

Unfortunately Gigacage has broken core dump generation.

  • bmalloc/Gigacage.h:
8:26 PM Changeset in webkit [223876] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

Unreviewed, rolling out r223870 and r223871.
https://bugs.webkit.org/show_bug.cgi?id=178702

broke the windows build (Requested by keith_miller on
#webkit).

Reverted changesets:

"Add html, inspector, loader to unified sources"
https://bugs.webkit.org/show_bug.cgi?id=178695
https://trac.webkit.org/changeset/223870

"Unrievwed, fix windows build."
https://trac.webkit.org/changeset/223871

8:20 PM Changeset in webkit [223875] by keith_miller@apple.com
  • 19 edits in trunk/Source/JavaScriptCore

Unreviewed, reland r223866

Didn't break the windows build...

Restored changeset:

"WebAssembly: topEntryFrame on Wasm::Instance"
https://bugs.webkit.org/show_bug.cgi?id=178690
https://trac.webkit.org/changeset/223866

7:33 PM Changeset in webkit [223874] by commit-queue@webkit.org
  • 19 edits in trunk/Source/JavaScriptCore

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

Probably broke the windows build (Requested by keith_miller on
#webkit).

Reverted changeset:

"WebAssembly: topEntryFrame on Wasm::Instance"
https://bugs.webkit.org/show_bug.cgi?id=178690
https://trac.webkit.org/changeset/223866

6:44 PM Changeset in webkit [223873] by Joseph Pecoraro
  • 3 edits in trunk/LayoutTests

Unreviewed test gardening. Try to reduce flakiness of inspector/network/har tests.

  • http/tests/inspector/network/har/har-page-expected.txt:
  • http/tests/inspector/network/har/har-page.html:

Remove properties which may sometimes be optional.
Filter contents which are shared across tests and might change.

6:42 PM Changeset in webkit [223872] by Michael Catanzaro
  • 2 edits in trunk/Source/WebCore

Unreviewed, attempt to fix initializeSupportedImageMIMETypes after r223860
https://bugs.webkit.org/show_bug.cgi?id=178618
<rdar://problem/35108852>

  • platform/MIMETypeRegistry.cpp:

(WebCore::initializeSupportedImageMIMETypes):

6:31 PM Changeset in webkit [223871] by keith_miller@apple.com
  • 2 edits in trunk/Source/WebCore

Unrievwed, fix windows build.

  • CMakeLists.txt:
6:25 PM Changeset in webkit [223870] by keith_miller@apple.com
  • 4 edits in trunk/Source/WebCore

Add html, inspector, loader to unified sources
https://bugs.webkit.org/show_bug.cgi?id=178695

Rubber-stamped by Tim Horton.

  • CMakeLists.txt:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
6:16 PM Changeset in webkit [223869] by BJ Burg
  • 3 edits in trunk/Source/WebKit

[Mac] Web Automation: key modifiers for synthesized NSEvents are incorrect
https://bugs.webkit.org/show_bug.cgi?id=178615

Reviewed by Joseph Pecoraro.

In both PLATFORM(MAC) platform methods for simulating keyboard interactions,
we errantly relied on +[NSEvent modifierFlags] to get the current state of
sticky modifiers when creating synthesized events. This is incorrect for two reasons:
modifierFlags is never updated when simulating a sequence of events (because
all the events are synthesized before any are delivered); and the NSEvent class
method only reflects the modifier state of the primary physical keyboard, which
is not affected by synthesized NSEvents that happen to have modifier flags.

Instead, just keep our own m_currentModifiers state in the session and compute
the necessary NSEventModifierFlags to put on each synthesized event. This aligns
the implementation with the treatment of sticky keys in the iOS and GTK platform methods.

  • UIProcess/Automation/WebAutomationSession.h: Every port gets this variable now.
  • UIProcess/Automation/mac/WebAutomationSessionMac.mm:

(WebKit::WebAutomationSession::platformSimulateKeyStroke):
(WebKit::WebAutomationSession::platformSimulateKeySequence):
Use and update m_currentModifiers.

5:55 PM Changeset in webkit [223868] by BJ Burg
  • 14 edits
    2 deletes in trunk/Source

Web Inspector: Remove unused Console.setMonitoringXHREnabled
https://bugs.webkit.org/show_bug.cgi?id=178617

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-10-23
Reviewed by Sam Weinig.

Source/JavaScriptCore:

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • inspector/agents/InspectorConsoleAgent.h:
  • inspector/agents/JSGlobalObjectConsoleAgent.cpp: Removed.
  • inspector/agents/JSGlobalObjectConsoleAgent.h: Removed.
  • inspector/protocol/Console.json:

Removed files and method.

  • inspector/JSGlobalObjectInspectorController.cpp:

(Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
This can use the base ConsoleAgent now.

Source/WebCore:

  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::didFinishXHRLoadingImpl):

  • inspector/InspectorInstrumentation.h:

(WebCore::InspectorInstrumentation::didFinishXHRLoading):

  • inspector/WebConsoleAgent.cpp:

(WebCore::WebConsoleAgent::setMonitoringXHREnabled): Deleted.
(WebCore::WebConsoleAgent::didFinishXHRLoading): Deleted.

  • inspector/WebConsoleAgent.h:

Remove XHR monitoring code.

  • xml/XMLHttpRequest.h:
  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::send):
(WebCore::XMLHttpRequest::didFinishLoading):
(WebCore::XMLHttpRequest::setLastSendLineAndColumnNumber): Deleted.

  • xml/XMLHttpRequest.idl:

Remove now unused state on XHR and ExecState requirement for send().

5:35 PM Changeset in webkit [223867] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Styles Redesign: Inline widgets don't hide when starting editing by tabbing from property name
https://bugs.webkit.org/show_bug.cgi?id=178638

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/SpreadsheetStyleProperty.js:

(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
Blur event on the property name text field caused WI.SpreadsheetStyleProperty.prototype._renderValue,
which displayed inline swatches. Display inline swatches only after blur event on the property value.

5:29 PM Changeset in webkit [223866] by jfbastien@apple.com
  • 19 edits in trunk/Source/JavaScriptCore

WebAssembly: topEntryFrame on Wasm::Instance
https://bugs.webkit.org/show_bug.cgi?id=178690

Reviewed by Saam Barati.

topEntryFrame is usually on VM, but for a no-VM WebAssembly we
need to hold topEntryFrame elsewhere, and generated code cannot
hard-code where topEntryFrame live. Do this at creation time of
Wasm::Instance, and then generated code will just load from
wherever Wasm::Instance was told topEntryFrame is. In a JavaScript
embedding this is still from VM, so all of the unwinding machinery
stays the same.

  • dfg/DFGOSREntry.cpp:

(JSC::DFG::prepareOSREntry):

  • dfg/DFGOSRExit.cpp:

(JSC::DFG::restoreCalleeSavesFromVMEntryFrameCalleeSavesBuffer):
(JSC::DFG::copyCalleeSavesToVMEntryFrameCalleeSavesBuffer):

  • ftl/FTLOSRExitCompiler.cpp:

(JSC::FTL::compileStub):

  • interpreter/Interpreter.cpp:

(JSC::UnwindFunctor::copyCalleeSavesToEntryFrameCalleeSavesBuffer const):

  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::restoreCalleeSavesFromEntryFrameCalleeSavesBuffer):
(JSC::AssemblyHelpers::copyCalleeSavesToEntryFrameCalleeSavesBufferImpl):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::copyCalleeSavesToEntryFrameCalleeSavesBuffer):
The default parameter was never non-defaulted from any of the
callers. The new version calls the impl directly because it
doesn't have VM and doesn't hard-code the address of
topEntryFrame.

  • jit/RegisterSet.cpp:

(JSC::RegisterSet::vmCalleeSaveRegisterOffsets): This was weird on
VM because it's not really VM-specific.

  • jit/RegisterSet.h:
  • runtime/VM.cpp:

(JSC::VM::getAllCalleeSaveRegisterOffsets): Deleted.

  • runtime/VM.h:

(JSC::VM::getCTIStub):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::addCall):
(JSC::Wasm::B3IRGenerator::addCallIndirect):

  • wasm/WasmInstance.cpp:

(JSC::Wasm::Instance::Instance):

  • wasm/WasmInstance.h: topEntryFramePointer will eventually live

here for real. Right now it's mirrored in JSWebAssemblyInstance
because that's the acting Context.
(JSC::Wasm::Instance::create):
(JSC::Wasm::Instance::offsetOfTopEntryFramePointer):

  • wasm/WasmThunks.cpp:

(JSC::Wasm::throwExceptionFromWasmThunkGenerator):

  • wasm/js/JSWebAssemblyInstance.cpp:

(JSC::JSWebAssemblyInstance::JSWebAssemblyInstance):

  • wasm/js/JSWebAssemblyInstance.h: Mirror Wasm::Instance temporarily.

(JSC::JSWebAssemblyInstance::offsetOfCallee):
(JSC::JSWebAssemblyInstance::offsetOfTopEntryFramePointer):
(JSC::JSWebAssemblyInstance::offsetOfVM): Deleted.

  • wasm/js/WebAssemblyInstanceConstructor.cpp:

(JSC::constructJSWebAssemblyInstance):

  • wasm/js/WebAssemblyPrototype.cpp:

(JSC::instantiate):

5:27 PM Changeset in webkit [223865] by keith_miller@apple.com
  • 4 edits in trunk/Source/WebCore

Add dom, editing, fileapi, and history to unified sources
https://bugs.webkit.org/show_bug.cgi?id=178694

Rubber-stamped by Tim Horton.

  • CMakeLists.txt:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
5:22 PM Changeset in webkit [223864] by Dewei Zhu
  • 4 edits in trunk/Websites/perf.webkit.org

Update perf dashboard upload logic to support uploading binaries from owned commits.
https://bugs.webkit.org/show_bug.cgi?id=178610

Reviewed by Ryosuke Niwa.

Update build requests to 'completed' only when all commit set items are satisfied.
Extend 'repositoryList' parameter to be able to specified own commit information.
Items in 'repositoryList' can either be a string for top level repository,
or a dictionary with two keys: 'ownerRepository' and 'ownedRepository'.

  • public/api/upload-root.php: Extend upload logic for support uploading binaries from owned commits.
  • server-tests/api-upload-root-tests.js: Added unit tests.
  • server-tests/tools-sync-buildbot-integration-tests.js: Added unit tests.
5:08 PM Changeset in webkit [223863] by keith_miller@apple.com
  • 4 edits in trunk/Source/WebCore

Move bridge, contentextensions, crypto, and css to unified sources.
https://bugs.webkit.org/show_bug.cgi?id=178691

Reviewed by Tim Horton.

  • CMakeLists.txt:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
4:40 PM Changeset in webkit [223862] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix the Windows build after r223860

UTIUtilities only exists on Cocoa platforms, so we need to guard it accordingly.

  • platform/MIMETypeRegistry.cpp:

(WebCore::initializeSupportedImageMIMETypes):

4:23 PM Changeset in webkit [223861] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Fix ASAN test after r222824
https://bugs.webkit.org/show_bug.cgi?id=178688
<rdar://problem/35104706>

Reviewed by Tim Horton.

  • UIProcess/WebBackForwardList.cpp:

(WebKit::WebBackForwardList::clear):
Resizing a list of Ref<T> after we've WTFMoved all the elements doesn't make ASAN happy.

4:17 PM AddingFiles edited by keith_miller@apple.com
(diff)
4:12 PM AddingFiles edited by keith_miller@apple.com
(diff)
4:11 PM AddingFiles edited by keith_miller@apple.com
(diff)
4:03 PM AddingFiles edited by keith_miller@apple.com
(diff)
3:37 PM Changeset in webkit [223860] by Wenson Hsieh
  • 3 edits in trunk/Source/WebCore

[iOS] DocumentWriter::createDocument can spend ~100ms unnecessarily converting image UTIs to MIME types
https://bugs.webkit.org/show_bug.cgi?id=178618
<rdar://problem/35108852>

Reviewed by Said Abou-Hallawa.

Currently, in setting up a new Document, DocumentWriter::createDocument() always asks whether or not the
Document should be a PDF document by calling MIMETypeRegistry::isPDFMIMEType(), which forces lazy initialization
of every MIME type dictionary (e.g. image types, PDF types, JavaScript types, etc.). As evidenced by traces,
this can be an expensive operation on certain devices.

This patch implements two optimizations. First, we refactor the initializeSupportedImageMIMETypes() helper to
stop asking for MIMETypeForImageSourceType for each of the supported UTIs. This is because the known MIME types
corresponding to these hard-coded UTI types is a fixed set anyways, so we can simply iterate over a constant
array of MIME types and populate the supported image (and image resource) types. Also, add assertions to ensure
that we keep allowed image MIME types in sync with allowed image UTIs.

The second optimization removes initializeMIMETypeRegistry() altogether in favor of calling just the
initialize*MIMETypes() functions needed to ensure the information required. For instance, getPDFMIMETypes()
currently calls initializeMIMETypeRegistry() if the pdfMIMETypes dictionary doesn't exist, when it really only
needs to ensure that the pdfMIMETypes is initialized, for which initializePDFMIMETypes() is sufficient.

  • platform/MIMETypeRegistry.cpp:

(WebCore::initializeSupportedImageMIMETypes):
(WebCore::initializeSupportedJavaScriptMIMETypes):
(WebCore::initializePDFMIMETypes):
(WebCore::initializeSupportedNonImageMimeTypes):
(WebCore::initializeUnsupportedTextMIMETypes):

Move MIME type dictionary creation into initialize*MIMETypes() helpers. Additionally, remove
initializePDFAndPostScriptMIMETypes, which is no longer necessary.

(WebCore::MIMETypeRegistry::isSupportedImageMIMEType):
(WebCore::MIMETypeRegistry::isSupportedImageResourceMIMEType):
(WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType):
(WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType):
(WebCore::MIMETypeRegistry::isUnsupportedTextMIMEType):
(WebCore::MIMETypeRegistry::isPDFOrPostScriptMIMEType):

Tweak to check that the type isPDFMIMEType(), or that it's otherwise "application/postscript".

(WebCore::MIMETypeRegistry::isPDFMIMEType):
(WebCore::MIMETypeRegistry::getSupportedImageMIMETypes):
(WebCore::MIMETypeRegistry::getSupportedImageResourceMIMETypes):
(WebCore::MIMETypeRegistry::getSupportedNonImageMIMETypes):
(WebCore::MIMETypeRegistry::getPDFMIMETypes):
(WebCore::MIMETypeRegistry::getUnsupportedTextMIMETypes):

Call only the relevant MIME type initializers when needed.

(WebCore::initializePostScriptMIMETypes): Deleted.
(WebCore::initializeMIMETypeRegistry): Deleted.
(WebCore::MIMETypeRegistry::getPDFAndPostScriptMIMETypes): Deleted.

Remove an unused and unexported function.

  • platform/MIMETypeRegistry.h:
3:30 PM Changeset in webkit [223859] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

Multiple imported layout tests are crashing and timing out.
https://bugs.webkit.org/show_bug.cgi?id=178685

Unreviewed.

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

  • TestExpectations: skipping cache storage tests in service worker context until it is functional.
3:14 PM Changeset in webkit [223858] by aestes@apple.com
  • 2 edits in trunk/Source/WebCore

[Payment Request] Take the JSC API lock before creating the PaymentResponse.details object
https://bugs.webkit.org/show_bug.cgi?id=178686

Reviewed by Keith Miller.

This fixes several flaky crashes in http/tests/paymentrequest/ after r223855.

  • Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:

(WebCore::ApplePayPaymentHandler::didAuthorizePayment):

2:58 PM Changeset in webkit [223857] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebKit

Stop using _UIApplicationUsesLegacyUI()
https://bugs.webkit.org/show_bug.cgi?id=178680
<rdar://problem/35131949>

Reviewed by Dan Bernstein.

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/ios/forms/WKFormSelectPopover.mm:

(-[WKSelectTableViewController tableView:cellForRowAtIndexPath:]):
(-[WKSelectPopover initWithView:hasGroups:]):
Resolve _UIApplicationUsesLegacyUI to false and simplify.

2:34 PM Changeset in webkit [223856] by Joseph Pecoraro
  • 22 edits
    6 adds in trunk

Web Inspector: Please support HAR Export for network traffic
https://bugs.webkit.org/show_bug.cgi?id=146692
<rdar://problem/7463672>

Reviewed by Brian Burg.

Source/JavaScriptCore:

  • inspector/protocol/Network.json:

Add a walltime to each send request.

Source/WebCore:

Tests: http/tests/inspector/network/har/har-basic.html

http/tests/inspector/network/har/har-page.html

  • inspector/InspectorNetworkAgent.cpp:

(WebCore::InspectorNetworkAgent::willSendRequest):
Include the wall time when sending a request. This is needed for HAR to
include a wall time, and can be used for Cookie expiration time calculation
as well.

Source/WebInspectorUI:

  • UserInterface/Main.html:
  • UserInterface/Test.html:

New resources.

  • UserInterface/Base/Platform.js:

Include a build number as well.

  • UserInterface/Base/URLUtilities.js:

(parseLocationQueryParameters): Deleted.
Remove unused function.

  • UserInterface/Controllers/FrameResourceManager.js:

(WI.FrameResourceManager.prototype.frameDidNavigate):
(WI.FrameResourceManager.prototype.resourceRequestWillBeSent):
(WI.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache):
(WI.FrameResourceManager.prototype.resourceRequestDidReceiveResponse):
(WI.FrameResourceManager.prototype._addNewResourceToFrameOrTarget):
Pass along a walltime.

  • UserInterface/Protocol/NetworkObserver.js:

(WI.NetworkObserver.prototype.requestWillBeSent):
Pass along a walltime. This new parameter shifts old parameters.

  • UserInterface/Controllers/HARBuilder.js: Added.

(WI.HARBuilder.async.buildArchive):
(WI.HARBuilder.creator):
(WI.HARBuilder.pages):
(WI.HARBuilder.pageTimings):
(WI.HARBuilder.entry):
(WI.HARBuilder.request):
(WI.HARBuilder.response):
(WI.HARBuilder.cookies):
(WI.HARBuilder.headers):
(WI.HARBuilder.content):
(WI.HARBuilder.postData):
(WI.HARBuilder.cache):
(WI.HARBuilder.timings):
(WI.HARBuilder.ipAddress):
(WI.HARBuilder.date):
(WI.HARBuilder.fetchType):
HAR construction and helpers.

  • UserInterface/Models/Cookie.js:

(WI.Cookie.prototype.expirationDate):

  • UserInterface/Models/Resource.js:

(WI.Resource.prototype.get queryStringParameters):
(WI.Resource.prototype.get requestFormParameters):
(WI.Resource.prototype.get requestSentWalltime):
(WI.Resource.prototype.get requestSentDate):
(WI.Resource.prototype.hasRequestFormParameters):
Helpers for HAR generation and sub-sets of data.

  • UserInterface/Models/SourceCode.js:

(WI.SourceCode.prototype._processContent):
Capture the raw, unmodified, base64 encoded flag and content. This ends
up getting used by HAR generation and is otherwise lost.

  • UserInterface/Test/TestHarness.js:

(TestHarness.prototype.json):
Helper for just logging JSON data with a filter. This defaults to
a reasonable 2 space indent for JSON logs in our test output.

  • UserInterface/Views/DOMTreeContentView.js:

(WI.DOMTreeContentView.prototype.get saveData):
(WI.DOMTreeContentView.get saveData.saveHandler): Deleted.
Drive-by simplify while looking at other save handlers.

  • UserInterface/Views/NetworkTableContentView.js:

(WI.NetworkTableContentView.prototype.get supportsSave):
(WI.NetworkTableContentView.prototype.get saveData):
(WI.NetworkTableContentView.prototype.tableCellContextMenuClicked):
(WI.NetworkTableContentView.prototype._HARResources):
(WI.NetworkTableContentView.prototype._exportHAR):
Provide a context menu and save keyboard handler to export a HAR.
This matches other browsers.

  • UserInterface/Views/ResourceClusterContentView.js:

(WI.ResourceClusterContentView.prototype._canShowRequestContentView):
Use code that is now available in Resource.

LayoutTests:

  • http/tests/inspector/network/har/har-basic-expected.txt: Added.
  • http/tests/inspector/network/har/har-basic.html: Added.
  • http/tests/inspector/network/har/har-page-expected.txt: Added.
  • http/tests/inspector/network/har/har-page.html: Added.

Tests with mock resources / data and real resources.

  • platform/mac-wk1/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/win/TestExpectations:

Skip on platforms that cannot provide complete metrics, so some optional
fields may be missing.

2:00 PM Changeset in webkit [223855] by aestes@apple.com
  • 23 edits
    6 copies
    14 adds in trunk

[Payment Request] Resolve PaymentRequest.show()'s accept promise when a payment is authorized
https://bugs.webkit.org/show_bug.cgi?id=178609
<rdar://problem/33542813>

Reviewed by Alex Christensen.

Source/WebCore:

This patch implements the logic for resolving PaymentRequest.show()'s accept promise when
the user authorizes a payment, and implements PaymentResponse.complete().

Tests: http/tests/paymentrequest/payment-address-attributes-and-toJSON-method.https.html

http/tests/paymentrequest/payment-response-complete-method.https.html
http/tests/paymentrequest/payment-response-methodName-attribute.https.html
http/tests/paymentrequest/payment-response-payerEmail-attribute.https.html
http/tests/paymentrequest/payment-response-payerName-attribute.https.html
http/tests/paymentrequest/payment-response-payerPhone-attribute.https.html

  • DerivedSources.make:
  • Modules/applepay/ApplePayPaymentContact.h:
  • Modules/applepay/Payment.h:

(WebCore::Payment::Payment): Deleted.
(WebCore::Payment::pkPayment const): Deleted.

  • Modules/applepay/PaymentContact.h:

(WebCore::PaymentContact::PaymentContact): Deleted.
(WebCore::PaymentContact::pkContact const): Deleted.

  • Modules/applepay/cocoa/PaymentContactCocoa.mm:

(WebCore::convert):

  • Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:

(WebCore::ApplePayPaymentHandler::hasActiveSession):
(WebCore::ApplePayPaymentHandler::ApplePayPaymentHandler):
(WebCore::ApplePayPaymentHandler::document):
(WebCore::ApplePayPaymentHandler::paymentCoordinator):
(WebCore::ApplePayPaymentHandler::convertData):
(WebCore::ApplePayPaymentHandler::show):
(WebCore::ApplePayPaymentHandler::hide):
(WebCore::ApplePayPaymentHandler::canMakePayment):
(WebCore::ApplePayPaymentHandler::complete):
(WebCore::convert):
(WebCore::ApplePayPaymentHandler::didAuthorizePayment):
(WebCore::ApplePayPaymentHandler::didSelectShippingMethod):
(WebCore::ApplePayPaymentHandler::didSelectShippingContact):

  • Modules/applepay/paymentrequest/ApplePayPaymentHandler.h:
  • Modules/paymentrequest/PaymentAddress.h:
  • Modules/paymentrequest/PaymentAddress.idl:
  • Modules/paymentrequest/PaymentHandler.cpp:

(WebCore::PaymentHandler::create):

  • Modules/paymentrequest/PaymentHandler.h:
  • Modules/paymentrequest/PaymentRequest.cpp:

(WebCore::PaymentRequest::show):
(WebCore::PaymentRequest::stop):
(WebCore::PaymentRequest::canMakePayment):
(WebCore::PaymentRequest::canSuspendForDocumentSuspension const):
(WebCore::PaymentRequest::shippingAddressChanged):
(WebCore::PaymentRequest::shippingOptionChanged):
(WebCore::PaymentRequest::accept):
(WebCore::PaymentRequest::complete):

  • Modules/paymentrequest/PaymentRequest.h:
  • Modules/paymentrequest/PaymentResponse.cpp:

(WebCore::PaymentResponse::PaymentResponse):
(WebCore::PaymentResponse::complete):

  • Modules/paymentrequest/PaymentResponse.h:
  • WebCore.xcodeproj/project.pbxproj:
  • testing/Internals.cpp:

(WebCore::Internals::Internals):
(WebCore::Internals::mockPaymentCoordinator const):

  • testing/Internals.h:
  • testing/Internals.idl:
  • testing/MockPayment.h: Added.
  • testing/MockPaymentAddress.h: Added.
  • testing/MockPaymentAddress.idl: Added.
  • testing/MockPaymentContact.h: Added.
  • testing/MockPaymentCoordinator.cpp:

(WebCore::MockPaymentCoordinator::canMakePaymentsWithActiveCard):
(WebCore::MockPaymentCoordinator::openPaymentSetup):
(WebCore::dispatchIfShowing):
(WebCore::MockPaymentCoordinator::showPaymentUI):
(WebCore::MockPaymentCoordinator::completeMerchantValidation):
(WebCore::MockPaymentCoordinator::completePaymentSession):
(WebCore::MockPaymentCoordinator::abortPaymentSession):
(WebCore::MockPaymentCoordinator::cancelPaymentSession):
(WebCore::MockPaymentCoordinator::paymentCoordinatorDestroyed):

  • testing/MockPaymentCoordinator.h:
  • testing/MockPaymentCoordinator.idl: Added.

LayoutTests:

  • http/tests/paymentrequest/payment-address-attributes-and-toJSON-method.https-expected.txt: Added.
  • http/tests/paymentrequest/payment-address-attributes-and-toJSON-method.https.html: Copied from imported/w3c/web-platform-tests/payment-request/PaymentAddress/attributes-and-toJSON-method-manual.https.html.
  • http/tests/paymentrequest/payment-response-complete-method.https-expected.txt: Added.
  • http/tests/paymentrequest/payment-response-complete-method.https.html: Copied from imported/w3c/web-platform-tests/payment-request/payment-response/complete-method-manual.https.html.
  • http/tests/paymentrequest/payment-response-methodName-attribute.https-expected.txt: Added.
  • http/tests/paymentrequest/payment-response-methodName-attribute.https.html: Copied from imported/w3c/web-platform-tests/payment-request/payment-response/methodName-attribute-manual.https.html.
  • http/tests/paymentrequest/payment-response-payerEmail-attribute.https-expected.txt: Added.
  • http/tests/paymentrequest/payment-response-payerEmail-attribute.https.html: Copied from imported/w3c/web-platform-tests/payment-request/payment-response/payerEmail-attribute-manual.https.html.
  • http/tests/paymentrequest/payment-response-payerName-attribute.https-expected.txt: Added.
  • http/tests/paymentrequest/payment-response-payerName-attribute.https.html: Copied from imported/w3c/web-platform-tests/payment-request/payment-response/payerName-attribute-manual.https.html.
  • http/tests/paymentrequest/payment-response-payerPhone-attribute.https-expected.txt: Added.
  • http/tests/paymentrequest/payment-response-payerPhone-attribute.https.html: Copied from imported/w3c/web-platform-tests/payment-request/payment-response/payerPhone-attribute-manual.https.html.
  • http/tests/paymentrequest/resources/helpers.js: Copied from imported/w3c/web-platform-tests/payment-request/payment-response/helpers.js.

(test):
(async.getPaymentResponse):
(async.getPaymentRequestResponse):
(async.runTest):

1:59 PM Changeset in webkit [223854] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

Attempt to stop iOS Simulator tests from failing because
we don't support Accelerated ImageBuffer.

  • html/ImageBitmap.cpp:
1:42 PM Changeset in webkit [223853] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[FrameView::layout cleanup] Make m_subtreeLayoutRoot weak.
https://bugs.webkit.org/show_bug.cgi?id=178621
<rdar://problem/35110321>

Reviewed by Simon Fraser.

This patch turn m_subtreeLayoutRoot into a weak pointer to handle both the optional and the mutation cases.

Covered by existing cases.

  • page/FrameView.cpp:

(WebCore::FrameView::reset):
(WebCore::FrameView::willDestroyRenderTree):
(WebCore::FrameView::didDestroyRenderTree):
(WebCore::FrameView::calculateScrollbarModesForLayout):
(WebCore::FrameView::handleLayoutWithFrameFlatteningIfNeeded):
(WebCore::FrameView::canPerformLayout const):
(WebCore::FrameView::layout): WeakPtr<RenderElement> protects us from recursive layouts triggering UAF on layoutRoot.
(WebCore::FrameView::convertSubtreeLayoutToFullLayout):
(WebCore::FrameView::scheduleRelayout):
(WebCore::FrameView::scheduleRelayoutOfSubtree):
(WebCore::FrameView::needsLayout const):
(WebCore::FrameView::autoSizeIfEnabled):

  • page/FrameView.h:
1:40 PM Changeset in webkit [223852] by keith_miller@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix windows build.

  • CMakeLists.txt:
1:37 PM WebKitGTK/2.18.x edited by Adrian Perez de Castro
(diff)
1:32 PM Changeset in webkit [223851] by Ryan Haddad
  • 2 edits in trunk/Source/WebKit

Unreviewed, suppress deprecation warnings to fix the build.
<rdar://problem/35131949>

  • UIProcess/ios/forms/WKFormSelectPopover.mm:

(-[WKSelectTableViewController tableView:cellForRowAtIndexPath:]):
(-[WKSelectPopover initWithView:hasGroups:]):

1:23 PM Changeset in webkit [223850] by keith_miller@apple.com
  • 4 edits in trunk/Source/WebCore

Move shared accessibility and animiations files to unified sources.
https://bugs.webkit.org/show_bug.cgi?id=178677

Reviewed by Tim Horton.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
12:36 PM Changeset in webkit [223849] by Chris Dumez
  • 16 edits
    2 adds in trunk

Drop confusing Event::dispatched() method
https://bugs.webkit.org/show_bug.cgi?id=178670

Reviewed by Youenn Fablet.

Source/WebCore:

Drop confusing Event::dispatched() method. What the call sites want to do is check
that the Event's "dispatch" flag is set:

This flag gets set at the beginning of dispatchEvent() and unset at the end of
dispatchEvent():

See as an example event.initEvent():

The right way to check the Event's "dispatch" flag is the Event::isBeingDispatched()
method, so use this instead. One side effect of this change is that it is now
possible to call the init*Event() method on events that have already been dispatched
in order to dispatch them again, as per the specification.

Test: fast/events/initEvent-after-dispatching.html

  • dom/CompositionEvent.cpp:

(WebCore::CompositionEvent::initCompositionEvent):

  • dom/DeviceMotionEvent.cpp:

(WebCore::DeviceMotionEvent::initDeviceMotionEvent):

  • dom/DeviceOrientationEvent.cpp:

(WebCore::DeviceOrientationEvent::initDeviceOrientationEvent):

  • dom/Event.h:
  • dom/HashChangeEvent.h:
  • dom/KeyboardEvent.cpp:

(WebCore::KeyboardEvent::initKeyboardEvent):

  • dom/MessageEvent.cpp:

(WebCore::MessageEvent::initMessageEvent):

  • dom/MouseEvent.cpp:

(WebCore::MouseEvent::initMouseEvent):

  • dom/OverflowEvent.cpp:

(WebCore::OverflowEvent::initOverflowEvent):

  • dom/TextEvent.cpp:

(WebCore::TextEvent::initTextEvent):

  • dom/TouchEvent.cpp:

(WebCore::TouchEvent::initTouchEvent):

  • dom/UIEvent.cpp:

(WebCore::UIEvent::initUIEvent):

  • dom/WheelEvent.cpp:

(WebCore::WheelEvent::initWheelEvent):

  • storage/StorageEvent.cpp:

(WebCore::StorageEvent::initStorageEvent):

LayoutTests:

Add layout test coverage.

  • fast/events/initEvent-after-dispatching-expected.txt: Added.
  • fast/events/initEvent-after-dispatching.html: Added.
11:59 AM Changeset in webkit [223848] by Antti Koivisto
  • 8 edits in trunk

Remember previous child renderer during render tree update
https://bugs.webkit.org/show_bug.cgi?id=178659

Reviewed by Zalan Bujtas.

Source/WebCore:

We shouldn't need to recompute the previous renderer, we know it already.

  • style/RenderTreePosition.cpp:

(WebCore::RenderTreePosition::previousSiblingRenderer const): Deleted.

No longer needed. This was also subtly wrong as doesn't take display:contents into account.

  • style/RenderTreePosition.h:
  • style/RenderTreeUpdater.cpp:

(WebCore::RenderTreeUpdater::updateRenderTree):
(WebCore::RenderTreeUpdater::textRendererIsNeeded):

Use the saved previous renderer.

(WebCore::RenderTreeUpdater::updateTextRenderer):
(WebCore::RenderTreeUpdater::storePreviousRenderer):

Save the previous renderere as we walk the tree.

(WebCore::textRendererIsNeeded): Deleted.

  • style/RenderTreeUpdater.h:

LayoutTests:

  • fast/block/float/float-not-removed-from-pre-block-expected.txt:
  • platform/mac/fast/css-generated-content/details-summary-before-after-expected.txt:
11:57 AM Changeset in webkit [223847] by keith_miller@apple.com
  • 4 edits in trunk/Source/WebCore

Add Shared Modules files to the unified source build.
https://bugs.webkit.org/show_bug.cgi?id=178675

Reviewed by Tim Horton.

This patch all the Modules sources files shared across all ports to
unified sources.

  • CMakeLists.txt:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
11:42 AM Changeset in webkit [223846] by Lucas Forschler
  • 2 edits in trunk/Tools

<rdar://problem/35045445>
Update README to reference WebKit build archives, instead of 'nightly'

Reviewed by Aakash Jain.

  • WebKitArchiveSupport/README:
11:10 AM Changeset in webkit [223845] by dbates@webkit.org
  • 3 edits
    4 adds in trunk/LayoutTests

Add tests to ensure spelling error dots are drawn in the correct place in bottom-to-top
and right-to-left writing modes
https://bugs.webkit.org/show_bug.cgi?id=178671

Reviewed by Simon Fraser.

  • fast/writing-mode/english-bt-text-with-spelling-marker-expected.html: Added.
  • fast/writing-mode/english-bt-text-with-spelling-marker.html: Added.
  • fast/writing-mode/english-rl-text-with-spelling-marker-expected.html: Added.
  • fast/writing-mode/english-rl-text-with-spelling-marker.html: Added.
  • platform/ios/TestExpectations: Skip the test on iOS as it does not support spelling and grammar

marker painting.

10:56 AM Changeset in webkit [223844] by zandobersek@gmail.com
  • 2 edits in trunk/Source/bmalloc

bmalloc::api::tryLargeMemalignVirtual() shouldn't assert on a failed allocation
https://bugs.webkit.org/show_bug.cgi?id=178654

Reviewed by Geoffrey Garen.

  • bmalloc/bmalloc.h:

(bmalloc::api::tryLargeMemalignVirtual): Call Heap::tryAllocateLarge()
instead of Heap::allocateLarge(). The former will return a null pointer
upon a failed allocation, allowing the caller to fail gracefully just as
the API entrypoint implies, while the latter currently provokes a crash
in these circumstances.

10:51 AM Changeset in webkit [223843] by dino@apple.com
  • 9 edits
    4 adds in trunk

Implement drawImage(ImageBitmap) on 2d canvas
https://bugs.webkit.org/show_bug.cgi?id=178653
<rdar://problem/35104360>

Reviewed by Antoine Quint.

LayoutTests/imported/w3c:

Update expected results now that drawImage is implemented.

  • web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt:

Source/WebCore:

Implement CanvasRenderingContext2D::drawImage with ImageBitmap.
It's probably not going to be a very common operation, but
it importantly allows us to test the ImageBitmap creation
code.

Test: http/wpt/2dcontext/imagebitmap/drawImage-ImageBitmap.html

  • html/ImageBitmap.cpp:

(WebCore::taintsOrigin): New helper function to determine if a
CachedImage would provide a clean origin.
(WebCore::ImageBitmap::createPromise): Set the flag that records
if this ImageBitmap has a clean origin.

  • html/ImageBitmap.h:

(WebCore::ImageBitmap::buffer): Exposes the ImageBuffer backing
store, allowing access to the data for drawing.
(WebCore::ImageBitmap::originClean const): Is this ImageBitmap
going to taint a destination.

  • html/canvas/CanvasRenderingContext.cpp:

(WebCore::CanvasRenderingContext::wouldTaintOrigin): Implement
the ImageBitmap version of this template function.

  • html/canvas/CanvasRenderingContext.h:
  • html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::CanvasRenderingContext2D::drawImage): Implement the
actual drawing of an ImageBitmap.

LayoutTests:

Add a new test that exercises drawImage(ImageBitmap)
that will be contributed back to Web Platform Tests.

  • http/wpt/2dcontext/imagebitmap/common.js: Copied (mostly) from WPT.

(create9x9CanvasWith2dContext): New helper function to create a canvas
and provide a rendering context.

  • http/wpt/2dcontext/imagebitmap/drawImage-ImageBitmap-expected.txt: Added.
  • http/wpt/2dcontext/imagebitmap/drawImage-ImageBitmap.html: Added.
  • http/wpt/2dcontext/imagebitmap/target-blue-dot.png: Added.
10:49 AM Changeset in webkit [223842] by dbates@webkit.org
  • 3 edits
    4 adds in trunk/LayoutTests

Add tests to ensure spelling error dots are drawn in the correct place for overlapping lines
https://bugs.webkit.org/show_bug.cgi?id=178611
<rdar://problem/35105805>

Reviewed by Zalan Bujtas.

Add tests to ensure that we paint the spelling error dots in the correct place for
overlapping lines.

  • editing/spelling/spelling-markers-in-overlapping-lines-expected.html: Added.
  • editing/spelling/spelling-markers-in-overlapping-lines-large-font-expected.html: Added.
  • editing/spelling/spelling-markers-in-overlapping-lines-large-font.html: Added.
  • editing/spelling/spelling-markers-in-overlapping-lines.html: Added.
  • platform/ios/TestExpectations: Skip the test on iOS as it does not support spelling and grammar

marker painting.

10:35 AM Changeset in webkit [223841] by zandobersek@gmail.com
  • 2 edits
    839 adds in trunk/LayoutTests

Unreviewed WPE gardening. Unskip the SVG tests and generate the
required platform-specific baselines.

  • platform/wpe/TestExpectations:
  • platform/wpe/svg: Added ~800 baselines.
10:28 AM Changeset in webkit [223840] by dbates@webkit.org
  • 3 edits in trunk/Source/WebCore

Unreviewed, rolling out r223699.

Caused regressions with right-to-left text selection and
painting of markers in flipped writing mode and in overlapping
lines. Will investigate offline.

Reverted changeset:

"Share logic in InlineTextBox to compute selection rect"
https://bugs.webkit.org/show_bug.cgi?id=178232
https://trac.webkit.org/changeset/223699

10:25 AM Changeset in webkit [223839] by commit-queue@webkit.org
  • 27 edits
    2 copies
    2 adds in trunk

Source/WebCore:
Create a Fetch event when ServiceWorker has to handle a fetch
https://bugs.webkit.org/show_bug.cgi?id=178491

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

Covered by existing test.

Updating FetchEvent to pass a FetchResponse* within its onResponse callback.
Making it a CompletionHandler.
Fixing a check on respondWith to ensure that event is dispatched when respondWith is called.

Adding ServiceWorkerFetch class to handle the creation of the fetch event, waiting for the fetch event to be responded
and processing when fetch event is responded.
ServiceWorkerFetchTask takes a client to which will be sent the response body or the error.
WebKit implementation of it will be to send the related IPC message back to the WebProcess that made the fetch request.

Adding a method to ServiceWorkerThread to create the fetch event on worker thread and dispatch on the global scope.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/network/ResourceResponseBase.h:
  • testing/Internals.cpp:

(WebCore::Internals::waitForFetchEventToFinish):

  • workers/service/FetchEvent.cpp:

(WebCore::FetchEvent::~FetchEvent):
(WebCore::FetchEvent::respondWith):
(WebCore::FetchEvent::onResponse):
(WebCore::FetchEvent::respondWithError):
(WebCore::FetchEvent::processResponse):
(WebCore::FetchEvent::promiseIsSettled):

  • workers/service/FetchEvent.h:
  • workers/service/context/ServiceWorkerFetch.cpp: Added.

(WebCore::ServiceWorkerFetch::dispatchFetchTask):
(WebCore::ServiceWorkerFetch::processResponse):

  • workers/service/context/ServiceWorkerFetch.h: Added.
  • workers/service/context/ServiceWorkerThread.cpp:

(WebCore::m_workerObjectProxy):
(WebCore::ServiceWorkerThread::dispatchFetchEvent):

  • workers/service/context/ServiceWorkerThread.h:

Source/WebKit:
TestController should clear all fetch caches when resetting its state
https://bugs.webkit.org/show_bug.cgi?id=178486
<rdar://problem/35066305>

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

Adding a new DidNotHandle message to disambiguate with the DidFail fetch case.
With DidNotHandle, the loading should go the network process.
With DidFail, the loading should return a network error.

On receiving an order to start a fetch, ServiceWorkerThread will dispatch a fetch event.
The client of this event will retrieve the response and return it to the WebProcess through IPC.

  • StorageProcess/ServiceWorker/WebSWServerConnection.cpp:

(WebKit::WebSWServerConnection::didNotHandleFetch):

  • StorageProcess/ServiceWorker/WebSWServerConnection.h:
  • StorageProcess/StorageProcess.cpp:

(WebKit::StorageProcess::didNotHandleFetch):

  • StorageProcess/StorageProcess.h:
  • StorageProcess/StorageProcess.messages.in:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Storage/ServiceWorkerClientFetch.cpp:

(WebKit::ServiceWorkerClientFetch::didFail):
(WebKit::ServiceWorkerClientFetch::didNotHandle):

  • WebProcess/Storage/ServiceWorkerClientFetch.h:
  • WebProcess/Storage/ServiceWorkerClientFetch.messages.in:
  • WebProcess/Storage/ServiceWorkerContextManager.cpp:

(WebKit::ServiceWorkerContextManager::startFetch):

  • WebProcess/Storage/ServiceWorkerContextManager.h:
  • WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp: Added.

(WebKit::WebServiceWorkerFetchTaskClient::~WebServiceWorkerFetchTaskClient):
(WebKit::WebServiceWorkerFetchTaskClient::WebServiceWorkerFetchTaskClient):
(WebKit::WebServiceWorkerFetchTaskClient::didReceiveResponse):
(WebKit::WebServiceWorkerFetchTaskClient::didReceiveData):
(WebKit::WebServiceWorkerFetchTaskClient::didFail):
(WebKit::WebServiceWorkerFetchTaskClient::didFinish):

  • WebProcess/Storage/WebServiceWorkerFetchTaskClient.h: Added.
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::startFetchInServiceWorker):

  • WebProcess/WebProcess.h:

LayoutTests:
TestController should clear all fetch caches when resetting its state
https://bugs.webkit.org/show_bug.cgi?id=178486
<rdar://problem/35066305>

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

Beefing up the test by using fetch event handler to return responses
previously hard coded in ServiceWorkerContextManager.

  • http/tests/workers/service/basic-fetch.https-expected.txt:
  • http/tests/workers/service/resources/basic-fetch-worker.js:

(event.event.request.url.indexOf):

  • http/tests/workers/service/resources/basic-fetch.js:
10:21 AM Changeset in webkit [223838] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

[Curl] Fix authentication related bugs
https://bugs.webkit.org/show_bug.cgi?id=178652

Patch by Basuke Suzuki <Basuke Suzuki> on 2017-10-23
Reviewed by Alex Christensen.

  • platform/network/curl/AuthenticationChallengeCurl.cpp:

(WebCore::AuthenticationChallenge::protectionSpaceFromHandle):

  • platform/network/curl/CurlContext.cpp:

(WebCore::CurlHandle::setHttpAuthUserPass):

  • platform/network/curl/CurlRequest.cpp:

(WebCore::CurlRequest::setUserPass):
(WebCore::CurlRequest::setupTransfer):
(WebCore::CurlRequest::didReceiveHeader):

  • platform/network/curl/CurlRequest.h:
10:10 AM Changeset in webkit [223837] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark compositing/visible-rect/iframe-no-layers.html as a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=178669

Unreviewed test gardening.

  • platform/ios/TestExpectations:
9:44 AM Changeset in webkit [223836] by Matt Lewis
  • 14 edits
    2 adds in trunk/Source

Unreviewed, rolling out r223820.

This caused a build break on Windows.

Reverted changeset:

"Web Inspector: Remove unused Console.setMonitoringXHREnabled"
https://bugs.webkit.org/show_bug.cgi?id=178617
https://trac.webkit.org/changeset/223820

8:57 AM Changeset in webkit [223835] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

Call FrameView::scheduleSelectionUpdate when selection needs repainting after layout instead of setting the RenderView dirty.
https://bugs.webkit.org/show_bug.cgi?id=178651
<rdar://problem/35117448>

Reviewed by Antti Koivisto.

Calling setNeedsLayout() on the RenderView to trigger selection update is problematic in 2 different ways:

  1. marking the root renderer dirty does not trigger layout (this is very specific to the root,

other renderers do trigger layout). It means that it works as long as someone else schedules a layout.

  1. when a subtree layout is already scheduled and we mark the root renderer dirty, the root gets stuck with

the dirty flag (since the entry point for the subsequent layout is a descendant of the root and not the root itself).

This patch addresses these issues by scheduling/converting subtree layout when needed.

Covered by fast/dynamic/remove-invisible-node-inside-selection.html/remove-node-inside-selection.html

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::respondToNodeModification):

  • page/FrameView.cpp:

(WebCore::FrameView::scheduleSelectionUpdate):

  • page/FrameView.h:
4:50 AM Changeset in webkit [223834] by Yusuke Suzuki
  • 6 edits
    4 adds in trunk

[JSC] Use fastJoin in Array#toString
https://bugs.webkit.org/show_bug.cgi?id=178062

Reviewed by Darin Adler.

JSTests:

  • microbenchmarks/contiguous-array-to-string.js: Added.

(target):

  • microbenchmarks/double-array-to-string.js: Added.

(target):

  • microbenchmarks/int32-array-to-string.js: Added.

(target):

Source/JavaScriptCore:

Array#toString()'s fast path uses original join operation.
But this should use fastJoin if possible.
This patch adds a fast path using fastJoin in Array#toString.
And we also extend fastJoin to perform fast joining for int32
arrays.

baseline patched

double-array-to-string 126.6157+-5.8625 103.7343+-4.4968 definitely 1.2206x faster
int32-array-to-string 64.7792+-2.6524 61.2390+-2.1749 might be 1.0578x faster
contiguous-array-to-string 62.6224+-2.6388 56.9899+-2.0852 definitely 1.0988x faster

  • runtime/ArrayPrototype.cpp:

(JSC::fastJoin):
(JSC::arrayProtoFuncToString):
(JSC::arrayProtoFuncToLocaleString):

  • runtime/JSStringJoiner.h:

(JSC::JSStringJoiner::appendWithoutSideEffects):
(JSC::JSStringJoiner::appendInt32):
(JSC::JSStringJoiner::appendDouble):

Source/WTF:

A bit cleaning up to use StringImpl::copyChars instead of
using for-loop directly.

  • wtf/text/StringView.h:

(WTF::StringView::getCharactersWithUpconvert const):

3:11 AM Changeset in webkit [223833] by magomez@igalia.com
  • 6 edits in trunk/Source/WebCore

[TexMap] Remove GraphicsContext3D usage from TextureMapperShaderProgram
https://bugs.webkit.org/show_bug.cgi?id=175425

Reviewed by Žan Doberšek.

Remove usage of the GraphicsContext3D class in TextureMapperShaderProgram.
Direct OpenGL API calls, types and constants are used instead.

By removing GraphicsContext3D, we don't use ANGLE anymore to perform the
shader adaptation to the used OpenGL/GLES2 version, so we need to do that
inside TextureMapperShaderProgram. The main changes required for this are
adding the #version directive and use in/out to define input/output parameters
when using OpenGL >= 3.2, and defining the default precision only when using
GLES2.

Besides that, now that VideoTextureCopierGStreamer doesn't have its own
GraphicsContext3D, we need to add a VAO to it when using OpenGL >= 3.2.

Based on a previous patch by Žan Doberšek <zdobersek@igalia.com>.

No behavior change.

  • platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp:

(WebCore::VideoTextureCopierGStreamer::VideoTextureCopierGStreamer):
(WebCore::VideoTextureCopierGStreamer::~VideoTextureCopierGStreamer):
(WebCore::VideoTextureCopierGStreamer::copyVideoTextureToPlatformTexture):

  • platform/graphics/gstreamer/VideoTextureCopierGStreamer.h:
  • platform/graphics/texmap/TextureMapperGL.cpp:

(WebCore::TextureMapperGLData::getShaderProgram):
(WebCore::prepareFilterProgram):
(WebCore::TextureMapperGL::drawTexture):
(WebCore::TextureMapperGL::drawFiltered):

  • platform/graphics/texmap/TextureMapperShaderProgram.cpp:

(WebCore::TextureMapperShaderProgram::create):
(WebCore::getShaderLog):
(WebCore::getProgramLog):
(WebCore::TextureMapperShaderProgram::TextureMapperShaderProgram):
(WebCore::TextureMapperShaderProgram::~TextureMapperShaderProgram):
(WebCore::TextureMapperShaderProgram::setMatrix):
(WebCore::TextureMapperShaderProgram::getLocation):

  • platform/graphics/texmap/TextureMapperShaderProgram.h:

(WebCore::TextureMapperShaderProgram::programID const):

Oct 22, 2017:

10:27 PM Changeset in webkit [223832] by zandobersek@gmail.com
  • 2 edits in trunk/JSTests

stress/check-string-ident.js is improperly skipped
https://bugs.webkit.org/show_bug.cgi?id=178642

Reviewed by Saam Barati.

  • stress/check-string-ident.js: Drop the defaultNoEagerRun directive

since it enforces the run-jsc-stress-tests script to still set up the
test to run, despite the skip directive that's used before.

10:26 PM Changeset in webkit [223831] by zandobersek@gmail.com
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Remove !(OS(LINUX) && CPU(ARM64)) guards in RegisterState.h
https://bugs.webkit.org/show_bug.cgi?id=178452

Reviewed by Yusuke Suzuki.

  • heap/RegisterState.h: Re-enable the custom RegisterState and

ALLOCATE_AND_GET_REGISTER_STATE definitions on ARM64 Linux. These don't
cause any crashes nowadays.

8:38 PM Changeset in webkit [223830] by jmarcell@apple.com
  • 7 edits in tags/Safari-604.4.5.1/Source

Versioning.

8:24 PM Changeset in webkit [223829] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.4.5.1

New tag.

8:13 PM Changeset in webkit [223828] by commit-queue@webkit.org
  • 5 edits
    8 adds
    3 deletes in trunk/Source/WebCore

[Settings] Replace current Settings generation with template file based approach
https://bugs.webkit.org/show_bug.cgi?id=178634

Patch by Sam Weinig <sam@webkit.org> on 2017-10-22
Reviewed by Joseph Pecoraro.

This replaces the recently added python based Settings generation with a generator
built in ruby, so we can take advantage of ERB for templating. The result has much
of the logic in the templates and as a result feels much easier to follow and cleaner.

Since I was moving things to ruby, I took the opertunity to switch the Settings definition
file from our .in format to yaml, which is quite a bit easier to read.

  • CMakeLists.txt:
  • DerivedSources.make:
  • Scripts/GenerateSettings: Removed.
  • Scripts/GenerateSettings.py: Removed.
  • Scripts/GenerateSettings.rb: Added.
  • Scripts/GenerateSettings/GenerateInternalSettingsHeaderFile.py: Removed.
  • Scripts/GenerateSettings/GenerateInternalSettingsIDLFile.py: Removed.
  • Scripts/GenerateSettings/GenerateInternalSettingsImplementationFile.py: Removed.
  • Scripts/GenerateSettings/GenerateSettings.py: Removed.
  • Scripts/GenerateSettings/GenerateSettingsHeaderFile.py: Removed.
  • Scripts/GenerateSettings/GenerateSettingsImplementationFile.py: Removed.
  • Scripts/GenerateSettings/Settings.py: Removed.
  • Scripts/GenerateSettings/init.py: Removed.
  • Scripts/SettingsTemplates: Added.
  • Scripts/SettingsTemplates/InternalSettingsGenerated.cpp.erb: Added.
  • Scripts/SettingsTemplates/InternalSettingsGenerated.h.erb: Added.
  • Scripts/SettingsTemplates/InternalSettingsGenerated.idl.erb: Added.
  • Scripts/SettingsTemplates/Settings.cpp.erb: Added.
  • Scripts/SettingsTemplates/Settings.h.erb: Added.
  • WebCore.xcodeproj/project.pbxproj:
  • WebCoreMacros.cmake:
  • page/Settings.in: Removed.
  • page/Settings.yaml: Added.
7:20 PM Changeset in webkit [223827] by Wenson Hsieh
  • 6 edits in trunk/Source/WebKit

[iOS] WebProcess::initializeWebProcess spends ~150ms spinning up AVSystemController on some devices
https://bugs.webkit.org/show_bug.cgi?id=178640
<rdar://problem/35113105>

Reviewed by Youenn Fablet.

In r213933, we added a mechanism to allow the web process to drive media capture, by setting an attribute on the
shared AVSystemController. This requires us to fault in the Celestial framework, which is a slight performance
hit on some hardware. Instead of doing this at the start of every web process launch, we can just do this work
lazily, the first time the web process requests permissions for user media access.

  • WebProcess/WebCoreSupport/WebUserMediaClient.cpp:

(WebKit::WebUserMediaClient::requestUserMediaAccess):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::prepareToSendUserMediaPermissionRequest):

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

(WebKit::WebPage::prepareToSendUserMediaPermissionRequest):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):

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

REGRESSION(r219675): Web Inspector: CommandLineAPI getEventListeners does not work
https://bugs.webkit.org/show_bug.cgi?id=178650
<rdar://problem/35116347>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-10-22
Reviewed by Sam Weinig.

Source/WebCore:

Test: inspector/console/command-line-api-getEventListeners.html

  • inspector/CommandLineAPIHost.cpp:

(WebCore::listenerEntriesFromListenerInfo):
Fix typo.

(WebCore::CommandLineAPIHost::getEventListeners):
Fix incorrect early return.

  • inspector/CommandLineAPIHost.h:
  • inspector/CommandLineAPIHost.idl:

Add more attributes about the listener. These new attributes match output from Chrome.

LayoutTests:

  • inspector/console/command-line-api-getEventListeners-expected.txt: Added.
  • inspector/console/command-line-api-getEventListeners.html: Added.
2:31 PM Changeset in webkit [223825] by commit-queue@webkit.org
  • 10 edits
    2 adds in trunk

[Web Animations] Add animations to the timeline
https://bugs.webkit.org/show_bug.cgi?id=178643

Patch by Antoine Quint <Antoine Quint> on 2017-10-22
Reviewed by Dean Jackson.

Source/WebCore:

If a timeline is provided as a parameter to the Animation constructor,
add it to the timeline, and remove it when the object is destroyed.

We also start the basic mechanism to dump the contents of a timeline
as text for testing purposes, currently only logging the number of
animations in a timeline and just logging the class name for animation
themselves.

Test: webanimations/animation-creation-addition.html

  • animation/AnimationTimeline.cpp:

(WebCore::AnimationTimeline::description):

  • animation/AnimationTimeline.h:
  • animation/AnimationTimeline.idl:
  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::create):
(WebCore::WebAnimation::~WebAnimation):
(WebCore::WebAnimation::description):

  • animation/WebAnimation.h:
  • testing/Internals.cpp:

(WebCore::Internals::timelineDescription):

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

LayoutTests:

Add a new test that checks that animations created with a timeline
are added to the provided timeline.

  • webanimations/animation-creation-addition-expected.txt: Added.
  • webanimations/animation-creation-addition.html: Added.
11:28 AM Changeset in webkit [223824] by Yusuke Suzuki
  • 11 edits in trunk/Source/JavaScriptCore

[JSC][Baseline] Use linkAllSlowCasesForBytecodeOffset as much as possible to simplify slow cases handling
https://bugs.webkit.org/show_bug.cgi?id=178647

Reviewed by Saam Barati.

There is much code counting slow cases in fast paths to call linkSlowCase carefully. This is really error-prone
since the number of slow cases depends on values of instruction's metadata. We have linkAllSlowCasesForBytecodeOffset,
which drains all slow cases for a specified bytecode offset. In typical cases like just calling a slow path function,
this is enough. We use linkAllSlowCasesForBytecodeOffset as much as possible. It significantly simplifies the code.

  • jit/JIT.h:

(JSC::JIT::linkAllSlowCases):

  • jit/JITArithmetic.cpp:

(JSC::JIT::emitSlow_op_unsigned):
(JSC::JIT::emit_compareAndJump):
(JSC::JIT::emit_compareAndJumpSlow):
(JSC::JIT::emitSlow_op_inc):
(JSC::JIT::emitSlow_op_dec):
(JSC::JIT::emitSlow_op_mod):
(JSC::JIT::emitSlow_op_negate):
(JSC::JIT::emitSlow_op_bitand):
(JSC::JIT::emitSlow_op_bitor):
(JSC::JIT::emitSlow_op_bitxor):
(JSC::JIT::emitSlow_op_lshift):
(JSC::JIT::emitSlow_op_rshift):
(JSC::JIT::emitSlow_op_urshift):
(JSC::JIT::emitSlow_op_add):
(JSC::JIT::emitSlow_op_div):
(JSC::JIT::emitSlow_op_mul):
(JSC::JIT::emitSlow_op_sub):

  • jit/JITArithmetic32_64.cpp:

(JSC::JIT::emit_compareAndJumpSlow):
(JSC::JIT::emitSlow_op_unsigned):
(JSC::JIT::emitSlow_op_inc):
(JSC::JIT::emitSlow_op_dec):
(JSC::JIT::emitSlow_op_mod):

  • jit/JITCall.cpp:

(JSC::JIT::compileCallEvalSlowCase):
(JSC::JIT::compileOpCallSlowCase):

  • jit/JITCall32_64.cpp:

(JSC::JIT::compileCallEvalSlowCase):
(JSC::JIT::compileOpCallSlowCase):

  • jit/JITInlines.h:

(JSC::JIT::linkAllSlowCasesForBytecodeOffset):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emitSlow_op_new_object):
(JSC::JIT::emitSlow_op_create_this):
(JSC::JIT::emitSlow_op_check_tdz):
(JSC::JIT::emitSlow_op_to_this):
(JSC::JIT::emitSlow_op_to_primitive):
(JSC::JIT::emitSlow_op_not):
(JSC::JIT::emitSlow_op_eq):
(JSC::JIT::emitSlow_op_neq):
(JSC::JIT::emitSlow_op_stricteq):
(JSC::JIT::emitSlow_op_nstricteq):
(JSC::JIT::emitSlow_op_instanceof):
(JSC::JIT::emitSlow_op_instanceof_custom):
(JSC::JIT::emitSlow_op_to_number):
(JSC::JIT::emitSlow_op_to_string):
(JSC::JIT::emitSlow_op_loop_hint):
(JSC::JIT::emitSlow_op_check_traps):
(JSC::JIT::emitSlow_op_has_indexed_property):
(JSC::JIT::emitSlow_op_get_direct_pname):
(JSC::JIT::emitSlow_op_has_structure_property):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emitSlow_op_new_object):
(JSC::JIT::emitSlow_op_instanceof):
(JSC::JIT::emitSlow_op_instanceof_custom):
(JSC::JIT::emitSlow_op_to_primitive):
(JSC::JIT::emitSlow_op_not):
(JSC::JIT::emitSlow_op_stricteq):
(JSC::JIT::emitSlow_op_nstricteq):
(JSC::JIT::emitSlow_op_to_number):
(JSC::JIT::emitSlow_op_to_string):
(JSC::JIT::emitSlow_op_create_this):
(JSC::JIT::emitSlow_op_to_this):
(JSC::JIT::emitSlow_op_check_tdz):
(JSC::JIT::emitSlow_op_has_indexed_property):
(JSC::JIT::emitSlow_op_get_direct_pname):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emitSlow_op_try_get_by_id):
(JSC::JIT::emitSlow_op_get_by_id):
(JSC::JIT::emitSlow_op_get_by_id_with_this):
(JSC::JIT::emitSlow_op_put_by_id):
(JSC::JIT::emitSlow_op_resolve_scope):
(JSC::JIT::emitSlow_op_get_from_scope):
(JSC::JIT::emitSlow_op_put_to_scope):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emitSlow_op_try_get_by_id):
(JSC::JIT::emitSlow_op_get_by_id):
(JSC::JIT::emitSlow_op_get_by_id_with_this):
(JSC::JIT::emitSlow_op_put_by_id):
(JSC::JIT::emitSlow_op_resolve_scope):
(JSC::JIT::emitSlow_op_get_from_scope):
(JSC::JIT::emitSlow_op_put_to_scope):

9:47 AM Changeset in webkit [223823] by Yusuke Suzuki
  • 9 edits in trunk/Source/JavaScriptCore

[JSC] Clean up baseline slow path
https://bugs.webkit.org/show_bug.cgi?id=178646

Reviewed by Saam Barati.

If the given op is just calling a slow path function, we should use DEFINE_SLOW_OP instead.
It is good since (1) we can reduce the manual emitting code and (2) it can clarify which
function is implemented as a slow path call. This patch is an attempt to reduce 32bit specific
code in baseline JIT.

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):

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

(JSC::JIT::emit_op_pow): Deleted.

  • jit/JITArithmetic32_64.cpp:

(JSC::JIT::emitSlow_op_mod):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_strcat): Deleted.
(JSC::JIT::emit_op_push_with_scope): Deleted.
(JSC::JIT::emit_op_assert): Deleted.
(JSC::JIT::emit_op_create_lexical_environment): Deleted.
(JSC::JIT::emit_op_throw_static_error): Deleted.
(JSC::JIT::emit_op_new_array_with_spread): Deleted.
(JSC::JIT::emit_op_spread): Deleted.
(JSC::JIT::emit_op_get_enumerable_length): Deleted.
(JSC::JIT::emit_op_has_generic_property): Deleted.
(JSC::JIT::emit_op_get_property_enumerator): Deleted.
(JSC::JIT::emit_op_to_index_string): Deleted.
(JSC::JIT::emit_op_create_direct_arguments): Deleted.
(JSC::JIT::emit_op_create_scoped_arguments): Deleted.
(JSC::JIT::emit_op_create_cloned_arguments): Deleted.
(JSC::JIT::emit_op_create_rest): Deleted.
(JSC::JIT::emit_op_unreachable): Deleted.

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_strcat): Deleted.
(JSC::JIT::emit_op_push_with_scope): Deleted.
(JSC::JIT::emit_op_assert): Deleted.
(JSC::JIT::emit_op_create_lexical_environment): Deleted.

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_put_by_val_with_this): Deleted.
(JSC::JIT::emit_op_get_by_val_with_this): Deleted.
(JSC::JIT::emit_op_put_by_id_with_this): Deleted.
(JSC::JIT::emit_op_resolve_scope_for_hoisting_func_decl_in_eval): Deleted.
(JSC::JIT::emit_op_define_data_property): Deleted.
(JSC::JIT::emit_op_define_accessor_property): Deleted.

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emit_op_resolve_scope_for_hoisting_func_decl_in_eval): Deleted.
(JSC::JIT::emit_op_get_by_val_with_this): Deleted.
(JSC::JIT::emit_op_put_by_id_with_this): Deleted.
(JSC::JIT::emit_op_put_by_val_with_this): Deleted.

Oct 21, 2017:

8:41 PM Changeset in webkit [223822] by Michael Catanzaro
  • 2 edits in trunk/Source/WebKit

Unreviewed, silence a -Wunused-but-set-variable warning

  • WebProcess/WebPage/EventDispatcher.cpp:

(WebKit::EventDispatcher::wheelEvent):

7:05 PM Changeset in webkit [223821] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[FrameView::layout cleanup] Drop allowSubtree parameter
https://bugs.webkit.org/show_bug.cgi?id=178623
<rdar://problem/35111012>

Reviewed by Sam Weinig.

This flag is only set through ::forceLayout(). Let's just convert the subtree layout
to full layout right before calling ::layout().

No change in functionality.

  • page/FrameView.cpp:

(WebCore::FrameView::handleLayoutWithFrameFlatteningIfNeeded):
(WebCore::FrameView::layout):
(WebCore::FrameView::startLayoutAtMainFrameViewIfNeeded):
(WebCore::FrameView::forceLayout):

  • page/FrameView.h:
3:23 PM Changeset in webkit [223820] by commit-queue@webkit.org
  • 14 edits
    2 deletes in trunk/Source

Web Inspector: Remove unused Console.setMonitoringXHREnabled
https://bugs.webkit.org/show_bug.cgi?id=178617

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-10-21
Reviewed by Sam Weinig.

Source/JavaScriptCore:

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • inspector/agents/InspectorConsoleAgent.h:
  • inspector/agents/JSGlobalObjectConsoleAgent.cpp: Removed.
  • inspector/agents/JSGlobalObjectConsoleAgent.h: Removed.
  • inspector/protocol/Console.json:

Removed files and method.

  • inspector/JSGlobalObjectInspectorController.cpp:

(Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
This can use the base ConsoleAgent now.

Source/WebCore:

  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::didFinishXHRLoadingImpl):

  • inspector/InspectorInstrumentation.h:

(WebCore::InspectorInstrumentation::didFinishXHRLoading):

  • inspector/WebConsoleAgent.cpp:

(WebCore::WebConsoleAgent::setMonitoringXHREnabled): Deleted.
(WebCore::WebConsoleAgent::didFinishXHRLoading): Deleted.

  • inspector/WebConsoleAgent.h:

Remove XHR monitoring code.

  • xml/XMLHttpRequest.h:
  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::send):
(WebCore::XMLHttpRequest::didFinishLoading):
(WebCore::XMLHttpRequest::setLastSendLineAndColumnNumber): Deleted.

  • xml/XMLHttpRequest.idl:

Remove now unused state on XHR and ExecState requirement for send().

2:48 PM Changeset in webkit [223819] by dino@apple.com
  • 4 edits
    9 adds in trunk

createImageBitmap with basic HTMLImageElement
https://bugs.webkit.org/show_bug.cgi?id=178619
<rdar://problem/35104118>

Reviewed by Antoine Quint.

Source/WebCore:

Implement the basic infrastructure for creating
an ImageBitmap from an HTMLImageElement.

Test: http/wpt/2dcontext/imagebitmap/createImageBitmap.html

  • html/ImageBitmap.cpp:

(WebCore::ImageBitmap::createPromise): Create the image buffer
and draw the image into its backing store.

  • html/ImageBitmap.h:

LayoutTests:

Make a better test for createImageBitmap. This will be
submitted to Web Platform Tests.

  • http/wpt/2dcontext/imagebitmap/createImageBitmap-expected.txt: Added.
  • http/wpt/2dcontext/imagebitmap/createImageBitmap.html: Added.
  • http/wpt/common/canvas-tests.css: Added.
  • http/wpt/common/canvas-tests.js: Added.
  • http/wpt/images/pattern.png: Added.
2:42 PM Changeset in webkit [223818] by timothy_horton@apple.com
  • 5 edits
    1 copy
    1 add in trunk

Turn on ccache for Mac cmake builds by default
https://bugs.webkit.org/show_bug.cgi?id=177059

Reviewed by Sam Weinig.

.:

  • Source/cmake/WebKitCCache.cmake: Added.
  • Source/cmake/WebKitCommon.cmake:

Turn on ccache for Mac CMake builds (Makefile and Ninja generators only)
if it's installed, making use of CMake's ability to wrap the compiler invocation.

Tools:

  • ccache/ccache-clang:
  • ccache/ccache-wrapper: Added.

Add a pass-through ccache wrapper to be used with CMake, in addition
to the existing faux-clang wrappers.

  • Scripts/build-webkit:

Add --use-ccache and --no-use-ccache option, which will define
WK_USE_CCACHE to YES or NO, respectively, which the underlying
build systems respect. We do not define WK_USE_CCACHE if the option
is not specified, because the underlying build systems have different
default values.

12:23 PM Changeset in webkit [223817] by jmarcell@apple.com
  • 7 edits in branches/safari-604-branch/Source

Versioning.

12:19 PM Changeset in webkit [223816] by jmarcell@apple.com
  • 3 edits
    1 add in branches/safari-604-branch

Cherry-pick r223731. rdar://problem/35100279

12:19 PM Changeset in webkit [223815] by jmarcell@apple.com
  • 3 edits
    1 add in branches/safari-604-branch

Cherry-pick r223645. rdar://problem/34820875

12:19 PM Changeset in webkit [223814] by jmarcell@apple.com
  • 7 edits
    49 adds in branches/safari-604-branch

Cherry-pick r223578. rdar://problem/34891313

8:34 AM Changeset in webkit [223813] by Yusuke Suzuki
  • 6 edits in trunk/Source/JavaScriptCore

[JSC] Remove per-host-function CTI stub in 32bit environment
https://bugs.webkit.org/show_bug.cgi?id=178581

Reviewed by Saam Barati.

JIT::privateCompileCTINativeCall only exists in 32bit environment and it is almost the same to native call CTI stub.
The only difference is that it embed the address of the host function directly in the generated stub. This means
that we have per-host-function CTI stub only in 32bit environment.

This patch just removes it and use one CTI stub instead. This design is the same to the current 64bit implementation.

  • jit/JIT.cpp:

(JSC::JIT::compileCTINativeCall): Deleted.

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

(JSC::JIT::privateCompileCTINativeCall): Deleted.

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::privateCompileCTINativeCall): Deleted.

  • jit/JITThunks.cpp:

(JSC::JITThunks::hostFunctionStub):

7:11 AM Changeset in webkit [223812] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[Web Animations] Add bindings to unified sources
https://bugs.webkit.org/show_bug.cgi?id=178620

Patch by Antoine Quint <Antoine Quint> on 2017-10-21
Reviewed by Dean Jackson.

Removing the Web Animations bindings from the WebCore target and adding them to the unified sources list instead.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
1:26 AM Changeset in webkit [223811] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebCore

Fix the Mac CMake build

  • PlatformMac.cmake:
1:15 AM Changeset in webkit [223810] by Antti Koivisto
  • 7 edits in trunk

Support ::before/::after pseudo elements with display:contents
https://bugs.webkit.org/show_bug.cgi?id=178584

Reviewed by Ryosuke Niwa.

Source/WebCore:

This is cases like

::before { display:contents; content:'foo' }

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::adjustDisplayContentsStyle): Added.

Allow display:contents on pseudo elements.
Factor into function.

(WebCore::StyleResolver::adjustRenderStyle):

  • dom/PseudoElement.h:

Add a weak vector of content renderers.

  • style/RenderTreePosition.h:

(WebCore::RenderTreePosition::moveToLastChild):

Add a way to set a valid render tree position without a node.

  • style/RenderTreeUpdaterGeneratedContent.cpp:

(WebCore::createContentRenderers):

Take RenderTreePosition.

(WebCore::updateStyleForContentRenderers):

Update based on the content renderer vector instead of doing a tree walk.

(WebCore::removeAndDestroyContentRenderers):

Helper for destroying content renderers.

(WebCore::RenderTreeUpdater::GeneratedContent::updatePseudoElement):

In the normal case create a render tree position for the pseudo element renderer and
use RenderTreePosition::moveToLastChild to make it a valid position. (The existing
RenderTreePosition interface didn't have way to move to positions in anonymous boxes)

In the case of a non box generating display:contents pseudo element, use the current
render tree position instead.

Ensure that pseudo element renderers are destroyed before creating the new ones since in
display:contents case they are not descendants of the pseudo renderer and don't get cleared
automatically.

LayoutTests:

  • TestExpectations: Enable imported/w3c/web-platform-tests/css/css-display-3/display-contents-before-after-002.html

Oct 20, 2017:

11:52 PM Changeset in webkit [223809] by commit-queue@webkit.org
  • 5 edits in trunk

Web Inspector: Support async test() { ... } in Inspector Test Suites
https://bugs.webkit.org/show_bug.cgi?id=178614

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-10-20
Reviewed by Devin Rousso.

Add the ability to have test functions be async functions. A successful
async test function just needs to complete evaluation. To indicate
failure it should throw an exception.

suite.addTestCase({

name: "ExceptionOfNormal",
async test() {

InspectorTest.expectThat(...);

}

});

suite.addTestCase({

name: "ExampleOfRejection",
async test() {

let value = await SomeAgent.method();
if (value.error)

throw "Exception";

...

}

});

Using async test functions has the added benefit that a runtime exception
inside of asynchronous test code will reject the current test case instead
of timing out. For example...

suite.addTestCase({

name: "ExampleOfRejectionThroughRuntimeException",
async test() {

let arr = [];
arr.this.does.not.exist;

}

});

... should will lead to a failure instead of a timeout.

This should allow us to structure some common tests more naturally, like so:

suite.addTestCase({

name: "ExampleOfNormalAsyncTest",
async test() {

InspectorTest.evaluateInPage(...);
let event = await WI.Manager.awaitEvent(...);
let resource = event.data.resource;
InspectorTest.expectEqual(...);
InspectorTest.expectEqual(...);
InspectorTest.expectEqual(...);

}

});

  • inspector/unit-tests/async-test-suite-expected.txt:
  • inspector/unit-tests/async-test-suite.html:
  • inspector/unit-tests/target-manager.html:
11:16 PM Changeset in webkit [223808] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Add FIXME comment after r223803
https://bugs.webkit.org/show_bug.cgi?id=178418

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::ensureNetworkProcess):
We need some work to better support customized persistent data stores. Add a comment indicating such.

10:04 PM Changeset in webkit [223807] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: scrolling the editor while debugging shouldn't trigger popovers
https://bugs.webkit.org/show_bug.cgi?id=178325

Reviewed by Devin Rousso.

Ignore the next "mousemove" event immediately following a "mousewheel",
when determining the hovered item for purposes of triggering a popover.

  • UserInterface/Controllers/CodeMirrorTokenTrackingController.js:

(WI.CodeMirrorTokenTrackingController):
(WI.CodeMirrorTokenTrackingController.prototype._startTracking):
(WI.CodeMirrorTokenTrackingController.prototype._stopTracking):
(WI.CodeMirrorTokenTrackingController.prototype.handleEvent):
(WI.CodeMirrorTokenTrackingController.prototype._mouseMovedOverEditor):

10:00 PM Changeset in webkit [223806] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk/Source/WebInspectorUI

Web Inspector: preview content view for MIME type application/json should be a collapsible tree outline
https://bugs.webkit.org/show_bug.cgi?id=158938
<rdar://problem/26891128>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-10-20
Reviewed by Brian Burg.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Main.html:

New files and strings.

  • UserInterface/Views/JSONResourceContentView.css: Added.

(.content-view.resource.json):
(.content-view.resource.json .object-tree .prototype-property):
Some padding and scrolling for the JSON content view.

  • UserInterface/Views/JSONResourceContentView.js: Added.

(WI.JSONResourceContentView):
(WI.JSONResourceContentView.customContentViewDisplayName):
(WI.JSONResourceContentView.prototype.contentAvailable):
(WI.JSONResourceContentView.prototype.closed):
JSON view evaluates the JSON content on the page and shows an ObjectTree
for the resulting object.

  • UserInterface/Views/ResourceClusterContentView.js:

(WI.ResourceClusterContentView):
(WI.ResourceClusterContentView.prototype.get customResponseContentView):
(WI.ResourceClusterContentView.prototype.get selectionPathComponents):
(WI.ResourceClusterContentView.prototype.restoreFromCookie):
(WI.ResourceClusterContentView.prototype.showResponse):
(WI.ResourceClusterContentView.prototype._canShowRequestContentView):
(WI.ResourceClusterContentView.prototype._canShowCustomResponseContentView):
(WI.ResourceClusterContentView.prototype._pathComponentForContentView):
(WI.ResourceClusterContentView.prototype._identifierForContentView):
(WI.ResourceClusterContentView.prototype._showContentViewForIdentifier):
(WI.ResourceClusterContentView.prototype._resourceTypeDidChange):
(WI.ResourceClusterContentView.prototype._resourceLoadingDidFinish):
(WI.ResourceClusterContentView.prototype._tryEnableCustomResponseContentView):
(WI.ResourceClusterContentView.prototype._customContentViewConstructorForResource):
Allow a custom content view to be used for a resource based on the response.
Currently the only custom content view is the JSON content view.

9:31 PM Changeset in webkit [223805] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[FrameView::layout cleanup] Use SetForScope to ensure layout state correctness
https://bugs.webkit.org/show_bug.cgi?id=178604
<rdar://problem/35101890>

Reviewed by Simon Fraser.

SetForScope guarantees state correctness even with nested layouts. This is a lot less
error prone than resetting the state value after each potential recursive call.

Covered by existing tests.

  • page/FrameView.cpp:

(WebCore::FrameView::handleDeferredScrollbarsUpdateAfterDirectionChange): This layout state does
not look too useful.
(WebCore::FrameView::layout):

  • page/FrameView.h: While performPostLayoutTasks() is somewhat special since it can either be sync or async,

so painting should be allowed in both cases.

7:33 PM Changeset in webkit [223804] by commit-queue@webkit.org
  • 21 edits in trunk/Source/WebCore

SVGPathElement should cache the built-up Path of its non animating pathByteStream()
https://bugs.webkit.org/show_bug.cgi?id=178248

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-10-20
Reviewed by Simon Fraser.

Instead of creating a Path object from the non animating pathByteStream()
every time we need to updatePathFromPathElement(), the Path object can be
cached once it is created and used for later calls.

  • html/canvas/Path2D.h: buildPathFromString() now returns a Path.
  • platform/graphics/Path.h:
  • platform/graphics/cairo/PathCairo.cpp:

(WebCore::Path::Path):
(WebCore::Path::operator=):

  • platform/graphics/cg/PathCG.cpp:

(WebCore::Path::Path):
(WebCore::Path::operator=):

  • platform/graphics/win/PathDirect2D.cpp:

(WebCore::Path::Path):
(WebCore::Path::operator=):
Define the move constructor and the move assignment operator for the the
Path class so a statement like "Path path = buildPathFromString()" won't
go through the copy constructor and the copy assignment operator.

  • rendering/style/BasicShapes.cpp:

(WebCore::SVGPathTranslatedByteStream::path const):

  • rendering/svg/RenderSVGResourceClipper.cpp:

(WebCore::RenderSVGResourceClipper::pathOnlyClipping):

  • rendering/svg/RenderSVGShape.cpp:

(WebCore::RenderSVGShape::updateShapeFromElement):

  • rendering/svg/RenderSVGTextPath.cpp:

(WebCore::RenderSVGTextPath::layoutPath const):

  • rendering/svg/SVGPathData.cpp:

(WebCore::pathFromCircleElement):
(WebCore::pathFromEllipseElement):
(WebCore::pathFromLineElement):
(WebCore::pathFromPathElement):
(WebCore::pathFromPolygonElement):
(WebCore::pathFromPolylineElement):
(WebCore::pathFromRectElement):
(WebCore::pathFromGraphicsElement):
(WebCore::updatePathFromCircleElement): Deleted.
(WebCore::updatePathFromEllipseElement): Deleted.
(WebCore::updatePathFromLineElement): Deleted.
(WebCore::updatePathFromPathElement): Deleted.
(WebCore::updatePathFromPolygonElement): Deleted.
(WebCore::updatePathFromPolylineElement): Deleted.
(WebCore::updatePathFromRectElement): Deleted.
(WebCore::updatePathFromGraphicsElement): Deleted.

  • rendering/svg/SVGPathData.h:
  • svg/SVGAnimateMotionElement.cpp:

(WebCore::SVGAnimateMotionElement::parseAttribute):
(WebCore::SVGAnimateMotionElement::updateAnimationPath):

  • svg/SVGGraphicsElement.cpp:

(WebCore::SVGGraphicsElement::toClipPath):

  • svg/SVGGraphicsElement.h:

Rename updatePathFromElement() to pathFromGraphicsElement().

  • svg/SVGPathElement.cpp:

(WebCore::SVGPathElement::parseAttribute): Clear the cache when
m_pathByteStream changes.
(WebCore::SVGPathElement::pathForByteStream const): Caches the m_cachedPath
if it is null.
(WebCore::SVGPathElement::pathSegListChanged): Clear the cache when
m_pathByteStream changes.

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

(WebCore::buildPathFromString):
(WebCore::buildPathFromByteStream):

  • svg/SVGPathUtilities.h:

Make thes buildPathFromString() and buildPathFromByteStream() return Paths.

  • svg/SVGUseElement.cpp:

(WebCore::SVGUseElement::toClipPath):

  • svg/SVGUseElement.h:

Make these toClipPath() return Path.

6:11 PM Changeset in webkit [223803] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Fix API tests after r223791.
https://bugs.webkit.org/show_bug.cgi?id=178418

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::ensureNetworkProcess):
Whatever NetworkSessionInitializationParameters we send with the NetworkProcess initialization message,
that's the default session. This is needed for WebKit.WebsiteDataStoreCustomPaths.
(WebKit::WebProcessPool::createNewWebProcess):
Don't change behavior or NetworkProcess initialization like I did in r223791.

5:49 PM Changeset in webkit [223802] by rniwa@webkit.org
  • 90 edits in trunk/Source/WebCore

Rename insertedInto and removedFrom to insertedIntoAncestor and removedFromAncestor
https://bugs.webkit.org/show_bug.cgi?id=178605

Reviewed by Andy Estes.

Renamed insertedInto and removedFrom to insertedIntoAncestor and removedFromAncestor respectively
to make it clear that these functions can be called even when node's immediate parent didn't change.

  • dom/ContainerNodeAlgorithms.cpp:

(WebCore::notifyNodeInsertedIntoDocument):
(WebCore::notifyNodeInsertedIntoTree):
(WebCore::notifyNodeRemovedFromDocument):
(WebCore::notifyNodeRemovedFromTree):
(WebCore::notifyChildNodeRemoved):

  • dom/ContainerNodeAlgorithms.h:
  • dom/Element.cpp:

(WebCore::Element::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::Element::removedFromAncestor): Renamed from removedFrom.

  • dom/Element.h:
  • dom/Node.cpp:

(WebCore::Node::insertedIntoAncestor):
(WebCore::Node::removedFromAncestor):
(WebCore::Node::removedFrom): Deleted.

  • dom/Node.h:
  • dom/ProcessingInstruction.cpp:

(WebCore::ProcessingInstruction::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::ProcessingInstruction::removedFromAncestor): Renamed from removedFrom.

  • dom/ProcessingInstruction.h:
  • dom/ScriptElement.h:

(WebCore::ScriptElement::insertedIntoAncestor const): Renamed from insertedInto.

  • dom/ShadowRoot.cpp:

(WebCore::ShadowRoot::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::ShadowRoot::removedFromAncestor): Renamed from removedFrom.

  • dom/ShadowRoot.h:
  • html/FormAssociatedElement.cpp:

(WebCore::FormAssociatedElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::FormAssociatedElement::removedFromAncestor): Renamed from removedFrom.

  • html/FormAssociatedElement.h:
  • html/HTMLBaseElement.cpp:

(WebCore::HTMLBaseElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLBaseElement::removedFromAncestor): Renamed from removedFrom.

  • html/HTMLBaseElement.h:
  • html/HTMLBodyElement.cpp:

(WebCore::HTMLBodyElement::insertedIntoAncestor): Renamed from insertedInto.

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

(WebCore::HTMLFormControlElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLFormControlElement::removedFromAncestor): Renamed from removedFrom.

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

(WebCore::HTMLFormControlElementWithState::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLFormControlElementWithState::removedFromAncestor): Renamed from removedFrom.

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

(WebCore::HTMLFormElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLFormElement::removedFromAncestor): Renamed from removedFrom.

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

(WebCore::HTMLFrameElementBase::insertedIntoAncestor): Renamed from insertedInto.

  • html/HTMLFrameElementBase.h:
  • html/HTMLFrameSetElement.cpp:

(WebCore::HTMLFrameSetElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLFrameSetElement::removedFromAncestor): Renamed from removedFrom.

  • html/HTMLFrameSetElement.h:
  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLImageElement::removedFromAncestor): Renamed from removedFrom.

  • html/HTMLImageElement.h:
  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLInputElement::removedFromAncestor): Renamed from removedFrom.

  • html/HTMLInputElement.h:
  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLLinkElement::removedFromAncestor): Renamed from removedFrom.

  • html/HTMLLinkElement.h:
  • html/HTMLMapElement.cpp:

(WebCore::HTMLMapElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLMapElement::removedFromAncestor): Renamed from removedFrom.

  • html/HTMLMapElement.h:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLMediaElement::removedFromAncestor): Renamed from removedFrom.

  • html/HTMLMediaElement.h:
  • html/HTMLMetaElement.cpp:

(WebCore::HTMLMetaElement::insertedIntoAncestor): Renamed from insertedInto.

  • html/HTMLMetaElement.h:
  • html/HTMLObjectElement.cpp:

(WebCore::HTMLObjectElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLObjectElement::removedFromAncestor): Renamed from removedFrom.

  • html/HTMLObjectElement.h:
  • html/HTMLOptionElement.cpp:

(WebCore::HTMLOptionElement::insertedIntoAncestor): Renamed from insertedInto.

  • html/HTMLOptionElement.h:
  • html/HTMLScriptElement.cpp:

(WebCore::HTMLScriptElement::insertedIntoAncestor): Renamed from insertedInto.

  • html/HTMLScriptElement.h:
  • html/HTMLSelectElement.cpp:

(WebCore::HTMLSelectElement::insertedIntoAncestor): Renamed from insertedInto.

  • html/HTMLSelectElement.h:
  • html/HTMLSlotElement.cpp:

(WebCore::HTMLSlotElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLSlotElement::removedFromAncestor): Renamed from removedFrom.

  • html/HTMLSlotElement.h:
  • html/HTMLSourceElement.cpp:

(WebCore::HTMLSourceElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLSourceElement::removedFromAncestor): Renamed from removedFrom.

  • html/HTMLSourceElement.h:
  • html/HTMLStyleElement.cpp:

(WebCore::HTMLStyleElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLStyleElement::removedFromAncestor): Renamed from removedFrom.

  • html/HTMLStyleElement.h:
  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::insertedIntoAncestor): Renamed from insertedInto.

  • html/HTMLTextFormControlElement.h:
  • html/HTMLTitleElement.cpp:

(WebCore::HTMLTitleElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLTitleElement::removedFromAncestor): Renamed from removedFrom.

  • html/HTMLTitleElement.h:
  • html/HTMLTrackElement.cpp:

(WebCore::HTMLTrackElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLTrackElement::removedFromAncestor): Renamed from removedFrom.

  • html/HTMLTrackElement.h:
  • svg/SVGElement.cpp:

(WebCore::SVGElement::removedFromAncestor): Renamed from removedFrom.
(WebCore::SVGElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::SVGElement::updateRelativeLengthsInformation):

  • svg/SVGElement.h:
  • svg/SVGFEImageElement.cpp:

(WebCore::SVGFEImageElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::SVGFEImageElement::removedFromAncestor): Renamed from removedFrom.

  • svg/SVGFEImageElement.h:
  • svg/SVGFontFaceElement.cpp:

(WebCore::SVGFontFaceElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::SVGFontFaceElement::removedFromAncestor): Renamed from removedFrom.

  • svg/SVGFontFaceElement.h:
  • svg/SVGFontFaceUriElement.cpp:

(WebCore::SVGFontFaceUriElement::insertedIntoAncestor): Renamed from insertedInto.

  • svg/SVGFontFaceUriElement.h:
  • svg/SVGImageElement.cpp:

(WebCore::SVGImageElement::insertedIntoAncestor): Renamed from insertedInto.

  • svg/SVGImageElement.h:
  • svg/SVGMPathElement.cpp:

(WebCore::SVGMPathElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::SVGMPathElement::removedFromAncestor): Renamed from removedFrom.

  • svg/SVGMPathElement.h:
  • svg/SVGPathElement.cpp:

(WebCore::SVGPathElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::SVGPathElement::removedFromAncestor): Renamed from removedFrom.

  • svg/SVGPathElement.h:
  • svg/SVGSVGElement.cpp:

(WebCore::SVGSVGElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::SVGSVGElement::removedFromAncestor): Renamed from removedFrom.

  • svg/SVGSVGElement.h:
  • svg/SVGScriptElement.cpp:

(WebCore::SVGScriptElement::insertedIntoAncestor): Renamed from insertedInto.

  • svg/SVGScriptElement.h:
  • svg/SVGStyleElement.cpp:

(WebCore::SVGStyleElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::SVGStyleElement::removedFromAncestor): Renamed from removedFrom.

  • svg/SVGStyleElement.h:
  • svg/SVGTRefElement.cpp:

(WebCore::SVGTRefElement::buildPendingResource):
(WebCore::SVGTRefElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::SVGTRefElement::removedFromAncestor): Renamed from removedFrom.

  • svg/SVGTRefElement.h:
  • svg/SVGTextPathElement.cpp:

(WebCore::SVGTextPathElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::SVGTextPathElement::removedFromAncestor): Renamed from removedFrom.

  • svg/SVGTextPathElement.h:
  • svg/SVGTitleElement.cpp:

(WebCore::SVGTitleElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::SVGTitleElement::removedFromAncestor): Renamed from removedFrom.

  • svg/SVGTitleElement.h:
  • svg/SVGUseElement.cpp:

(WebCore::SVGUseElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::SVGUseElement::removedFromAncestor): Renamed from removedFrom.

  • svg/SVGUseElement.h:
  • svg/animation/SVGSMILElement.cpp:

(WebCore::SVGSMILElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::SVGSMILElement::removedFromAncestor): Renamed from removedFrom.

  • svg/animation/SVGSMILElement.h:
5:03 PM Changeset in webkit [223801] by rniwa@webkit.org
  • 3 edits in trunk/Source/WebCore

Fix conditions in HTMLSourceElement and HTMLTrackElement's insertedInto and removedFrom
https://bugs.webkit.org/show_bug.cgi?id=178607

Reviewed by Eric Carlson.

Fixed the conditions in insertedInto and removedFrom of HTMLSourceElement and HTMLTrackElement to be
semantically sensisble. Since these elements are only functional when their immediate parents are
HTMLMediaElement and HTMLPictureElement, we have to check that its immediate parent changed, not when
some of its ancestor had changed by insertion or removal.

  • html/HTMLSourceElement.cpp:

(WebCore::HTMLSourceElement::insertedInto):
(WebCore::HTMLSourceElement::removedFrom):

  • html/HTMLTrackElement.cpp:

(WebCore::HTMLTrackElement::insertedInto):
(WebCore::HTMLTrackElement::removedFrom):

4:55 PM Changeset in webkit [223800] by rniwa@webkit.org
  • 2 edits in trunk/LayoutTests

http/tests/security/clipboard/drag-drop-html-cross-origin-iframe-in-same-origin.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=178606

Reviewed by Wenson Hsieh.

The bug was caused by the race condition during the page loading of iframes.

Waiting for message event wasn't doing anything useful because it was receiving the message from
source iframe before the drag & drop had started.

Fixed the bug by waiting for the second message event. Also replaced the wait for load event
by the wait for the first message event for clarity.

  • http/tests/security/clipboard/drag-drop-html-cross-origin-iframe-in-same-origin.html:
4:40 PM Changeset in webkit [223799] by Ryan Haddad
  • 11 edits
    3 moves
    24 adds
    1 delete in trunk/LayoutTests

[iOS] Rebaseline compositing tests
https://bugs.webkit.org/show_bug.cgi?id=178492

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/ios/compositing/backing/child-layer-no-backing-expected.txt: Added.
  • platform/ios/compositing/contents-scale/animating-expected.txt:
  • platform/ios/compositing/geometry/ancestor-overflow-change-expected.txt:
  • platform/ios/compositing/geometry/fixed-position-expected.txt:
  • platform/ios/compositing/geometry/fixed-position-flipped-writing-mode-expected.txt: Added.
  • platform/ios/compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt: Added.
  • platform/ios/compositing/geometry/limit-layer-bounds-overflow-repaint-expected.txt: Added.
  • platform/ios/compositing/geometry/preserve-3d-switching-expected.txt: Added.
  • platform/ios/compositing/geometry/tall-page-composited-expected.txt: Added.
  • platform/ios/compositing/geometry/video-fixed-scrolling-expected.txt: Added.
  • platform/ios/compositing/geometry/video-opacity-overlay-expected.txt: Added.
  • platform/ios/compositing/iframes/invisible-nested-iframe-show-expected.txt:
  • platform/ios/compositing/iframes/overlapped-nested-iframes-expected.txt: Renamed from LayoutTests/platform/ios-wk2/compositing/iframes/overlapped-nested-iframes-expected.txt.
  • platform/ios/compositing/images/direct-image-object-fit-expected.txt: Added.
  • platform/ios/compositing/layer-creation/animation-overlap-with-children-expected.txt: Removed.
  • platform/ios/compositing/layer-creation/fixed-position-and-transform-expected.txt: Renamed from LayoutTests/platform/ios-wk2/compositing/layer-creation/fixed-position-and-transform-expected.txt.
  • platform/ios/compositing/overflow/ancestor-overflow-expected.txt:
  • platform/ios/compositing/overflow/clipping-ancestor-with-accelerated-scrolling-ancestor-expected.txt: Added.
  • platform/ios/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants-expected.txt: Added.
  • platform/ios/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants2-expected.txt: Added.
  • platform/ios/compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt:
  • platform/ios/compositing/overflow/fixed-position-ancestor-clip-expected.txt:
  • platform/ios/compositing/overflow/overflow-clip-with-accelerated-scrolling-ancestor-expected.txt: Added.
  • platform/ios/compositing/reflections/direct-image-object-fit-reflected-expected.txt: Added.
  • platform/ios/compositing/reflections/load-video-in-reflection-expected.txt: Added.
  • platform/ios/compositing/reflections/nested-reflection-on-overflow-expected.txt:
  • platform/ios/compositing/repaint/page-scale-repaint-expected.txt: Added.
  • platform/ios/compositing/rtl/rtl-fixed-overflow-scrolled-expected.txt: Renamed from LayoutTests/platform/ios-wk2/compositing/rtl/rtl-fixed-overflow-scrolled-expected.txt.
  • platform/ios/compositing/rtl/rtl-overflow-scrolling-expected.txt: Added.
  • platform/ios/compositing/self-painting-layers-expected.txt: Added.
  • platform/ios/compositing/tiling/huge-layer-img-expected.txt: Added.
  • platform/ios/compositing/visible-rect/3d-transform-style-expected.txt: Added.
  • platform/ios/compositing/visible-rect/animated-expected.txt: Added.
  • platform/ios/compositing/visible-rect/iframe-no-layers-expected.txt: Added.
  • platform/ios/compositing/visible-rect/iframe-with-layers-outside-viewport-expected.txt: Added.
  • platform/ios/compositing/visible-rect/mask-layer-coverage-expected.txt: Added.
4:12 PM Changeset in webkit [223798] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Fix download tests on El Capitan after r223730
https://bugs.webkit.org/show_bug.cgi?id=178547

  • UIProcess/Downloads/DownloadProxy.cpp:

(WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
Revert to original behavior. This uses suggestedFilename, which may have come from places like
the download attribute, instead of always using the filename from CFNetwork.

4:09 PM Changeset in webkit [223797] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.4.5

Tag Safari-604.4.5.

2:56 PM Changeset in webkit [223796] by aakash_jain@apple.com
  • 5 edits in trunk/Tools

Do not run binding tests on multiple EWSes
https://bugs.webkit.org/show_bug.cgi?id=178599

Reviewed by Alexey Proskuryakov.

Remove old code which runs bindings tests and ignore it's result. We now have
a dedicated bindings test EWS.

  • Scripts/webkitpy/tool/steps/runtests.py:

(RunTests.run): Removed bindings tests code.

  • Scripts/webkitpy/tool/steps/runtests_unittest.py: Updated unit-tests.

(RunTestsTest.test_webkit_run_unit_tests): Ditto.

  • Scripts/webkitpy/tool/steps/steps_unittest.py: Ditto.
  • Scripts/webkitpy/tool/commands/download_unittest.py: Ditto.
2:20 PM Changeset in webkit [223795] by keith_miller@apple.com
  • 3 edits in trunk/Source/WebCore

Unreviewed, fix windows build.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
1:58 PM Changeset in webkit [223794] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebCore

Use "= default" for more default constructors and destructors in WebCore
https://bugs.webkit.org/show_bug.cgi?id=178585

Patch by Daniel Bates <dabates@apple.com> on 2017-10-20
Reviewed by Alex Christensen.

Also remove some destructors that would be implicitly generated.

  • Modules/applepay/PaymentMerchantSession.h:

(WebCore::PaymentMerchantSession::~PaymentMerchantSession): Deleted.

  • platform/ControlStates.h:

(WebCore::ControlStates::~ControlStates): Deleted.

  • platform/PlatformEvent.h:

(WebCore::PlatformEvent::~PlatformEvent): Use default.

  • platform/PlatformStrategies.h:

(WebCore::PlatformStrategies::PlatformStrategies): Ditto.

  • platform/image-decoders/gif/GIFImageReader.h:

(GIFFrameContext::GIFFrameContext):
(GIFFrameContext::~GIFFrameContext): Deleted.
(GIFImageReader::~GIFImageReader): Deleted.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::RenderBlockFlowRareData::~RenderBlockFlowRareData): Deleted.

1:58 PM Changeset in webkit [223793] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Marked plugins/js-from-destroy.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=176881

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
1:40 PM Changeset in webkit [223792] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[FrameView::layout cleanup] Scheduling layout should be disabled for FrameView::layout
https://bugs.webkit.org/show_bug.cgi?id=178562
<rdar://problem/35089015>

Reviewed by Simon Fraser.

This patch extends the scope of m_layoutSchedulingEnabled. Now layout scheduling is disabled for the entire FrameView::layout().
A scheduled layout at the end of FrameView::layout would indicated dirty tree (which is against FrameView::layout's contract).

Covered by existing tests.

  • page/FrameView.cpp:

(WebCore::FrameView::layout):

1:39 PM Changeset in webkit [223791] by commit-queue@webkit.org
  • 38 edits
    1 add in trunk/Source

Expose _boundInterfaceIdentifier and _allowsCellularAccess to WKWebsiteDataStorePrivate
https://bugs.webkit.org/show_bug.cgi?id=178418
<rdar://problem/29599569>

Patch by Alex Christensen <achristensen@webkit.org> on 2017-10-20
Reviewed by Tim Horton.
Source/WebCore/PAL:

  • pal/spi/cf/CFNetworkSPI.h:

Source/WebKit:

In r213747 I introduced allowsCellularAccess to _WKProcessPoolConfiguration because there
was no way to add parameters to the default (and other) NetworkSession constructors. Since
clients have not adopted this SPI, we can introduce such a way in NetworkSessionCreationParameters
and move the SPI to WKWebsiteDataStore, which is where it and other NetworkSession properties
ought to be instead of making them WKProcessPool global.

We also need to expose access to NSURLRequest.boundInterfaceIdentifier. Instead of serializing and
deserializing that property for each NSURLRequest and then having subresources mysteriously jump back
to having no bound interface identifiers, I'm adding this to WKWebsiteDataStore, too, to make it a
session networking property.

I manually verified that these properties are being set properly with a custom test app and added logs.
Unfortunately, these properties don't do anything under circumstances anywhere close to what we test.
The architecture change of having NetworkSessionCreationParameters is verified to not have a change in
behavior by existing tests, such as any test that uses TestProtocol (which we should eventually remove).

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::ensureLegacyPrivateBrowsingSession):

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::NetworkProcess):
(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::clearCachedCredentials):

  • NetworkProcess/NetworkProcessCreationParameters.cpp:

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

  • NetworkProcess/NetworkProcessCreationParameters.h:
  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::create):
(WebKit::NetworkSession::defaultSession): Deleted.

  • NetworkProcess/NetworkSession.h:
  • NetworkProcess/NetworkSessionCreationParameters.h: Added.

(WebKit::NetworkSessionCreationParameters::encode const):
(WebKit::NetworkSessionCreationParameters::decode):

  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:

(WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):

  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):

  • NetworkProcess/cocoa/NetworkSessionCocoa.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::NetworkSessionCocoa::setSourceApplicationSecondaryIdentifier):
(WebKit::NetworkSessionCocoa::create):
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
(WebKit::NetworkSessionCocoa::setLegacyCustomProtocolManager): Deleted.
(WebKit::NetworkSessionCocoa::setAllowsCellularAccess): Deleted.
(WebKit::NetworkSessionCocoa::defaultSession): Deleted.

  • NetworkProcess/mac/RemoteNetworkingContext.mm:

(WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
(WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):

  • Shared/SessionTracker.cpp:

(WebKit::SessionTracker::networkSession):
(WebKit::SessionTracker::setSession):

  • Shared/WebsiteDataStoreParameters.cpp:

(WebKit::WebsiteDataStoreParameters::encode const):
(WebKit::WebsiteDataStoreParameters::decode):

  • Shared/WebsiteDataStoreParameters.h:
  • UIProcess/API/APIProcessPoolConfiguration.cpp:

(API::ProcessPoolConfiguration::copy):

  • UIProcess/API/APIProcessPoolConfiguration.h:
  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(-[WKWebsiteDataStore _setBoundInterfaceIdentifier:]):
(-[WKWebsiteDataStore _boundInterfaceIdentifier]):
(-[WKWebsiteDataStore _setAllowsCellularAccess:]):
(-[WKWebsiteDataStore _allowsCellularAccess]):

  • UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
  • UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:

(-[_WKProcessPoolConfiguration allowsCellularAccess]):
(-[_WKProcessPoolConfiguration setAllowsCellularAccess:]):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::ensureNetworkProcess):
(WebKit::WebProcessPool::setAnyPageGroupMightHavePrivateBrowsingEnabled):

  • UIProcess/WebsiteData/WebsiteDataStore.h:

(WebKit::WebsiteDataStore::setBoundInterfaceIdentifier):
(WebKit::WebsiteDataStore::boundInterfaceIdentifier):
(WebKit::WebsiteDataStore::setAllowsCellularAccess):
(WebKit::WebsiteDataStore::allowsCellularAccess):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::setPrivateBrowsingEnabled):

  • WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
  • WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:

(WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
(WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::ensurePrivateBrowsingSession):
(WebKit::WebProcess::clearCachedCredentials):

1:38 PM Changeset in webkit [223790] by achristensen@apple.com
  • 4 edits in trunk/Source/WebKit

Add ObjC SPI to _WKDownloadDelegate missing from WKContextDownloadClient
https://bugs.webkit.org/show_bug.cgi?id=178566
<rdar://problem/23041906>

Reviewed by Brady Eidson.

  • UIProcess/API/Cocoa/_WKDownloadDelegate.h:
  • UIProcess/Cocoa/DownloadClient.h:
  • UIProcess/Cocoa/DownloadClient.mm:

(WebKit::DownloadClient::DownloadClient):
(WebKit::DownloadClient::didReceiveAuthenticationChallenge):
(WebKit::DownloadClient::shouldDecodeSourceDataOfMIMEType):
(WebKit::DownloadClient::didCreateDestination):
(WebKit::DownloadClient::processDidCrash):

1:34 PM Changeset in webkit [223789] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

When destroying a resource, register "only" the clients who are losing their resource as having pending resources
https://bugs.webkit.org/show_bug.cgi?id=178567
<rdar://problem/35064781>

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-10-20
Reviewed by Simon Fraser.

SVGResources::resourceDestroyed() will return a bool indicating whether
it had a reference to the destroyed resource or not. If it returns true
SVGResourcesCache::resourceDestroyed() will register the client Element
as having pending resources.

  • rendering/svg/SVGResources.cpp:

(WebCore::paintingResourceFromSVGPaint):
(WebCore::SVGResources::removeClientFromCache const):
(WebCore::SVGResources::resourceDestroyed):
(WebCore::SVGResources::buildSetOfResources):
(WebCore::SVGResources::resetClipper):
(WebCore::SVGResources::resetFilter):
(WebCore::SVGResources::resetMarkerStart):
(WebCore::SVGResources::resetMarkerMid):
(WebCore::SVGResources::resetMarkerEnd):
(WebCore::SVGResources::resetMasker):
(WebCore::SVGResources::resetFill):
(WebCore::SVGResources::resetStroke):
(WebCore::SVGResources::resetLinkedResource):

  • rendering/svg/SVGResources.h:

(WebCore::SVGResources::isEmpty const):
(WebCore::SVGResources::ClipperFilterMaskerData::ClipperFilterMaskerData): Deleted.
(WebCore::SVGResources::MarkerData::MarkerData): Deleted.
(WebCore::SVGResources::FillStrokeData::FillStrokeData): Deleted.

  • rendering/svg/SVGResourcesCache.cpp:

(WebCore::SVGResourcesCache::resourceDestroyed):

1:20 PM Changeset in webkit [223788] by rniwa@webkit.org
  • 7 edits in trunk/Source/WebCore

Unify the node removal code in ContainerNode and expand the coverage of NoEventDispatchAssertion
https://bugs.webkit.org/show_bug.cgi?id=178568

Reviewed by Antti Koivisto.

Consolidated the code to remove a child node in ContainerNode into removeAllChildrenWithScriptAssertion
and removeNodeWithScriptAssertion to share code and make the semantics of when it becomes unsafe to run scripts.

Also renamed getChildNodes to collectChildNodes, and made it return NodeVector instead of taking an out argument.

No new tests since there should be no behavioral changes.

  • dom/ContainerNode.cpp:

(WebCore::ContainerNode::removeAllChildrenWithScriptAssertion): Added.
(WebCore::ContainerNode::removeNodeWithScriptAssertion): Added.
(WebCore::collectChildrenAndRemoveFromOldParent):
(WebCore::ContainerNode::takeAllChildrenFrom): Deployed removeAllChildrenWithScriptAssertion.
(WebCore::ContainerNode::notifyChildRemoved): Deleted. Merged into removeNodeWithScriptAssertion.
(WebCore::willRemoveChild): Deleted. Ditto.
(WebCore::willRemoveChildren): Deleted. Merged into removeAllChildrenWithScriptAssertion.
(WebCore::ContainerNode::removeChild): Deployed removeNodeWithScriptAssertion.
(WebCore::ContainerNode::parserRemoveChild): Ditto.
(WebCore::ContainerNode::replaceAllChildren): Deployed removeAllChildrenWithScriptAssertion. Now removes the node
outside executeNodeInsertionWithScriptAssertion but that's okay since executeNodeInsertionWithScriptAssertion
doesn't execute any code with a side effect before invoking the callback.
(WebCore::ContainerNode::removeChildren):
(WebCore::dispatchChildRemovalEvents): Refactored to take Ref<Node>&.

  • dom/ContainerNode.h:

(WebCore::collectChildNodes): Renamed from getChildNodes. Also removed the useless comment about NodeVector's
initial size and instead prefer to webkit.org/b/80706 where the number 11 was picked.

  • editing/ApplyStyleCommand.cpp:

(WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):

  • editing/ReplaceNodeWithSpanCommand.cpp:

(WebCore::swapInNodePreservingAttributesAndChildren):

  • svg/SVGUseElement.cpp:

(WebCore::SVGUseElement::clearShadowTree): Added an assertion exception while tearing down the UA shadow tree.

1:08 PM Changeset in webkit [223787] by mark.lam@apple.com
  • 1 edit
    1 add in trunk/JSTests

Add a test case for r214334.
https://bugs.webkit.org/show_bug.cgi?id=169941
<rdar://problem/31221258>

Reviewed by JF Bastien.

  • stress/regress-169941.js: Added.
12:56 PM Changeset in webkit [223786] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Marked http/tests/loading/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=178536

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
12:42 PM Changeset in webkit [223785] by commit-queue@webkit.org
  • 15 edits in trunk

ResourceResponse should have a ServiceWorker source
https://bugs.webkit.org/show_bug.cgi?id=178593

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-20
Reviewed by Alex Christensen.

Source/WebCore:

Covered by updated tests.

Added ResourceResponse::Source::ServiceWorker.
Added internals to get FetchResponse source.

  • inspector/InspectorNetworkAgent.cpp:

(WebCore::responseSource):

  • loader/ResourceLoader.cpp:

(WebCore::logResourceResponseSource):

  • page/DiagnosticLoggingKeys.cpp:

(WebCore::DiagnosticLoggingKeys::serviceWorkerKey):

  • page/DiagnosticLoggingKeys.h:
  • platform/network/ResourceResponseBase.h:
  • testing/Internals.cpp:

(WebCore::responseSourceToString):
(WebCore::Internals::fetchResponseSource):

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

Source/WebKit:

  • WebProcess/Storage/ServiceWorkerClientFetch.cpp:

(WebKit::ServiceWorkerClientFetch::didReceiveResponse): setting response source to ServiceWorker.

  • WebProcess/Storage/ServiceWorkerClientFetch.h:

LayoutTests:

  • http/tests/workers/service/basic-fetch.https-expected.txt:
  • http/tests/workers/service/resources/basic-fetch.js:

(async.test):

12:39 PM Changeset in webkit [223784] by dino@apple.com
  • 5 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r223707 and r223711. rdar://problem/35099869

12:28 PM Changeset in webkit [223783] by jmarcell@apple.com
  • 7 edits in tags/Safari-605.1.11.2/Source

Versioning.

12:27 PM Changeset in webkit [223782] by jmarcell@apple.com
  • 1 copy in tags/Safari-605.1.11.2

New tag.

12:26 PM Changeset in webkit [223781] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

WebsiteDataStoreCustomPaths.mm is failing after r223718
https://bugs.webkit.org/show_bug.cgi?id=178596

Unreviewed.

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

  • TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:

(TEST): Making default web site data store creation expected at the end of the test.
We should probably not need need to create it.
This should be fixed as a follow-up.

12:21 PM Changeset in webkit [223780] by aestes@apple.com
  • 4 edits in trunk/Source/WebCore

Generated serializers do not properly handle optional interface attributes
https://bugs.webkit.org/show_bug.cgi?id=178542

Reviewed by Sam Weinig.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateSerializerDefinition):

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

(WebCore::JSTestSerialization::serialize):

11:41 AM Changeset in webkit [223779] by commit-queue@webkit.org
  • 37 edits
    16 adds in trunk

[Web Animations] Provide basic timeline and animation interfaces
https://bugs.webkit.org/show_bug.cgi?id=178526

Patch by Antoine Quint <Antoine Quint> on 2017-10-20
Reviewed by Dean Jackson.

.:

Remove the WEB_ANIMATIONS compile-time flag.

  • Source/cmake/OptionsWPE.cmake:
  • Source/cmake/OptionsWin.cmake:
  • Source/cmake/WebKitFeatures.cmake:
  • Source/cmake/tools/vsprops/FeatureDefines.props:
  • Source/cmake/tools/vsprops/FeatureDefinesCairo.props:

Source/JavaScriptCore:

Remove the WEB_ANIMATIONS compile-time flag.

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

We're getting Web Animations work started by implementing a very minimal codebase which provides
a DocumentTimeline class which has an instance created for each Document. The parent class,
AnimationTimeline, allows for animations to be added and removed, and animations can be created
using the Animation class, with an optional timeline as parameter.

Tests: webanimations/animation-creation-basic.html

webanimations/document-timeline.html

  • CMakeLists.txt:
  • Configurations/FeatureDefines.xcconfig:
  • DerivedSources.make:
  • PlatformWin.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • animation/AnimationTimeline.cpp: Added.

(WebCore::AnimationTimeline::AnimationTimeline):
(WebCore::AnimationTimeline::~AnimationTimeline):
(WebCore::AnimationTimeline::addAnimation):
(WebCore::AnimationTimeline::removeAnimation):

  • animation/AnimationTimeline.h: Added.

(WebCore::AnimationTimeline::isDocumentTimeline const):
(WebCore::AnimationTimeline::classType const):

  • animation/AnimationTimeline.idl: Added.
  • animation/DocumentTimeline.cpp: Added.

(WebCore::DocumentTimeline::create):
(WebCore::DocumentTimeline::DocumentTimeline):

  • animation/DocumentTimeline.h: Added.
  • animation/DocumentTimeline.idl: Added.
  • animation/WebAnimation.cpp: Added.

(WebCore::WebAnimation::create):
(WebCore::WebAnimation::WebAnimation):
(WebCore::WebAnimation::~WebAnimation):

  • animation/WebAnimation.h: Added.
  • animation/WebAnimation.idl: Added.
  • bindings/js/JSAnimationTimelineCustom.cpp: Added.

(WebCore::toJSNewlyCreated):
(WebCore::toJS):

  • bindings/js/WebCoreBuiltinNames.h:
  • dom/Document.cpp:

(WebCore::Document::timeline):

  • dom/Document.h:
  • dom/Document.idl:
  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::webAnimationsEnabled const):

Source/WebCore/PAL:

Remove the WEB_ANIMATIONS compile-time flag.

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit:

Remove the WEB_ANIMATIONS compile-time flag.

  • Configurations/FeatureDefines.xcconfig:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
(WebKit::InjectedBundle::setWebAnimationsEnabled):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

Source/WebKitLegacy/mac:

Remove the WEB_ANIMATIONS compile-time flag.

  • Configurations/FeatureDefines.xcconfig:
  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):

  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

Source/WebKitLegacy/win:

Remove the WEB_ANIMATIONS compile-time flag.

  • WebView.cpp:

(WebView::notifyPreferencesChanged):

Source/WTF:

Remove the WEB_ANIMATIONS compile-time flag.

  • wtf/FeatureDefines.h:

Tools:

Remove the WEB_ANIMATIONS compile-time flag.

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

LayoutTests:

Basic test coverage to check that we are exposing a DocumentTimeline instance on
the Document and that we can construct Animations, optionally associated with a timeline.

  • platform/mac-elcapitan/TestExpectations:
  • webanimations/animation-creation-basic-expected.txt: Added.
  • webanimations/animation-creation-basic.html: Added.
  • webanimations/document-timeline-expected.txt: Added.
  • webanimations/document-timeline.html: Added.
11:33 AM Changeset in webkit [223778] by commit-queue@webkit.org
  • 8 edits
    5 deletes in trunk/Source/WebInspectorUI

Web Inspector: Network Tab - Turn on the new tab by default, remove the legacy network tab
https://bugs.webkit.org/show_bug.cgi?id=178559
<rdar://problem/34985503>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-10-20
Reviewed by Matt Baker.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Base/Main.js:

(WI.contentLoaded):

  • UserInterface/Base/Setting.js:
  • UserInterface/Main.html:
  • UserInterface/Views/LegacyNetworkSidebarPanel.css: Removed.
  • UserInterface/Views/LegacyNetworkSidebarPanel.js: Removed.
  • UserInterface/Views/LegacyNetworkTabContentView.js: Removed.
  • UserInterface/Views/NetworkGridContentView.css: Removed.
  • UserInterface/Views/NetworkGridContentView.js: Removed.
  • UserInterface/Views/TabBrowser.js:

(WI.TabBrowser.prototype.bestTabContentViewForRepresentedObject):
Remove LegacyNetwork tab, its NetworkGridContentView, and associated content.

  • UserInterface/Views/NetworkTabContentView.js:

(WI.NetworkTabContentView.isTabAllowed):
Simplify now that this is the only Network tab.

  • UserInterface/Views/SettingsTabContentView.js:

(WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
Remove experimental setting.

10:58 AM Changeset in webkit [223777] by Matt Lewis
  • 18 edits in trunk

Unreviewed, rolling out r223744, r223750, and r223751.
https://bugs.webkit.org/show_bug.cgi?id=178594

These caused consistent failures in test that existed and were
added in the patches. (Requested by mlewis13 on #webkit).

Reverted changesets:

"[JSC] ScriptFetcher should be notified directly from module
pipeline"
https://bugs.webkit.org/show_bug.cgi?id=178340
https://trac.webkit.org/changeset/223744

"Unreviewed, fix changed line number in test expect files"
https://bugs.webkit.org/show_bug.cgi?id=178340
https://trac.webkit.org/changeset/223750

"Unreviewed, follow up to reflect comments"
https://bugs.webkit.org/show_bug.cgi?id=178340
https://trac.webkit.org/changeset/223751

Patch by Commit Queue <commit-queue@webkit.org> on 2017-10-20

10:54 AM Changeset in webkit [223776] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[FrameView::layout cleanup] Move can-enter-layout logic to a separate function
https://bugs.webkit.org/show_bug.cgi?id=178546
<rdar://problem/35083894>

Reviewed by Antti Koivisto.

No change in functionality.

  • page/FrameView.cpp:

(WebCore::FrameView::canPerformLayout const):
(WebCore::FrameView::layout): We already assert on certain reentrancy conditions, loggig the reason
does not seem to have high value.

  • page/FrameView.h:
10:47 AM Changeset in webkit [223775] by dino@apple.com
  • 17 edits in trunk

Add createImageBitmap to Window and Worker
https://bugs.webkit.org/show_bug.cgi?id=178573
<rdar://problem/35092692>

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Update the expected results now that createImageBitmap exists.

  • web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt:
  • web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt:
  • web-platform-tests/2dcontext/imagebitmap/createImageBitmap-sizeOverflow-expected.txt:
  • web-platform-tests/imagebitmap-renderingcontext/bitmaprenderer-as-imagesource-expected.txt:
  • web-platform-tests/imagebitmap-renderingcontext/context-creation-with-alpha-expected.txt:
  • web-platform-tests/imagebitmap-renderingcontext/tranferFromImageBitmap-null-expected.txt:
  • web-platform-tests/imagebitmap-renderingcontext/transferFromImageBitmap-detached-expected.txt:

Source/WebCore:

Implement the createImageBitmap functions that are exposed on the Window
and Worker objects.

Covered by the Web Platform Tests.

  • html/ImageBitmap.cpp: Make sure to call suspendIfNeeded since this is

an ActiveDOMObject.

  • html/ImageBitmap.h: Change the order of the classes in the Variant

to match the order of definitions in the IDL.

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::createImageBitmap): Call ImageBitmap::createPromise.

  • page/DOMWindow.h:
  • page/WindowOrWorkerGlobalScope.idl: Add the createImageBitmap methods.
  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::createImageBitmap): Call ImageBitmap::createPromise.

  • workers/WorkerGlobalScope.h:
10:30 AM Changeset in webkit [223774] by BJ Burg
  • 7 edits in trunk/Source/WebKit

Web Inspector: consolidate code that hosts the Inspector page inside a WKWebView
https://bugs.webkit.org/show_bug.cgi?id=177661
<rdar://problem/34740286>

Reviewed by Joseph Pecoraro.

Move setup and delegates of the inspector frontend page into implementations of
WebInspectorProxy::platformCreateFrontendPage. The Mac implementation
will be subsumed by WKInspectorViewController, while the GTK implementation
is inherited from the cross-platform version that uses C API. Eventually the
GTK version should use GTK API rather than the soon to be deprecated C API.

  • UIProcess/WebInspectorProxy.cpp:

(WebKit::WebInspectorProxy::createFrontendPage):
(WebKit::webProcessDidCrash): Deleted.
(WebKit::decidePolicyForNavigationAction): Deleted.
(WebKit::getContextMenuFromProposedMenu): Deleted.

  • UIProcess/gtk/WebInspectorProxyGtk.cpp:

(WebKit::exceededDatabaseQuota):
(WebKit::webProcessDidCrash):
(WebKit::decidePolicyForNavigationAction):
(WebKit::getContextMenuFromProposedMenu):
(WebKit::WebInspectorProxy::platformCreateFrontendPage):

  • UIProcess/mac/WebInspectorProxyMac.mm:

(WebKit::exceededDatabaseQuota):
(WebKit::webProcessDidCrash):
(WebKit::decidePolicyForNavigationAction):
(WebKit::getContextMenuFromProposedMenu):
(WebKit::WebInspectorProxy::platformCreateFrontendPage):

10:29 AM Changeset in webkit [223773] by BJ Burg
  • 6 edits in trunk/Source/WebKit

Web Inspector: consolidate code that hosts the Inspector page inside a WKWebView
https://bugs.webkit.org/show_bug.cgi?id=177661
<rdar://problem/34740286>

Reviewed by Joseph Pecoraro.

Introduce new platform methods to open and close the frontend page and window.
This matches how RemoteWebInspectorProxy divides work up into platform methods.
Move existing code from platformDidClose, platformOpen, and other methods into
the new platform methods. Move some identical platform code into WebInspectorProxy.cpp.

  • UIProcess/WebInspectorProxy.h:
  • UIProcess/WebInspectorProxy.cpp:

(WebKit::WebInspectorProxy::connect):
(WebKit::WebInspectorProxy::showConsole):
(WebKit::WebInspectorProxy::showResources):
(WebKit::WebInspectorProxy::showTimelines):
(WebKit::WebInspectorProxy::showMainResourceForFrame):
(WebKit::WebInspectorProxy::createFrontendPage):
(WebKit::WebInspectorProxy::createInspectorPage):
(WebKit::WebInspectorProxy::open):
(WebKit::WebInspectorProxy::didClose):
(WebKit::WebInspectorProxy::eagerlyCreateInspectorPage): Renamed.

  • UIProcess/gtk/WebInspectorProxyGtk.cpp:

(WebKit::WebInspectorProxy::updateInspectorWindowTitle const):
(WebKit::WebInspectorProxy::platformCreateFrontendPage):
Do everything necessary to set up the frontend page WebView.

(WebKit::WebInspectorProxy::platformCreateFrontendWindow):
Do everything necessary to set up the detached NSWindow for the frontend.

(WebKit::WebInspectorProxy::platformCloseFrontendPageAndWindow):
(WebKit::WebInspectorProxy::platformDetach):
(WebKit::WebInspectorProxy::platformCreateInspectorPage): Deleted.
(WebKit::WebInspectorProxy::createInspectorWindow): Deleted.
(WebKit::WebInspectorProxy::platformOpen): Deleted.
(WebKit::WebInspectorProxy::platformDidClose): Deleted.

  • UIProcess/mac/WebInspectorProxyMac.mm:

(WebKit::WebInspectorProxy::updateInspectorWindowTitle const):
(WebKit::WebInspectorProxy::platformCreateFrontendPage): Added.
Do everything necessary to set up the frontend page WebView.

(WebKit::WebInspectorProxy::platformCreateFrontendWindow): Added.
Do everything necessary to set up the detached NSWindow for the frontend.

(WebKit::WebInspectorProxy::closeFrontendPage):
(WebKit::WebInspectorProxy::closeFrontendAfterInactivityTimerFired):
(WebKit::WebInspectorProxy::platformCloseFrontendPageAndWindow):
(WebKit::WebInspectorProxy::platformDidCloseForCrash):
(WebKit::WebInspectorProxy::platformInvalidate):
(WebKit::WebInspectorProxy::platformBringToFront): Carry through renamings.

(WebKit::WebInspectorProxy::platformDetach):
Defer to the general open() method to create a window if needed and bring it to front.

(WebKit::WebInspectorProxy::platformCanAttach): Move this below open/close code.

(WebKit::WebInspectorProxy::closeFrontend): Deleted.
(WebKit::WebInspectorProxy::createInspectorWindow): Deleted.
(WebKit::WebInspectorProxy::platformCreateInspectorPage): Deleted.
(WebKit::WebInspectorProxy::platformOpen): Deleted.
(WebKit::WebInspectorProxy::platformDidClose): Deleted.
Defer to the general open() method to create a window if needed and bring it to front.

  • UIProcess/wpe/WebInspectorProxyWPE.cpp:

(WebKit::WebInspectorProxy::platformCreateFrontendPage):
(WebKit::WebInspectorProxy::platformCreateFrontendWindow):
(WebKit::WebInspectorProxy::platformCloseFrontendPageAndWindow):
(WebKit::WebInspectorProxy::platformCreateInspectorPage): Deleted.
(WebKit::WebInspectorProxy::createInspectorWindow): Deleted.
(WebKit::WebInspectorProxy::platformOpen): Deleted.
(WebKit::WebInspectorProxy::platformDidClose): Deleted.
Update stubs.

10:28 AM Changeset in webkit [223772] by BJ Burg
  • 4 edits in trunk/Source/WebKit

Web Inspector: consolidate code that hosts the Inspector page inside a WKWebView
https://bugs.webkit.org/show_bug.cgi?id=177661
<rdar://problem/34740286>

Reviewed by Joseph Pecoraro.

This patch refactors some Cocoa code pathas.
Rename the timer that closes the WebView so it's more obvious what it is for.
Extract the common code to close the frontend window so its not implemented by
the timer callback.

In later patches, this will be extracted further into platform methods to open/close
the frontend and window, like how it is for RemoteWebInspectorProxy.

  • UIProcess/WebInspectorProxy.cpp:

(WebKit::WebInspectorProxy::WebInspectorProxy):

  • UIProcess/WebInspectorProxy.h:
  • UIProcess/mac/WebInspectorProxyMac.mm:

(WebKit::WebInspectorProxy::closeFrontendAfterInactivityTimerFired):
(WebKit::WebInspectorProxy::closeFrontend):
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
(WebKit::WebInspectorProxy::platformDidClose):
(WebKit::WebInspectorProxy::platformDidCloseForCrash):
(WebKit::WebInspectorProxy::platformInvalidate):
(WebKit::WebInspectorProxy::closeTimerFired): Deleted.

10:28 AM Changeset in webkit [223771] by BJ Burg
  • 5 edits in trunk/Source/WebKit

Web Inspector: consolidate code that hosts the Inspector page inside a WKWebView
https://bugs.webkit.org/show_bug.cgi?id=177661
<rdar://problem/34740286>

Reviewed by Joseph Pecoraro.

Modernize the ObjC adapter and related code a bit before it is hooked
into WKInspectorViewController.

  • UIProcess/API/C/mac/WKInspectorPrivateMac.h: No need for the

ivar to be declared here, move to @implementation.

  • UIProcess/WebInspectorProxy.h: Simplify the name to match modern convention.
  • UIProcess/mac/WebInspectorProxyMac.mm:

(-[WKWebInspectorProxyObjCAdapter inspectorRef]):
(-[WKWebInspectorProxyObjCAdapter initWithWebInspectorProxy:]):
(-[WKWebInspectorProxyObjCAdapter invalidate]):
(-[WKWebInspectorProxyObjCAdapter windowDidMove:]):
(-[WKWebInspectorProxyObjCAdapter windowDidResize:]):
(-[WKWebInspectorProxyObjCAdapter windowWillClose:]):
(-[WKWebInspectorProxyObjCAdapter windowDidEnterFullScreen:]):
(-[WKWebInspectorProxyObjCAdapter windowDidExitFullScreen:]):
(-[WKWebInspectorProxyObjCAdapter inspectedViewFrameDidChange:]):
Remove unnecessary casts to and from void*.

(WebKit::WebInspectorProxy::attachmentViewDidChange):
(WebKit::WebInspectorProxy::setInspectorWindowFrame):
(WebKit::WebInspectorProxy::closeTimerFired):
(WebKit::WebInspectorProxy::createInspectorWindow):
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
Fix uses of member variable m_objCAdapter.

(-[WKWebInspectorProxyObjCAdapter close]): Deleted.
Rename this to invalidate to match modern convention. In this context,
'close' might trick someone into thinking that this closes a window/page.

10:28 AM Changeset in webkit [223770] by BJ Burg
  • 5 edits
    2 adds in trunk/Source/WebKit

Web Inspector: consolidate code that hosts the Inspector page inside a WKWebView
https://bugs.webkit.org/show_bug.cgi?id=177661
<rdar://problem/34740286>

Reviewed by Joseph Pecoraro.

Move code that sets up and controls the inspector WebView into WKInspectorViewController.
This will be shared between RemoteWebInspectorProxy and WebInspectorProxy eventually,
but for now just pull out code from RemoteWebInspectorProxy. The next patch will move
over WebInspectorProxy.

WKInspectorViewController uses the ObjC API for setting up the WKWebView's delegates.
Previously, a WKWebView was used but the delegates were set up using the C API. In
a few cases it uses delegate methods to ask the owning [Remote]WebInspectorProxy some
things. In general, WKInspectorViewController doesn't dig into any internals of
WebPageProxy or WebInspectorProxy; that is delegated to the client.

  • UIProcess/RemoteWebInspectorProxy.h:

(WebKit::RemoteWebInspectorProxy::isUnderTest const): Add a method stub for now.
We might want to enable tests for a _WKRemoteWebInspectorViewController-based UI
in the future, and WebInspectorProxy has the same method. Add this and connect it
to the view controller delegate method.

(WebKit::RemoteWebInspectorProxy::webView const):
This returns a plain WKWebView type now.

  • UIProcess/mac/RemoteWebInspectorProxyMac.mm:

(-[WKRemoteWebInspectorProxyObjCAdapter inspectorViewControllerInspectorDidCrash:]):
(-[WKRemoteWebInspectorProxyObjCAdapter inspectorViewControllerInspectorIsUnderTest:]):
(-[WKRemoteWebInspectorProxyObjCAdapter webViewWebContentProcessDidTerminate:]): Deleted.
(-[WKRemoteWebInspectorProxyObjCAdapter webView:decidePolicyForNavigationAction:decisionHandler:]): Deleted.
Make the ObjCAdapter forward view controller delegate calls to the C++ class.
It no longer needs to be the delegate of the WebView, as the view controller handles that.

(WebKit::RemoteWebInspectorProxy::platformCreateFrontendPageAndWindow):
Clean up and move WKWebView setup code into the view controller.

(WebKit::RemoteWebInspectorProxy::platformCloseFrontendPageAndWindow):
The m_inspectorPage is closed by the caller before calling this method, so we don't need to do it here.

(WebKit::RemoteWebInspectorProxy::platformBringToFront):
(WebKit::RemoteWebInspectorProxy::platformSave):
(WebKit::RemoteWebInspectorProxy::platformAppend):
(WebKit::RemoteWebInspectorProxy::platformStartWindowDrag):
Use webView() instead of m_webView.

  • UIProcess/mac/WKInspectorViewController.h: Added.
  • UIProcess/mac/WKInspectorViewController.mm: Added.

(-[WKInspectorWKWebView tag]):
(-[WKInspectorViewController initWithInspectedPage:]):
(-[WKInspectorViewController dealloc]):
(-[WKInspectorViewController delegate]):
(-[WKInspectorViewController webView]):
(-[WKInspectorViewController setDelegate:]):
(-[WKInspectorViewController configuration]):
(-[WKInspectorViewController _webView:getWindowFrameWithCompletionHandler:]):
(-[WKInspectorViewController _webView:setWindowFrame:]):
(-[WKInspectorViewController webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]):
(-[WKInspectorViewController _webView:decideDatabaseQuotaForSecurityOrigin:currentQuota:currentOriginUsage:currentDatabaseUsage:expectedUsage:decisionHandler:]):
(-[WKInspectorViewController webViewWebContentProcessDidTerminate:]):
(-[WKInspectorViewController webView:decidePolicyForNavigationAction:decisionHandler:]):
Move code from RemoteWebInspectorProxyMac into here.

  • UIProcess/mac/WebInspectorProxyMac.mm:

(WebKit::WebInspectorProxy::createFrontendWindow):
Remove commented out code left over from the last time that this method got moved around.

  • WebKit.xcodeproj/project.pbxproj:

Add new class.

10:22 AM Changeset in webkit [223769] by zandobersek@gmail.com
  • 3 edits
    6 adds in trunk/LayoutTests

Unreviewed GTK+ gardening. Adding GTK+-specific baselines for a bunch
of HTTP tests, and adding failure expectations for some others.

  • platform/gtk/TestExpectations:
  • platform/gtk/http/tests/security/contentSecurityPolicy/1.1: Added.
  • platform/gtk/http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-redirect-expected.txt: Added.
  • platform/gtk/http/tests/security/module-no-mime-type-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/2dcontext: Added.
  • platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap: Added.
  • platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt: Added.
10:05 AM Changeset in webkit [223768] by Ms2ger@igalia.com
  • 3 edits in trunk/LayoutTests

[GTK] Update expectations for webkitConvertPoint.html
https://bugs.webkit.org/show_bug.cgi?id=178582

Reviewed by Michael Catanzaro.

This at least makes the test useful as a regression test.

  • platform/gtk/TestExpectations:
  • platform/gtk/fast/dom/Window/webkitConvertPoint-expected.txt:
10:00 AM Changeset in webkit [223767] by tpopela@redhat.com
  • 2 edits in trunk/Tools

Missing some perl packages in install-dependencies
https://bugs.webkit.org/show_bug.cgi?id=178571

Reviewed by Žan Doberšek.

Install per-version and perl-Time-HiRes so we can use build-webkit
script. Also add missing backlashes.

  • wpe/install-dependencies:
9:30 AM Changeset in webkit [223766] by jdiggs@igalia.com
  • 7 edits
    4 adds in trunk

AX: [ATK] Events missing and state incorrect for aria-activedescendant
https://bugs.webkit.org/show_bug.cgi?id=178523

Reviewed by Chris Fleizach.

Source/WebCore:

When the aria-activedescendant of an element changes, emit object:state-changed:focused.
When a focused element has a valid active descendant, do not expose the focused state on
the element, but rather on the active descendant. Also expose the focusable state on the
active descendant.

Tests: accessibility/gtk/aria-activedescendant-changed-notification.html

accessibility/gtk/aria-activedescendant.html

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::isActiveDescendantOfFocusedContainer const):
(WebCore::AccessibilityObject::ariaActiveDescendantReferencingElements const):

  • accessibility/AccessibilityObject.h:
  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::shouldNotifyActiveDescendant const):

  • accessibility/atk/AXObjectCacheAtk.cpp:

(WebCore::AXObjectCache::postPlatformNotification):

  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(setAtkStateSetFromCoreObject):

LayoutTests:

  • accessibility/gtk/aria-activedescendant-changed-notification-expected.txt: Added.
  • accessibility/gtk/aria-activedescendant-changed-notification.html: Added.
  • accessibility/gtk/aria-activedescendant-expected.txt: Added.
  • accessibility/gtk/aria-activedescendant.html: Added.
9:10 AM Changeset in webkit [223765] by commit-queue@webkit.org
  • 2 edits
    1 delete in trunk/Tools

Unreviewed, rolling out r222709 and r223572.
https://bugs.webkit.org/show_bug.cgi?id=178587

Still getting mac-wk2 EWS bots stuck (Requested by ap on
#webkit).

Reverted changesets:

"Log stack-trace for run-webkit-tests when interrupted"
https://bugs.webkit.org/show_bug.cgi?id=176393
https://trac.webkit.org/changeset/222709

"webkitpy: Hang when workers write to the same stack trace
file"
https://bugs.webkit.org/show_bug.cgi?id=178402
https://trac.webkit.org/changeset/223572

8:39 AM Changeset in webkit [223764] by jmarcell@apple.com
  • 1 edit in branches/safari-604-branch/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm

Applied patch. rdar://problem/35041490

8:39 AM Changeset in webkit [223763] by jmarcell@apple.com
  • 19 edits in branches/safari-604-branch

Cherry-pick r223708. rdar://problem/34771406

8:15 AM Changeset in webkit [223762] by pvollan@apple.com
  • 2 edits in trunk/LayoutTests

[Win] Mark http/tests/navigation/keyboard-events-during-provisional-navigation.html and
http/tests/navigation/keyboard-events-during-provisional-subframe-navigation.html as failures.
https://bugs.webkit.org/show_bug.cgi?id=178549

Unreviewed test gardening.

  • platform/win/TestExpectations:
8:02 AM Changeset in webkit [223761] by jmarcell@apple.com
  • 2 edits in branches/safari-604-branch/Tools

Apply patch. rdar://problem/34745623

Unreviewed build fix after merging r223427 and r223442.

  • TestWebKitAPI/Tests/WebCore/cocoa/DatabaseTrackerTest.mm: Import the necessary header file, and guard the tests to only run on iOS because createTemporaryDirectory() only exists on iOS.
8:00 AM Changeset in webkit [223760] by jmarcell@apple.com
  • 4 edits in branches/safari-604-branch

Cherry-pick r223442. rdar://problem/34745623

8:00 AM Changeset in webkit [223759] by jmarcell@apple.com
  • 2 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r223438. rdar://problem/34745623

8:00 AM Changeset in webkit [223758] by jmarcell@apple.com
  • 6 edits
    1 add
    1 delete in branches/safari-604-branch

Cherry-pick r223427. rdar://problem/34745623

5:45 AM Changeset in webkit [223757] by Ms2ger@igalia.com
  • 5 edits in trunk

Add the MAX_CLIENT_WAIT_TIMEOUT_WEBGL constant to WebGL2RenderingContext.
https://bugs.webkit.org/show_bug.cgi?id=178572

Reviewed by Žan Doberšek.

Source/WebCore:

Test: fast/canvas/webgl/webgl2/constants.html

  • html/canvas/WebGL2RenderingContext.idl:

LayoutTests:

  • fast/canvas/webgl/webgl2/constants-expected.txt:
  • fast/canvas/webgl/webgl2/constants.html:
5:23 AM Changeset in webkit [223756] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebKit

[WK2] Drop 'CoordinatedGraphics' as a platform prefix from generate-forwarding-headers.pl
https://bugs.webkit.org/show_bug.cgi?id=178575

Reviewed by Carlos Garcia Campos.

  • Scripts/generate-forwarding-headers.pl: Remove CoordinatedGraphics as

a supported platform prefix. No one invokes the script with this
argument anymore.

5:04 AM Changeset in webkit [223755] by zandobersek@gmail.com
  • 2 edits in trunk/LayoutTests

Unreviewed WPE gardening. Managing failure expectations for
a set of failing HTTP tests.

  • platform/wpe/TestExpectations:
4:08 AM Changeset in webkit [223754] by magomez@igalia.com
  • 4 edits in trunk

[GTK][WPE] Fix review comments on WEBPImageDecoder
https://bugs.webkit.org/show_bug.cgi?id=178080

Reviewed by Said Abou-Hallawa.

Source/WebCore:

Properly free the demuxer in case of error, improve the code to detect the first
required frame to decode, fix the usage of the DecodingStatus and some styling
changes.

Covered by existent tests.

  • platform/image-decoders/webp/WEBPImageDecoder.cpp:

(WebCore::webpFrameAtIndex):
(WebCore::WEBPImageDecoder::findFirstRequiredFrameToDecode):
(WebCore::WEBPImageDecoder::decode):
(WebCore::WEBPImageDecoder::decodeFrame):
(WebCore::WEBPImageDecoder::initFrameBuffer):
(WebCore::WEBPImageDecoder::clearFrameBufferCache):

LayoutTests:

Adjusted test duration.

  • fast/images/animated-webp.html:
2:23 AM Changeset in webkit [223753] by zandobersek@gmail.com
  • 11 edits in trunk/LayoutTests

Unreviewed WPE gardening. Rebaselining CSS tests that were affected
by recent font changes.

  • platform/wpe/css1/font_properties/font-expected.txt:
  • platform/wpe/css1/pseudo/firstline-expected.txt:
  • platform/wpe/css1/pseudo/multiple_pseudo_elements-expected.txt:
  • platform/wpe/css2.1/t051201-c23-first-line-00-b-expected.txt:
  • platform/wpe/css2.1/t051202-c26-psudo-nest-00-c-expected.txt:
  • platform/wpe/css2.1/t0905-c5525-fltwidth-00-c-g-expected.txt:
  • platform/wpe/css2.1/t1508-c527-font-00-b-expected.txt:
  • platform/wpe/css2.1/t1508-c527-font-06-b-expected.txt:
  • platform/wpe/css2.1/t1508-c527-font-07-b-expected.txt:
  • platform/wpe/css2.1/t1508-c527-font-10-c-expected.txt:
2:22 AM Changeset in webkit [223752] by commit-queue@webkit.org
  • 26 edits in trunk/Source

[Curl] Clean up old style code in old curl files.
https://bugs.webkit.org/show_bug.cgi?id=178569

Patch by Basuke Suzuki <Basuke Suzuki> on 2017-10-20
Reviewed by Ryosuke Niwa.

Source/WebCore:

  • platform/network/curl/AuthenticationChallenge.h:
  • platform/network/curl/CertificateInfo.h:
  • platform/network/curl/CookieJarCurl.h:
  • platform/network/curl/CurlCacheEntry.h:
  • platform/network/curl/CurlCacheManager.cpp:

(WebCore::CurlCacheManager::singleton):
(WebCore::CurlCacheManager::getInstance): Deleted.

  • platform/network/curl/CurlCacheManager.h:
  • platform/network/curl/CurlContext.cpp:

(WebCore::CurlContext::singleton):

  • platform/network/curl/CurlContext.h:

(WebCore::CurlContext::singleton): Deleted.

  • platform/network/curl/CurlJobManager.cpp:

(WebCore::CurlJobManager::singleton):

  • platform/network/curl/CurlJobManager.h:

(WebCore::CurlJobManager::singleton): Deleted.

  • platform/network/curl/CurlRequest.cpp:

(WebCore::CurlRequest::setupTransfer):

  • platform/network/curl/CurlRequest.h:
  • platform/network/curl/CurlRequestDelegate.h:
  • platform/network/curl/CurlResponse.h:

(WebCore::CurlResponse::isolatedCopy const):

  • platform/network/curl/CurlSSLHandle.h:
  • platform/network/curl/CurlSSLVerifier.h:
  • platform/network/curl/DownloadBundle.h:
  • platform/network/curl/MultipartHandle.h:
  • platform/network/curl/ResourceError.h:
  • platform/network/curl/ResourceHandleCurlDelegate.cpp:

(WebCore::ResourceHandleCurlDelegate::createCurlRequest):
(WebCore::ResourceHandleCurlDelegate::curlDidReceiveResponse):
(WebCore::ResourceHandleCurlDelegate::curlDidReceiveBuffer):
(WebCore::ResourceHandleCurlDelegate::curlDidComplete):
(WebCore::ResourceHandleCurlDelegate::curlDidFailWithError):

  • platform/network/curl/ResourceRequest.h:

(WebCore::ResourceRequest::ResourceRequest):
(WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties):
(WebCore::ResourceRequest::cfURLRequest const):
(WebCore::ResourceRequest::httpPipeliningEnabled):
(WebCore::ResourceRequest::setHTTPPipeliningEnabled):
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdateResourceRequest):
(WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
(WebCore::ResourceRequest::doUpdateResourceHTTPBody):
(WebCore::ResourceRequest::doPlatformSetAsIsolatedCopy):

  • platform/network/curl/ResourceResponseCurl.cpp:

(WebCore::ResourceResponse::isAppendableHeader):
(WebCore::ResourceResponse::ResourceResponse):

Source/WebKitLegacy/win:

  • WebCache.cpp:

(WebCache::cacheFolder):
(WebCache::setCacheFolder):

  • WebView.cpp:

(WebView::setCacheModel):

2:02 AM Changeset in webkit [223751] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, follow up to reflect comments
https://bugs.webkit.org/show_bug.cgi?id=178340

  • runtime/JSModuleLoader.cpp:

(JSC::JSModuleLoader::notifyCompleted):

1:59 AM Changeset in webkit [223750] by Yusuke Suzuki
  • 3 edits in trunk/LayoutTests

Unreviewed, fix changed line number in test expect files
https://bugs.webkit.org/show_bug.cgi?id=178340

  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-redirect-expected.txt:
  • http/tests/security/module-no-mime-type-expected.txt:
1:30 AM Changeset in webkit [223749] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

RenderLayerCompositor: Move implementation of simple methods into the header file.
https://bugs.webkit.org/show_bug.cgi?id=178514

Patch by Frederic Wang <fwang@igalia.com> on 2017-10-20
Reviewed by Darin Adler.

No new tests, behavior unchanged.

1:29 AM Changeset in webkit [223748] by Antti Koivisto
  • 10 edits in trunk

Support ::before/::after pseudo elements on elements with display:contents
https://bugs.webkit.org/show_bug.cgi?id=178513

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

  • web-platform-tests/cssom/getComputedStyle-pseudo-expected.txt:

Source/WebCore:

Add support for

div { display:contents }
div::after { content:'foo' }

That is support non-box generating elements with generated content.

  • style/RenderTreePosition.cpp:

(WebCore::RenderTreePosition::nextSiblingRenderer const):

Implement full pseudo-inclusive traversal starting from any element (including pseudo)
to locate the next rendering sibling. In case of display:content this may need to look
into descendants.

  • style/RenderTreeUpdater.cpp:

(WebCore::textRendererIsNeeded):

RenderTreePosition::nextSiblingRenderer can no longer be called with a node that already has a renderer.
Maintain the existing behavior.

  • style/RenderTreeUpdaterGeneratedContent.cpp:

(WebCore::RenderTreeUpdater::GeneratedContent::updatePseudoElement):
(WebCore::RenderTreeUpdater::GeneratedContent::needsPseudoElement):

Don't require for host to have a renderer.

  • style/RenderTreeUpdaterGeneratedContent.h:
  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::resolvePseudoStyle):

LayoutTests:

  • TestExpectations: Enable imported/w3c/web-platform-tests/css/css-display-3/display-contents-before-after-001.html
12:50 AM Changeset in webkit [223747] by keith_miller@apple.com
  • 5 edits in trunk/Source/WebCore

Move common bindings files to unified sources
https://bugs.webkit.org/show_bug.cgi?id=178561

Rubber-stamped by Ryosuke Niwa.

This patch moves most of the common bindings files to unified sources.

Additionally, it adds a change to make_names to unique a struct
name that caused name conflicts that I missed when I made the
source changes before.

Lastly, add missing reference to WebCoreJSBuiltins.cpp in CMake build.

No new behavior no tests.

  • CMakeLists.txt:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/make_names.pl:

(printFactoryCppFile):

12:50 AM Changeset in webkit [223746] by sbarati@apple.com
  • 34 edits in trunk/Source

Optimize accesses to how we get the direct prototype
https://bugs.webkit.org/show_bug.cgi?id=178548

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

This patch makes JSObject::getPrototypeDirect take VM& as a parameter
so it can use the faster version of the structure accessor function.
The reason for making this change is that JSObjet::getPrototypeDirect
is called on the hot path in property lookup.

  • API/JSObjectRef.cpp:

(JSObjectGetPrototype):

  • jsc.cpp:

(WTF::DOMJITGetterBaseJSObject::DOMJITAttribute::slowCall):
(WTF::DOMJITGetterBaseJSObject::customGetter):
(functionCreateProxy):

  • runtime/ArrayPrototype.cpp:

(JSC::speciesWatchpointIsValid):

  • runtime/ErrorInstance.cpp:

(JSC::ErrorInstance::sanitizedToString):

  • runtime/JSArray.cpp:

(JSC::JSArray::isIteratorProtocolFastAndNonObservable):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):
(JSC::lastInPrototypeChain):
(JSC::JSGlobalObject::resetPrototype):
(JSC::JSGlobalObject::finishCreation):

  • runtime/JSGlobalObjectInlines.h:

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

  • runtime/JSLexicalEnvironment.cpp:

(JSC::JSLexicalEnvironment::getOwnPropertySlot):

  • runtime/JSMap.cpp:

(JSC::JSMap::isIteratorProtocolFastAndNonObservable):

  • runtime/JSObject.cpp:

(JSC::JSObject::calculatedClassName):
(JSC::JSObject::setPrototypeWithCycleCheck):
(JSC::JSObject::getPrototype):
(JSC::JSObject::attemptToInterceptPutByIndexOnHoleForPrototype):
(JSC::JSObject::attemptToInterceptPutByIndexOnHole):
(JSC::JSObject::anyObjectInChainMayInterceptIndexedAccesses const):
(JSC::JSObject::prototypeChainMayInterceptStoreTo):

  • runtime/JSObject.h:

(JSC::JSObject::finishCreation):
(JSC::JSObject::getPrototypeDirect const):
(JSC::JSObject::getPrototype):

  • runtime/JSObjectInlines.h:

(JSC::JSObject::canPerformFastPutInline):
(JSC::JSObject::getPropertySlot):
(JSC::JSObject::getNonIndexPropertySlot):

  • runtime/JSProxy.cpp:

(JSC::JSProxy::setTarget):

  • runtime/JSSet.cpp:

(JSC::JSSet::isIteratorProtocolFastAndNonObservable):

  • runtime/ProgramExecutable.cpp:

(JSC::ProgramExecutable::initializeGlobalProperties):

  • runtime/StructureInlines.h:

(JSC::Structure::isValid const):

Source/WebCore:

No new tests: no functionality change.

  • bindings/js/JSDOMAbstractOperations.h:

(WebCore::isVisibleNamedProperty):
(WebCore::accessVisibleNamedProperty):

  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::toJSDOMWindow):

  • bindings/js/JSDOMWindowProperties.cpp:

(WebCore::JSDOMWindowProperties::getOwnPropertySlot):

  • bindings/js/JSPluginElementFunctions.cpp:

(WebCore::pluginElementCustomGetOwnPropertySlot):

  • bindings/js/WorkerScriptController.cpp:

(WebCore::WorkerScriptController::initScript):

  • bindings/scripts/CodeGeneratorJS.pm:

(GeneratePut):
(GeneratePutByIndex):
(GenerateConstructorHelperMethods):

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

(WebCore::JSTestGlobalObjectConstructor::initializeProperties):

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

(WebCore::JSTestNamedAndIndexedSetterNoIdentifier::put):
(WebCore::JSTestNamedAndIndexedSetterNoIdentifier::putByIndex):

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

(WebCore::JSTestNamedAndIndexedSetterThrowingException::put):
(WebCore::JSTestNamedAndIndexedSetterThrowingException::putByIndex):

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

(WebCore::JSTestNamedAndIndexedSetterWithIdentifier::put):
(WebCore::JSTestNamedAndIndexedSetterWithIdentifier::putByIndex):

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

(WebCore::JSTestNamedSetterNoIdentifier::put):
(WebCore::JSTestNamedSetterNoIdentifier::putByIndex):

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

(WebCore::JSTestNamedSetterThrowingException::put):
(WebCore::JSTestNamedSetterThrowingException::putByIndex):

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

(WebCore::JSTestNamedSetterWithIdentifier::put):
(WebCore::JSTestNamedSetterWithIdentifier::putByIndex):

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

(WebCore::JSTestNamedSetterWithIndexedGetter::put):
(WebCore::JSTestNamedSetterWithIndexedGetter::putByIndex):

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

(WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::put):
(WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::putByIndex):

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

(WebCore::JSTestNamedSetterWithUnforgableProperties::put):
(WebCore::JSTestNamedSetterWithUnforgableProperties::putByIndex):

12:35 AM Changeset in webkit [223745] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

[ARM64] static_cast<int32_t>() in BinaryOpNode::emitBytecode() prevents op_unsigned emission
https://bugs.webkit.org/show_bug.cgi?id=178379

Reviewed by Saam Barati.

We reuse jsNumber's checking mechanism here to precisely check the generated number is within uint32_t
in bytecode compiler. This is reasonable since the NumberNode will generate the exact this JSValue.

  • bytecompiler/NodesCodegen.cpp:

(JSC::BinaryOpNode::emitBytecode):

12:19 AM Changeset in webkit [223744] by Yusuke Suzuki
  • 18 edits in trunk

[JSC] ScriptFetcher should be notified directly from module pipeline
https://bugs.webkit.org/show_bug.cgi?id=178340

Reviewed by Sam Weinig.

Source/JavaScriptCore:

Previously, we use JSStdFunction to let WebCore inform the module pipeline results.
We setup JSStdFunction to the resulted promise of the module pipeline. It is super
ad-hoc since JSStdFunction's lambda need extra-careful to make it non-cyclic-referenced.
JSStdFunction's lambda can capture variables, but they are not able to be marked by GC.

But now, we have ScriptFetcher. It is introduced after we implemented the module pipeline
notification mechanism by using JSStdFunction. But it is appropriate one to receive notification
from the module pipeline by observer style.

This patch removes the above ad-hoc JSStdFunction use. And now ScriptFetcher receives
completion/failure notifications from the module pipeline.

  • builtins/ModuleLoaderPrototype.js:

(loadModule):
(loadAndEvaluateModule):

  • runtime/Completion.cpp:

(JSC::loadModule):

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

(JSC::jsValueToModuleKey):
(JSC::JSModuleLoader::notifyCompleted):
(JSC::JSModuleLoader::notifyFailed):

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

(JSC::moduleLoaderPrototypeNotifyCompleted):
(JSC::moduleLoaderPrototypeNotifyFailed):

  • runtime/ScriptFetcher.h:

(JSC::ScriptFetcher::notifyLoadCompleted):
(JSC::ScriptFetcher::notifyLoadFailed):

Source/WebCore:

No behavior change.

  • bindings/js/JSMainThreadExecState.h:

(WebCore::JSMainThreadExecState::loadModule):

  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::loadModuleScriptInWorld):
(WebCore::jsValueToModuleKey): Deleted.
(WebCore::ScriptController::setupModuleScriptHandlers): Deleted.

  • bindings/js/ScriptController.h:
  • dom/LoadableModuleScript.cpp:

(WebCore::LoadableModuleScript::notifyLoadFailed):

  • dom/LoadableModuleScript.h:

LayoutTests:

  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-redirect-expected.txt:
  • http/tests/security/module-no-mime-type-expected.txt:
  • js/dom/modules/module-execution-error-should-be-propagated-to-onerror-expected.txt:

Oct 19, 2017:

11:17 PM Changeset in webkit [223743] by Ms2ger@igalia.com
  • 2 edits in trunk/Source/WebCore

Remove proprietary constants from WebGL2RenderingContext.
https://bugs.webkit.org/show_bug.cgi?id=178511

Reviewed by Ryosuke Niwa.

As far as I can tell, these constants are not in the specification,
and no other browser supports them.

No new tests: just code removal.

  • html/canvas/WebGL2RenderingContext.idl:
9:52 PM Changeset in webkit [223742] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[FrameView::layout cleanup] Move style update related logic to a separate function
https://bugs.webkit.org/show_bug.cgi?id=178558
<rdar://problem/35088218>

Reviewed by Simon Fraser.

No change in functionality.

  • page/FrameView.cpp:

(WebCore::FrameView::ensureStyleIsUpToDateForLayout):
(WebCore::FrameView::layout):

  • page/FrameView.h:
8:08 PM Changeset in webkit [223741] by sbarati@apple.com
  • 2 edits in trunk/Source/bmalloc

Runtime disable gigacage on iOS because it broke WasmBench
https://bugs.webkit.org/show_bug.cgi?id=178556

Reviewed by Keith Miller.

  • bmalloc/Gigacage.cpp:

(Gigacage::shouldBeEnabled):

7:41 PM Changeset in webkit [223740] by achristensen@apple.com
  • 4 edits in trunk/Source/WebKit

Introduce completionHandler-based SPI for _WKDownloadDelegate.decideDestinationWithSuggestedFilename
https://bugs.webkit.org/show_bug.cgi?id=178560

Reviewed by Tim Horton.

  • UIProcess/API/Cocoa/_WKDownloadDelegate.h:
  • UIProcess/Cocoa/DownloadClient.h:
  • UIProcess/Cocoa/DownloadClient.mm:

(WebKit::DownloadClient::DownloadClient):
(WebKit::DownloadClient::didStart):
(WebKit::DownloadClient::didReceiveResponse):
(WebKit::DownloadClient::didReceiveData):
(WebKit::DownloadClient::decideDestinationWithSuggestedFilename):
(WebKit::DownloadClient::didFinish):
(WebKit::DownloadClient::didFail):
(WebKit::DownloadClient::didCancel):
(WebKit::DownloadClient::willSendRequest):

7:39 PM Changeset in webkit [223739] by Chris Dumez
  • 10 edits
    1 add in trunk/Source/WebKit

ServiceWorkerContextManager should be an IPC::MessageReceiver
https://bugs.webkit.org/show_bug.cgi?id=178552

Reviewed by Youenn Fablet.

ServiceWorkerContextManager should be an IPC::MessageReceiver, to avoid putting too many
ServiceWorker related methods on WebProcess class.

  • DerivedSources.make:
  • StorageProcess/ServiceWorker/WebSWServerConnection.cpp:

(WebKit::WebSWServerConnection::startServiceWorkerContext):
(WebKit::WebSWServerConnection::startFetch):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Storage/ServiceWorkerContextManager.cpp:

(WebKit::ServiceWorkerContextManager::startFetchInServiceWorker):
(WebKit::ServiceWorkerContextManager::startFetch): Deleted.

  • WebProcess/Storage/ServiceWorkerContextManager.h:
  • WebProcess/Storage/ServiceWorkerContextManager.messages.in: Added.
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::didReceiveMessage):
(WebKit::WebProcess::getWorkerContextConnection):
(WebKit::WebProcess::startServiceWorkerContext): Deleted.
(WebKit::WebProcess::startFetchInServiceWorker): Deleted.

  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:
7:23 PM Changeset in webkit [223738] by jfbastien@apple.com
  • 99 edits
    9 copies
    2 moves
    4 adds in trunk

WebAssembly: no VM / JS version of everything but Instance
https://bugs.webkit.org/show_bug.cgi?id=177473

Reviewed by Filip Pizlo, Saam Barati.

JSTests:

  • Exceeding max on memory growth now returns a range error as per

spec. This is a (very minor) breaking change: it used to throw OOM
error. Update the corresponding test.

  • wasm/js-api/memory-grow.js:

(assertEq):

  • wasm/js-api/table.js:

(assert.throws):

Source/JavaScriptCore:

This change entails cleaning up and splitting a bunch of code which we had
intertwined between C++ classes which represent JS objects, and pure C++
implementation objects. This specific change goes most of the way towards
allowing JSC's WebAssembly to work without VM / JS, up to but excluding
JSWebAssemblyInstance (there's Wasm::Instance, but it's not *the* thing
yet). Because of this we still have a few FIXME identifying places that need to
change. A follow-up change will go the rest of the way.

I went about this change in the simplest way possible: grep the
JavaScriptCore/wasm directory for "JS[C_]" as well as "VM" and exclude the /js/
sub-directory (which contains the JS implementation of WebAssembly).

None of this change removes the need for a JIT entitlement to be able to use
WebAssembly. We don't have an interpreter, the process therefore still needs to
be allowed to JIT to use these pure-C++ APIs.

Interesting things to note:

  • Remove VM from Plan and associated places. It can just live as a capture in the callback lambda if it's needed.
  • Wasm::Memory shouldn't require a VM. It was only used to ask the GC to collect. We now instead pass two lambdas at construction time for this purpose: one to notify of memory pressure, and the other to ask for syncrhonous memory reclamation. This allows whoever creates the memory to dictate how to react to both these cases, and for a JS embedding that's to call the GC (async or sync, respectively).
  • Move grow logic from JSWebAssemblyMemory to Wasm::Memory::grow. Use Expected there, with an enum class for failure types.
  • Exceeding max on memory growth now returns a range error as per spec. This is a (very minor) breaking change: it used to throw OOM error. Update the corresponding test.
  • When generating the grow_memory opcode, no need to get the VM. Instead, reach directly for Wasm::Memory and grow it.
  • JSWebAssemblyMemory::grow can now always throw on failure, because it's only ever called from JS (not from grow_memory as before).
  • Wasm::Memory now takes a callback for successful growth. This allows JS wrappers to register themselves when growth succeeds without Wasm::Memory knowning anything about JS. It'll also allow creating a list of callbacks for when we add thread support (we'll want to notify many wrappers, all under a lock).
  • Wasm::Memory is now back to being the source of truth about address / size, used directly by generated code instead of JSWebAssemblyMemory.
  • Move wasmToJS from the general WasmBinding header to its own header under wasm/js. It's only used by wasm/js/JSWebAssemblyCodeBlock.cpp, and uses VM, and therefore isn't general WebAssembly.
  • Make Wasm::Context an actual type (just a struct holding a JSWebAssemlyInstance for now) instead of an alias for that. Notably this doesn't add anything to the Context and doesn't change what actually gets passed around in JIT code (fast TLS or registers) because these changes potentially impact performance. The entire purpose of this change is to allow passing Wasm::Context around without having to know about VM. Since VM contains a Wasm::Context the JS embedding is effectively the same, but with this setup a non-JS embedding is much better off.
  • Move JSWebAssembly into the JS folder.
  • OMGPlan: use Wasm::CodeBlock directly instead of JSWebAssemblyCodeBlock.
  • wasm->JS stubs are now on the instance's tail as raw pointers, instead of being on JSWebAssemblyCodeBlock, and are now called wasm->Embedder stubs. The owned reference is still on JSWebAssemblyCodeBlock, and is still called wasm->JS stub. This move means that the embedder must, after creating a Wasm::CodeBlock, somehow create the stubs to call back into the embedder. This removes an indirection in the generated code because the B3 IR generator now reaches into the instance instead of JSWebAssemblyCodeBlock.
  • Move more CodeBlock things. Compilation completion is now marked by its own atomic<bool> flag instead of a nullptr plan: that required using a lock, and was causing a deadlock in stack-trace.js because before my changes JSWebAssemblyCodeBlock did its own completion checking separately from Wasm::CodeBlock, without getting the lock. Now that everything points to Wasm::CodeBlock and there's no cached completion marker, the lock was being acquired in a sanity-check assertion.
  • Embedder -> Wasm wrappers are now generated through a function that's passed in at compilation time, instead of being hard-coded as a JS -> Wasm wrapper.
  • WasmMemory doens't need to know about fault handling thunks. Only the IR generator should know, and should make sure that the exception throwing thunk is generated if any memory is present (note: with signal handling not all of them generate an exception check).
  • Make exception throwing pluggable: instead of having a hard-coded JS-specific lambda we now have a regular C++ function being called from JIT code when a WebAssembly exception is thrown. This allows any embedder to get called as they wish. For now a process can only have a single of these functions (i.e. only one embedder per process) because the trap handler is a singleton. That can be fixed in in #177475.
  • Create WasmEmbedder.h where all embedder plugging will live.
  • Split up JSWebAssemblyTable into Wasm::Table which is refcounted. JSWebAssemblyTable now only contains the JS functions in the table, and Wasm::Table is what's used by the JIT code to lookup where to call and do the instance check (for context switch). Note that this creates an extra allocation for all the instances in Wasm::Table, and in exchange removes an indirection in JIT code because the instance used to be obtained off of the JS function. Also note that it's the embedder than keeps the instances alive, not Wasm::Table (which holds a dumb pointer to the instance), because doing otherwise would cause reference cycles.
    • Add WasmInstance. It doesn't do much for now, owns globals.
    • JSWebAssembly instance now doesn't just contain the imported functions as JSObjects, it also has the corresponding import's instance and wasm entrypoint. This triples the space allocated per instance's imported function, but there shouldn't be that many imports. This has two upsides: it creates smaller and faster code, and makes is easier to disassociate embedder-specific things from embedder-neutral things. The small / faster win is in two places: B3 IR generator only needs offsetOfImportFunction for the call opcode (when the called index is an import) to know whether the import is wasm->wasm or wasm->embedder (this isn't known at compile-time because it's dependent on the import object), this is now done by seeing if that import function has an associated target instance (only wasm->wasm does); the other place is wasmBinding which uses offsetOfImportFunction to figure out the wasm->wasm target instance, and then gets WebAssemblyFunction::offsetOfWasmEntrypointLoadLocation to do a tail call. The disassociation comes because the target instance can be Wasm::Instance once we change what the Context is, and WasmEntrypointLoadLocation is already embedder-independent. As a next step I can move this tail allocation from JSWebAssemblyInstance to Wasm::Instance, and leave importFunction in as an opaque pointer which is embedder-specific, and in JS will remain WriteBarrier<JSObject>.
    • Rename VMEntryFrame to EntryFrame, and in many places pass a pointer to it around instead of VM. This is a first step in allowing entry frames which aren't stored on VM, but which are instead stored in an embedder-specific location. That change won't really affect JS except through code churn, but will allow WebAssembly to use some machinery in a generic manner without having a VM.
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • bytecode/PolymorphicAccess.cpp:

(JSC::AccessGenerationState::emitExplicitExceptionHandler):

  • debugger/Debugger.cpp:

(JSC::Debugger::stepOutOfFunction):
(JSC::Debugger::returnEvent):
(JSC::Debugger::unwindEvent):
(JSC::Debugger::didExecuteProgram):

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::compileExceptionHandlers):

  • dfg/DFGOSREntry.cpp:

(JSC::DFG::prepareOSREntry):

  • dfg/DFGOSRExit.cpp:

(JSC::DFG::OSRExit::compileOSRExit):
(JSC::DFG::OSRExit::compileExit):

  • dfg/DFGThunks.cpp:

(JSC::DFG::osrEntryThunkGenerator):

  • ftl/FTLCompile.cpp:

(JSC::FTL::compile):

  • ftl/FTLLink.cpp:

(JSC::FTL::link):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::lower):

  • ftl/FTLOSRExitCompiler.cpp:

(JSC::FTL::compileStub):

  • interpreter/CallFrame.cpp:

(JSC::CallFrame::wasmAwareLexicalGlobalObject):
(JSC::CallFrame::callerFrame):
(JSC::CallFrame::unsafeCallerFrame):

  • interpreter/CallFrame.h:

(JSC::ExecState::callerFrame const):
(JSC::ExecState::callerFrameOrEntryFrame const):
(JSC::ExecState::unsafeCallerFrameOrEntryFrame const):

  • interpreter/FrameTracers.h:

(JSC::NativeCallFrameTracer::NativeCallFrameTracer):
(JSC::NativeCallFrameTracerWithRestore::NativeCallFrameTracerWithRestore):
(JSC::NativeCallFrameTracerWithRestore::~NativeCallFrameTracerWithRestore):

  • interpreter/Interpreter.cpp:

(JSC::UnwindFunctor::operator() const):
(JSC::UnwindFunctor::copyCalleeSavesToEntryFrameCalleeSavesBuffer const):
(JSC::Interpreter::unwind):

  • interpreter/StackVisitor.cpp:

(JSC::StackVisitor::StackVisitor):
(JSC::StackVisitor::gotoNextFrame):
(JSC::StackVisitor::readNonInlinedFrame):
(JSC::StackVisitor::Frame::dump const):

  • interpreter/StackVisitor.h:

(JSC::StackVisitor::Frame::callerIsEntryFrame const):

  • interpreter/VMEntryRecord.h:

(JSC::VMEntryRecord::prevTopEntryFrame):
(JSC::VMEntryRecord::unsafePrevTopEntryFrame):
(JSC::EntryFrame::vmEntryRecordOffset):

  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::restoreCalleeSavesFromEntryFrameCalleeSavesBuffer):
(JSC::AssemblyHelpers::loadWasmContextInstance):
(JSC::AssemblyHelpers::storeWasmContextInstance):
(JSC::AssemblyHelpers::loadWasmContextInstanceNeedsMacroScratchRegister):
(JSC::AssemblyHelpers::storeWasmContextInstanceNeedsMacroScratchRegister):
(JSC::AssemblyHelpers::copyCalleeSavesToEntryFrameCalleeSavesBufferImpl):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::copyCalleeSavesToVMEntryFrameCalleeSavesBuffer):
(JSC::AssemblyHelpers::copyCalleeSavesToEntryFrameCalleeSavesBuffer):
(JSC::AssemblyHelpers::copyCalleeSavesFromFrameOrRegisterToEntryFrameCalleeSavesBuffer):

  • jit/JIT.cpp:

(JSC::JIT::emitEnterOptimizationCheck):
(JSC::JIT::privateCompileExceptionHandlers):

  • jit/JITExceptions.cpp:

(JSC::genericUnwind):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_throw):
(JSC::JIT::emit_op_catch):
(JSC::JIT::emitSlow_op_loop_hint):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_throw):
(JSC::JIT::emit_op_catch):

  • jit/JITOperations.cpp:
  • jit/ThunkGenerators.cpp:

(JSC::throwExceptionFromCallSlowPathGenerator):
(JSC::nativeForGenerator):

  • jsc.cpp:

(functionDumpCallFrame):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • llint/LLIntThunks.cpp:

(JSC::vmEntryRecord):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/Options.cpp:

(JSC::recomputeDependentOptions):

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

(JSC::FrameWalker::FrameWalker):
(JSC::FrameWalker::advanceToParentFrame):
(JSC::SamplingProfiler::processUnverifiedStackTraces):

  • runtime/ThrowScope.cpp:

(JSC::ThrowScope::~ThrowScope):

  • runtime/VM.cpp:

(JSC::VM::VM):
(JSC::VM::~VM):

  • runtime/VM.h:

(JSC::VM::topEntryFrameOffset):

  • runtime/VMTraps.cpp:

(JSC::isSaneFrame):
(JSC::VMTraps::tryInstallTrapBreakpoints):
(JSC::VMTraps::invalidateCodeBlocksOnStack):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::restoreWasmContextInstance):
(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::restoreWebAssemblyGlobalState):
(JSC::Wasm::B3IRGenerator::addGrowMemory):
(JSC::Wasm::B3IRGenerator::addCurrentMemory):
(JSC::Wasm::B3IRGenerator::addCall):
(JSC::Wasm::B3IRGenerator::addCallIndirect):
(JSC::Wasm::parseAndCompile):

  • wasm/WasmB3IRGenerator.h:
  • wasm/WasmBBQPlan.cpp:

(JSC::Wasm::BBQPlan::BBQPlan):
(JSC::Wasm::BBQPlan::compileFunctions):
(JSC::Wasm::BBQPlan::complete):

  • wasm/WasmBBQPlan.h:
  • wasm/WasmBBQPlanInlines.h:

(JSC::Wasm::BBQPlan::initializeCallees):

  • wasm/WasmBinding.cpp:

(JSC::Wasm::wasmToWasm):

  • wasm/WasmBinding.h:
  • wasm/WasmCodeBlock.cpp:

(JSC::Wasm::CodeBlock::create):
(JSC::Wasm::CodeBlock::CodeBlock):
(JSC::Wasm::CodeBlock::compileAsync):
(JSC::Wasm::CodeBlock::setCompilationFinished):

  • wasm/WasmCodeBlock.h:

(JSC::Wasm::CodeBlock::offsetOfImportStubs):
(JSC::Wasm::CodeBlock::allocationSize):
(JSC::Wasm::CodeBlock::importWasmToEmbedderStub):
(JSC::Wasm::CodeBlock::offsetOfImportWasmToEmbedderStub):
(JSC::Wasm::CodeBlock::wasmToJSCallStubForImport):
(JSC::Wasm::CodeBlock::compilationFinished):
(JSC::Wasm::CodeBlock::jsEntrypointCalleeFromFunctionIndexSpace):
(JSC::Wasm::CodeBlock::wasmEntrypointCalleeFromFunctionIndexSpace):

  • wasm/WasmContext.cpp:

(JSC::Wasm::Context::useFastTLS):
(JSC::Wasm::Context::load const):
(JSC::Wasm::Context::store):

  • wasm/WasmContext.h:
  • wasm/WasmEmbedder.h: Copied from Source/JavaScriptCore/wasm/WasmContext.h.
  • wasm/WasmFaultSignalHandler.cpp:
  • wasm/WasmFaultSignalHandler.h:
  • wasm/WasmFormat.h:
  • wasm/WasmInstance.cpp: Copied from Source/JavaScriptCore/wasm/WasmFaultSignalHandler.h.

(JSC::Wasm::Instance::Instance):
(JSC::Wasm::Instance::~Instance):
(JSC::Wasm::Instance::extraMemoryAllocated const):

  • wasm/WasmInstance.h: Added.

(JSC::Wasm::Instance::create):
(JSC::Wasm::Instance::finalizeCreation):
(JSC::Wasm::Instance::module):
(JSC::Wasm::Instance::codeBlock):
(JSC::Wasm::Instance::memory):
(JSC::Wasm::Instance::table):
(JSC::Wasm::Instance::loadI32Global const):
(JSC::Wasm::Instance::loadI64Global const):
(JSC::Wasm::Instance::loadF32Global const):
(JSC::Wasm::Instance::loadF64Global const):
(JSC::Wasm::Instance::setGlobal):
(JSC::Wasm::Instance::offsetOfCachedStackLimit):
(JSC::Wasm::Instance::cachedStackLimit const):
(JSC::Wasm::Instance::setCachedStackLimit):

  • wasm/WasmMemory.cpp:

(JSC::Wasm::Memory::Memory):
(JSC::Wasm::Memory::create):
(JSC::Wasm::Memory::~Memory):
(JSC::Wasm::Memory::grow):

  • wasm/WasmMemory.h:

(JSC::Wasm::Memory::offsetOfMemory):
(JSC::Wasm::Memory::offsetOfSize):

  • wasm/WasmMemoryInformation.cpp:

(JSC::Wasm::PinnedRegisterInfo::get):
(JSC::Wasm::PinnedRegisterInfo::PinnedRegisterInfo):

  • wasm/WasmMemoryInformation.h:

(JSC::Wasm::PinnedRegisterInfo::toSave const):

  • wasm/WasmMemoryMode.cpp: Copied from Source/JavaScriptCore/wasm/WasmFaultSignalHandler.h.

(JSC::Wasm::makeString):

  • wasm/WasmMemoryMode.h: Copied from Source/JavaScriptCore/wasm/WasmFaultSignalHandler.h.
  • wasm/WasmModule.cpp:

(JSC::Wasm::makeValidationCallback):
(JSC::Wasm::Module::validateSync):
(JSC::Wasm::Module::validateAsync):
(JSC::Wasm::Module::getOrCreateCodeBlock):
(JSC::Wasm::Module::compileSync):
(JSC::Wasm::Module::compileAsync):

  • wasm/WasmModule.h:
  • wasm/WasmModuleParser.cpp:

(JSC::Wasm::ModuleParser::parseTableHelper):

  • wasm/WasmOMGPlan.cpp:

(JSC::Wasm::OMGPlan::OMGPlan):
(JSC::Wasm::OMGPlan::runForIndex):

  • wasm/WasmOMGPlan.h:
  • wasm/WasmPageCount.h:

(JSC::Wasm::PageCount::isValid const):

  • wasm/WasmPlan.cpp:

(JSC::Wasm::Plan::Plan):
(JSC::Wasm::Plan::runCompletionTasks):
(JSC::Wasm::Plan::addCompletionTask):
(JSC::Wasm::Plan::tryRemoveContextAndCancelIfLast):

  • wasm/WasmPlan.h:

(JSC::Wasm::Plan::dontFinalize):

  • wasm/WasmSignature.cpp:
  • wasm/WasmSignature.h:
  • wasm/WasmTable.cpp: Added.

(JSC::Wasm::Table::create):
(JSC::Wasm::Table::~Table):
(JSC::Wasm::Table::Table):
(JSC::Wasm::Table::grow):
(JSC::Wasm::Table::clearFunction):
(JSC::Wasm::Table::setFunction):

  • wasm/WasmTable.h: Copied from Source/JavaScriptCore/wasm/js/JSWebAssemblyTable.h.

(JSC::Wasm::Table::maximum const):
(JSC::Wasm::Table::size const):
(JSC::Wasm::Table::offsetOfSize):
(JSC::Wasm::Table::offsetOfFunctions):
(JSC::Wasm::Table::offsetOfInstances):
(JSC::Wasm::Table::isValidSize):

  • wasm/WasmThunks.cpp:

(JSC::Wasm::throwExceptionFromWasmThunkGenerator):
(JSC::Wasm::triggerOMGTierUpThunkGenerator):
(JSC::Wasm::Thunks::setThrowWasmException):
(JSC::Wasm::Thunks::throwWasmException):

  • wasm/WasmThunks.h:
  • wasm/WasmWorklist.cpp:

(JSC::Wasm::Worklist::stopAllPlansForContext):

  • wasm/WasmWorklist.h:
  • wasm/js/JSToWasm.cpp: Added.

(JSC::Wasm::createJSToWasmWrapper):

  • wasm/js/JSToWasm.h: Copied from Source/JavaScriptCore/wasm/WasmBinding.h.
  • wasm/js/JSWebAssembly.cpp: Renamed from Source/JavaScriptCore/wasm/JSWebAssembly.cpp.
  • wasm/js/JSWebAssembly.h: Renamed from Source/JavaScriptCore/wasm/JSWebAssembly.h.
  • wasm/js/JSWebAssemblyCodeBlock.cpp:

(JSC::JSWebAssemblyCodeBlock::create):
(JSC::JSWebAssemblyCodeBlock::JSWebAssemblyCodeBlock):

  • wasm/js/JSWebAssemblyCodeBlock.h:
  • wasm/js/JSWebAssemblyInstance.cpp:

(JSC::JSWebAssemblyInstance::JSWebAssemblyInstance):
(JSC::JSWebAssemblyInstance::finishCreation):
(JSC::JSWebAssemblyInstance::visitChildren):
(JSC::JSWebAssemblyInstance::finalizeCreation):
(JSC::JSWebAssemblyInstance::create):

  • wasm/js/JSWebAssemblyInstance.h:

(JSC::JSWebAssemblyInstance::instance):
(JSC::JSWebAssemblyInstance::context const):
(JSC::JSWebAssemblyInstance::table):
(JSC::JSWebAssemblyInstance::webAssemblyToJSCallee):
(JSC::JSWebAssemblyInstance::setMemory):
(JSC::JSWebAssemblyInstance::offsetOfTail):
(JSC::JSWebAssemblyInstance::importFunctionInfo):
(JSC::JSWebAssemblyInstance::offsetOfTargetInstance):
(JSC::JSWebAssemblyInstance::offsetOfWasmEntrypoint):
(JSC::JSWebAssemblyInstance::offsetOfImportFunction):
(JSC::JSWebAssemblyInstance::importFunction):
(JSC::JSWebAssemblyInstance::internalMemory):
(JSC::JSWebAssemblyInstance::wasmCodeBlock const):
(JSC::JSWebAssemblyInstance::offsetOfWasmTable):
(JSC::JSWebAssemblyInstance::offsetOfCallee):
(JSC::JSWebAssemblyInstance::offsetOfGlobals):
(JSC::JSWebAssemblyInstance::offsetOfWasmCodeBlock):
(JSC::JSWebAssemblyInstance::offsetOfWasmMemory):
(JSC::JSWebAssemblyInstance::cachedStackLimit const):
(JSC::JSWebAssemblyInstance::setCachedStackLimit):
(JSC::JSWebAssemblyInstance::wasmMemory):
(JSC::JSWebAssemblyInstance::wasmModule):
(JSC::JSWebAssemblyInstance::allocationSize):
(JSC::JSWebAssemblyInstance::module const):

  • wasm/js/JSWebAssemblyMemory.cpp:

(JSC::JSWebAssemblyMemory::create):
(JSC::JSWebAssemblyMemory::adopt):
(JSC::JSWebAssemblyMemory::JSWebAssemblyMemory):
(JSC::JSWebAssemblyMemory::grow):
(JSC::JSWebAssemblyMemory::growSuccessCallback):

  • wasm/js/JSWebAssemblyMemory.h:
  • wasm/js/JSWebAssemblyModule.cpp:

(JSC::JSWebAssemblyModule::moduleInformation const):
(JSC::JSWebAssemblyModule::exportSymbolTable const):
(JSC::JSWebAssemblyModule::signatureIndexFromFunctionIndexSpace const):
(JSC::JSWebAssemblyModule::callee const):
(JSC::JSWebAssemblyModule::codeBlock):
(JSC::JSWebAssemblyModule::module):

  • wasm/js/JSWebAssemblyModule.h:
  • wasm/js/JSWebAssemblyTable.cpp:

(JSC::JSWebAssemblyTable::create):
(JSC::JSWebAssemblyTable::JSWebAssemblyTable):
(JSC::JSWebAssemblyTable::visitChildren):
(JSC::JSWebAssemblyTable::grow):
(JSC::JSWebAssemblyTable::getFunction):
(JSC::JSWebAssemblyTable::clearFunction):
(JSC::JSWebAssemblyTable::setFunction):

  • wasm/js/JSWebAssemblyTable.h:

(JSC::JSWebAssemblyTable::isValidSize):
(JSC::JSWebAssemblyTable::maximum const):
(JSC::JSWebAssemblyTable::size const):
(JSC::JSWebAssemblyTable::table):

  • wasm/js/WasmToJS.cpp: Copied from Source/JavaScriptCore/wasm/WasmBinding.cpp.

(JSC::Wasm::materializeImportJSCell):
(JSC::Wasm::wasmToJS):
(JSC::Wasm::wasmToJSException):

  • wasm/js/WasmToJS.h: Copied from Source/JavaScriptCore/wasm/WasmBinding.h.
  • wasm/js/WebAssemblyFunction.cpp:

(JSC::callWebAssemblyFunction):

  • wasm/js/WebAssemblyInstanceConstructor.cpp:

(JSC::constructJSWebAssemblyInstance):

  • wasm/js/WebAssemblyMemoryConstructor.cpp:

(JSC::constructJSWebAssemblyMemory):

  • wasm/js/WebAssemblyMemoryPrototype.cpp:

(JSC::webAssemblyMemoryProtoFuncGrow):

  • wasm/js/WebAssemblyModuleConstructor.cpp:

(JSC::constructJSWebAssemblyModule):
(JSC::WebAssemblyModuleConstructor::createModule):

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

(JSC::WebAssemblyModuleRecord::link):
(JSC::WebAssemblyModuleRecord::evaluate):

  • wasm/js/WebAssemblyPrototype.cpp:

(JSC::webAssemblyCompileFunc):
(JSC::instantiate):
(JSC::compileAndInstantiate):
(JSC::webAssemblyValidateFunc):

  • wasm/js/WebAssemblyTableConstructor.cpp:

(JSC::constructJSWebAssemblyTable):

  • wasm/js/WebAssemblyWrapperFunction.cpp:

(JSC::WebAssemblyWrapperFunction::create):

Source/WebCore:

  • ForwardingHeaders/wasm/WasmModule.h: Added. This used to be

included in JSWebAssemblyModule.h.

  • bindings/js/SerializedScriptValue.cpp: Update postMessage code

according to C++ API changes.

7:17 PM Changeset in webkit [223737] by achristensen@apple.com
  • 9 edits in trunk/Source/WebKit

Modernize authentication challenge handling in WebKit
https://bugs.webkit.org/show_bug.cgi?id=178555

Reviewed by Tim Horton.

  • UIProcess/API/APILoaderClient.h:

(API::LoaderClient::didReceiveAuthenticationChallengeInFrame):

  • UIProcess/API/APINavigationClient.h:

(API::NavigationClient::didReceiveAuthenticationChallenge):

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetPageLoaderClient):
(WKPageSetPageNavigationClient):

  • UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
  • UIProcess/Cocoa/NavigationState.h:
  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::NavigationState::NavigationClient::canAuthenticateAgainstProtectionSpace):
(WebKit::NavigationState::NavigationClient::didReceiveAuthenticationChallenge):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didReceiveAuthenticationChallengeProxy):

7:12 PM Changeset in webkit [223736] by Joseph Pecoraro
  • 2 edits in trunk/Source/WebInspectorUI

Unreviewed localized strings update.

  • Localizations/en.lproj/localizedStrings.js:

Add missing string after r223735.

7:11 PM Changeset in webkit [223735] by Joseph Pecoraro
  • 7 edits
    6 adds in trunk/Source/WebInspectorUI

Web Inspector: Network Tab: Metrics Detail View
https://bugs.webkit.org/show_bug.cgi?id=178323
<rdar://problem/34071929>

Reviewed by Devin Rousso.

Provide a Metrics detail view for resources in the Network tab.
This detail view shows:

  • Transfer Size information (Header + Body bytes)
  • Resource Size information (Compression, MIME)
  • Timing information (ResourceTiming, Waterfall breakdown)

The display of timing information isn't quite final. But this
is a good starting point for all the information.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Main.html:

New resources and strings.

  • UserInterface/Base/MIMETypeUtilities.js:

(WI.shouldTreatMIMETypeAsText):
Helper for detecting text resources.

  • UserInterface/Images/Receiving.svg: Added.
  • UserInterface/Images/Sending.svg: Added.
  • UserInterface/Images/gtk/Receiving.svg: Added.
  • UserInterface/Images/gtk/Sending.svg: Added.

Same images for main and linux ports with different licenses.

  • UserInterface/Views/NetworkResourceDetailView.js:

(WI.NetworkResourceDetailView):
(WI.NetworkResourceDetailView.prototype.metricsContentViewGoToHeaders):
(WI.NetworkResourceDetailView.prototype.metricsContentViewGoToRequestBody):
(WI.NetworkResourceDetailView.prototype.metricsContentViewGoToResponseBody):
(WI.NetworkResourceDetailView.prototype.initialLayout):
(WI.NetworkResourceDetailView.prototype._showPreferredContentView):
(WI.NetworkResourceDetailView.prototype._showContentViewForNavigationItem):
Replace "Timing" and "Details" stubs with a single "Metrics" section.
Handle delegate cases from the Metrics content view.

  • UserInterface/Views/NetworkTableContentView.js:

(WI.NetworkTableContentView.displayNameForResource):
(WI.NetworkTableContentView.prototype._displayType): Deleted.
(WI.NetworkTableContentView.prototype._entryForResource):
Promote this to a static helper in case anyone else wants it.

(WI.NetworkTableContentView.prototype.closed):
(WI.NetworkTableContentView.prototype.reset):
(WI.NetworkTableContentView.prototype.networkResourceDetailViewClose):
Reorder code a bit to reduce work since hiding the detail view currently
forces a layout.

  • UserInterface/Views/ResourceHeadersContentView.js:

(WI.ResourceHeadersContentView):
(WI.ResourceHeadersContentView.prototype._refreshRequestDataSection):
(WI.ResourceHeadersContentView.prototype._resourceResponseReceived):
(WI.ResourceHeadersContentView.prototype._goToRequestDataClicked): Deleted.
Simplify by making the delegate required.

  • UserInterface/Views/ResourceMetricsContentView.css: Added.

(.resource-metrics):
(.resource-metrics > .content):
(.resource-metrics > .content .label):
General metrics styles.

(.resource-metrics > .content > section):
(.resource-metrics > .content > section .subtitle):
(.resource-metrics > .content > section:not(:last-of-type)):
(.resource-metrics > .content > section.split):
(.resource-metrics > .content > section.split > .subsection):
(.resource-metrics > .content > section.split > .subsection > table):
(.resource-metrics > .content > section.split > .divider):
(.resource-metrics > .content > section.network > .subsection > .container):
(.resource-metrics > .content > section.network .bytes-group):
(.resource-metrics > .content > section.network .bytes):
(body[dir=ltr] .resource-metrics > .content > section.network table > tr > td.label):
(body[dir=rtl] .resource-metrics > .content > section.network table > tr > td.label):
(.resource-metrics > .content > section.network .suffix):
(.resource-metrics > .content > section.network img):
(.resource-metrics > .content > section.network .go-to-arrow):
(.resource-metrics > .content > section.network .warning):
Styles for Sizes sections.

(.resource-metrics > .content > section.timing):
(.resource-metrics > .content > section.timing .subtitle):
(.resource-metrics > .content > section.timing > ul):
(.resource-metrics > .content > section.timing > ul > li):
(.resource-metrics > .content > section.timing > .waterfall):
(.resource-metrics > .content > section.timing > .waterfall .block):
(.resource-metrics > .content > section.timing > ul > li > .row-label):
(body[dir=ltr] .resource-metrics > .content > section.timing > ul > li > .row-label):
(body[dir=rtl] .resource-metrics > .content > section.timing > ul > li > .row-label):
(.resource-metrics > .content > section.timing > ul > li > .time-label):
(.resource-metrics > .content > section.timing > ul > li.total .block):
(.resource-metrics > .content > section.timing > ul > li.total .time-label):
(.resource-metrics > .content > section.timing .indeterminate-progress-spinner):
(.resource-metrics > .content > section.timing .empty):
Styles for Timing section.

  • UserInterface/Views/ResourceMetricsContentView.js: Added.

(WI.ResourceMetricsContentView):
(WI.ResourceMetricsContentView.prototype.initialLayout.createSizeComponents):
(WI.ResourceMetricsContentView.prototype.initialLayout):
(WI.ResourceMetricsContentView.prototype.layout):
(WI.ResourceMetricsContentView.prototype.closed):
(WI.ResourceMetricsContentView.prototype._sizeComponents):
(WI.ResourceMetricsContentView.prototype._refreshTransferSizeSections.appendGoToArrow):
(WI.ResourceMetricsContentView.prototype._refreshTransferSizeSections):
(WI.ResourceMetricsContentView.prototype._refreshResourceSizeSection):
(WI.ResourceMetricsContentView.prototype._refreshTimingSection.createBlock):
(WI.ResourceMetricsContentView.prototype._refreshTimingSection.createTimeLabel):
(WI.ResourceMetricsContentView.prototype._refreshTimingSection.createRow):
(WI.ResourceMetricsContentView.prototype._refreshTimingSection):
(WI.ResourceMetricsContentView.prototype._resourceSizeDidChange):
(WI.ResourceMetricsContentView.prototype._resourceTransferSizeDidChange):
(WI.ResourceMetricsContentView.prototype._resourceMetricsDidChange):
(WI.ResourceMetricsContentView.prototype._resourceTimestampsDidChange):
Metrics content. This just creates all of the elements, and saves a
few to get populated with data later on.

7:11 PM Changeset in webkit [223734] by Joseph Pecoraro
  • 10 edits
    2 adds in trunk/Source/WebInspectorUI

Web Inspector: Network Tab - Improve graphical representation of network waterfall
https://bugs.webkit.org/show_bug.cgi?id=147897
<rdar://problem/27482198>

Reviewed by Brian Burg.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Main.html:

New strings and resources.

  • UserInterface/Views/Variables.css:

(:root):
Global styles.

  • UserInterface/Views/NetworkTableContentView.css:

(.network-table .header .cell.waterfall):
(.network-table .timeline-ruler):
(.network-table .timeline-ruler > .header):
Styles for having a TimelineRuler in the Waterfall's table header.

(.network-table :not(.header) .cell.waterfall):
(.network-table :not(.header) .cell.waterfall .waterfall-container):
(.waterfall .block):
(.waterfall .block.request,):
(.waterfall .block.mouse):
(.waterfall .block.queue):
(.waterfall .block.dns):
(.waterfall .block.connect):
(.waterfall .block.secure):
(.waterfall .block.request):
(.waterfall .block.response):
Waterfall styles inside the Network Table.

  • UserInterface/Views/NetworkTableContentView.js:

(WI.NetworkTableContentView):
(WI.NetworkTableContentView.prototype.reset):
(WI.NetworkTableContentView.prototype.tablePopulateCell):
(WI.NetworkTableContentView.prototype.initialLayout):
(WI.NetworkTableContentView.prototype._updateWaterfallTimelineRuler):
(WI.NetworkTableContentView.prototype._updateEntryForResource):
(WI.NetworkTableContentView.prototype._resourceLoadingDidFinish):
(WI.NetworkTableContentView.prototype._resourceLoadingDidFail):
(WI.NetworkTableContentView.prototype._networkTimelineRecordAdded):
(WI.NetworkTableContentView.prototype._tableWaterfallColumnDidChangeWidth):
Update the TimelineRuler and Waterfall column when the column's
size changes or the time bounds change. The time bounds right now
are the earliest and latest time of resources. Later we hope to
bound this by a timeline selection.

(WI.NetworkTableContentView.prototype._waterfallPopoverContentForResource):
(WI.NetworkTableContentView.prototype._handleMousedownWaterfall):
(WI.NetworkTableContentView.prototype._populateWaterfallGraph.appendBlock):
(WI.NetworkTableContentView.prototype._populateWaterfallGraph):
(WI.NetworkTableContentView.prototype._hidePopover):
Create and manage a popover for the waterfall column.

  • UserInterface/Views/Popover.js:

(WI.Popover):
(WI.Popover.prototype.get element):
(WI.Popover.prototype.get visible):
(WI.Popover.prototype.get backgroundStyle):
(WI.Popover.prototype.set backgroundStyle):
(WI.Popover.prototype._drawBackground):
Provide an option to have a white background popover.

  • UserInterface/Views/ResourceTimingBreakdownView.css: Added.

(.resource-timing-breakdown):
(.resource-timing-breakdown .waterfall):
(.resource-timing-breakdown .waterfall .block):
(.resource-timing-breakdown .waterfall .block.request):
(body[dir=ltr] .resource-timing-breakdown .waterfall .block.queue,):
(body[dir=ltr] .resource-timing-breakdown .waterfall .block.response):
(body[dir=rtl] .resource-timing-breakdown .waterfall .block.queue,):
(body[dir=rtl] .resource-timing-breakdown .waterfall .block.response):
(.resource-timing-breakdown .numbers):
(body[dir=ltr] .resource-timing-breakdown .numbers):
(body[dir=rtl] .resource-timing-breakdown .numbers):
Waterfall styles and sizes in the popover's breakdown view.

(.resource-timing-breakdown .numbers > p):
(.resource-timing-breakdown .numbers > p > .swatch):
(.resource-timing-breakdown .numbers .swatch.queue):
(.resource-timing-breakdown .numbers .swatch.dns):
(.resource-timing-breakdown .numbers .swatch.connect):
(.resource-timing-breakdown .numbers .swatch.secure):
(.resource-timing-breakdown .numbers .swatch.request):
(.resource-timing-breakdown .numbers .swatch.response):
(.resource-timing-breakdown .numbers > p > .label):
(.resource-timing-breakdown .numbers > p.total):
Number and label styles in the popover's breakdown view.

  • UserInterface/Views/ResourceTimingBreakdownView.js: Added.

(WI.ResourceTimingBreakdownView):
(WI.ResourceTimingBreakdownView.prototype.initialLayout):
(WI.ResourceTimingBreakdownView.prototype.initialLayout.appendBlock):
(WI.ResourceTimingBreakdownView.prototype.initialLayout.appendRow):
Show a section for a waterfall visualization and a section for the numbers.

  • UserInterface/Views/Table.js:

(WI.Table.prototype.reloadVisibleColumnCells):
(WI.Table.prototype.cellForRowAndColumn):
(WI.Table.prototype.addColumn):
(WI.Table.prototype.showColumn):
(WI.Table.prototype.hideColumn):
(WI.Table.prototype.resizerDragging):
(WI.Table.prototype.resizerDragEnded):
(WI.Table.prototype._resizeColumnsAndFiller):
(WI.Table.prototype._applyColumnWidths):
(WI.Table.prototype._positionHeaderViews):

  • UserInterface/Views/TableColumn.js:

(WI.TableColumn.prototype.get headerView):
Provide a way to include a WI.View with a TableColumn Header. This
matches what we do with DataGrid, and ends up being pretty concise.

  • UserInterface/Views/TimelineRuler.css:

(.timeline-ruler > .header):
Make the height a variable so that other code can work off of it.

6:47 PM Changeset in webkit [223733] by Michael Catanzaro
  • 2 edits in trunk/PerformanceTests

-Wsign-compare triggered by MallocBench
https://bugs.webkit.org/show_bug.cgi?id=178544

Reviewed by Ryosuke Niwa.

  • MallocBench/MallocBench/Interpreter.cpp:

(Interpreter::Interpreter):

6:34 PM Changeset in webkit [223732] by Chris Dumez
  • 8 edits in trunk/Source/WebCore

SerializedScriptValue passed to postMessage() cannot be null
https://bugs.webkit.org/show_bug.cgi?id=178550

Reviewed by Youenn Fablet.

SerializedScriptValue passed to postMessage() cannot be null. Therefore, we
should use Ref<> type, not RefPtr<>.

  • dom/MessagePortChannel.h:
  • dom/default/PlatformMessagePortChannel.cpp:

(WebCore::MessagePortChannel::postMessageToRemote):

  • workers/WorkerGlobalScopeProxy.h:
  • workers/WorkerMessagingProxy.cpp:

(WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
(WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):

  • workers/WorkerMessagingProxy.h:
  • workers/WorkerObjectProxy.h:
  • workers/service/context/ServiceWorkerThread.cpp:
5:47 PM Changeset in webkit [223731] by mark.lam@apple.com
  • 3 edits
    1 add in trunk

Stringifier::appendStringifiedValue() is missing an exception check.
https://bugs.webkit.org/show_bug.cgi?id=178386
<rdar://problem/35027610>

Reviewed by Saam Barati.

JSTests:

  • stress/regress-178386.js: Added.

Source/JavaScriptCore:

  • runtime/JSONObject.cpp:

(JSC::Stringifier::appendStringifiedValue):

5:09 PM Changeset in webkit [223730] by achristensen@apple.com
  • 18 edits in trunk/Source/WebKit

Modernize API::DownloadClient
https://bugs.webkit.org/show_bug.cgi?id=178547

Reviewed by Andy Estes.

Use more C++ references instead of pointers because they're never null.

Remove canAuthenticateAgainstProtectionSpace because there are no implementations
except the default implementation which always returns true and we don't intend to
add this to the SPI because that's just a legacy call anyways from when NSURLConnection
hadn't fully evolved, and we're moving away from NSURLConnection, especially in our API design.

Separate the NetworkSession-only and pre-NetworkSession-only callbacks. All the synchronous
IPC messages are only used in the pre-NetworkSession code, so once we remove it we can remove them!

Make API::DownloadClient calls that NetworkSession uses use a completion handler so we will be able to
design an asynchronous API.

  • NetworkProcess/Downloads/DownloadManager.cpp:

(WebKit::DownloadManager::continueCanAuthenticateAgainstProtectionSpace): Deleted.

  • NetworkProcess/Downloads/DownloadManager.h:
  • NetworkProcess/Downloads/PendingDownload.cpp:

(WebKit::PendingDownload::canAuthenticateAgainstProtectionSpaceAsync):
(WebKit::PendingDownload::continueCanAuthenticateAgainstProtectionSpace): Deleted.

  • NetworkProcess/Downloads/PendingDownload.h:
  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::continueCanAuthenticateAgainstProtectionSpaceDownload): Deleted.

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • UIProcess/API/APIDownloadClient.h:

(API::DownloadClient::didStart):
(API::DownloadClient::didReceiveAuthenticationChallenge):
(API::DownloadClient::didReceiveResponse):
(API::DownloadClient::didReceiveData):
(API::DownloadClient::shouldDecodeSourceDataOfMIMEType):
(API::DownloadClient::decideDestinationWithSuggestedFilename):
(API::DownloadClient::didCreateDestination):
(API::DownloadClient::didFinish):
(API::DownloadClient::didFail):
(API::DownloadClient::didCancel):
(API::DownloadClient::processDidCrash):
(API::DownloadClient::willSendRequest):
(API::DownloadClient::canAuthenticateAgainstProtectionSpace): Deleted.

  • UIProcess/API/C/WKContext.cpp:

(WKContextSetDownloadClient):

  • UIProcess/API/glib/WebKitDownloadClient.cpp:
  • UIProcess/Cocoa/DownloadClient.h:
  • UIProcess/Cocoa/DownloadClient.mm:

(WebKit::DownloadClient::didStart):
(WebKit::DownloadClient::didReceiveResponse):
(WebKit::DownloadClient::didReceiveData):
(WebKit::DownloadClient::decideDestinationWithSuggestedFilename):
(WebKit::DownloadClient::didFinish):
(WebKit::DownloadClient::didFail):
(WebKit::DownloadClient::didCancel):
(WebKit::DownloadClient::willSendRequest):

  • UIProcess/Downloads/DownloadProxy.cpp:

(WebKit::DownloadProxy::processDidClose):
(WebKit::DownloadProxy::didStart):
(WebKit::DownloadProxy::didReceiveAuthenticationChallenge):
(WebKit::DownloadProxy::willSendRequest):
(WebKit::DownloadProxy::didReceiveResponse):
(WebKit::DownloadProxy::didReceiveData):
(WebKit::DownloadProxy::shouldDecodeSourceDataOfMIMEType):
(WebKit::DownloadProxy::decideDestinationWithSuggestedFilenameAsync):
(WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
(WebKit::DownloadProxy::didCreateDestination):
(WebKit::DownloadProxy::didFinish):
(WebKit::DownloadProxy::didFail):
(WebKit::DownloadProxy::didCancel):
(WebKit::DownloadProxy::canAuthenticateAgainstProtectionSpace): Deleted.

  • UIProcess/Downloads/DownloadProxy.h:
  • UIProcess/Downloads/DownloadProxy.messages.in:
4:49 PM Changeset in webkit [223729] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

REGRESSION(r223691): DFGByteCodeParser.cpp:1483:83: warning: comparison is always false due to limited range of data type [-Wtype-limits]
https://bugs.webkit.org/show_bug.cgi?id=178543

Reviewed by Filip Pizlo.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleRecursiveTailCall):

4:48 PM Changeset in webkit [223728] by dbates@webkit.org
  • 865 edits in trunk/Source/WebCore

Use "= default" to denote default constructor or destructor
https://bugs.webkit.org/show_bug.cgi?id=178528

Rubber-stamped by Andy Estes.

Source/WebCore:

  • Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h:
  • Modules/applepay/ApplePayError.cpp:
  • Modules/applepay/ApplePayPaymentAuthorizedEvent.cpp:
  • Modules/applepay/ApplePayPaymentMethodSelectedEvent.cpp:
  • Modules/applepay/ApplePaySession.cpp:
  • Modules/applepay/ApplePaySessionPaymentRequest.cpp:
  • Modules/applepay/ApplePayShippingContactSelectedEvent.cpp:
  • Modules/applepay/ApplePayShippingMethodSelectedEvent.cpp:
  • Modules/applepay/ApplePayValidateMerchantEvent.cpp:
  • Modules/applepay/Payment.h:
  • Modules/applepay/PaymentCoordinatorClient.h:
  • Modules/credentials/BasicCredential.cpp:
  • Modules/credentials/FederatedCredential.cpp:
  • Modules/credentials/NavigatorCredentials.cpp:
  • Modules/credentials/PasswordCredential.cpp:
  • Modules/encryptedmedia/CDMClient.h:
  • Modules/encryptedmedia/legacy/LegacyCDM.cpp:
  • Modules/encryptedmedia/legacy/LegacyCDM.h:
  • Modules/encryptedmedia/legacy/LegacyCDMPrivate.h:
  • Modules/encryptedmedia/legacy/LegacyCDMPrivateClearKey.h:
  • Modules/encryptedmedia/legacy/LegacyCDMPrivateMediaPlayer.h:
  • Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp:
  • Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.cpp:
  • Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.cpp:
  • Modules/entriesapi/DOMFileSystem.cpp:
  • Modules/entriesapi/FileSystemDirectoryReader.cpp:
  • Modules/entriesapi/FileSystemEntry.cpp:
  • Modules/fetch/FetchLoaderClient.h:
  • Modules/gamepad/Gamepad.cpp:
  • Modules/gamepad/GamepadEvent.h:
  • Modules/gamepad/deprecated/Gamepad.cpp:

[ truncated ]

Source/WebCore/PAL:

  • pal/Logger.h:

(PAL::Logger::Observer::~Observer): Deleted.

  • pal/crypto/gcrypt/CryptoDigestGCrypt.cpp:
  • pal/system/SleepDisabler.cpp:
  • pal/system/SystemSleepListener.h:
4:34 PM Changeset in webkit [223727] by sbarati@apple.com
  • 5 edits
    1 move in trunk/Source/JavaScriptCore

re-inline ObjectAllocationProfile::initializeProfile
https://bugs.webkit.org/show_bug.cgi?id=178532

Rubber stamped by Michael Saboff.

I un-inlined this function when implementing poly proto.
This patch re-inlines it. In my testing, it looks like it
might be a 0.5% speedometer progression to inline it.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • bytecode/CodeBlock.cpp:
  • bytecode/ObjectAllocationProfile.cpp: Removed.
  • bytecode/ObjectAllocationProfileInlines.h: Copied from Source/JavaScriptCore/bytecode/ObjectAllocationProfile.cpp.

(JSC::ObjectAllocationProfile::initializeProfile):
(JSC::ObjectAllocationProfile::possibleDefaultPropertyCount):

  • runtime/FunctionRareData.cpp:
4:34 PM Changeset in webkit [223726] by n_wang@apple.com
  • 12 edits in trunk

AX: Provide a way for Accessibility to cache the selection while retrieving rects for speak selection
https://bugs.webkit.org/show_bug.cgi?id=176247
<rdar://problem/34217143>

Reviewed by Ryosuke Niwa.

Source/WebKit:

When getting the rects for highlighting the spoken text within a selection range on iOS, we can get a
list of totally wrong rects if the user changed the selection to some other text. This is because the
calculation is based on the current selection range. Therefore, we need to provide a way for accessibility
codepath to store the selection during a speaking session.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _accessibilityStoreSelection]):
(-[WKWebView _accessibilityClearSelection]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _accessibilityStoreSelection]):
(-[WKContentView _accessibilityClearSelection]):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::storeSelectionForAccessibility):

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

(WebKit::WebPage::getRectsForGranularityWithSelectionOffset):
(WebKit::WebPage::storeSelectionForAccessibility):
(WebKit::WebPage::getRectsAtSelectionOffsetWithText):

Tools:

  • TestWebKitAPI/Tests/ios/AccessibilityTestsIOS.mm:

(TestWebKitAPI::TEST):

4:31 PM Changeset in webkit [223725] by weinig@apple.com
  • 17 edits in trunk/Source/WebCore

[Bindings] Standardize on DOMPromise as the way to store passed in promises
https://bugs.webkit.org/show_bug.cgi?id=178533

Reviewed by Youenn Fablet.

This standardizes on RefPtr<DOMPromise> as the canonical way to store a promise
that has been passed in from JS. This does not change promises that start off in
WebCore and are passed to JS; they remain using DOMPromiseDeferred and DOMPromiseProxy.

  • Modules/paymentrequest/PaymentRequestUpdateEvent.cpp:
  • Modules/paymentrequest/PaymentRequestUpdateEvent.h:
  • dom/PromiseRejectionEvent.cpp:
  • dom/PromiseRejectionEvent.h:
  • dom/RejectedPromiseTracker.cpp:

Use a RefPtr<DOMPromise> rather than a JSPromise* to hold onto the promise.

  • bindings/IDLTypes.h:

Use IDLWrapper to get better defaults, since DOMPromise is refcounted.

  • bindings/js/JSDOMConvertPromise.h:

(WebCore::Converter<IDLPromise<T>>::convert):

Switch default conversion to return a RefPtr<DOMPromise> rather than a JSPromise*

(WebCore::JSConverter<IDLPromise<T>>::convert):

Add support for converting from a DOMPromise to a JSValue.

  • bindings/js/JSDOMPromise.cpp:
  • bindings/js/JSDOMPromise.h:

(WebCore::DOMPromise::create): Deleted.

Remove now unused constructor.

  • workers/service/ExtendableEvent.cpp:

(WebCore::ExtendableEvent::waitUntil):

  • workers/service/ExtendableEvent.h:
  • workers/service/ExtendableEvent.idl:
  • workers/service/FetchEvent.cpp:

(WebCore::FetchEvent::respondWith):
(WebCore::FetchEvent::promiseIsSettled):

  • workers/service/FetchEvent.h:
  • workers/service/FetchEvent.idl:

Address FIXMEs and remove need for passing an ExecState to ExtendableEvent
and FetchEvent by using the new default conversion to DOMPromise.

4:26 PM Changeset in webkit [223724] by msaboff@apple.com
  • 4 edits in trunk

Test262: RegExp/property-escapes/generated/Emoji_Component.js fails with current RegExp Unicode Properties implementation
https://bugs.webkit.org/show_bug.cgi?id=178521

Reviewed by JF Bastien.

JSTests:

  • test262.yaml: Enabled test262/test/built-ins/RegExp/property-escapes/generated/Emoji_Component.js as it

now passes with the current version (5.0) of the Emoji spec.

Source/JavaScriptCore:

  • ucd/emoji-data.txt: Replaced with the Unicode Emoji 5.0 version of the file as that is the most recent

standard version. The prior version was the draft 6.0 version.

4:11 PM Changeset in webkit [223723] by jmarcell@apple.com
  • 7 edits in branches/safari-604-branch/Source

Versioning.

4:11 PM Changeset in webkit [223722] by jmarcell@apple.com
  • 29 edits
    6 adds in branches/safari-604-branch

Cherry-pick r223565. rdar://problem/35041490

4:11 PM Changeset in webkit [223721] by jmarcell@apple.com
  • 22 edits
    32 adds in branches/safari-604-branch

Cherry-pick r223253. rdar://problem/35077489

4:02 PM Changeset in webkit [223720] by commit-queue@webkit.org
  • 46 edits
    1 copy
    1 add in trunk

[Settings] Move global settings into their own file
https://bugs.webkit.org/show_bug.cgi?id=178512

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

Source/WebCore:

Moves all global settigns out of SettingsBase and into the new DeprecatedGlobalSettings.
It's called DeprecatedGlobalSettings to indicate that this is an anti-pattern we would
like to discourage, as WebCore can operate in a process with multiple clients, each of
which should be able to set their own preferences.

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

Add new files.

  • page/DeprecatedGlobalSettings.cpp: Copied from Source/WebCore/page/SettingsBase.cpp.
  • page/DeprecatedGlobalSettings.h: Copied from Source/WebCore/page/SettingsBase.h.
  • page/SettingsBase.cpp:
  • page/SettingsBase.h:

Move all global settings out of SettingsBase and into the new DeprecatedGlobalSettings.

  • Modules/mediastream/UserMediaRequest.cpp:
  • bindings/js/CommonVM.cpp:
  • css/CSSStyleDeclaration.cpp:
  • dom/DataTransfer.cpp:
  • dom/DataTransferItemList.cpp:
  • editing/Editor.cpp:
  • loader/ResourceLoadObserver.cpp:
  • page/FrameView.cpp:
  • page/PerformanceMonitor.cpp:
  • platform/ScrollbarTheme.cpp:

(WebCore::ScrollbarTheme::theme):

  • platform/audio/cocoa/MediaSessionManagerCocoa.cpp:
  • platform/graphics/MediaPlayer.cpp:
  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
  • platform/mac/NSScrollerImpDetails.mm:
  • platform/mock/ScrollbarThemeMock.cpp:
  • platform/network/cf/SocketStreamHandleImplCFNet.cpp:
  • platform/network/ios/NetworkStateNotifierIOS.mm:
  • platform/network/soup/SocketStreamHandleImplSoup.cpp:
  • platform/win/MainThreadSharedTimerWin.cpp:
  • rendering/RenderLayer.cpp:
  • rendering/RenderListBox.cpp:
  • testing/InternalSettings.cpp:
  • testing/Internals.cpp:

Update users of global settings to reference the new class name.

Source/WebKit:

Moves all global settigns out of SettingsBase and into the new DeprecatedGlobalSettings.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::setAllowsAnySSLCertificateForWebSocket):

  • Shared/WebPreferencesDefinitions.h:
  • Shared/WebPreferencesStore.cpp:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_cpuLimit):
(WebKit::WebPage::updatePreferences):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::setResourceLoadStatisticsEnabled):

  • WebProcess/cocoa/VideoFullscreenManager.mm:

(WebKit::VideoFullscreenManager::supportsVideoFullscreen const):

Source/WebKitLegacy/mac:

Moves all global settigns out of SettingsBase and into the new DeprecatedGlobalSettings.

  • WebCoreSupport/WebChromeClient.mm:

(WebChromeClient::supportsVideoFullscreen):

  • WebView/WebDynamicScrollBarsView.mm:

(+[WebDynamicScrollBarsView _horizontalScrollerClass]):
(+[WebDynamicScrollBarsView _verticalScrollerClass]):

  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):

  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView _preferencesChanged:]):
(+[WebView _doNotStartObservingNetworkReachability]):

Source/WebKitLegacy/win:

Moves all global settigns out of SettingsBase and into the new DeprecatedGlobalSettings.

  • WebView.cpp:

(WebView::initWithFrame):

Tools:

  • TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm:

(TestWebKitAPI::TEST):

3:47 PM Changeset in webkit [223719] by aestes@apple.com
  • 5 edits in trunk

[iOS] Conditionally rename DatabaseProcess to StorageProcess when building for iOS devices
https://bugs.webkit.org/show_bug.cgi?id=178181
<rdar://problem/33660282>

Reviewed by Dan Bernstein.

Source/WebKit:

  • Configurations/BaseTarget.xcconfig:
  • UIProcess/Launcher/mac/ProcessLauncherMac.mm:

(WebKit::serviceName):

  • WebKit.xcodeproj/project.pbxproj:

Tools:

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::databaseProcessName):

3:44 PM Changeset in webkit [223718] by Chris Dumez
  • 34 edits
    2 copies
    1 move
    6 adds
    1 delete in trunk

Add preliminary support for ServiceWorker Handle Fetch
https://bugs.webkit.org/show_bug.cgi?id=178475
<rdar://problem/35066424>

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

Source/WebCore:

Test: http/tests/workers/service/basic-fetch.https.html

Adding parameters to allow WebKit to do loading through Service Worker or through regular networking.
A script context is now storing its selected service worker identifier. This should be fully implemented later on.
This selected service worker identifier is passed to loading code as a ResourceLoaderOptions field.
Service workers mode is also added as a ResourceLoaderOptions field so that the service worker can be bypassed.

  • WebCore.xcodeproj/project.pbxproj:
  • dom/ScriptExecutionContext.h:

(WebCore::ScriptExecutionContext::selectedServiceWorkerIdentifier const):
(WebCore::ScriptExecutionContext::setSelectedServiceWorkerIdentifier):

  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::DocumentThreadableLoader):

  • loader/FetchOptions.h:

(WebCore::isPotentialNavigationOrSubresourceRequest):
(WebCore::isNonSubresourceRequest):

  • loader/ResourceLoaderOptions.h:
  • loader/WorkerThreadableLoader.cpp:

(WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
(WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):

  • loader/WorkerThreadableLoader.h:
  • platform/network/ResourceRequestBase.h:
  • platform/network/ResourceResponseBase.h:
  • workers/WorkerThread.h:
  • workers/service/ServiceWorkerContainer.cpp:

(WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):

  • workers/service/context/SWContextManager.cpp: Removed.
  • workers/service/context/ServiceWorkerThread.h:

Source/WebKit:

Relanding now that underlying issue is fixed in https://bugs.webkit.org/show_bug.cgi?id=178527.

Preliminary support of Handle Fetch algorithm and integration with fetch spec.
Adding ServiceWorkerClientFetch as the class responsible to do the load through ServiceWorker.
It is similar to WebResourceLoader that do the load through NetworkProcess.
In case ServiceWorkerClientFetch is not able to load through ServiceWorker,
it will fallback to WebResourceLoader through a fallback callback.

Loading through Service Worker is done currently if:

  • There is a service worker registered for that origin
  • Request is a subresource
  • service workers mode is all

There will be cases where the service worker will not do the loading, for instance when fetch event handler is not set.
Future work should try to reduce the cases where the IPC dance is done unnecessarily.

ServiceWorkerClientFetch is responsible to adapt the ServiceWorker response to ResourceLoader.
In particular, it is calling ResourceLoader error callback if response is of type error.
It should call ResourceLoader redirection callback if response is a redirection response.
This will be done as a follow-up.

Implementing the IPC communication dedicated to fetch between WebProcess and ServiceWorker through StorageProcess.
In the future, WebProcess should create a direct IPC communication to the ServiceWorker process.

Moved SWContextManager from WebCore to WebKit and renamed it to ServiceWorkerContextManager.
This class is moved to WebKit as it will have to handle IPC and having a separation will add some unnecessary boilerplate.

  • CMakeLists.txt:
  • DerivedSources.make:
  • StorageProcess/ServiceWorker/WebSWServerConnection.cpp:

(WebKit::WebSWServerConnection::startFetch):
(WebKit::WebSWServerConnection::didReceiveFetchResponse):
(WebKit::WebSWServerConnection::didReceiveFetchData):
(WebKit::WebSWServerConnection::didFinishFetch):
(WebKit::WebSWServerConnection::didFailFetch):

  • StorageProcess/ServiceWorker/WebSWServerConnection.h:
  • StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
  • StorageProcess/StorageProcess.cpp:

(WebKit::StorageProcess::didFailFetch):
(WebKit::StorageProcess::didReceiveFetchResponse):
(WebKit::StorageProcess::didReceiveFetchData):
(WebKit::StorageProcess::didFinishFetch):

  • StorageProcess/StorageProcess.h:
  • StorageProcess/StorageProcess.messages.in:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::scheduleLoad):
(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
(WebKit::WebLoaderStrategy::remove):

  • WebProcess/Network/WebLoaderStrategy.h:
  • WebProcess/Storage/ServiceWorkerClientFetch.cpp: Added.

(WebKit::ServiceWorkerClientFetch::ServiceWorkerClientFetch):
(WebKit::ServiceWorkerClientFetch::didReceiveResponse):
(WebKit::ServiceWorkerClientFetch::didReceiveData):
(WebKit::ServiceWorkerClientFetch::didFinish):
(WebKit::ServiceWorkerClientFetch::didFail):
(WebKit::ServiceWorkerClientFetch::cancel):

  • WebProcess/Storage/ServiceWorkerClientFetch.h: Copied from Source/WebKit/WebProcess/Storage/WebSWClientConnection.h.
  • WebProcess/Storage/ServiceWorkerClientFetch.messages.in: Copied from Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.messages.in.
  • WebProcess/Storage/ServiceWorkerContextManager.cpp: Added.

(WebKit::ServiceWorkerContextManager::startServiceWorkerContext):
(WebKit::ServiceWorkerContextManager::startFetch):

  • WebProcess/Storage/ServiceWorkerContextManager.h: Renamed from Source/WebCore/workers/service/context/SWContextManager.h.

(WebKit::ServiceWorkerContextManager::ServiceWorkerContextManager):

  • WebProcess/Storage/WebSWClientConnection.cpp:

(WebKit::WebSWClientConnection::startFetch):

  • WebProcess/Storage/WebSWClientConnection.h:
  • WebProcess/Storage/WebServiceWorkerProvider.cpp:

(WebKit::shouldHandleFetch):
(WebKit::WebServiceWorkerProvider::handleFetch):
(WebKit::WebServiceWorkerProvider::cancelFetch):
(WebKit::WebServiceWorkerProvider::fetchFinished):
(WebKit::WebServiceWorkerProvider::didReceiveServiceWorkerClientFetchMessage):

  • WebProcess/Storage/WebServiceWorkerProvider.h:
  • WebProcess/Storage/WebToStorageProcessConnection.cpp:

(WebKit::WebToStorageProcessConnection::didReceiveMessage):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::getWorkerContextConnection):
(WebKit::WebProcess::startServiceWorkerContext):
(WebKit::WebProcess::startFetchInServiceWorker):

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

LayoutTests:

  • http/tests/workers/service/basic-fetch.https-expected.txt: Added.
  • http/tests/workers/service/basic-fetch.https.html: Added.
  • http/tests/workers/service/resources/basic-fetch-worker.js: Added.
  • http/tests/workers/service/resources/basic-fetch.js: Added.
3:31 PM Changeset in webkit [223717] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[FrameView::layout cleanup] Move post layout task scheduling logic to a separate function
https://bugs.webkit.org/show_bug.cgi?id=178538
<rdar://problem/35080743>

Reviewed by Simon Fraser.

Move and reorganize post layout task scheduling code.

Covered by existing tests.

  • page/FrameView.cpp:

(WebCore::FrameView::layout):
(WebCore::FrameView::runOrSchedulePostLayoutTasks):

  • page/FrameView.h:
3:29 PM Changeset in webkit [223716] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.4.4

Tag Safari-604.4.4.

3:23 PM Changeset in webkit [223715] by sbarati@apple.com
  • 14 edits in trunk/Source/JavaScriptCore

We should hard code the poly proto offset
https://bugs.webkit.org/show_bug.cgi?id=178531

Reviewed by Filip Pizlo.

This patch embraces that the poly proto offset is always zero. It's already
the case that we would always get the inline offset zero for poly proto just
by construction. This just hardcodes this assumption throughout the codebase.
This appears to be a 1% speedometer progression in my testing.

The downside of this patch is that it may require changing how we do
things when we implement poly proto when inheriting from builtin
types. I think we can face this problem when we decide to implement
that.

  • bytecode/AccessCase.cpp:

(JSC::AccessCase::generateWithGuard):

  • dfg/DFGOperations.cpp:
  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileInstanceOfForObject):
(JSC::DFG::SpeculativeJIT::compileGetPrototypeOf):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileGetPrototypeOf):
(JSC::FTL::DFG::LowerDFGToB3::compileInstanceOf):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_instanceof):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_instanceof):

  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/JSObject.cpp:

(JSC::JSObject::setPrototypeDirect):

  • runtime/JSObject.h:

(JSC::JSObject::locationForOffset const):
(JSC::JSObject::locationForOffset):
(JSC::JSObject::getDirect const):

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

(JSC::Structure::create):
(JSC::Structure::dump const):

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

(JSC::Structure::storedPrototype const):
(JSC::Structure::storedPrototypeObject const):

2:58 PM Changeset in webkit [223714] by dbates@webkit.org
  • 2 edits in trunk/LayoutTests

Attempt to fix Legacy WebKit test failure following r223704
(https://bugs.webkit.org/show_bug.cgi?id=178403)

Call testRunner.setCanOpenWindows() to tell DumpRenderTree to allow the test to open a new window.

  • http/tests/security/referrer-policy-subframe-window-open.html:
2:31 PM Changeset in webkit [223713] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Service Worker process should not be selected to open WebView on it
https://bugs.webkit.org/show_bug.cgi?id=178527

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

Selection of process to open a page will no longer use an existing web process if it is the service worker process.

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::createNewWebProcessRespectingProcessCountLimit):

2:23 PM Changeset in webkit [223712] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[FrameView::layout cleanup] Move scrollbars setup logic to a separate function
https://bugs.webkit.org/show_bug.cgi?id=178394
<rdar://problem/35031066>

Reviewed by Antti Koivisto.

Decouple scrollbars setup and the unrelated first-layout logic.
FIXME: find out why m_firstLayout depends on the subtree flag (I'd assume we issue full layout the very first time).

Covered by existing test cases.

  • page/FrameView.cpp:

(WebCore::FrameView::adjustScrollbarsForLayout):
(WebCore::FrameView::layout):

  • page/FrameView.h:
2:15 PM Changeset in webkit [223711] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

Avoid duplicate multisample resolve before WebGL compositing
https://bugs.webkit.org/show_bug.cgi?id=178537
<rdar://problem/35080724>

Fix iOS build.

  • platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:

(WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):

1:51 PM Changeset in webkit [223710] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebKit

Display link bringup can block the main thread for ~150ms during WKWebView init
https://bugs.webkit.org/show_bug.cgi?id=178524

Reviewed by Dean Jackson.

  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h:
  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:

(WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
(WebKit::RemoteLayerTreeDrawingAreaProxy::displayLinkHandler):
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
(WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
Lazily initialize the display link at first use.

1:45 PM Changeset in webkit [223709] by sbarati@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Turn various poly proto RELEASE_ASSERTs into ASSERTs because they're on the hot path in speedometer
https://bugs.webkit.org/show_bug.cgi?id=178529

Reviewed by Mark Lam.

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

(JSC::Structure::storedPrototypeObject const):
(JSC::Structure::storedPrototypeStructure const):
(JSC::Structure::storedPrototype const):
(JSC::Structure::prototypeForLookup const):
(JSC::Structure::prototypeChain const):

1:43 PM Changeset in webkit [223708] by timothy_horton@apple.com
  • 19 edits in trunk

Expand r209943 to suppress paste during provisional navigation as well
https://bugs.webkit.org/show_bug.cgi?id=178429
<rdar://problem/33952830>

Reviewed by Dean Jackson.

Source/WebCore:

No new tests; adjusted an existing test to cover this case.

  • editing/Editor.cpp:

(WebCore::Editor::canPaste const):
Disable pasting during provisional navigation, like r209943 did for
various other forms of text input.

(WebCore::Editor::shouldInsertText const):

  • dom/EventDispatcher.cpp:

(WebCore::shouldSuppressEventDispatchInDOM):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::shouldSuppressTextInputFromEditing const):
(WebCore::FrameLoader::shouldSuppressKeyboardInput const): Deleted.

  • loader/FrameLoader.h:
  • page/Settings.in:

Rename the setting to be about editing-related text input, not "keyboard" input.

  • editing/EditorCommand.cpp:

(WebCore::allowExecutionWhenDisabled):
(WebCore::doNotAllowExecutionWhenDisabled):
(WebCore::allowExecutionWhenDisabledCopyCut):
(WebCore::allowExecutionWhenDisabledPaste):
(WebCore::createCommandMap):
(WebCore::Editor::Command::allowExecutionWhenDisabled const):
Completely disable execution of paste events when in no-text-input-from-editing mode.
Otherwise, even though canPaste was false and we wouldn't do a default paste action,
we would still dispatch the paste event to the DOM.

Source/WebKit:

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

(WKPreferencesSetShouldSuppressKeyboardInputDuringProvisionalNavigation):
(WKPreferencesGetShouldSuppressKeyboardInputDuringProvisionalNavigation):

  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences _shouldSuppressKeyboardInputDuringProvisionalNavigation]):
(-[WKPreferences _setShouldSuppressKeyboardInputDuringProvisionalNavigation:]):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):
Adjust to the changed preference name, except at the SPI level.

LayoutTests:

  • http/tests/navigation/keyboard-events-during-provisional-navigation-expected.txt:
  • http/tests/navigation/keyboard-events-during-provisional-navigation.html:
  • http/tests/navigation/keyboard-events-during-provisional-subframe-navigation-expected.txt:
  • http/tests/navigation/keyboard-events-during-provisional-subframe-navigation.html:
  • http/tests/navigation/resources/keyboard-events-after-navigation.html:
  • http/tests/navigation/resources/keyboard-events-test.js:

(runBeforeTest):
(runTest):
Copy a "d" to the clipboard before running the test, and paste it while running.
I put the copy before running the test so that if someone comes along and
blacklists copy during provisional load as well, the test for this behavior
still actually tests the paste portion.
Also ensure that paste events are not triggered during provisional navigation.

1:32 PM Changeset in webkit [223707] by dino@apple.com
  • 4 edits in trunk/Source/WebCore

Avoid duplicate multisample resolve before WebGL compositing
https://bugs.webkit.org/show_bug.cgi?id=178537
<rdar://problem/35080724>

Reviewed by Jer Noble.

Both endPaint and prepareTexture were doing the MSAA resolve
into the renderbuffer, and being called on macOS before compositing.
Without that step, endPaint became unnecessary on iOS so I renamed
it presentRenderbuffer.

Covered by existing tests.

  • platform/graphics/GraphicsContext3D.h:
  • platform/graphics/cocoa/GraphicsContext3DCocoa.mm:

(WebCore::GraphicsContext3D::presentRenderbuffer):
(WebCore::GraphicsContext3D::endPaint): Deleted.

  • platform/graphics/cocoa/WebGLLayer.mm:

(-[WebGLLayer display]):

1:30 PM Changeset in webkit [223706] by jmarcell@apple.com
  • 7 edits in tags/Safari-604.4.3.1/Source

Versioning.

1:19 PM Changeset in webkit [223705] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.4.3.1

New tag.

1:17 PM Changeset in webkit [223704] by dbates@webkit.org
  • 1 edit
    1 add in trunk/LayoutTests

Referrer policy should be inherited from creator
https://bugs.webkit.org/show_bug.cgi?id=178403
<rdar://problem/31546136>

Add missing file that I inadvertently forgot to commit in r223697. The tests depend on this file.

  • http/tests/security/resources/nested-referrer-policy-postmessage.html: Added.
1:16 PM Changeset in webkit [223703] by sbarati@apple.com
  • 5 edits in trunk

Turn poly proto back on by default and remove the option
https://bugs.webkit.org/show_bug.cgi?id=178525

Reviewed by Mark Lam.

Source/JavaScriptCore:

I added this option because I thought it'd speed speedometer up because the
original poly proto patch slowed speedometer down. It turns out that
allocating poly proto objects is not what slows speedometer down. It's
other code I added in the runtime that needs to be poly proto aware. I'll
be addressing these in follow up patches.

  • runtime/Options.h:
  • runtime/StructureInlines.h:

(JSC::Structure::shouldConvertToPolyProto):

Tools:

  • Scripts/run-jsc-stress-tests:
1:15 PM Changeset in webkit [223702] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Add API to clean CacheStorage data
https://bugs.webkit.org/show_bug.cgi?id=178034

Unreviewed.

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

  • UIProcess/API/Cocoa/WKWebsiteDataRecord.h: Using WK_IOS_TBA instead of WK_MAC_TBA for iOS.
1:02 PM Changeset in webkit [223701] by aestes@apple.com
  • 4 edits in trunk

[Payment Request] Only process shipping options if shipping is requested, and throw an exception on duplicate shipping option IDs
https://bugs.webkit.org/show_bug.cgi?id=178535

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

  • web-platform-tests/payment-request/payment-request-constructor.https-expected.txt:

Source/WebCore:

Progresses four tests in web-platform-tests/payment-request/payment-request-constructor.https.html.

  • Modules/paymentrequest/PaymentRequest.cpp:

(WebCore::PaymentRequest::create):

12:57 PM Changeset in webkit [223700] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Marked http/tests/resourceLoadStatistics/prevalent-resource-handled-keydown.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=178472

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
11:55 AM Changeset in webkit [223699] by dbates@webkit.org
  • 3 edits in trunk/Source/WebCore

Share logic in InlineTextBox to compute selection rect
https://bugs.webkit.org/show_bug.cgi?id=178232
<rdar://problem/34963452>

Reviewed by Zalan Bujtas.

Currently each paint routine in InlineTextBox duplicates similar code to compute the selection
rect it will paint. This change consolidates all the duplication into localSelectionRectWithClampedPositions()
and writes all of the paint operations, except for paintCompositionUnderline(), in terms of it.
We will write paintCompositionUnderline() in terms of localSelectionRectWithClampedPositions()
in a subsequent patch.

We also write localSelectionRect() in terms of localSelectionRectWithClampedPositions(). Ideally
we would have one way to compute the selection rect. However, localSelectionRect() and paintDocumentMarker()
currently expect the enclosing integral rectangle of the selection rectangle. The function
paintDocumentMarker() needs the enclosing integral rectangle to avoid truncating the dot pattern
drawn under marked words (e.g. a spelling error) on Cocoa platforms. With regards to localSelectionRect()
we should look to have it return the actual selection rectangle. See <https://bugs.webkit.org/show_bug.cgi?id=138913>
for more details.

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::localSelectionRect const): Move logic in common with paintSelection() into
localSelectionRectWithClampedPositions() and modified code to use it.
(WebCore::InlineTextBox::localSelectionRectWithClampedPositions const): Added.
(WebCore::InlineTextBox::paint): Store the local paint offset as a LayoutPoint as it is the canonical
data type for representing an offset when painting. Pass the local paint offset instead of the analagous boxOrigin value.
(WebCore::InlineTextBox::paintSelection): Write in terms of localSelectionRectWithClampedPositions().
(WebCore::InlineTextBox::paintTextSubrangeBackground): Ditto.
(WebCore::InlineTextBox::paintCompositionBackground): Ditto.
(WebCore::InlineTextBox::paintTextMatchMarker): Ditto.
(WebCore::InlineTextBox::paintDocumentMarker): Ditto.
(WebCore::InlineTextBox::paintDocumentMarkers): Pass paint offset instead of the analogous boxOrigin value.

  • rendering/InlineTextBox.h:
11:54 AM Changeset in webkit [223698] by commit-queue@webkit.org
  • 1 edit
    1 delete in trunk/Source/WebInspectorUI

Web Inspector: Remove superfluous file External/.eslintrc
https://bugs.webkit.org/show_bug.cgi?id=178474

Patch by Ross Kirsling <Ross Kirsling> on 2017-10-19
Reviewed by Joseph Pecoraro.

  • UserInterface/External/.eslintrc: Removed.
11:46 AM Changeset in webkit [223697] by dbates@webkit.org
  • 6 edits
    8 adds in trunk

Referrer policy should be inherited from creator
https://bugs.webkit.org/show_bug.cgi?id=178403
<rdar://problem/31546136>

Reviewed by Andy Estes.

Source/WebCore:

As per section Browsing contexts of the the HTML standard, <https://html.spec.whatwg.org/multipage/browsers.html>
(17 October 2017), the referrer policy of a document should initially be inherited from its
creator.

Tests: http/tests/security/referrer-policy-nested-subframe.html

http/tests/security/referrer-policy-nested-window-open.html
http/tests/security/referrer-policy-subframe-window-open.html
http/tests/security/referrer-policy-window-open-subframe.html

  • dom/Document.cpp:

(WebCore::Document::initSecurityContext): Ask the loader for the effective referrer policy.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::effectiveReferrerPolicy const): Added. Returns the referrer policy
of the creator document. The creator document is document of the parent frame or the document
of the opener for a subframe or child window, respectively. If we do not have a creator frame
then we return the default referrer policy, non-referrer-when-downgrade, by <https://www.w3.org/TR/2017/CR-referrer-policy-20170126/#referrer-policy-empty-string>.

  • loader/FrameLoader.h:

LayoutTests:

Add tests to ensure that the referrer policy of a document is initially inherited from its creator.

  • http/tests/security/referrer-policy-nested-subframe-expected.txt: Added.
  • http/tests/security/referrer-policy-nested-subframe.html: Added.
  • http/tests/security/referrer-policy-nested-window-open-expected.txt: Added.
  • http/tests/security/referrer-policy-nested-window-open.html: Added.
  • http/tests/security/referrer-policy-subframe-window-open-expected.txt: Added.
  • http/tests/security/referrer-policy-subframe-window-open.html: Added.
  • http/tests/security/referrer-policy-window-open-subframe-expected.txt: Added.
  • http/tests/security/referrer-policy-window-open-subframe.html: Added.
  • http/tests/security/resources/referrer-policy-postmessage.php:
11:39 AM Changeset in webkit [223696] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[FrameView::layout cleanup] Do not reenter FrameView::performPostLayoutTasks
https://bugs.webkit.org/show_bug.cgi?id=178518
<rdar://problem/35075409>

Reviewed by Antti Koivisto.

This patch tightens existing reentrancy policy on performPostLayoutTasks.

Covered by existing test cases.

  • page/FrameView.cpp:

(WebCore::FrameView::FrameView):
(WebCore::FrameView::reset):
(WebCore::FrameView::layout):
(WebCore::FrameView::performPostLayoutTasks):

  • page/FrameView.h:
11:37 AM Changeset in webkit [223695] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Unreviewed build fix after r223692.

  • StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
11:33 AM Changeset in webkit [223694] by Adrian Perez de Castro
  • 16 edits in trunk/Source/WebInspectorUI

[GTK] Inspector UI does not use system font despite -webkit-system-font being supported
https://bugs.webkit.org/show_bug.cgi?id=178388

Reviewed by Joseph Pecoraro.

Change ocurrences of the "-apple-system" generic font name to
"-webkit-system-font", which is also implemented by the GTK+ port.

  • UserInterface/Views/CodeMirrorOverrides.css:

(.CodeMirror .CodeMirror-linenumber):
(.CodeMirror .CodeMirror-placeholder):

  • UserInterface/Views/ConsoleMessageView.css:

(.console-user-command.special-user-log > .console-message-text):
(.console-message .console-message-extra-parameters-container > li::before):
(.console-message .console-message-location):

  • UserInterface/Views/DataGrid.css:

(.data-grid td):

  • UserInterface/Views/DefaultDashboardView.css:

(.toolbar .dashboard.default > .item):

  • UserInterface/Views/HeapSnapshotInstancesContentView.css:

(.heap-snapshot-instance-popover-content > .title):

  • UserInterface/Views/HierarchicalPathComponent.css:

(.hierarchical-path-component):

  • UserInterface/Views/LogContentView.css:

(.console-messages):

  • UserInterface/Views/Main.css:

(body):

  • UserInterface/Views/ObjectTreeArrayIndexTreeElement.css:

(.object-tree-array-index .index-name):

  • UserInterface/Views/ObjectTreePropertyTreeElement.css:

(.object-tree-property .property-name,):

  • UserInterface/Views/ObjectTreeView.css:

(.tree-outline.object li .empty-message):

  • UserInterface/Views/RecordingActionTreeElement.css:

(.item.action:not(.initial-state)::before):

  • UserInterface/Views/SourceCodeTextEditor.css:

(.source-code.text-editor > .CodeMirror .line-indicator-widget > .text):
(.popover .debugger-popover-content > .title):

  • UserInterface/Views/TypeTreeView.css:

(.type-tree):

  • UserInterface/Views/VisualStyleFontFamilyTreeElement.js:
11:18 AM Changeset in webkit [223693] by keith_miller@apple.com
  • 2 edits in trunk/Source/WTF

REGRESSION (r223476): WebCore exports symbols with names belonging to other frameworks
https://bugs.webkit.org/show_bug.cgi?id=178424

Reviewed by David Kilzer.

This patch moves the wrapper function sharing the name of the externed function
to the source file and marks it as always inline. Marking it as inline prevents
the framework from exporting it.

  • wtf/cocoa/SoftLinking.h:
10:58 AM Changeset in webkit [223692] by Chris Dumez
  • 34 edits
    1 copy
    1 move
    8 deletes in trunk

Unreviewed, revert r223650 as it caused crashes on the bots.

Source/WebCore:

  • WebCore.xcodeproj/project.pbxproj:
  • dom/ScriptExecutionContext.h:
  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::DocumentThreadableLoader):

  • loader/FetchOptions.h:
  • loader/ResourceLoaderOptions.h:
  • loader/WorkerThreadableLoader.cpp:

(WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
(WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):

  • loader/WorkerThreadableLoader.h:
  • platform/network/ResourceRequestBase.h:
  • platform/network/ResourceResponseBase.h:
  • workers/WorkerThread.h:
  • workers/service/ServiceWorkerContainer.cpp:

(WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):

  • workers/service/context/SWContextManager.cpp: Copied from Source/WebKit/WebProcess/Storage/ServiceWorkerContextManager.h.

(WebCore::SWContextManager::singleton):
(WebCore::SWContextManager::SWContextManager):
(WebCore::SWContextManager::startServiceWorkerContext):

  • workers/service/context/SWContextManager.h: Renamed from Source/WebKit/WebProcess/Storage/ServiceWorkerContextManager.h.
  • workers/service/context/ServiceWorkerThread.h:

Source/WebKit:

  • CMakeLists.txt:
  • DerivedSources.make:
  • StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
  • StorageProcess/ServiceWorker/WebSWServerConnection.h:
  • StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
  • StorageProcess/StorageProcess.cpp:
  • StorageProcess/StorageProcess.h:
  • StorageProcess/StorageProcess.messages.in:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::scheduleLoad):
(WebKit::WebLoaderStrategy::remove):

  • WebProcess/Network/WebLoaderStrategy.h:
  • WebProcess/Storage/ServiceWorkerClientFetch.cpp: Removed.
  • WebProcess/Storage/ServiceWorkerClientFetch.h: Removed.
  • WebProcess/Storage/ServiceWorkerClientFetch.messages.in: Removed.
  • WebProcess/Storage/ServiceWorkerContextManager.cpp: Removed.
  • WebProcess/Storage/WebSWClientConnection.cpp:
  • WebProcess/Storage/WebSWClientConnection.h:
  • WebProcess/Storage/WebServiceWorkerProvider.cpp:
  • WebProcess/Storage/WebServiceWorkerProvider.h:
  • WebProcess/Storage/WebToStorageProcessConnection.cpp:

(WebKit::WebToStorageProcessConnection::didReceiveMessage):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::getWorkerContextConnection):
(WebKit::WebProcess::startServiceWorkerContext):

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

LayoutTests:

  • http/tests/workers/service/basic-fetch.https-expected.txt: Removed.
  • http/tests/workers/service/basic-fetch.https.html: Removed.
  • http/tests/workers/service/resources/basic-fetch-worker.js: Removed.
  • http/tests/workers/service/resources/basic-fetch.js: Removed.
9:27 AM Changeset in webkit [223691] by rmorisset@apple.com
  • 8 edits
    1 add in trunk

Turn recursive tail calls into loops
https://bugs.webkit.org/show_bug.cgi?id=176601

Reviewed by Saam Barati.

JSTests:

Add some simple test that computes factorial in several ways, and other trivial computations.
They all tests the case where foo calls bar (in an inlineable way) that then does a tail call.
Depending on the nature of both calls, it is possible or not to turn the tail call into a loop.
I have no clear way of checking that the call was indeed transformed, but I can check that the code computes the right result
(which it doesn't if that tail call is transformed into a loop in the unsound cases).

  • stress/inline-call-to-recursive-tail-call.js: Added.

(factorial.aux):
(factorial):
(factorial2.aux):
(factorial2.id):
(factorial2):
(factorial3.aux):
(factorial3):
(aux):
(factorial4):
(test):

Source/JavaScriptCore:

We want to turn recursive tail calls into loops early in the pipeline, so that the loops can then be optimized.
One difficulty is that we need to split the entry block of the function we are jumping to in order to have somewhere to jump to.
Worse: it is not necessarily the first block of the codeBlock, because of inlining! So we must do the splitting in the DFGByteCodeParser, at the same time as inlining.
We do this part through modifying the computation of the jump targets.
Importantly, we only do this splitting for functions that have tail calls.
It is the only case where the optimisation is sound, and doing the splitting unconditionnaly destroys performance on Octane/raytrace.

We must then do the actual transformation also in DFGByteCodeParser, to avoid code motion moving code out of the body of what will become a loop.
The transformation is entirely contained in handleRecursiveTailCall, which is hooked to the inlining machinery.

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::hasTailCalls const):

  • bytecode/PreciseJumpTargets.cpp:

(JSC::getJumpTargetsForBytecodeOffset):
(JSC::computePreciseJumpTargetsInternal):

  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):

  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedCodeBlock::hasTailCalls const):
(JSC::UnlinkedCodeBlock::setHasTailCalls):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitEnter):
(JSC::BytecodeGenerator::emitCallInTailPosition):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::allocateTargetableBlock):
(JSC::DFG::ByteCodeParser::makeBlockTargetable):
(JSC::DFG::ByteCodeParser::handleCall):
(JSC::DFG::ByteCodeParser::handleRecursiveTailCall):
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::parse):

9:10 AM Changeset in webkit [223690] by Chris Dumez
  • 6 edits in trunk/Source/WebKit

http/tests/workers/service/basic-register.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=178494
<rdar://problem/35065315>

Reviewed by Youenn Fablet.

In WebSWServerConnection::resolveJobInClient(), when a service worker is
registered, we:

  1. Add the origin to the WebSWOriginStore
  2. Send the IPC to the WebProcess to notify it that the registration succeeded.

The assumption was that step 1 would be synchronous and would therefore send
the shared memory handle to the WebProcess (if the SharedMemory was invalidated)
*before* step 2.

The issue is that step 1 was scheduling a zero-timer to schedule the addition.
As a result, there was a race and the WebContent process could check the
the WebSWOriginTable *after* being notified that a service worker was registered
but *before* it received the SharedMemory handle for the WebSWOriginTable. This
could lead to false negatives and was causing the layout test to be flaky.

To address the issue, step 1 is now synchronous.

  • Shared/SharedStringHashStore.cpp:

(WebKit::SharedStringHashStore::SharedStringHashStore):
(WebKit::SharedStringHashStore::scheduleAddition):
(WebKit::SharedStringHashStore::scheduleRemoval):
(WebKit::SharedStringHashStore::contains):
(WebKit::SharedStringHashStore::flushPendingChanges):
(WebKit::SharedStringHashStore::processPendingOperations):

  • Shared/SharedStringHashStore.h:
  • StorageProcess/ServiceWorker/WebSWOriginStore.cpp:

(WebKit::WebSWOriginStore::add):
(WebKit::WebSWOriginStore::addAll):
(WebKit::WebSWOriginStore::remove):

  • StorageProcess/ServiceWorker/WebSWOriginStore.h:
  • UIProcess/VisitedLinkStore.cpp:

(WebKit::VisitedLinkStore::addVisitedLinkHash):
(WebKit::VisitedLinkStore::removeVisitedLinkHash):

8:52 AM Changeset in webkit [223689] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[FrameView::layout cleanup] Replace m_nestedLayoutCount with isLayoutNested()
https://bugs.webkit.org/show_bug.cgi?id=178503
<rdar://problem/35066561>

Reviewed by Antti Koivisto.

Covered by existing tests.

  • page/FrameView.cpp:

(WebCore::FrameView::reset):
(WebCore::FrameView::layout):
(WebCore::FrameView::updateLayerPositionsAfterScrolling):
(WebCore::FrameView::updateCompositingLayersAfterScrolling):
(WebCore::FrameView::updateEmbeddedObjects):
(WebCore::FrameView::flushPostLayoutTasksQueue):
(WebCore::FrameView::performPostLayoutTasks):
(WebCore::FrameView::startLayoutAtMainFrameViewIfNeeded):

  • page/FrameView.h:
6:11 AM Changeset in webkit [223688] by Antti Koivisto
  • 6 edits
    2 adds in trunk

Overlapping text on all CSS fonts specs
https://bugs.webkit.org/show_bug.cgi?id=177585
<rdar://problem/34704078>

Reviewed by Daniel Bates.

Source/WebCore:

We were resetting StyleResolver::overrideDocumentElementStyle too early when resolving slot elements.
This resulted in 'rem' units being miscomputed.

Reduction by Zalan.

Test: fast/html/details-line-height-overlap.html

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::Scope::Scope):
(WebCore::Style::TreeResolver::Scope::~Scope):

Only reset overrideDocumentElementStyle when destroying the scope.

(WebCore::Style::TreeResolver::pushScope):
(WebCore::Style::TreeResolver::pushEnclosingScope):
(WebCore::Style::TreeResolver::popScope):

A scope can show up multiple times in scope stack.

  • style/StyleTreeResolver.h:

LayoutTests:

  • fast/html/details-line-height-overlap-expected.html: Added.
  • fast/html/details-line-height-overlap.html: Added.
  • platform/ios/fast/shadow-dom/copy-shadow-tree-expected.txt:
3:34 AM Changeset in webkit [223687] by rniwa@webkit.org
  • 16 edits in trunk/Source/WebCore

Consolidate calls to insertedInto and expand the coverage of NoEventDispatchAssertion
https://bugs.webkit.org/show_bug.cgi?id=178504

Reviewed by Antti Koivisto.

Consolidated calls to notifyChildNodeInserted, childrenChanged, didFinishInsertingNode, and
dispatchChildInsertionEvents for inserting a node by executeNodeInsertionWithScriptAssertion,
a new templatefunction which takes a closure to do the node insertion to make exactly when
the script becomes runnable clear.

Added an exception to SVGTRefElement::updateReferencedText since this code mutates user agent
shadow root during insertedInto, and turned ChildChangeSource into an enum class.

  • dom/CharacterData.cpp:

(WebCore::CharacterData::parserAppendData):
(WebCore::CharacterData::setDataAndUpdate):

  • dom/ContainerNode.cpp:

(WebCore::executeNodeInsertionWithScriptAssertion): Extracted.
(WebCore::ContainerNode::takeAllChildrenFrom): Deployed executeNodeInsertionWithScriptAssertion.
(WebCore::ContainerNode::insertBefore): Ditto.
(WebCore::ContainerNode::changeForChildInsertion): Deleted.
(WebCore::ContainerNode::notifyChildInserted): Deleted.
(WebCore::ContainerNode::parserInsertBefore): Deployed executeNodeInsertionWithScriptAssertion.
(WebCore::ContainerNode::replaceChild): Ditto.
(WebCore::ContainerNode::removeChild):
(WebCore::ContainerNode::parserRemoveChild):
(WebCore::ContainerNode::replaceAllChildren): Ditto.
(WebCore::ContainerNode::removeChildren):
(WebCore::ContainerNode::appendChildWithoutPreInsertionValidityCheck): Ditto.
(WebCore::ContainerNode::parserAppendChild): Ditto.
(WebCore::ContainerNode::childrenChanged):
(WebCore::ContainerNode::updateTreeAfterInsertion): Deleted.

  • dom/ContainerNode.h:
  • dom/Element.cpp:

(WebCore::Element::childrenChanged):

  • html/HTMLOutputElement.cpp:

(WebCore::HTMLOutputElement::childrenChanged):

  • svg/SVGClipPathElement.cpp:

(WebCore::SVGClipPathElement::childrenChanged):

  • svg/SVGElement.cpp:

(WebCore::SVGElement::childrenChanged):

  • svg/SVGFELightElement.cpp:

(WebCore::SVGFELightElement::childrenChanged):

  • svg/SVGFilterElement.cpp:

(WebCore::SVGFilterElement::childrenChanged):

  • svg/SVGFilterPrimitiveStandardAttributes.cpp:

(WebCore::SVGFilterPrimitiveStandardAttributes::childrenChanged):

  • svg/SVGGradientElement.cpp:

(WebCore::SVGGradientElement::childrenChanged):

  • svg/SVGMarkerElement.cpp:

(WebCore::SVGMarkerElement::childrenChanged):

  • svg/SVGMaskElement.cpp:

(WebCore::SVGMaskElement::childrenChanged):

  • svg/SVGPatternElement.cpp:

(WebCore::SVGPatternElement::childrenChanged):

  • svg/SVGTRefElement.cpp:

(WebCore::SVGTRefElement::updateReferencedText): Allow DOM mutations inside the user agent shadow tree here.

3:07 AM Changeset in webkit [223686] by dino@apple.com
  • 2 edits
    9 adds in trunk/LayoutTests/imported/w3c

Import W3C Web Platform Tests for createImageBitmap
https://bugs.webkit.org/show_bug.cgi?id=178509
<rdar://problem/35070583>

Reviewed by Antoine Quint.

  • resources/import-expectations.json:
  • web-platform-tests/2dcontext/imagebitmap/common.js: Added.

(testCanvasDisplayingPattern):
(testDrawImageBitmap):
(initializeImageData):

  • web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt: Added.
  • web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html: Added.
  • web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt: Added.
  • web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args.html: Added.
  • web-platform-tests/2dcontext/imagebitmap/createImageBitmap-sizeOverflow-expected.txt: Added.
  • web-platform-tests/2dcontext/imagebitmap/createImageBitmap-sizeOverflow.html: Added.
  • web-platform-tests/2dcontext/imagebitmap/w3c-import.log: Added.
3:05 AM Changeset in webkit [223685] by rniwa@webkit.org
  • 69 edits in trunk/Source/WebCore

Add an argument indicating the type of removal to Node::removedFrom
https://bugs.webkit.org/show_bug.cgi?id=178505

Reviewed by Antti Koivisto.

Like r223628, added RemovalType as the first argument to Node::removedFrom, which contains two booleans indicating
whether the node just become disconnected from a document, and whether node's tree scope had changed or not.

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

Also renamed the second argument of removedFrom to parentOfRemovedTree to make the semantics clear.

Note that in some implementations of removedFrom, we check whether isConnected() was true to decide whether
the node had already been disconnected from a document prior to calls to this particular call of removedFrom.
This extra check is no longer necessary since no node will be removed from a document without first being inserted
completely somewhere after r223458.

No new tests since there should be no behavioral changes.

  • dom/ContainerNodeAlgorithms.cpp:

(WebCore::notifyNodeInsertedIntoDocument): Replaced RELEASE_ASSERT with RELEASE_ASSERT_WITH_SECURITY_IMPLICATION.
(WebCore::notifyNodeRemovedFromDocument): Replaced the check that the node had not been re-connected by scripts
by a release assert now that we believe we've eliminated all causes of these unwanted DOM mutations in r223458.
Also moved the code to call setCSSTarget to Element::removedFrom. This random call to setCSSTarget predates r114351,
as well as r40475. It was originally introduced by r29311 into Node::removedFromDocument() ten years ago.
(WebCore::notifyNodeRemovedFromTree): Moved NoEventDispatchAssertion to notifyChildNodeRemoved.
(WebCore::notifyChildNodeRemoved): Added NoEventDispatchAssertion.

  • dom/ContainerNodeAlgorithms.h:
  • dom/Element.cpp:

(WebCore::Element::removedFrom): Replaced the complicated code to detect when this element is removed from a document
and its tree scope had changed by removalType.disconnectedFromDocument and removalType.treeScopeChanged.

  • dom/Element.h:
  • dom/Node.cpp:

(WebCore::Node::removedFrom):

  • dom/Node.h: Replaced a long block of comments above insertedInto by two lines of concise comments now that

the semantics of insertedInto and didFinishInsertingNode are more clear, and enforced by assertions.
(WebCore::Node::RemovalType::RemovalType): Addedl

  • dom/ProcessingInstruction.cpp:

(WebCore::ProcessingInstruction::removedFrom):

  • dom/ProcessingInstruction.h:
  • dom/ShadowRoot.cpp:

(WebCore::ShadowRoot::removedFrom): The extra !isConnected() check is no longer needed. See the description above.

  • dom/ShadowRoot.h:
  • html/FormAssociatedElement.cpp:

(WebCore::FormAssociatedElement::removedFrom):

  • html/FormAssociatedElement.h:
  • html/HTMLBaseElement.cpp:

(WebCore::HTMLBaseElement::removedFrom):

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

(WebCore::HTMLFormControlElement::removedFrom):

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

(WebCore::HTMLFormControlElementWithState::removedFrom):

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

(WebCore::HTMLFormElement::removedFrom):

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

(WebCore::HTMLFrameSetElement::removedFrom):

  • html/HTMLFrameSetElement.h:
  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::removedFrom):

  • html/HTMLImageElement.h:
  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::removedFrom):

  • html/HTMLInputElement.h:
  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::removedFrom): The extra !isConnected() check is no longer needed. See above.

  • html/HTMLLinkElement.h:
  • html/HTMLMapElement.cpp:

(WebCore::HTMLMapElement::removedFrom):

  • html/HTMLMapElement.h:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::removedFrom):

  • html/HTMLMediaElement.h:
  • html/HTMLObjectElement.cpp:

(WebCore::HTMLObjectElement::removedFrom):

  • html/HTMLObjectElement.h:
  • html/HTMLSlotElement.cpp:

(WebCore::HTMLSlotElement::removedFrom): Simplifies the logic to detect when this slot element is being
removed from a shadow tree using removalType.treeScopeChanged.

  • html/HTMLSlotElement.h:
  • html/HTMLSourceElement.cpp:

(WebCore::HTMLSourceElement::insertedInto): Added a FIXME for an obvious bug.
(WebCore::HTMLSourceElement::removedFrom): Ditto.

  • html/HTMLSourceElement.h:
  • html/HTMLStyleElement.cpp:

(WebCore::HTMLStyleElement::removedFrom):

  • html/HTMLStyleElement.h:
  • html/HTMLTitleElement.cpp:

(WebCore::HTMLTitleElement::removedFrom):

  • html/HTMLTitleElement.h:
  • html/HTMLTrackElement.cpp:

(WebCore::HTMLTrackElement::removedFrom): Ditto.

  • html/HTMLTrackElement.h:
  • svg/SVGElement.cpp:

(WebCore::SVGElement::removedFrom): Replaced isConnected() check before calling Node::removedFrom by the check of
removalType.disconnectedFromDocument.

  • svg/SVGElement.h:
  • svg/SVGFEImageElement.cpp:

(WebCore::SVGFEImageElement::removedFrom):

  • svg/SVGFEImageElement.h:
  • svg/SVGFontFaceElement.cpp:

(WebCore::SVGFontFaceElement::removedFrom):

  • svg/SVGFontFaceElement.h:
  • svg/SVGMPathElement.cpp:

(WebCore::SVGMPathElement::removedFrom):

  • svg/SVGMPathElement.h:
  • svg/SVGPathElement.cpp:

(WebCore::SVGPathElement::removedFrom):

  • svg/SVGPathElement.h:
  • svg/SVGSVGElement.cpp:

(WebCore::SVGSVGElement::removedFrom):

  • svg/SVGSVGElement.h:
  • svg/SVGStyleElement.cpp:

(WebCore::SVGStyleElement::removedFrom): The extra !isConnected() check is no longer needed. See above.

  • svg/SVGStyleElement.h:
  • svg/SVGTRefElement.cpp:

(WebCore::SVGTRefElement::removedFrom):

  • svg/SVGTRefElement.h:
  • svg/SVGTextPathElement.cpp:

(WebCore::SVGTextPathElement::removedFrom):

  • svg/SVGTextPathElement.h:
  • svg/SVGTitleElement.cpp:

(WebCore::SVGTitleElement::removedFrom):

  • svg/SVGTitleElement.h:
  • svg/SVGUseElement.cpp:

(WebCore::SVGUseElement::removedFrom):

  • svg/SVGUseElement.h:
  • svg/animation/SVGSMILElement.cpp:

(WebCore::SVGSMILElement::removedFrom):

  • svg/animation/SVGSMILElement.h:
2:11 AM WebKitGTK/Gardening/Calendar edited by Ms2ger@igalia.com
(diff)
2:09 AM WebKitGTK/Gardening/Calendar edited by Ms2ger@igalia.com
(diff)
1:37 AM Changeset in webkit [223684] by jmarcell@apple.com
  • 13 edits in branches/safari-604-branch

Cherry-pick r223451. rdar://problem/34985194

1:27 AM Changeset in webkit [223683] by Ms2ger@igalia.com
  • 4 edits in trunk/Source/WebCore

Update the signatures of compressedTexSubImage3D.
https://bugs.webkit.org/show_bug.cgi?id=178507

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::compressedTexSubImage3D):

  • html/canvas/WebGL2RenderingContext.h:
  • html/canvas/WebGL2RenderingContext.idl:
1:20 AM Changeset in webkit [223682] by jmarcell@apple.com
  • 7 edits in branches/safari-604-branch/Source

Cherry-pick r223436. rdar://problem/35061711

12:41 AM Changeset in webkit [223681] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[curl] Segfault in WebCore::CurlRequest::setupPOST
https://bugs.webkit.org/show_bug.cgi?id=178434

Patch by Basuke Suzuki <Basuke Suzuki> on 2017-10-19
Reviewed by Ryosuke Niwa.

  • platform/network/curl/CurlRequest.cpp:

(WebCore::CurlRequest::resolveBlobReferences):
(WebCore::CurlRequest::setupPOST):

Note: See TracTimeline for information about the timeline view.