Timeline



Apr 9, 2019:

6:28 PM Changeset in webkit [244103] by don.olmstead@sony.com
  • 3 edits in trunk

[CMake] WEBKIT_COMPUTE_SOURCES should use the target's derived sources directory
https://bugs.webkit.org/show_bug.cgi?id=196741

Reviewed by Michael Catanzaro.

WEBKIT_COMPUTE_SOURCES is using ${DERIVED_SOURCES_DIR} directly. Instead it should
rely on the directory specified by the target.

  • Source/cmake/WebKitFS.cmake:

Add variables that can be expanded within CMake to the derived sources directory for
a target.

  • Source/cmake/WebKitMacros.cmake:

Use variable expansion rather than ${DERIVED_SOURCES_DIR} to determine the target's
derived sources directory.

6:06 PM Changeset in webkit [244102] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-build] Add unit tests for PrintConfiguration
https://bugs.webkit.org/show_bug.cgi?id=196752

Reviewed by Dewei Zhu.

  • BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
6:03 PM Changeset in webkit [244101] by wilander@apple.com
  • 1 edit
    2 adds in trunk/LayoutTests

Add Resource Load Statistics test case for Ping
https://bugs.webkit.org/show_bug.cgi?id=196748

Reviewed by Alex Christensen.

  • http/tests/resourceLoadStatistics/ping-to-prevalent-resource-expected.txt: Added.
  • http/tests/resourceLoadStatistics/ping-to-prevalent-resource.html: Added.
5:35 PM Changeset in webkit [244100] by Keith Rollin
  • 11 edits in trunk

Unreviewed build maintenance -- update .xcfilelists.

Source/JavaScriptCore:

  • DerivedSources-input.xcfilelist:

Source/WebCore:

  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:

Source/WebKit:

  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:

Tools:

  • DumpRenderTree/DerivedSources-input.xcfilelist:
  • DumpRenderTree/DerivedSources-output.xcfilelist:
4:56 PM Changeset in webkit [244099] by Megan Gardner
  • 2 edits in trunk/LayoutTests

Turn on editing test that should pass now
https://bugs.webkit.org/show_bug.cgi?id=196747
<rdar://problem/38779179>

Reviewed by Tim Horton.

Just turning on a test that needed to be turns off for a while due to compatibility changes
with the system.

  • platform/ios-wk2/TestExpectations:
4:42 PM Changeset in webkit [244098] by Alan Bujtas
  • 16 edits in trunk

[AutoSizing] Avoid making text paragraphs scroll horizontally when there is a wide table
https://bugs.webkit.org/show_bug.cgi?id=196743
<rdar://problem/43897551>

Reviewed by Tim Horton.

Source/WebCore:

This patch changes the auto size behavior by using fixed constraint (instead of a min/max pair) to compute the content height.
Now with the initial containing block width is firmly set to auto-sizing width, the overflow content will not stretch the ICB. Instead it overflows the ICB
and triggers scrolling the same way the non-auto-sizing mode does.

  • page/FrameView.cpp:

(WebCore::FrameView::autoSizeIfEnabled):
(WebCore::FrameView::enableAutoSizeMode):

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

(WebCore::Internals::enableAutoSizeMode):

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

Source/WebKit:

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::setViewLayoutSize):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm: expected behavior change.

(TEST):

LayoutTests:

  • css3/viewport-percentage-lengths/vh-auto-size-expected.html:
  • css3/viewport-percentage-lengths/vh-auto-size.html:
  • fast/dynamic/crash-subtree-layout-when-auto-size-enabled.html:
  • fast/dynamic/mail-autosize-viewport-unit.html:
4:37 PM Changeset in webkit [244097] by youenn@apple.com
  • 17 edits in trunk

Close service worker database on network process suspension
https://bugs.webkit.org/show_bug.cgi?id=196623
<rdar://problem/48930869>

Reviewed by Alex Christensen.

Source/WebCore:

Add suspend/resume support to SWServer.
On suspend, close the service worker database and stop pushing for changes.
On resume, push changes if needed.

  • workers/service/server/RegistrationDatabase.cpp:

(WebCore::RegistrationDatabase::close):

  • workers/service/server/RegistrationDatabase.h:

(WebCore::RegistrationDatabase::isClosed const): Deleted.

  • workers/service/server/RegistrationStore.cpp:

(WebCore::RegistrationStore::closeDatabase):

  • workers/service/server/RegistrationStore.cpp:

(WebCore::RegistrationStore::pushChangesToDatabase):
(WebCore::RegistrationStore::clearAll):
(WebCore::RegistrationStore::startSuspension):
(WebCore::RegistrationStore::endSuspension):

  • workers/service/server/RegistrationStore.h:
  • workers/service/server/SWServer.cpp:

(WebCore::SWServer::startSuspension):
(WebCore::SWServer::endSuspension):

  • workers/service/server/SWServer.h:

Source/WebKit:

Close service worker database when preparing to suspend.
On resume, push changes if any is needed.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::actualPrepareToSuspend):
(WebKit::NetworkProcess::cancelPrepareToSuspend):
(WebKit::NetworkProcess::processDidResume):

  • UIProcess/API/Cocoa/WKProcessPool.mm:

(-[WKProcessPool _sendNetworkProcessWillSuspendImminently]):
(-[WKProcessPool _sendNetworkProcessDidResume]):

  • UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::sendNetworkProcessWillSuspendImminently):
(WebKit::WebProcessPool::sendNetworkProcessDidResume):

  • UIProcess/WebProcessPool.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
2:45 PM Changeset in webkit [244096] by commit-queue@webkit.org
  • 17 edits
    2 adds in trunk

[iPad] Should open popover when the spacebar is pressed
https://bugs.webkit.org/show_bug.cgi?id=196360
<rdar://problem/49389129>

Patch by Daniel Bates <dabates@apple.com> on 2019-04-09
Reviewed by Brent Fulgham.

Source/WebKit:

Pressing the spacebar should open the popover for a focused popup button (e.g. <select>) on iOS
just like it does on the Mac.

For now, we keep the iPhone behavior of blurring the element when the Done button is pressed and
hence pressing spacebar does nothing (because there is no focused element).

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

(-[WKContentView accessoryOpen]): Added. Extracted the logic from -_elementDidFocus to scroll to
the focused element, update the accessory and then tell the accessory to begin editing.
(-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
Write in terms of -accessoryOpen.

  • UIProcess/ios/forms/WKFormPeripheralBase.mm:

(-[WKFormPeripheralBase handleKeyEvent:]): Interpret the spacebar when the peripheral is closed (!_editing)
and call -accessoryOpen to ultimately call back to this peripheral to tell it to begin editing,
which will cause the popover to appear again.

Tools:

Add testing infrastructure to support waiting for a popover to be presented or dismissed.

  • DumpRenderTree/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::isShowingPopover const): Added.
(WTR::UIScriptController::platformSetWillPresentPopoverCallback): Added.
(WTR::UIScriptController::platformSetDidDismissPopoverCallback): Added.

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

(WTR::UIScriptController::setWillPresentPopoverCallback): Added.
(WTR::UIScriptController::willPresentPopoverCallback const): Added.
(WTR::UIScriptController::setDidDismissPopoverCallback): Added.
(WTR::UIScriptController::didDismissPopoverCallback const): Added.
(WTR::UIScriptController::isShowingPopover const): Added.
(WTR::UIScriptController::platformSetWillPresentPopoverCallback): Added.
(WTR::UIScriptController::platformSetDidDismissPopoverCallback): Added.

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

(-[TestRunnerWKWebView initWithFrame:configuration:]): Update some state.
(-[TestRunnerWKWebView resetInteractionCallbacks]): Ditto.
(-[TestRunnerWKWebView _willPresentPopover]): Added.
(-[TestRunnerWKWebView _didDismissPopover]): Added.

  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::isShowingPopover const): Added.
(WTR::UIScriptController::platformSetWillPresentPopoverCallback): Added.
(WTR::UIScriptController::platformSetDidDismissPopoverCallback): Added.

LayoutTests:

Add an iPad-specific test to ensure that pressing the spacebar opens the popover and scrolls
the form control into view.

  • fast/forms/ios/ipad/open-picker-using-keyboard-expected.txt: Added.
  • fast/forms/ios/ipad/open-picker-using-keyboard.html: Added.
  • platform/ios/TestExpectations: Skip tests in fast/forms/ios/ipad. We will unskip for iPad below.
  • platform/ipad/TestExpectations: Mark tests in fast/forms/ios/ipad as PASS so we run them.
  • resources/ui-helper.js:

(window.UIHelper.waitForPopoverToPresent):
(window.UIHelper.waitForPopoverToDismiss):

2:42 PM Changeset in webkit [244095] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Unreviewed, fix webkitpy failure after r244085.

Use a list instead of a set for header includes so that the order is
maintained.

  • Scripts/webkit/messages.py:
1:17 PM Changeset in webkit [244094] by youenn@apple.com
  • 15 edits in trunk/LayoutTests

Refresh WPT service worker expectations
https://bugs.webkit.org/show_bug.cgi?id=196732

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

  • web-platform-tests/service-workers/cache-storage/serviceworker/cache-abort.https-expected.txt:
  • web-platform-tests/service-workers/cache-storage/window/cache-abort.https-expected.txt:
  • web-platform-tests/service-workers/cache-storage/worker/cache-abort.https-expected.txt:
  • web-platform-tests/service-workers/service-worker/client-navigate.https-expected.txt:
  • web-platform-tests/service-workers/service-worker/clients-matchall-include-uncontrolled.https-expected.txt:
  • web-platform-tests/service-workers/service-worker/fetch-canvas-tainting-image-cache.https-expected.txt:
  • web-platform-tests/service-workers/service-worker/multipart-image.https-expected.txt:
  • web-platform-tests/service-workers/service-worker/navigation-redirect.https-expected.txt:
  • web-platform-tests/service-workers/service-worker/performance-timeline.https-expected.txt:
  • web-platform-tests/service-workers/service-worker/resource-timing.https-expected.txt:
  • web-platform-tests/service-workers/service-worker/respond-with-body-accessed-response.https-expected.txt:
  • web-platform-tests/service-workers/service-worker/sandboxed-iframe-fetch-event.https-expected.txt:
  • web-platform-tests/service-workers/service-worker/update-after-navigation-fetch-event.https-expected.txt:

LayoutTests:

1:03 PM Changeset in webkit [244093] by Justin Fan
  • 8 edits
    4 adds in trunk

[Web GPU] GPURenderPassEncoder updates: setBlendColor, setViewport, setScissorRect
https://bugs.webkit.org/show_bug.cgi?id=196719

Reviewed by Myles C. Maxfield.

Source/WebCore:

Implement setBlendColor, setViewport, and setScissorRect for GPURenderPassEncoder.

Tests: webgpu/viewport-scissor-rect-triangle-strip.html, webgpu/blend-color-triangle-strip.html

  • Modules/webgpu/WebGPURenderPassEncoder.cpp:

(WebCore::WebGPURenderPassEncoder::setBlendColor):
(WebCore::WebGPURenderPassEncoder::setViewport):
(WebCore::WebGPURenderPassEncoder::setScissorRect):

  • Modules/webgpu/WebGPURenderPassEncoder.h:
  • Modules/webgpu/WebGPURenderPassEncoder.idl:
  • platform/graphics/gpu/GPURenderPassEncoder.h:
  • platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:

(WebCore::GPURenderPassEncoder::setBlendColor):
(WebCore::GPURenderPassEncoder::setViewport):
(WebCore::GPURenderPassEncoder::setScissorRect):

LayoutTests:

Add blend-color-triangle-strip to set and blend with a custom blend color on the renderpass encoder.
Add viewport-scissor-rect-triangle-strip to draw a checkerboard by restricting the drawing viewport or scissor rectangle.

  • webgpu/blend-color-triangle-strip.html: Added.
  • webgpu/js/webgpu-functions.js:

(beginBasicRenderPass):

  • webgpu/viewport-scissor-rect-triangle-strip-expected.html: Added.
  • webgpu/viewport-scissor-rect-triangle-strip.html: Added.
12:53 PM Changeset in webkit [244092] by aestes@apple.com
  • 8 edits in trunk/Source

[Apple Pay] Add release logging to PaymentCoordinator
https://bugs.webkit.org/show_bug.cgi?id=196738

Reviewed by Alex Christensen.

Source/WebCore:

When allowed, log interactions with PaymentCoordinator to os_log to help diagnose Apple Pay bugs.

The following information might be logged: names of functions called, merchant API versions,
boolean results of canMakePayments(), boolean results of beginPaymentSession(), whether
completePaymentSession() was called with a final state result, boolean results of
shouldAllowApplePay(), whether a document has evaluated user agent scripts or is running
user scripts, and whether a client supports unrestricted Apple Pay.

  • Modules/applepay/PaymentCoordinator.cpp:

(WebCore::PaymentCoordinator::supportsVersion const):
(WebCore::PaymentCoordinator::canMakePayments):
(WebCore::PaymentCoordinator::canMakePaymentsWithActiveCard):
(WebCore::PaymentCoordinator::openPaymentSetup):
(WebCore::PaymentCoordinator::beginPaymentSession):
(WebCore::PaymentCoordinator::completeMerchantValidation):
(WebCore::PaymentCoordinator::completeShippingMethodSelection):
(WebCore::PaymentCoordinator::completeShippingContactSelection):
(WebCore::PaymentCoordinator::completePaymentMethodSelection):
(WebCore::PaymentCoordinator::completePaymentSession):
(WebCore::PaymentCoordinator::abortPaymentSession):
(WebCore::PaymentCoordinator::cancelPaymentSession):
(WebCore::PaymentCoordinator::validateMerchant):
(WebCore::PaymentCoordinator::didAuthorizePayment):
(WebCore::PaymentCoordinator::didSelectPaymentMethod):
(WebCore::PaymentCoordinator::didSelectShippingMethod):
(WebCore::PaymentCoordinator::didSelectShippingContact):
(WebCore::PaymentCoordinator::didCancelPaymentSession):
(WebCore::PaymentCoordinator::shouldAllowApplePay const):
(WebCore::PaymentCoordinator::shouldAllowUserAgentScripts const):

  • Modules/applepay/PaymentCoordinatorClient.h:

(WebCore::PaymentCoordinatorClient::isAlwaysOnLoggingAllowed const):

  • platform/Logging.h:
  • testing/MockPaymentCoordinator.h:

Source/WebKit:

  • WebProcess/ApplePay/WebPaymentCoordinator.cpp:

(WebKit::WebPaymentCoordinator::isAlwaysOnLoggingAllowed const):

  • WebProcess/ApplePay/WebPaymentCoordinator.h:
12:37 PM Changeset in webkit [244091] by jer.noble@apple.com
  • 15 edits
    1 copy
    1 add in trunk/Source/WebKit

[Cocoa] Awaken UIProcess if WebContent process is awakened from suspensions unexpectedly.
https://bugs.webkit.org/show_bug.cgi?id=196659

Reviewed by Chris Dumez.

  • Platform/IPC/Connection.h:

(IPC::Connection::sendWithAsyncReply):

  • Platform/spi/ios/AssertionServicesSPI.h:
  • Shared/Cocoa/ProcessTaskStateObserver.h: Added.

(WebKit::ProcessTaskStateObserver::setClient):
(WebKit::ProcessTaskStateObserver::client):
(WebKit::ProcessTaskStateObserver::taskState const):

  • Shared/Cocoa/ProcessTaskStateObserver.mm: Added.

(-[WKProcessTaskStateObserverDelegate process:taskStateDidChange:]):
(WebKit::toProcessTaskStateObserverTaskState):
(WebKit::ProcessTaskStateObserver::ProcessTaskStateObserver):
(WebKit::ProcessTaskStateObserver::~ProcessTaskStateObserver):
(WebKit::ProcessTaskStateObserver::setTaskState):

  • UIProcess/Cocoa/WebProcessProxyCocoa.mm:

(WebKit::WebProcessProxy::processWasUnexpectedlyUnsuspended):

  • UIProcess/ProcessAssertion.h:
  • UIProcess/ProcessThrottler.cpp:

(WebKit::ProcessThrottler::updateAssertion):

  • UIProcess/ProcessThrottler.h:

(WebKit::ProcessThrottler::shouldBeRunnable const):

  • UIProcess/WebProcessProxy.h:
  • UIProcess/WebProcessProxy.messages.in:
  • UIProcess/ios/ProcessAssertionIOS.mm:

(WebKit::reasonForState):
(WebKit::toBKSProcessAssertionReason):
(WebKit::ProcessAssertion::ProcessAssertion):

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

(WebKit::WebProcess::actualPrepareToSuspend):
(WebKit::WebProcess::cancelPrepareToSuspend):
(WebKit::WebProcess::processDidResume):

  • WebProcess/WebProcess.h:
  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::processTaskStateDidChange):

12:32 PM Changeset in webkit [244090] by don.olmstead@sony.com
  • 7 edits in trunk

[CMake] WTF derived sources should only be referenced inside WTF
https://bugs.webkit.org/show_bug.cgi?id=196706

Reviewed by Konstantin Tokarev.

.:

  • Source/cmake/OptionsWinCairo.cmake:
  • Source/cmake/WebKitFS.cmake:

Source/WTF:

Use ${WTF_DERIVED_SOURCES_DIR} instead of ${DERIVED_SOURCES_DIR} within WTF.

  • wtf/CMakeLists.txt:
  • wtf/PlatformJSCOnly.cmake:
  • wtf/PlatformMac.cmake:
12:07 PM Changeset in webkit [244089] by commit-queue@webkit.org
  • 5 edits in trunk

Clicking "Go Back" from a safe browsing warning from an iframe should navigate the WKWebView back to the previous page
https://bugs.webkit.org/show_bug.cgi?id=196665
<rdar://45115669>

Patch by Alex Christensen <achristensen@webkit.org> on 2019-04-09
Reviewed by Geoff Garen.

Source/WebKit:

It is insufficient to just not navigate the subframe. We must leave the page that contained it.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _showSafeBrowsingWarning:completionHandler:]):

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::showSafeBrowsingWarning):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:

(goBack):
(+[SimpleLookupContext sharedLookupContext]):
(-[SimpleLookupContext lookUpURL:completionHandler:]):
(TEST):
(+[Simple3LookupContext sharedLookupContext]): Deleted.
(-[Simple3LookupContext lookUpURL:completionHandler:]): Deleted.

11:50 AM Changeset in webkit [244088] by Ross Kirsling
  • 50 edits in trunk/Source/JavaScriptCore

JSC should build successfully even with -DENABLE_UNIFIED_BUILDS=OFF
https://bugs.webkit.org/show_bug.cgi?id=193073

Reviewed by Keith Miller.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitEqualityOpImpl):
(JSC::BytecodeGenerator::emitEqualityOp): Deleted.

  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::emitEqualityOp):
Factor out the logic that uses the template parameter and keep it in the header.

  • jit/JITPropertyAccess.cpp:

List off the template specializations needed by JITOperations.cpp.
This is unfortunate but at least there are only two (x2) by definition?
Trying to do away with this incurs a severe domino effect...

  • API/JSValueRef.cpp:
  • b3/B3OptimizeAssociativeExpressionTrees.cpp:
  • b3/air/AirHandleCalleeSaves.cpp:
  • builtins/BuiltinNames.cpp:
  • bytecode/AccessCase.cpp:
  • bytecode/BytecodeIntrinsicRegistry.cpp:
  • bytecode/BytecodeIntrinsicRegistry.h:
  • bytecode/BytecodeRewriter.cpp:
  • bytecode/BytecodeUseDef.h:
  • bytecode/CodeBlock.cpp:
  • bytecode/InstanceOfAccessCase.cpp:
  • bytecode/MetadataTable.cpp:
  • bytecode/PolyProtoAccessChain.cpp:
  • bytecode/StructureSet.cpp:
  • bytecompiler/NodesCodegen.cpp:
  • dfg/DFGCFAPhase.cpp:
  • dfg/DFGPureValue.cpp:
  • heap/GCSegmentedArray.h:
  • heap/HeapInlines.h:
  • heap/IsoSubspace.cpp:
  • heap/LocalAllocator.cpp:
  • heap/LocalAllocator.h:
  • heap/LocalAllocatorInlines.h:
  • heap/MarkingConstraintSolver.cpp:
  • inspector/ScriptArguments.cpp:

(Inspector::ScriptArguments::isEqual const):

  • inspector/ScriptCallStackFactory.cpp:
  • interpreter/CallFrame.h:
  • interpreter/Interpreter.cpp:
  • interpreter/StackVisitor.cpp:
  • llint/LLIntEntrypoint.cpp:
  • runtime/ArrayIteratorPrototype.cpp:
  • runtime/BigIntPrototype.cpp:
  • runtime/CachedTypes.cpp:
  • runtime/ErrorType.cpp:
  • runtime/IndexingType.cpp:
  • runtime/JSCellInlines.h:
  • runtime/JSImmutableButterfly.h:
  • runtime/Operations.h:
  • runtime/RegExpCachedResult.cpp:
  • runtime/RegExpConstructor.cpp:
  • runtime/RegExpGlobalData.cpp:
  • runtime/StackFrame.h:
  • wasm/WasmSignature.cpp:
  • wasm/js/JSToWasm.cpp:
  • wasm/js/JSToWasmICCallee.cpp:
  • wasm/js/WebAssemblyFunction.h:

Fix includes / forward declarations (and a couple of nearby clang warnings).

11:45 AM Changeset in webkit [244087] by Devin Rousso
  • 2 edits in trunk/LayoutTests

Unreviewed, fix test failures after r239698.
<rdar://problem/47223615>

  • http/tests/inspector/network/resource-security-connection.html:

Security connection information is sent as part of the metrics, not the response.

11:19 AM Changeset in webkit [244086] by wilander@apple.com
  • 15 edits
    9 adds in trunk

Pick up Ad Click Attribution conversions in NetworkResourceLoader::willSendRedirectedRequest()
https://bugs.webkit.org/show_bug.cgi?id=196558
<rdar://problem/47650245>

Reviewed by Youenn Fablet.

Source/WebCore:

Tests: http/tests/adClickAttribution/attribution-conversion-through-cross-site-image-redirect.html

http/tests/adClickAttribution/attribution-conversion-through-image-redirect-with-priority.html
http/tests/adClickAttribution/attribution-conversion-through-image-redirect-without-priority.html

The existing API tests were expanded too.

  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::parseAdClickAttribution const):

Enhanced the use of AdClickAttribution::MaxEntropy.

  • loader/AdClickAttribution.cpp:

(WebCore::AdClickAttribution::parseConversionRequest):

New function to parse and validate URLs with a path starting with
/.well-known/ad-click-attribution/.

(WebCore::AdClickAttribution::toString const):

Added output for the conversion priority for testing purposes.

  • loader/AdClickAttribution.h:

(WebCore::AdClickAttribution::Campaign::isValid const):
(WebCore::AdClickAttribution::Conversion::isValid const):

Enhanced the use of AdClickAttribution::MaxEntropy.

Source/WebKit:

So called pixel requests have traditionally been used to send ad click
attribution data to click sources. The privacy implications of such
pixel requests are severe which is in part why browsers have started to
block cookies from being sent in such third-party requests.

To allow for a smooth transition to more privacy-friendly ad click
attribution, we should allow servers to make a redirect to
https://click-source.example/.well-known/ad-click-attribution/ to
trigger a so called conversion.

This patch checks for the well-known location in the path component of
the redirect URL. If the request indeed goes to the well-known location,
we parse the conversion data and send it to the storage in the network
session.

  • NetworkProcess/NetworkAdClickAttribution.cpp:

(WebKit::NetworkAdClickAttribution::convert):

Reporting function.

  • NetworkProcess/NetworkAdClickAttribution.h:
  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::willSendRedirectedRequest):

Now checks for the well-known location through a call to
WebCore::AdClickAttribution::parseConversionRequest().

  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::convertAdClickAttribution):

Piping to WebKit::NetworkAdClickAttribution::convert().

  • NetworkProcess/NetworkSession.h:

Tools:

  • TestWebKitAPI/Tests/WebCore/AdClickAttribution.cpp:

(TestWebKitAPI::TEST):

Added tests of WebCore::AdClickAttribution::parseConversionRequest().

LayoutTests:

  • http/tests/adClickAttribution/anchor-tag-attributes-validation-expected.txt:

Enhanced the use of AdClickAttribution::MaxEntropy.

  • http/tests/adClickAttribution/attribution-conversion-through-cross-site-image-redirect-expected.txt: Added.
  • http/tests/adClickAttribution/attribution-conversion-through-cross-site-image-redirect.html: Added.
  • http/tests/adClickAttribution/attribution-conversion-through-image-redirect-with-priority-expected.txt: Added.
  • http/tests/adClickAttribution/attribution-conversion-through-image-redirect-with-priority.html: Added.
  • http/tests/adClickAttribution/attribution-conversion-through-image-redirect-without-priority-expected.txt: Added.
  • http/tests/adClickAttribution/attribution-conversion-through-image-redirect-without-priority.html: Added.
  • http/tests/adClickAttribution/resources/redirectToConversion.php: Added.
  • http/tests/adClickAttribution/resources/redirectToConversionOnIPAddress.php: Added.
  • platform/ios-wk2/http/tests/adClickAttribution/anchor-tag-attributes-validation-expected.txt:

Enhanced the use of AdClickAttribution::MaxEntropy.

11:08 AM Changeset in webkit [244085] by Chris Dumez
  • 18 edits in trunk/Source

[iOS] WebContent processes should be marked as "Foreground Running" when their view is visible
https://bugs.webkit.org/show_bug.cgi?id=196695
<rdar://problem/48073787>

Reviewed by Tim Horton.

In order for WebContent processes to get marked as "Foreground Running" when their view
is visible on iOS, we now construct a _UILayerHostView in the UIProcess and add it as
a subview of the WKContentView. The _UILayerHostView's visibility target is the
WebContent process currently associated with the view.

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/PageClient.h:

(WebKit::PageClient::didCreateContextForVisibilityPropagation):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebProcessProxy.h:

(WebKit::WebProcessProxy::contextIDForVisibilityPropagation):

  • UIProcess/WebProcessProxy.messages.in:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::didCreateContextForVisibilityPropagation):

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

(-[WKContentView _commonInitializationWithProcessPool:configuration:]):
(-[WKContentView _setupVisibilityPropagationView]):
(-[WKContentView _processDidExit]):
(-[WKContentView _didRelaunchProcess]):
(-[WKContentView _processDidCreateContextForVisibilityPropagation]):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::didCreateContextForVisibilityPropagation):

  • UIProcess/ios/WebProcessProxyIOS.mm:

(WebKit::WebProcessProxy::didCreateContextForVisibilityPropagation):

  • WebProcess/WebProcess.h:
  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):

11:07 AM Changeset in webkit [244084] by Shawn Roberts
  • 2 edits in trunk/LayoutTests

inspector/canvas/css-canvas-clients.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=174272

Unreviewed test gardening

  • platform/mac/TestExpectations: Updating expectations to unskip test and just mark as a flaky failure
11:04 AM Changeset in webkit [244083] by Shawn Roberts
  • 2 edits in trunk/LayoutTests

inspector/console/console-time.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=158006

Unreviewed test gardening.

  • platform/mac/TestExpectations: Updating expecations for flaky failure
10:50 AM Changeset in webkit [244082] by graouts@webkit.org
  • 2 edits in trunk/LayoutTests

[ Mac ] REGRESSION (r237587) Layout Test compositing/visible-rect/animated-from-none.html is flaky text diff failure
https://bugs.webkit.org/show_bug.cgi?id=194798
<rdar://problem/48181898>

Reviewed by Dean Jackson.

When using the Web Animations engine, the best way to run code as an animation start is to use the "ready" promise, whereas
DOM events are dispatched asynchronously and, in the case of this test, might have an animation progress that is greater
than 0 and yield an animated transform that isn't quite the identity matrix.

  • compositing/visible-rect/animated-from-none.html:
9:57 AM Changeset in webkit [244081] by don.olmstead@sony.com
  • 14 edits in trunk

[CMake] Apple builds should use ICU_INCLUDE_DIRS
https://bugs.webkit.org/show_bug.cgi?id=196720

Reviewed by Konstantin Tokarev.

.:

The Apple platform is using ${DERIVED_SOURCES_WTF_DIR} for hosting the ICU headers.
Instead it should stage the headers into ${ICU_INCLUDE_DIRS} so no special handling
is needed.

  • Source/cmake/OptionsJSCOnly.cmake:
  • Source/cmake/OptionsMac.cmake:

Source/JavaScriptCore:

  • PlatformMac.cmake:

Source/WebCore:

  • PlatformMac.cmake:

Source/WebCore/PAL:

  • pal/PlatformMac.cmake:

Source/WTF:

Copy ICU headers for Apple builds into ICU_INCLUDE_DIRS.

  • CMakeLists.txt:
  • wtf/PlatformMac.cmake:

Tools:

  • TestWebKitAPI/PlatformMac.cmake:
9:14 AM Changeset in webkit [244080] by Jonathan Bedard
  • 5 edits in trunk/Tools

iOS 12 Simulator Release WK2 frequently timing out while running layout tests
https://bugs.webkit.org/show_bug.cgi?id=196694
<rdar://problem/48388734>

Rubber-stamped by Aakash Jain.

  • Scripts/webkitpy/port/image_diff.py:

(ImageDiffer.diff_image): If the ImageDiff process has data, kill it before running again.

  • Scripts/webkitpy/port/server_process.py:

(ServerProcess.has_available_stdout): Check if stdout has data in it.
(ServerProcess._wait_for_data_and_update_buffers_using_select):
(ServerProcess._wait_for_data_and_update_buffers_using_win32_apis):

  • Scripts/webkitpy/port/server_process_mock.py:

(MockServerProcess.has_available_stdout):

  • Scripts/webkitpy/port/server_process_unittest.py:

(TestServerProcess.serial_test_basic):

9:06 AM Changeset in webkit [244079] by sbarati@apple.com
  • 16 edits
    1 add in trunk

Clean up Int52 code and some bugs in it
https://bugs.webkit.org/show_bug.cgi?id=196639
<rdar://problem/49515757>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/spec-any-int-as-double-produces-any-int52-from-int52-rep.js: Added.

Source/JavaScriptCore:

This patch fixes bugs in our Int52 code. The primary change in this patch is
adopting a segregated type lattice for Int52. Previously, for Int52 values,
we represented them with SpecInt32Only and SpecInt52Only. For an Int52,
SpecInt32Only meant that the value is in int32 range. And SpecInt52Only meant
that the is outside of the int32 range.

However, this got confusing because we reused SpecInt32Only both for JSValue
representations and Int52 representations. This actually lead to some bugs.

  1. It's possible that roundtripping through Int52 representation would say

it produces the wrong type. For example, consider this program and how we
used to annotate types in AI:
a: JSConstant(10.0) => m_type is SpecAnyIntAsDouble
b: Int52Rep(@a) => m_type is SpecInt52Only
c: ValueRep(@b) => m_type is SpecAnyIntAsDouble

In AI, for the above program, we'd say that @c produces SpecAnyIntAsDouble.
However, the execution semantics are such that it'd actually produce a boxed
Int32. This patch fixes the bug where we'd say that Int52Rep over SpecAnyIntAsDouble
would produce SpecInt52Only. This is clearly wrong, as SpecAnyIntAsDouble can
mean an int value in either int32 or int52 range.

  1. AsbstractValue::validateTypeAcceptingBoxedInt52 was wrong in how it

accepted Int52 values. It was wrong in two different ways:
a: If the AbstractValue's type was SpecInt52Only, and the incoming value
was a boxed double, but represented a value in int32 range, the incoming
value would incorrectly validate as being acceptable. However, we should
have rejected this value.
b: If the AbstractValue's type was SpecInt32Only, and the incoming value
was an Int32 boxed in a double, this would not validate, even though
it should have validated.

Solving 2 was easiest if we segregated out the Int52 type into its own
lattice. This patch makes a new Int52 lattice, which is composed of
SpecInt32AsInt52 and SpecNonInt32AsInt52.

The conversion rules are now really simple.

Int52 rep => JSValue rep
SpecInt32AsInt52 => SpecInt32Only
SpecNonInt32AsInt52 => SpecAnyIntAsDouble

JSValue rep => Int52 rep
SpecInt32Only => SpecInt32AsInt52
SpecAnyIntAsDouble => SpecInt52Any

With these rules, the program in (1) will now correctly report that @c
returns SpecInt32Only | SpecAnyIntAsDouble.

  • bytecode/SpeculatedType.cpp:

(JSC::dumpSpeculation):
(JSC::speculationToAbbreviatedString):
(JSC::int52AwareSpeculationFromValue):
(JSC::leastUpperBoundOfStrictlyEquivalentSpeculations):
(JSC::speculationFromString):

  • bytecode/SpeculatedType.h:

(JSC::isInt32SpeculationForArithmetic):
(JSC::isInt32OrBooleanSpeculationForArithmetic):
(JSC::isAnyInt52Speculation):
(JSC::isIntAnyFormat):
(JSC::isInt52Speculation): Deleted.
(JSC::isAnyIntSpeculation): Deleted.

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGAbstractValue.cpp:

(JSC::DFG::AbstractValue::fixTypeForRepresentation):
(JSC::DFG::AbstractValue::checkConsistency const):

  • dfg/DFGAbstractValue.h:

(JSC::DFG::AbstractValue::isInt52Any const):
(JSC::DFG::AbstractValue::validateTypeAcceptingBoxedInt52 const):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupArithMul):
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::fixupGetPrototypeOf):
(JSC::DFG::FixupPhase::fixupToThis):
(JSC::DFG::FixupPhase::fixupToStringOrCallStringConstructor):
(JSC::DFG::FixupPhase::observeUseKindOnNode):
(JSC::DFG::FixupPhase::fixIntConvertingEdge):
(JSC::DFG::FixupPhase::attemptToMakeIntegerAdd):
(JSC::DFG::FixupPhase::fixupCompareStrictEqAndSameValue):
(JSC::DFG::FixupPhase::fixupChecksInBlock):

  • dfg/DFGGraph.h:

(JSC::DFG::Graph::addShouldSpeculateInt52):
(JSC::DFG::Graph::binaryArithShouldSpeculateInt52):
(JSC::DFG::Graph::unaryArithShouldSpeculateInt52):
(JSC::DFG::Graph::addShouldSpeculateAnyInt): Deleted.
(JSC::DFG::Graph::binaryArithShouldSpeculateAnyInt): Deleted.
(JSC::DFG::Graph::unaryArithShouldSpeculateAnyInt): Deleted.

  • dfg/DFGNode.h:

(JSC::DFG::Node::shouldSpeculateInt52):
(JSC::DFG::Node::shouldSpeculateAnyInt): Deleted.

  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::setIntTypedArrayLoadResult):
(JSC::DFG::SpeculativeJIT::compileArithAdd):
(JSC::DFG::SpeculativeJIT::compileArithSub):
(JSC::DFG::SpeculativeJIT::compileArithNegate):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::fillSpeculateInt32Internal):
(JSC::DFG::SpeculativeJIT::fillSpeculateInt52):

  • dfg/DFGUseKind.h:

(JSC::DFG::typeFilterFor):

  • dfg/DFGVariableAccessData.cpp:

(JSC::DFG::VariableAccessData::makePredictionForDoubleFormat):
(JSC::DFG::VariableAccessData::couldRepresentInt52Impl):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileArithAddOrSub):
(JSC::FTL::DFG::LowerDFGToB3::compileArithNegate):
(JSC::FTL::DFG::LowerDFGToB3::setIntTypedArrayLoadResult):

8:57 AM Changeset in webkit [244078] by jer.noble@apple.com
  • 21 edits
    3 adds in trunk

Source/WebCore:
Test for: 196095 Inband Text Track cues interspersed with Data cues can display out of order.
https://bugs.webkit.org/show_bug.cgi?id=196097

Reviewed by Eric Carlson.

Test: media/track/track-in-band-metadata-display-order.html

Add a method in Internals to create a TextTrackCueGeneric (which can normally only be created
by parsing an in-band media track). This requires adding IDL for TextTrackCueGeneric, and exporting
TextTrackCueGeneric for testing.

Drive-by fixes:

Add runtime logging to MediaControlTextTrackContainerElement. This necessitates modifying the
parentMediaElement() method to take a const Node*, and const_cast that constness away in order to return
a HTMLMediaElement*

TextTrackCue, VTTCue, TextTrackCueGeneric, and DataCue should all use the WTF TypeCasts macros to
enable use of is<> and downcast<>.

  • Source/WebCore/CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • html/shadow/MediaControlElementTypes.cpp:

(WebCore::parentMediaElement):

  • html/shadow/MediaControlElementTypes.h:
  • html/shadow/MediaControlElements.cpp:

(WebCore::MediaControlTextTrackContainerElement::updateDisplay):
(WebCore::MediaControlTextTrackContainerElement::logger const):
(WebCore::MediaControlTextTrackContainerElement::logIdentifier const):
(WebCore::MediaControlTextTrackContainerElement::logChannel const):

  • html/shadow/MediaControlElements.h:
  • html/track/DataCue.h:

(isType):

  • html/track/TextTrackCueGeneric.h:

(isType):

  • html/track/TextTrackCueGeneric.idl: Added.
  • html/track/VTTCue.h:

(isType):

  • testing/Internals.cpp:

(WebCore::Internals::createGenericCue):

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

Tools:
Test for: 196095 Inband Text Track cues interspersed with Data cues can display out of order.
https://bugs.webkit.org/show_bug.cgi?id=196097

Reviewed by Eric Carlson.

Drive-by bug fix: allow tests to play audio without a user gesture by default.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(resetWebPreferencesToConsistentValues):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetPreferencesToConsistentValues):

LayoutTests:
Add test for fix of #196095
https://bugs.webkit.org/show_bug.cgi?id=196097

Reviewed by Eric Carlson.

  • media/track/track-in-band-metadata-display-order-expected.txt: Added.
  • media/track/track-in-band-metadata-display-order.html: Added.
8:56 AM Changeset in webkit [244077] by sihui_liu@apple.com
  • 11 edits in trunk/Source

Remove unnecessary network process assertion for IDB close
https://bugs.webkit.org/show_bug.cgi?id=196693

Reviewed by Geoffrey Garen.

Source/WebCore:

We already took assertion at WebCore::SQLiteDatabase::close.

  • Modules/indexeddb/server/IDBServer.cpp:

(WebCore::IDBServer::IDBServer::create):
(WebCore::IDBServer::IDBServer::IDBServer):
(WebCore::IDBServer::m_quotaManagerGetter): Deleted.
(WebCore::IDBServer::IDBServer::closeDatabase): Deleted.
(WebCore::IDBServer::IDBServer::didCloseDatabase): Deleted.

  • Modules/indexeddb/server/IDBServer.h:

(WebCore::IDBServer::IDBServer::create): Deleted.

  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
(WebCore::IDBServer::UniqueIDBDatabase::scheduleShutdownForClose):
(WebCore::IDBServer::UniqueIDBDatabase::didShutdownForClose):
(WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore):
(WebCore::IDBServer::UniqueIDBDatabase::immediateCloseForUserDelete):
(WebCore::IDBServer::UniqueIDBDatabase::notifyServerAboutClose): Deleted.

  • Modules/indexeddb/server/UniqueIDBDatabase.h:

Source/WebKit:

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::createIDBServer):
(WebKit::NetworkProcess::notifyHoldingLockedFiles): Deleted.

  • NetworkProcess/NetworkProcess.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::didClose):
(WebKit::NetworkProcessProxy::setIsIDBDatabaseHoldingLockedFiles): Deleted.

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.messages.in:
8:43 AM Changeset in webkit [244076] by commit-queue@webkit.org
  • 4 edits in trunk/Tools

[JSCOnly] Add an i386 JSCOnly EWS that runs tests
https://bugs.webkit.org/show_bug.cgi?id=196690

Patch by Pablo Saavedra <Pablo Saavedra> on 2019-04-09
Reviewed by Michael Catanzaro.

  • QueueStatusServer/config/queues.py:
  • Scripts/webkitpy/common/config/ews.json:
  • Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py:

(test_ews_name):

7:20 AM Changeset in webkit [244075] by Chris Dumez
  • 7 edits in trunk

Loads using loadHTMLString() cause flashing when process-swapping
https://bugs.webkit.org/show_bug.cgi?id=196714
<rdar://problem/49637354>

Reviewed by Antti Koivisto.

Source/WebKit:

Our logic to decide if we should construct a SuspendedPageProxy on process-swap was assuming
a SuspendedPageProxy is only useful for PageCache and would therefore not create one if PageCache
is disabled or if there is no associated WebBackForwardListItem. However, constructing a
SuspendedPageProxy is also useful to prevent flashing when process-swapping as we need to keep
displaying the layer of the previous process until there is something meaningful to show in the
new process.

This patch makes it so that we now construct a SuspendedPageProxy on process-swap, even if
PageCache is disabled or if there is no associated WebBackForwardListItem. The process in
question will not be useful for PageCache but it will avoid flashing. The SuspendedPageProxy's
process may also get used for future navigations to the same site (as demonstrated by the
API test) which is beneficial for performance.

  • UIProcess/SuspendedPageProxy.cpp:

(WebKit::SuspendedPageProxy::SuspendedPageProxy):

  • UIProcess/SuspendedPageProxy.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::suspendCurrentPageIfPossible):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::findReusableSuspendedPageProcess):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
3:21 AM Changeset in webkit [244074] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Initialize trackTypeAsString for call to GST_INFO_OBJECT() in TrackType::Text
https://bugs.webkit.org/show_bug.cgi?id=196350

Patch by Eike Rathke <erack@redhat.com> on 2019-04-09
Reviewed by Xabier Rodriguez-Calvar.

trackTypeAsString was uninitialized in the
TrackPrivateBaseGStreamer::TrackType::Text case when calling
GST_INFO_OBJECT().

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::enableTrack):

2:48 AM Changeset in webkit [244073] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

Unreviewed. Fix ATK accessibility tests after r244059.

We are failing to load the injected bundle due to undefined symbol
AccessibilityUIElement::replaceTextInRange().

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

(WTR::AccessibilityUIElement::replaceTextInRange):

2:01 AM Changeset in webkit [244072] by Carlos Garcia Campos
  • 4 edits in trunk/Source/WebCore

[ATK] Cleanup WebKitAccessibleHyperlink
https://bugs.webkit.org/show_bug.cgi?id=196602

Reviewed by Michael Catanzaro.

Cleanups:

  • Rename webkitAccessibleHyperlinkNew() as webkitAccessibleHyperlinkGetOrCreate() and move the code to get/set the object data here.
  • Use WEBKIT_DEFINE_TYPE instead of custom type registration. This ensures that all CStrings used in private struct are no longer leaked.
  • Remove all confusing core() functions and simply use webkitAccessibleGetAccessibilityObject().
  • Use nullptr instead of 0 and other coding style issues.
  • accessibility/atk/WebKitAccessibleHyperlink.cpp:

(webkitAccessibleHyperlinkActionDoAction):
(webkitAccessibleHyperlinkActionGetNActions):
(webkitAccessibleHyperlinkActionGetDescription):
(webkitAccessibleHyperlinkActionGetKeybinding):
(webkitAccessibleHyperlinkActionGetName):
(atk_action_interface_init):
(webkitAccessibleHyperlinkGetURI):
(webkitAccessibleHyperlinkGetObject):
(rangeLengthForObject):
(webkitAccessibleHyperlinkGetStartIndex):
(webkitAccessibleHyperlinkGetEndIndex):
(webkitAccessibleHyperlinkIsValid):
(webkitAccessibleHyperlinkGetNAnchors):
(webkitAccessibleHyperlinkIsSelectedLink):
(webkitAccessibleHyperlinkGetProperty):
(webkitAccessibleHyperlinkSetProperty):
(webkit_accessible_hyperlink_class_init):
(webkitAccessibleHyperlinkGetOrCreate):
(core): Deleted.
(atkActionInterfaceInit): Deleted.
(getRangeLengthForObject): Deleted.
(webkitAccessibleHyperlinkFinalize): Deleted.
(webkitAccessibleHyperlinkClassInit): Deleted.
(webkitAccessibleHyperlinkInit): Deleted.
(webkitAccessibleHyperlinkGetType): Deleted.
(webkitAccessibleHyperlinkNew): Deleted.
(webkitAccessibleHyperlinkGetAccessibilityObject): Deleted.

  • accessibility/atk/WebKitAccessibleHyperlink.h:
  • accessibility/atk/WebKitAccessibleInterfaceHyperlinkImpl.cpp:

(webkitAccessibleHyperlinkImplGetHyperlink):
(webkitAccessibleHyperlinkImplInterfaceInit):

1:41 AM Changeset in webkit [244071] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.24.1

WebKitGTK 2.24.1

1:41 AM Changeset in webkit [244070] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.24

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.24.1 release

.:

  • Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit:

  • gtk/NEWS: Add release notes for 2.24.1.
12:54 AM Changeset in webkit [244069] by Tadeu Zagallo
  • 3 edits
    1 add in trunk
ASSERTION FAILED: !scope.exception()
!hasProperty in JSObject::get

https://bugs.webkit.org/show_bug.cgi?id=196708
<rdar://problem/49556803>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/proxy-getter-stack-overflow.js: Added.

(const.handler.get target):
(const.handler.has):
(try.with):
(catch):

Source/JavaScriptCore:

operationPutToScope needs to return early if an exception is thrown while
checking if hasProperty.

  • jit/JITOperations.cpp:

Apr 8, 2019:

11:23 PM Changeset in webkit [244068] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

Remove some iOS #ifdefs around sticky-related code
https://bugs.webkit.org/show_bug.cgi?id=196726

Reviewed by Zalan Bujtas.

Now that async overflow scrolling can be enabled on macOS, RenderLayerCompositor::isAsyncScrollableStickyLayer()
should not have iOS-only code.

The answer to the FIXME in RenderLayerCompositor::computeStickyViewportConstraints is obvious: composited
overflow:scroll can be the container for sticky. The assertion can be removed.

  • rendering/RenderLayer.cpp: Fix spacing in some logging.

(WebCore::outputPaintOrderTreeRecursive):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::isAsyncScrollableStickyLayer const):
(WebCore::RenderLayerCompositor::computeStickyViewportConstraints const):

9:31 PM BuildingCairoOnWindows edited by Fujii Hironori
(diff)
9:30 PM BuildingCairoOnWindows edited by Fujii Hironori
(diff)
9:18 PM BuildingCairoOnWindows edited by Fujii Hironori
(diff)
9:18 PM BuildingCairoOnWindows edited by Fujii Hironori
(diff)
8:23 PM Changeset in webkit [244067] by ysuzuki@apple.com
  • 12 edits
    2 adds in trunk

[JSC] DFG should respect node's strict flag
https://bugs.webkit.org/show_bug.cgi?id=196617

Reviewed by Saam Barati.

JSTests:

  • stress/put-by-val-direct-should-respect-strict-mode-of-inlining-codeblock.js: Added.

(shouldEqual):
(makeUnwriteableUnconfigurableObject):
(runTest):

  • stress/put-dynamic-var-strict-and-sloppy.js: Added.

(shouldBe):
(shouldThrow):
(with.result):
(with.putValueStrict):
(with.putValueSloppy):

Source/JavaScriptCore:

We accidentally use codeBlock->isStrictMode() directly in DFG and FTL. But this is wrong since this CodeBlock is the top level DFG/FTL CodeBlock,
and this code does not respect the isStrictMode flag for the inlined CodeBlocks. In this patch, we start using isStrictModeFor(CodeOrigin) consistently
in DFG and FTL to get the right isStrictMode flag for the DFG node.
And we also split compilePutDynamicVar into compilePutDynamicVarStrict and compilePutDynamicVarNonStrict since (1) it is cleaner than accessing inlined
callframe in the operation function, and (2) it is aligned to the other functions like operationPutByValDirectNonStrict etc.
This bug is discovered by RandomizingFuzzerAgent by expanding the DFG coverage.

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::foldConstants):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupToThis):

  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileDoublePutByVal):
(JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray):
(JSC::DFG::SpeculativeJIT::compilePutDynamicVar):
(JSC::DFG::SpeculativeJIT::compileToThis):

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compilePutByVal):
(JSC::FTL::DFG::LowerDFGToB3::compilePutDynamicVar):

6:54 PM Changeset in webkit [244066] by Fujii Hironori
  • 2 edits in trunk/Tools

AX: Support API: accessibilityReplaceRange:withText
https://bugs.webkit.org/show_bug.cgi?id=196636

Unreviewed build fix for Windows port.

  • WebKitTestRunner/InjectedBundle/win/AccessibilityUIElementWin.cpp:

(WTR::AccessibilityUIElement::replaceTextInRange): Added.

6:38 PM Changeset in webkit [244065] by don.olmstead@sony.com
  • 25 edits in trunk

[CMake][WinCairo] Separate copied headers into different directories
https://bugs.webkit.org/show_bug.cgi?id=196655

Reviewed by Michael Catanzaro.

.:

Add variables for the paths to copied framework headers. This is done to be
explicit rather than relying on ${FORWARDING_HEADERS_DIR}.

Currently all ports but WinCairo will default to ${FORWARDING_HEADERS_DIR}.
WinCairo overrides them to provide a directory structure that looks more
like what happens in an XCode build. This is meant as an intermediate step
towards making all CMake ports behave like this.

  • Source/cmake/OptionsWinCairo.cmake:
  • Source/cmake/WebKitFS.cmake:
  • Source/cmake/WebKitMacros.cmake:

Source/JavaScriptCore:

  • CMakeLists.txt:
  • shell/PlatformWin.cmake:

Source/WebCore:

  • CMakeLists.txt:
  • PlatformWin.cmake:

Source/WebCore/PAL:

  • pal/CMakeLists.txt:

Source/WebKit:

  • CMakeLists.txt:
  • PlatformWin.cmake:

Source/WebKitLegacy:

  • CMakeLists.txt:
  • PlatformWin.cmake:

Source/WTF:

  • wtf/CMakeLists.txt:

Tools:

  • DumpRenderTree/CMakeLists.txt:
  • MiniBrowser/win/CMakeLists.txt:
  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/PlatformWin.cmake:
6:32 PM Changeset in webkit [244064] by Jonathan Bedard
  • 2 edits
    1 add in trunk/Tools

Log stack-trace for run-webkit-tests when interrupted
https://bugs.webkit.org/show_bug.cgi?id=176393
<rdar://problem/34262310>

Reviewed by Lucas Forschler.

  • Scripts/webkitpy/common/interrupt_debugging.py: Added.

(log_stack_trace): Given a Python frame object, log a stack trace to the provided file.
(StackTraceFileContext): Context which allows stack-traces to be printed to stderr or to a file.
(log_stack_trace_on_term): Attach a listener to SIGTERM so that a stack-trace can be logged when a program is terminated.
(log_stack_trace_on_ctrl_c): Attach a listener to SIGINT so that a stack-trace can be logged when a program is CTRL+Ced.

  • Scripts/webkitpy/layout_tests/run_webkit_tests.py:

(main): Set handlers to log stack trace on interruption.

6:31 PM Changeset in webkit [244063] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Elements tab: Classes toggle should use accent color on hover
https://bugs.webkit.org/show_bug.cgi?id=196266

Reviewed by Devin Rousso.

  • UserInterface/Views/GeneralStyleDetailsSidebarPanel.css:

(.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle):
(.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle::before):
(.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle:matches(.selected, :hover)):
(.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle:matches(.selected, :hover)::before):
(.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle:not(.selected):hover::before):
(.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle.selected:active::before):
(.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle.selected): Deleted.
(.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle:not(.selected):hover): Deleted.

6:26 PM Changeset in webkit [244062] by Fujii Hironori
  • 2 edits in trunk/Tools

AX: Support API: accessibilityReplaceRange:withText
https://bugs.webkit.org/show_bug.cgi?id=196636

Unreviewed build fix for Windows port.

  • DumpRenderTree/AccessibilityUIElement.cpp:

(AccessibilityUIElement::replaceTextInRange): Changed the return value type from void to bool.

5:58 PM Changeset in webkit [244061] by Chris Fleizach
  • 11 edits
    4 adds in trunk

AX: Automatically compute accessibility labels for Apple Pay buttons
https://bugs.webkit.org/show_bug.cgi?id=196661

Reviewed by Joanmarie Diggs.

Source/WebCore:

Detect Apple Pay buttons and return a standard role and label for them based on their type.

Test: accessibility/mac/apple-pay-labels.html

accessibility/mac/apple-pay-session-v4.html

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::isControl const):

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

(WebCore::AccessibilityRenderObject::applePayButtonDescription const):
(WebCore::AccessibilityRenderObject::titleElementText const):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
(WebCore::AccessibilityRenderObject::isApplePayButton const):
(WebCore::AccessibilityRenderObject::applePayButtonType const):

  • accessibility/AccessibilityRenderObject.h:
  • en.lproj/Localizable.strings:
  • platform/LocalizedStrings.cpp:

(WebCore::AXApplePayPlainLabel):
(WebCore::AXApplePayBuyLabel):
(WebCore::AXApplePaySetupLabel):
(WebCore::AXApplePayDonateLabel):
(WebCore::AXApplePayCheckOutLabel):
(WebCore::AXApplePayBookLabel):
(WebCore::AXApplePaySubscribeLabel):

  • platform/LocalizedStrings.h:

LayoutTests:

  • accessibility/mac/apple-pay-labels-expected.txt: Added.
  • accessibility/mac/apple-pay-labels.html: Added.
  • accessibility/mac/apple-pay-session-v4-expected.txt: Added.
  • accessibility/mac/apple-pay-session-v4.html: Added.
5:42 PM Changeset in webkit [244060] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-build] Scripts using Buildbot API have CORS error
https://bugs.webkit.org/show_bug.cgi?id=196709

Reviewed by Alexey Proskuryakov.

  • BuildSlaveSupport/ews-build/master.cfg: Set allowed_origins appropriately.
5:39 PM Changeset in webkit [244059] by Chris Fleizach
  • 14 edits
    2 adds in trunk

AX: Support API: accessibilityReplaceRange:withText
https://bugs.webkit.org/show_bug.cgi?id=196636

Reviewed by Daniel Bates.

Source/WebCore:

Support this platform API on mac to provide a way to replace a range of editable text.

Test: accessibility/mac/replace-text-with-range.html

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::replaceTextInRange):

  • accessibility/AccessibilityObject.h:
  • accessibility/mac/AccessibilityObjectBase.mm:

(WebCore::PlainTextRange::PlainTextRange):

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper accessibilityReplaceRange:withText:]):

Tools:

  • DumpRenderTree/AccessibilityUIElement.cpp:

(replaceTextInRangeCallback):
(AccessibilityUIElement::replaceTextInRange):
(AccessibilityUIElement::getJSClass):

  • DumpRenderTree/AccessibilityUIElement.h:
  • DumpRenderTree/ios/AccessibilityUIElementIOS.mm:

(AccessibilityUIElement::replaceTextInRange):

  • DumpRenderTree/mac/AccessibilityUIElementMac.mm:

(AccessibilityUIElement::replaceTextInRange):

  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
  • WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
  • WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:

(WTR::AccessibilityUIElement::replaceTextInRange):

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:

(WTR::AccessibilityUIElement::replaceTextInRange):

5:00 PM Changeset in webkit [244058] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] isRope jump in StringSlice should not jump over register allocations
https://bugs.webkit.org/show_bug.cgi?id=196716

Reviewed by Saam Barati.

JSTests:

  • stress/is-rope-check-in-string-slice-should-not-jump-over-register-allocations.js: Added.

(foo.bar):
(foo):

Source/JavaScriptCore:

Jumping over the register allocation code in DFG (like the following) is wrong.

auto jump = m_jit.branchXXX();
{

GPRTemporary reg(this);
GPRReg regGPR = reg.gpr();
...

}
jump.link(&m_jit);

When GPRTemporary::gpr allocates a new register, it can flush the previous register value into the stack and make the register usable.
Jumping over this register allocation code skips the flushing code, and makes the DFG's stack and register content tracking inconsistent:
DFG thinks that the content is flushed and stored in particular stack slot even while this flushing code is skipped.
In this patch, we perform register allocations before jumping to the slow path based on isRope condition in StringSlice.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileStringSlice):

4:33 PM Changeset in webkit [244057] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] to_index_string should not assume incoming value is Uint32
https://bugs.webkit.org/show_bug.cgi?id=196713

Reviewed by Saam Barati.

JSTests:

  • stress/to-index-string-should-not-assume-incoming-value-is-uint32.js: Added.

(foo):

Source/JavaScriptCore:

The slow path of to_index_string assumes that incoming value is Uint32. But we should not have
this assumption since DFG may decide we should have it double format. This patch removes this
assumption, and instead, we should assume that incoming value is AnyInt and the range of this
is within Uint32.

  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

3:49 PM Changeset in webkit [244056] by Wenson Hsieh
  • 14 edits in trunk

[iOS] Do not allow starting selection drags when selection views are not visible
https://bugs.webkit.org/show_bug.cgi?id=196686
<rdar://problem/49399192>

Reviewed by Tim Horton.

Source/WebCore:

See WebKit ChangeLog for more details.

Tests: DragAndDropTests.CanDragImageWhenNotFirstResponder

DragAndDropTests.DoNotPerformSelectionDragWhenNotFirstResponder

  • page/DragController.cpp:

(WebCore::DragController::draggableElement const):

Make this respect the case where m_dragSourceAction does not include DragSourceActionSelection. All the other
drag source types are currently consulted in this method, with the exception of DragSourceActionSelection.

Source/WebKit:

Currently, on iOS, it's possible to start dragging selected text in a web view even if the selection itself is
not visible. This can happen if the user selects some text, focuses a native text field, and then long presses
the previously selected text. This is because the text is still selected in the document since we don't clear
the selection when resigning first responder on iOS, despite the fact that the native selection view is no
longer present.

To fix this, we add plumbing to specify the set of allowed drag source actions when requesting drag start; this
set of allowed drag source actions only includes DragSourceActionSelection if the selection view can be visible
(i.e. the content view is first responder, and isn't suppressing text interactions). We then update WebPage's
allowed drag source actions with this given set of actions, while sending "dragstart" to the page.

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

(-[WKContentView hasSelectablePositionAtPoint:]):
(-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):

Only bail out of text selection in text that is already selected if the web view allows dragging text selections
(i.e. the web view is first responder, and is not suppressing text interactions).

(-[WKContentView _allowedDragSourceActions]):
(-[WKContentView _dragInteraction:itemsForAddingToSession:withTouchAtPoint:completion:]):
(-[WKContentView _dragInteraction:prepareForSession:completion:]):

Pass the set of allowed drag source actions when requesting a drag start or adding items to an existing session.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::requestDragStart):
(WebKit::WebPageProxy::requestAdditionalItemsForDragSession):

Plumb the allowed drag source actions from the UI process (WKContentView) over to the web process (WebPage).

  • WebProcess/WebCoreSupport/WebDragClient.cpp:

(WebKit::WebDragClient::dragSourceActionMaskForPoint):

Instead of always returning Any, consult WebPage's allowed drag source actions.

  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::allowedDragSourceActions const):

  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::requestDragStart):
(WebKit::WebPage::requestAdditionalItemsForDragSession):

Set WebPage's allowed drag source actions to the given set of actions when sending a drag start to the page.

Tools:

Adjust some existing API tests to make the web view become first responder before trying to begin dragging, and
also add some new API tests to cover scenarios where the web view is not first responder.

  • TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/cocoa/DragAndDropSimulator.h:

Add a switch to optionally make the web view first responder when starting the simulated drag.

  • TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:

(-[DragAndDropSimulator initWithWebView:]):
(-[DragAndDropSimulator runFrom:to:additionalItemRequestLocations:]):

3:45 PM Changeset in webkit [244055] by Alan Coon
  • 7 edits in tags/Safari-608.1.15.1/Source

Versioning.

3:29 PM Changeset in webkit [244054] by youenn@apple.com
  • 7 edits
    1 copy in trunk

Add a test to check for the service worker process name
https://bugs.webkit.org/show_bug.cgi?id=196621

Reviewed by Chris Dumez.

Source/WebCore:

Add a service worker internal API to get process name.
Covered by updated test.

  • WebCore.xcodeproj/project.pbxproj:
  • testing/ServiceWorkerInternals.cpp:

(WebCore::ServiceWorkerInternals::processName const):

  • testing/ServiceWorkerInternals.h:
  • testing/ServiceWorkerInternals.idl:
  • testing/ServiceWorkerInternals.mm: Added.

LayoutTests:

  • http/wpt/service-workers/online-worker.js:

(async.doTest):

3:26 PM Changeset in webkit [244053] by Alan Coon
  • 7 edits in branches/safari-607-branch/Source

Versioning.

3:26 PM Changeset in webkit [244052] by ysuzuki@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed, speculative fix for build failure in old macOS after r243887
https://bugs.webkit.org/show_bug.cgi?id=196475

  • dom/NodeList.h:
3:25 PM Changeset in webkit [244051] by Alan Coon
  • 1 copy in tags/Safari-608.1.15.1

New tag.

3:11 PM Changeset in webkit [244050] by Justin Fan
  • 19 edits in trunk

[Web GPU] Fix Web GPU experimental feature on iOS
https://bugs.webkit.org/show_bug.cgi?id=196632

Reviewed by Myles C. Maxfield.

Source/JavaScriptCore:

Properly make Web GPU available on iOS 11+.

  • Configurations/FeatureDefines.xcconfig:
  • Configurations/WebKitTargetConditionals.xcconfig:

Source/ThirdParty/libwebrtc:

Add conditionals for iOS 11.

  • Configurations/WebKitTargetConditionals.xcconfig:

Source/WebCore:

Add feature conditionals for iOS 11.
Properly make Web GPU available on iOS 11+.

  • Configurations/FeatureDefines.xcconfig:
  • Configurations/WebKitTargetConditionals.xcconfig:

Source/WebCore/PAL:

Add feature conditionals for iOS 11.
Properly make Web GPU available on iOS 11+.

  • Configurations/FeatureDefines.xcconfig:
  • Configurations/WebKitTargetConditionals.xcconfig:

Source/WebKit:

Add feature conditionals for iOS 11.
Properly make Web GPU available on iOS 11+.

  • Configurations/FeatureDefines.xcconfig:
  • Configurations/WebKitTargetConditionals.xcconfig:

Source/WebKitLegacy/mac:

Add feature conditionals for iOS 11.
Properly make Web GPU available on iOS 11+.

  • Configurations/FeatureDefines.xcconfig:
  • Configurations/WebKitTargetConditionals.xcconfig:

Tools:

Properly make Web GPU available on iOS 11+.

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
3:01 PM Changeset in webkit [244049] by ysuzuki@apple.com
  • 1 edit
    1 add in trunk/JSTests

[JSC] Add more tests for r243966
https://bugs.webkit.org/show_bug.cgi?id=196711

Reviewed by Saam Barati.

Adding one more test for r243966 fix. The added test will not crash after r243966.

  • stress/stress-cleared-calllinkinfo.js: Added.

(runNearStackLimit.t):
(runNearStackLimit):
(repeat):
(cls):
(let.item.of.array.runNearStackLimit):

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

Fix selector name after r243834
https://bugs.webkit.org/show_bug.cgi?id=196549

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
I forgot the colon in the setter's name.

2:41 PM Changeset in webkit [244047] by Shawn Roberts
  • 2 edits in trunk/LayoutTests

fast/parser/xml-error-adopted.xml is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=186581

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations:
2:31 PM Changeset in webkit [244046] by timothy@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed build fix for iOSMac after r243893.
https://bugs.webkit.org/show_bug.cgi?id=196707

  • dom/Element.cpp:

(WebCore::parentCrossingFrameBoundaries): Remove ENABLE(POINTER_EVENTS) since computedTouchActions()
no longer uses parentCrossingFrameBoundaries().

2:29 PM Changeset in webkit [244045] by Shawn Roberts
  • 2 edits in trunk/LayoutTests

Fixed a typo on a test expectation
https://bugs.webkit.org/show_bug.cgi?id=187391

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations: Updating test expectations
1:57 PM Changeset in webkit [244044] by Ross Kirsling
  • 2 edits in trunk/Source/JavaScriptCore

-f[no-]var-tracking-assignments is GCC-only
https://bugs.webkit.org/show_bug.cgi?id=196699

Reviewed by Don Olmstead.

  • CMakeLists.txt:

Just remove the build flag altogether -- it supposedly doesn't solve the problem it was meant to
and said problem evidently no longer occurs as of GCC 9.

1:51 PM Changeset in webkit [244043] by youenn@apple.com
  • 5 edits in trunk/Source/WebCore

Lazily construct Navigator serviceWorker
https://bugs.webkit.org/show_bug.cgi?id=196692

Reviewed by Chris Dumez.

Make NavigatorBase a ContextDestructionObserver.
This allows to get the navigator script execution context.
Use it when creating the navigator ServiceWorkerContainer object.
For GC, introduce serviceWorkerIfAny which returns the container if created.
No JS observable change of behavior.
Covered by existing tests.

  • bindings/js/JSNavigatorCustom.cpp:

(WebCore::JSNavigator::visitAdditionalChildren):

  • bindings/js/JSWorkerNavigatorCustom.cpp:

(WebCore::JSWorkerNavigator::visitAdditionalChildren):

  • page/NavigatorBase.cpp:

(WebCore::NavigatorBase::NavigatorBase):
(WebCore::NavigatorBase::serviceWorkerIfAny):
(WebCore::NavigatorBase::serviceWorker):

  • page/NavigatorBase.h:
1:50 PM Changeset in webkit [244042] by Antti Koivisto
  • 3 edits in trunk/Source/WebKit

Compute touch actions for touch point from remote layer tree regions
https://bugs.webkit.org/show_bug.cgi?id=196701

Reviewed by Simon Fraser.

Add a function for finding the right layer and getting the touch actions in UI process side.

The code is not used yet.

  • UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.h:
  • UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:

(WebKit::touchActionsForPoint):

Use the same code as overlap hit testing for collecting the candidate layers for the touch point,
taking event regions into account.
Return the touch actions from the deepest event sensitive layer hit.

(-[UIView _web_findDescendantViewAtPoint:withEvent:]):

Modernize.

1:48 PM Changeset in webkit [244041] by Shawn Roberts
  • 2 edits in trunk/LayoutTests

inspector/canvas/css-canvas-clients.html is a constant timeout/failure
https://bugs.webkit.org/show_bug.cgi?id=174272

Unreviewed test gardening.

  • platform/mac/TestExpectations: Updating test expectations to skip test
1:46 PM Changeset in webkit [244040] by sbarati@apple.com
  • 4 edits
    1 add in trunk

WebAssembly.RuntimeError missing exception check
https://bugs.webkit.org/show_bug.cgi?id=196700
<rdar://problem/49693932>

Reviewed by Yusuke Suzuki.

JSTests:

  • wasm/js-api/runtime-error-should-exception-check.js: Added.

Source/JavaScriptCore:

  • wasm/js/JSWebAssemblyRuntimeError.h:
  • wasm/js/WebAssemblyRuntimeErrorConstructor.cpp:

(JSC::constructJSWebAssemblyRuntimeError):

1:46 PM Changeset in webkit [244039] by Devin Rousso
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION: Audit: default audits aren't added when an existing audit is present
https://bugs.webkit.org/show_bug.cgi?id=196663
<rdar://problem/49660757>

Reviewed by Timothy Hatcher.

Rather than have a button that allows the user to re-add the default audits, prevent them
from being deletable in the first place. "Deleting" a default audit will instead mark it as
disabled (and beep if it is already disabled).

  • UserInterface/Controllers/AuditManager.js:

(WI.AuditManager.prototype.loadStoredTests):
(WI.AuditManager.prototype.removeTest):
(WI.AuditManager.prototype._addDefaultTests): Added.
(WI.AuditManager.prototype.addDefaultTestsIfNeeded): Deleted.

  • UserInterface/Views/AuditNavigationSidebarPanel.js:

(WI.AuditNavigationSidebarPanel.prototype._addTest):
(WI.AuditNavigationSidebarPanel.prototype._updateStartStopButtonNavigationItemState):
(WI.AuditNavigationSidebarPanel.prototype._updateNoAuditsPlaceholder):
(WI.AuditNavigationSidebarPanel.prototype._handleAuditTestRemoved):

  • UserInterface/Views/AuditNavigationSidebarPanel.css:

(.sidebar > .panel.navigation.audit.has-results > .content > .message-text-view.no-enabled-audits): Added.
(.sidebar > .panel.navigation.audit.has-results:not(.has-tests) > .content > .message-text-view): Deleted.
(.sidebar > .panel.navigation.audit.has-results:not(.has-tests) > .content > .message-text-view > .message): Deleted.
(.sidebar > .panel.navigation.audit.has-results:not(.has-tests) > .content > .message-text-view > button): Deleted.

  • Localizations/en.lproj/localizedStrings.js:
1:43 PM Changeset in webkit [244038] by ysuzuki@apple.com
  • 10 edits
    2 adds in trunk

Unreviewed, rolling in r243948 with test fix
https://bugs.webkit.org/show_bug.cgi?id=196486

JSTests:

  • stress/arrow-function-and-use-strict-directive.js: Added.
  • stress/arrow-function-syntax.js: Added.

(checkSyntax):
(checkSyntaxError):

Source/JavaScriptCore:

  • parser/ASTBuilder.h:

(JSC::ASTBuilder::createString):

  • parser/Lexer.cpp:

(JSC::Lexer<T>::parseMultilineComment):
(JSC::Lexer<T>::lexWithoutClearingLineTerminator):
(JSC::Lexer<T>::lex): Deleted.

  • parser/Lexer.h:

(JSC::Lexer::hasLineTerminatorBeforeToken const):
(JSC::Lexer::setHasLineTerminatorBeforeToken):
(JSC::Lexer<T>::lex):
(JSC::Lexer::prevTerminator const): Deleted.
(JSC::Lexer::setTerminator): Deleted.

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::allowAutomaticSemicolon):
(JSC::Parser<LexerType>::parseSingleFunction):
(JSC::Parser<LexerType>::parseStatementListItem):
(JSC::Parser<LexerType>::maybeParseAsyncFunctionDeclarationStatement):
(JSC::Parser<LexerType>::parseFunctionInfo):
(JSC::Parser<LexerType>::parseClass):
(JSC::Parser<LexerType>::parseExportDeclaration):
(JSC::Parser<LexerType>::parseAssignmentExpression):
(JSC::Parser<LexerType>::parseYieldExpression):
(JSC::Parser<LexerType>::parseProperty):
(JSC::Parser<LexerType>::parsePrimaryExpression):
(JSC::Parser<LexerType>::parseMemberExpression):

  • parser/Parser.h:

(JSC::Parser::nextWithoutClearingLineTerminator):
(JSC::Parser::lexCurrentTokenAgainUnderCurrentContext):
(JSC::Parser::internalSaveLexerState):
(JSC::Parser::restoreLexerState):

LayoutTests:

The test relied on the wrong EOF token's offset. This patch also fixes the test.

  • inspector/runtime/parse-expected.txt:
  • inspector/runtime/parse.html:
1:32 PM Changeset in webkit [244037] by Antti Koivisto
  • 6 edits
    2 adds in trunk

Update touch-action region on property changes
https://bugs.webkit.org/show_bug.cgi?id=196608

Reviewed by Simon Fraser.

Source/WebCore:

Test: pointerevents/ios/touch-action-region-dynamic.html

  • rendering/EventRegion.cpp:

(WebCore::EventRegion::touchActionsForPoint const):

Correctly return 'auto' when nothing is found from the regions (this code is not used yet).

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::styleWillChange):

React to 'touch-action' property changes, similarly to 'pointer-events'.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::invalidateEventRegion):

Test if need to invalidate.

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::setContentsNeedDisplay):
(WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):

Call invalidateEventRegion explicitly instead of relying on compositing update. This ensures
that we update the top level event region correctly when we have touch-actions.

LayoutTests:

  • pointerevents/ios/touch-action-region-dynamic-expected.txt: Added.
  • pointerevents/ios/touch-action-region-dynamic.html: Added.
1:31 PM Changeset in webkit [244036] by jfernandez@igalia.com
  • 20 edits
    6 adds in trunk

Implement white-space:break-spaces value
https://bugs.webkit.org/show_bug.cgi?id=177327

Reviewed by Myles Maxfield and Zalan Bujtas.

LayoutTests/imported/w3c:

Imoprted a few aditional tests from the CSS Text WPT suite that are relevant for this change.

  • web-platform-tests/css/css-text/overflow-wrap/overflow-wrap-break-word-008-expected.html: Added.
  • web-platform-tests/css/css-text/overflow-wrap/overflow-wrap-break-word-008.html: Added.
  • web-platform-tests/css/css-text/overflow-wrap/w3c-import.log:
  • web-platform-tests/css/css-text/parsing/white-space-valid-expected.txt:
  • web-platform-tests/css/css-text/white-space/break-spaces-003-expected.html: Added.
  • web-platform-tests/css/css-text/white-space/break-spaces-003.html: Added.
  • web-platform-tests/css/css-text/white-space/break-spaces-009-expected.html: Added.
  • web-platform-tests/css/css-text/white-space/break-spaces-009.html: Added.
  • web-platform-tests/css/css-text/white-space/w3c-import.log:

Source/WebCore:

Finally the CSS WG decided [1] to move back the 'break-spaces' value to
the 'white-space' property. This makes the parsing logic easier than
the previous approach of using the 'overflow-wrap' property.

This new value prevents the white-space sequence to collapse and gives
breaking opportunities after every preserved white-space.

https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces

Additionally, unlike 'pre-wrap', non-collapsible spaces or tabs at the
end of a line cannot be hung or visually collapsed, since we want them
to be preserved and broken.

[1] https://github.com/w3c/csswg-drafts/pull/2841

Tests: imported/w3c/web-platform-tests/css/css-text/overflow-wrap/overflow-wrap-break-word-008.html

imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-003.html
imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-009.html

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue): New mapping for CSSVaueBreakSpaces.
(WebCore::CSSPrimitiveValue::operator WhiteSpace const): New value BreakSpaces for the Whitespace enum.

  • css/CSSProperties.json: new 'break-spaces' value for the 'white-space' property.
  • css/CSSValueKeywords.in: new break-spaces keyword
  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):

  • rendering/SimpleLineLayout.cpp: The SimpleLineLayut codepath must handle properly the new behavior of preserved whitespaces.

(WebCore::SimpleLineLayout::LineState::hasTrailingWhitespace const): Require that m_trailingWhitespaceWidth being greater than zero.
(WebCore::SimpleLineLayout::LineState::hasWhitespaceFragments const): New function to detect former whitespae fragments that could be breaking opportunities.
(WebCore::SimpleLineLayout::removeTrailingWhitespace): The 'break-spaces' feature forbids to remove any trailing whitespace.
(WebCore::SimpleLineLayout::firstFragment): We have now leading whitespace sequences comming from the previous line.
(WebCore::SimpleLineLayout::createLineRuns): We should revert some breaking opportunities if others were formerly found in the line.

  • rendering/SimpleLineLayoutTextFragmentIterator.cpp:

(WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style): New style fields to determine whether the break-space feature is being used. Also split out the break-all and breal-all values.

  • rendering/SimpleLineLayoutTextFragmentIterator.h:
  • rendering/line/BreakingContext.h: Different codepath but similar changes to properly handle the new behavior of preserved whitespace.

(WebCore::BreakingContext::BreakingContext): New class field to determine whether there are some whitespace that may prevent the word ot be broken.
(WebCore::BreakingContext::handleText): New line-breaking logic to implement the break-spaces behavior.
(WebCore::BreakingContext::trailingSpacesHang): Cases where the preserved breakspaces should hand or overflow.

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::collapseWhiteSpace): With break-spaces collapsing whitespaces is not allowed.
(WebCore::RenderStyle::breakOnlyAfterWhiteSpace const): Add the WhiteSpace::BreakSpaces to this group.

  • rendering/style/RenderStyleConstants.h: A new constan added.

LayoutTests:

Removed many failure expectations of tests that pass now thanks to this change.

The overflow-wrap-break-word-003.html tests fails in mac and iOS platforms due to an issue related to
how we compute widths using 'ch' units and 'monospace' fonts. I filed bug #196169 to report the specific
case of this test (break-word+pre-wrap) but the root cause it's probably the bug #196353.

I have submitted a PR [1] to the Web Platform Tests to change several tests that failed only if the
monospace font is used, but pass with the Ahem font. Additionally, I've requested another PR [2] to
add new layout tests, with the same case than overflow-wrap-break-word-003.html but using the Ahem
font.

[1] https://github.com/web-platform-tests/wpt/pull/16137
[2] https://github.com/web-platform-tests/wpt/pull/16124

  • TestExpectations: Removed many Failure entries on tests that pass now thanks to this change.
  • platform/mac/TestExpectations: Added one Failure entry and filed the corresponding bug report.
1:24 PM Changeset in webkit [244035] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

Make HSTS list handling more robust against unexpected content
https://bugs.webkit.org/show_bug.cgi?id=196552
<rdar://problem/43403817>

Reviewed by Chris Dumez.

Crash logs indicate we sometimes encounter null key values during processing.
This patch adds some debug assertions to catch this in test environments, and
allows the code to skip the bad entries if encountered.

It also avoids calling CFDictionaryApplyFunction when the HSTS policies returned
by _CFNetworkCopyHSTSPolicies is nullptr, which is a possible return value.

  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::filterPreloadHSTSEntry):
(WebKit::NetworkProcess::getHostNamesWithHSTSCache):

1:22 PM Changeset in webkit [244034] by youenn@apple.com
  • 3 edits in trunk/Source/WebCore

LibWebRTCMediaEndpoint does not need to hop to the signaling thread to gather stats
https://bugs.webkit.org/show_bug.cgi?id=196697
<rdar://problem/47477113>

Reviewed by Eric Carlson.

It is not thread safe to use m_backend in another thread than the main thread.
It is not useful anymore to hop to the signaling thread to gather stats.
No change of behavior.

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::LibWebRTCMediaEndpoint::getStats):
(WebCore::LibWebRTCMediaEndpoint::gatherStatsForLogging):

12:31 PM Changeset in webkit [244033] by BJ Burg
  • 7 edits in trunk/Source/WebKit

Web Automation: clean up some WebAutomationSession methods to use modern async IPC
https://bugs.webkit.org/show_bug.cgi?id=196168

Reviewed by Devin Rousso.

Modern WebKit IPC is capable of providing completion handlers and can track callback IDs.
So, most messages between WebAutomationSession and its proxy can use this facility and stop
keeping track of callback IDs manually. This makes most code easier to read on both the
sender and receiver side.

There are two cases that could not be converted:

  • For evaluateJavaScript, we cannot use async IPC because WebAutomationSession expects to

be able to cancel all pending replies when a page navigates away, the web process crashes,
or when handling an alert.

  • For takeScreenshot, there is not currently support in the modern async IPC code paths for

sending the result back. ShareableBitmap and friends lack a modern decoder implementation.

  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::resolveChildFrameHandle):
(WebKit::WebAutomationSession::resolveParentFrameHandle):
(WebKit::WebAutomationSession::computeElementLayout):
(WebKit::WebAutomationSession::selectOptionElement):
(WebKit::WebAutomationSession::getAllCookies):
(WebKit::WebAutomationSession::deleteSingleCookie):
(WebKit::WebAutomationSession::viewportInViewCenterPointOfElement):
(WebKit::WebAutomationSession::didResolveChildFrame): Deleted.
(WebKit::WebAutomationSession::didResolveParentFrame): Deleted.
(WebKit::WebAutomationSession::didComputeElementLayout): Deleted.
(WebKit::WebAutomationSession::didSelectOptionElement): Deleted.
(WebKit::WebAutomationSession::didGetCookiesForFrame): Deleted.
(WebKit::WebAutomationSession::didDeleteCookie): Deleted.

  • UIProcess/Automation/WebAutomationSession.h:
  • UIProcess/Automation/WebAutomationSession.messages.in:
  • WebProcess/Automation/WebAutomationSessionProxy.cpp:

(WebKit::WebAutomationSessionProxy::resolveChildFrameWithOrdinal):
(WebKit::WebAutomationSessionProxy::resolveChildFrameWithNodeHandle):
(WebKit::WebAutomationSessionProxy::resolveChildFrameWithName):
(WebKit::WebAutomationSessionProxy::resolveParentFrame):
(WebKit::WebAutomationSessionProxy::computeElementLayout):
(WebKit::WebAutomationSessionProxy::selectOptionElement):
(WebKit::WebAutomationSessionProxy::getCookiesForFrame):
(WebKit::WebAutomationSessionProxy::deleteCookie):

  • WebProcess/Automation/WebAutomationSessionProxy.h:
  • WebProcess/Automation/WebAutomationSessionProxy.messages.in:
11:50 AM Changeset in webkit [244032] by graouts@webkit.org
  • 2 edits in trunk/Source/WebCore

[ Mac WK2 iOS Debug ] REGRESSION(r233667) Layout Test imported/w3c/web-platform-tests/web-animations/interfaces/DocumentTimeline/constructor.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=195233
<rdar://problem/48527231>

Reviewed by Dean Jackson.

We need to create the "main" document timeline (document.timeline) if it doesn't already exist and use its current time as a basis for any other DocumentTimeline instance.

  • animation/DocumentTimeline.cpp:

(WebCore::DocumentTimeline::currentTime):

11:49 AM Changeset in webkit [244031] by graouts@webkit.org
  • 5 edits
    2 adds in trunk

[Web Animations] JS wrapper may be deleted while animation is yet to dispatch its finish event
https://bugs.webkit.org/show_bug.cgi?id=196118
<rdar://problem/46614137>

Reviewed by Chris Dumez.

Source/WebCore:

Test: webanimations/js-wrapper-kept-alive.html

We need to teach WebAnimation to keep its JS wrapper alive if it's relevant or could become relevant again by virtue of having a timeline.
We also need to ensure that the new implementation of hasPendingActivity() does not interfere with the ability of pages to enter the page
cache when running animations.

  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::canSuspendForDocumentSuspension const):
(WebCore::WebAnimation::stop):
(WebCore::WebAnimation::hasPendingActivity const):

  • animation/WebAnimation.h:

LayoutTests:

Add a test that starts a short animation, sets a custom property on it, registers a "finish" event listener on it and deletes
the sole reference to it in the JS world before triggering garbage collection. Prior to this fix, this test would time out
because the JS wrapper would be garbage-collected prior to the animation completing and thus the event listener would not
be called. To complete successfully, this test checks that it receives the event and its target is the same animation object
that was originally created by checking the custom property is still set.

We also make sure that a test, which was found to have regressed with a previous version of this patch, uses the animation
engine that it is expected to be testing.

  • legacy-animation-engine/animations/resume-after-page-cache.html:
  • webanimations/js-wrapper-kept-alive-expected.txt: Added.
  • webanimations/js-wrapper-kept-alive.html: Added.
11:45 AM Changeset in webkit [244030] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

REGRESSION(236463) DownloadManager can call a null CompletionHandler
https://bugs.webkit.org/show_bug.cgi?id=196414
<rdar://problem/48389434>

Reviewed by Geoff Garen.

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::convertToDownload):
DownloadManager::continueDecidePendingDownloadDestination is being called when there is no completion handler.
r236463 introduced an unchecked code path that can allow this to happen.

11:09 AM Changeset in webkit [244029] by commit-queue@webkit.org
  • 4 edits
    3 adds in trunk

AX: <svg> elements with labels and no accessible contents are exposed as empty AXGroups
https://bugs.webkit.org/show_bug.cgi?id=156774

Patch by Eric Liang <ericliang@apple.com> on 2019-04-08
Reviewed by Chris Fleizach.

Source/WebCore:

Labelled SVGs without accessible descendants are exposed as AXImage rather than groups.

Unlabelled equivalents are not exposed. Otherwise, SVGs with accessible descendants are exposed as AXGroup.
Also added back functionalities from last patch of determining whether a SVG element should be ignored.

Test: accessibility/svg-shape-labelled.html

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::updateRoleAfterChildrenCreation):

  • accessibility/AccessibilitySVGElement.cpp:

(WebCore::AccessibilitySVGElement::computeAccessibilityIsIgnored const):

LayoutTests:

Added tests that verify svgs shapes that are labelled are exposed as images.

  • accessibility/resources/apple-logo.svg: Added.
  • accessibility/svg-shape-labelled-expected.txt: Added.
  • accessibility/svg-shape-labelled.html: Added.
11:01 AM Changeset in webkit [244028] by Ryan Haddad
  • 7 edits
    2 deletes in trunk

Unreviewed, rolling out r243948.

Caused inspector/runtime/parse.html to fail

Reverted changeset:

"SIGSEGV in JSC::BytecodeGenerator::addStringConstant"
https://bugs.webkit.org/show_bug.cgi?id=196486
https://trac.webkit.org/changeset/243948

10:29 AM Changeset in webkit [244027] by youenn@apple.com
  • 5 edits in trunk/Source/WebCore

Make sure UniqueIDBDatabaseConnection unregisters itself even if its database is gone
https://bugs.webkit.org/show_bug.cgi?id=196651

Reviewed by Brady Eidson.

In UniqueIDBDatabase methods, many operations are refing the transaction
so that it stays alive until a quota check decision is made.
This extends the lifetime of the transaction which may be lasting
longer than its database that may be cleared without waiting for the quota check decisions.

We therefore need to make sure that the transaction is cleaning itself correctly at destruction time.

Make sure that the transaction is unregistering itself from its IDBServer.
To do so, the transaction keeps a weak ref to the IDBServer.

This is timing sensitive hence difficult to test.

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

(WebCore::IDBServer::UniqueIDBDatabaseConnection::didAbortTransaction):
Like done below for UniqueIDBDatabaseConnection::didCommitTransaction,
add a check to ensure that either the database is we are in an error case.

  • Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:

(WebCore::IDBServer::UniqueIDBDatabaseTransaction::UniqueIDBDatabaseTransaction):
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::~UniqueIDBDatabaseTransaction):

  • Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
10:29 AM Changeset in webkit [244026] by Shawn Roberts
  • 2 edits in trunk/LayoutTests

Layout tests imported/w3c/IndexedDB-private-browsing/idbobjectstore_createIndex7-event_order.html
imported/w3c/IndexedDB-private-browsing/idbobjectstore_createIndex6-event_order.html are flaky failures
https://bugs.webkit.org/show_bug.cgi?id=195961

Unreviewed test gardening

  • platform/mac-wk2/TestExpectations: Updating test expectations for Debug flaky failure
10:27 AM Changeset in webkit [244025] by chris.reid@sony.com
  • 2 edits in trunk/Source/WebCore

Undefined Behavior: m_experimentalImageMenuEnabled isn't initialized in HTMLImageElement when SERVICE_CONTROLS is disabled
https://bugs.webkit.org/show_bug.cgi?id=196664

Reviewed by Ross Kirsling.

No observable change in behavior.

Initialize m_experimentalImageMenuEnabled regardless of ENABLE(SERVICE_CONTROLS)

  • html/HTMLImageElement.cpp:
10:09 AM Changeset in webkit [244024] by bshafiei@apple.com
  • 3 edits
    1 add in tags/Safari-608.1.15

Cherry-pick r243967. rdar://problem/49589308

REGRESSION (r243642): Crash in reddit.com page
https://bugs.webkit.org/show_bug.cgi?id=196684

Reviewed by Geoffrey Garen.

JSTests:

New regression test.

  • stress/regexp-nongreedy-charclass-backtracks.js: Added.

Source/JavaScriptCore:

In r243642, the code that saves and restores the count for non-greedy character classes
was inadvertently put inside an if statement. This code should be generated for all
non-greedy character classes.

  • yarr/YarrJIT.cpp: (JSC::Yarr::YarrGenerator::generateCharacterClassNonGreedy): (JSC::Yarr::YarrGenerator::backtrackCharacterClassNonGreedy):

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

10:09 AM Changeset in webkit [244023] by bshafiei@apple.com
  • 5 edits in tags/Safari-608.1.15

Cherry-pick r243839. rdar://problem/49589308

REGRESSION (r243642): com.apple.JavaScriptCore crash in JSC::RegExpObject::execInline
https://bugs.webkit.org/show_bug.cgi?id=196477

Reviewed by Keith Miller.

Source/JavaScriptCore:

The problem here is that when we advance the index by 2 for a character class that only
has non-BMP characters, we might go past the end of the string. This can happen for
greedy counted character classes that are part of a alternative where there is one
character to match after the greedy non-BMP character class.

The "do we have string left to match" check at the top of the JIT loop for the counted
character class checks to see if index is not equal to the string length. For non-BMP
character classes, we need to check to see if there are at least 2 characters left.
Therefore we now temporarily add 1 to the current index before comparing. This checks
to see if there are iat least 2 characters left to match, instead of 1.

  • yarr/YarrJIT.cpp: (JSC::Yarr::YarrGenerator::generateCharacterClassGreedy): (JSC::Yarr::YarrGenerator::backtrackCharacterClassNonGreedy):

LayoutTests:

Updated the test with a couple more test cases to test a few variants of this bug.
Also added a couple of non-greedy counted non-BMP character class tests that don't have
the bug just to be sure.

  • js/regexp-unicode-expected.txt:
  • js/script-tests/regexp-unicode.js:

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

10:09 AM Changeset in webkit [244022] by bshafiei@apple.com
  • 9 edits in tags/Safari-608.1.15/Source/JavaScriptCore

Cherry-pick r243642. rdar://problem/49589308

[YARR] Precompute BMP / non-BMP status when constructing character classes
https://bugs.webkit.org/show_bug.cgi?id=196296

Reviewed by Keith Miller.

Changed CharacterClass::m_hasNonBMPCharacters into a character width bit field which
indicateis if the class includes characters from either BMP, non-BMP or both ranges.
This allows the recognizing code to eliminate checks for the width of a matched
characters when the class has only one width. The character width is needed to
determine if we advance 1 or 2 character. Also, the pre-computed width of character
classes that contains either all BMP or all non-BMP characters allows the parser to
use fixed widths for terms using those character classes. Changed both the code gen
scripts and Yarr compiler to compute this bit field during the construction of
character classes.

For JIT'ed code of character classes that contain either all BMP or all non-BMP
characters, we can eliminate the generic check we were doing do compute how much
to advance after sucessfully matching a character in the class.

Generic isBMP check BMP only non-BMP only
-------------- -------------- --------------
inc %r9d inc %r9d add $0x2, %r9d
cmp $0x10000, %eax
jl isBMP
cmp %edx, %esi
jz atEndOfString
inc %r9d
inc %esi

isBMP:

For character classes that contained non-BMP characters, we were always generating
the code in the left column. The middle column is the code we generate for character
classes that contain only BMP characters. The right column is the code we now
generate if the character class has only non-BMP characters. In the fix width cases,
we can eliminate both the isBMP check as well as the atEndOfString check. The
atEndOfstring check is eliminated since we know how many characters this character
class requires and that check can be factored out to the beginning of the current
alternative. For character classes that contain both BMP and non-BMP characters,
we still generate the generic left column.

This change is a ~8% perf progression on UniPoker and a ~2% improvement on RexBench
as a whole.

  • runtime/RegExp.cpp: (JSC::RegExp::matchCompareWithInterpreter):
  • runtime/RegExpInlines.h: (JSC::RegExp::matchInline):
  • yarr/YarrInterpreter.cpp: (JSC::Yarr::Interpreter::checkCharacterClassDontAdvanceInputForNonBMP): (JSC::Yarr::Interpreter::matchCharacterClass):
  • yarr/YarrJIT.cpp: (JSC::Yarr::YarrGenerator::optimizeAlternative): (JSC::Yarr::YarrGenerator::matchCharacterClass): (JSC::Yarr::YarrGenerator::advanceIndexAfterCharacterClassTermMatch): (JSC::Yarr::YarrGenerator::tryReadUnicodeCharImpl): (JSC::Yarr::YarrGenerator::generateCharacterClassOnce): (JSC::Yarr::YarrGenerator::generateCharacterClassFixed): (JSC::Yarr::YarrGenerator::generateCharacterClassGreedy): (JSC::Yarr::YarrGenerator::backtrackCharacterClassGreedy): (JSC::Yarr::YarrGenerator::generateCharacterClassNonGreedy): (JSC::Yarr::YarrGenerator::backtrackCharacterClassNonGreedy): (JSC::Yarr::YarrGenerator::generateEnter): (JSC::Yarr::YarrGenerator::YarrGenerator): (JSC::Yarr::YarrGenerator::compile):
  • yarr/YarrPattern.cpp: (JSC::Yarr::CharacterClassConstructor::CharacterClassConstructor): (JSC::Yarr::CharacterClassConstructor::reset): (JSC::Yarr::CharacterClassConstructor::charClass): (JSC::Yarr::CharacterClassConstructor::addSorted): (JSC::Yarr::CharacterClassConstructor::addSortedRange): (JSC::Yarr::CharacterClassConstructor::hasNonBMPCharacters): (JSC::Yarr::CharacterClassConstructor::characterWidths): (JSC::Yarr::PatternTerm::dump): (JSC::Yarr::anycharCreate):
  • yarr/YarrPattern.h: (JSC::Yarr::operator|): (JSC::Yarr::operator&): (JSC::Yarr::operator|=): (JSC::Yarr::CharacterClass::CharacterClass): (JSC::Yarr::CharacterClass::hasNonBMPCharacters): (JSC::Yarr::CharacterClass::hasOneCharacterSize): (JSC::Yarr::CharacterClass::hasOnlyNonBMPCharacters): (JSC::Yarr::PatternTerm::invert const): (JSC::Yarr::PatternTerm::invert): Deleted.
  • yarr/create_regex_tables:
  • yarr/generateYarrUnicodePropertyTables.py:

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

9:32 AM Changeset in webkit [244021] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[ews-build] Do not upload archive when Compile Fails
https://bugs.webkit.org/show_bug.cgi?id=196674

Reviewed by Alexey Proskuryakov.

  • BuildSlaveSupport/ews-build/factories.py:

(BuildFactory.init): Remove steps which require dynamic decision about whether to run or not.

  • BuildSlaveSupport/ews-build/steps.py:

(CompileWebKit.evaluateCommand): Dynamically decide which steps to run based on compile status.
(CompileWebKitToT.evaluateCommand): Explicitly override Compile.evaluateCommand so that it
doesn't inherit CompileWebKit.evaluateCommand which dynamically adds more steps.

8:51 AM Changeset in webkit [244020] by Ryan Haddad
  • 7 edits in trunk

Unreviewed, rolling out r243943.

Caused test262 failures.

Reverted changeset:

"[JSC] Filter DontEnum properties in
ProxyObject::getOwnPropertyNames()"
https://bugs.webkit.org/show_bug.cgi?id=176810
https://trac.webkit.org/changeset/243943

7:45 AM Changeset in webkit [244019] by Claudio Saavedra
  • 11 edits in trunk/Source/JavaScriptCore

[JSC] Partially fix the build with unified builds disabled
https://bugs.webkit.org/show_bug.cgi?id=196647

Reviewed by Konstantin Tokarev.

If you disable unified builds you find all kind of build
errors. This partially tries to fix them but there's a lot
more.

  • API/JSBaseInternal.h:
  • b3/air/AirAllocateRegistersAndStackAndGenerateCode.cpp:
  • b3/air/AirHandleCalleeSaves.h:
  • bytecode/ExecutableToCodeBlockEdge.cpp:
  • bytecode/ExitFlag.h:
  • bytecode/ICStatusUtils.h:
  • bytecode/UnlinkedMetadataTable.h:
  • dfg/DFGPureValue.h:
  • heap/IsoAlignedMemoryAllocator.cpp:
  • heap/IsoAlignedMemoryAllocator.h:
5:41 AM WebKitGTK/2.24.x edited by Carlos Garcia Campos
(diff)
5:40 AM Changeset in webkit [244018] by Carlos Garcia Campos
  • 6 edits
    2 adds in releases/WebKitGTK/webkit-2.24

Merge r243828 - Documents can be destroyed before their CSSFontFaceSet is destroyed
https://bugs.webkit.org/show_bug.cgi?id=195830

Reviewed by Darin Adler.

Source/WebCore:

CSSFontFaceSet has a raw pointer to its owning document. JS can keep the CSSFontFaceSet alive (by using FontFaceSet)
and can destroy the document at any time. When the document is destroyed, the link between the two objects needs to
be severed.

Test: fast/text/font-face-set-destroy-document.html

  • css/CSSFontFace.cpp:

(WebCore::CSSFontFace::CSSFontFace):

  • css/CSSFontFace.h:
  • css/CSSFontFaceSet.cpp:

(WebCore::CSSFontFaceSet::CSSFontFaceSet):
(WebCore::CSSFontFaceSet::ensureLocalFontFacesForFamilyRegistered):

  • css/CSSFontFaceSet.h:
  • css/CSSFontSelector.cpp:

(WebCore::CSSFontSelector::CSSFontSelector):
(WebCore::CSSFontSelector::addFontFaceRule):

  • css/CSSFontSelector.h:
  • css/FontFace.cpp:

(WebCore::FontFace::FontFace):

LayoutTests:

  • fast/text/font-face-set-destroy-document-expected.html: Added.
  • fast/text/font-face-set-destroy-document.html: Added.
5:39 AM Changeset in webkit [244017] by Carlos Garcia Campos
  • 9 edits in releases/WebKitGTK/webkit-2.24/Source/WebCore

Merge r243820 - Crash in HTMLCanvasElement::createContext2d after the element got adopted to a new document
https://bugs.webkit.org/show_bug.cgi?id=196527

Reviewed by Antti Koivisto.

We need to update CanvasBase::m_scriptExecutionContext when HTMLCanvasElement moves from
one document to another. Fixed the bug by making CanvasBase::scriptExecutionContext make
a virtual function call instead of directly storing a raw pointer. In HTMLCanvasElement,
we use Node::scriptExecutionContext(). Use ContextDestructionObserver in CustomPaintCanvas
and OffscreenCanvas instead of a raw pointer.

Unfortunately, no new tests since there is no reproducible test case.

  • html/CanvasBase.cpp:

(WebCore::CanvasBase::CanvasBase):

  • html/CanvasBase.h:

(WebCore::CanvasBase::scriptExecutionContext const):

  • html/CustomPaintCanvas.cpp:

(WebCore::CustomPaintCanvas::CustomPaintCanvas):

  • html/CustomPaintCanvas.h:
  • html/HTMLCanvasElement.cpp:

(WebCore::HTMLCanvasElement::HTMLCanvasElement):

  • html/HTMLCanvasElement.h:
  • html/OffscreenCanvas.cpp:

(WebCore::OffscreenCanvas::OffscreenCanvas):

  • html/OffscreenCanvas.h:
5:39 AM Changeset in webkit [244016] by Carlos Garcia Campos
  • 7 edits
    2 adds in releases/WebKitGTK/webkit-2.24

BackwardsGraph needs to consider back edges as the backward's root successor
https://bugs.webkit.org/show_bug.cgi?id=195991

Reviewed by Filip Pizlo.

JSTests:

  • stress/map-b3-licm-infinite-loop.js: Added.

Source/JavaScriptCore:

  • b3/testb3.cpp:

(JSC::B3::testInfiniteLoopDoesntCauseBadHoisting):
(JSC::B3::run):

Source/WTF:

Previously, our backwards graph analysis was slightly wrong. The idea of
backwards graph is that the root of the graph has edges to terminals in
the original graph. And then the original directed edges in the graph are flipped.

However, we weren't considering loops as a form of terminality. For example,
we wouldn't consider an infinite loop as a terminal. So there were no edges
from the root to a node in the infinite loop. This lead us to make mistakes
when we used backwards dominators to compute control flow equivalence.

This is better understood in an example:

`
preheader:
while (1) {

if (!isCell(v))

continue;

load structure ID
if (cond)

continue;

return

}
`

In the previous version of this algorithm, the only edge from the backwards
root would be to the block containing the return. This would lead us to
believe that the loading of the structureID backwards dominates the preheader,
leading us to believe it's control flow equivalent to preheader. This is
obviously wrong, since we can loop forever if "v" isn't a cell.

The solution here is to treat any backedge in the graph as a "terminal" node.
Since a backedge implies the existence of a loop.

In the above example, the backwards root now has an edge to both blocks with
"continue". This prevents us from falsely claiming that the return is control
flow equivalent with the preheader.

This patch uses DFS spanning trees to compute back edges. An edge
u->v is a back edge when u is a descendent of v in the DFS spanning
tree of the Graph.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/BackwardsGraph.h:

(WTF::BackwardsGraph::BackwardsGraph):

  • wtf/SpanningTree.h: Added.

(SpanningTree::SpanningTree):
(SpanningTree::isDescendent):

5:39 AM Changeset in webkit [244015] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.24

Merge r243506 - vertexAttribPointer must restrict offset parameter
https://bugs.webkit.org/show_bug.cgi?id=196261
<rdar://problem/48458086>

Reviewed by Antoine Quint.

Source/WebCore:

This WebGL function should fail if the offset parameter is
not within [0, max 32-bit int].

Test: fast/canvas/webgl/vertexAttribPointer-with-bad-offset.html

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::vertexAttribPointer):

LayoutTests:

Add a test where the offset parameter is out of bounds.

  • fast/canvas/webgl/vertexAttribPointer-with-bad-offset-expected.txt: Added.
  • fast/canvas/webgl/vertexAttribPointer-with-bad-offset.html: Added.
5:39 AM Changeset in webkit [244014] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.24/Source/WebCore

Merge r243341 - Inband Text Track cues interspersed with Data cues can display out of order.
https://bugs.webkit.org/show_bug.cgi?id=196095

Reviewed by Eric Carlson.

The compareCueIntervalForDisplay() comparator depends on a virtual function, isPositionedAbove(TextTrackCue* other),
but this comparison returns inconsistent results for cueA->isPositionedAbove(cueB) and cueB->isPositionedAbove(cueA)
if the two cues are different subclasses of TextTrackCue.

The underlying algorithm should be fixed in a future patch, but for now, remove all non-displaying cues from the array
of activeCues before sorting, rather than after when iterating over the sorted list of activeCues.

  • html/shadow/MediaControlElements.cpp:

(WebCore::MediaControlTextTrackContainerElement::updateDisplay):

5:39 AM Changeset in webkit [244013] by Carlos Garcia Campos
  • 4 edits
    2 adds in releases/WebKitGTK/webkit-2.24

Merge r243331 - Do not insert the first-letter anonymous container until after we've constructed the first-letter renderer.
https://bugs.webkit.org/show_bug.cgi?id=195919
<rdar://problem/48573434>

Reviewed by Brent Fulgham.

Source/WebCore:

When the container is injected too early, we might end up removing it as part of the collapsing logic
while the text renderer is being removed (replaced with the first letter + remaining text).

Test: fast/css/first-letter-and-float-crash.html

  • rendering/updating/RenderTreeBuilderFirstLetter.cpp:

(WebCore::RenderTreeBuilder::FirstLetter::createRenderers):

LayoutTests:

  • fast/css/first-letter-and-float-crash-expected.txt: Added.
  • fast/css/first-letter-and-float-crash.html: Added.
  • platform/mac/TestExpectations:
5:39 AM Changeset in webkit [244012] by Carlos Garcia Campos
  • 7 edits
    2 adds in releases/WebKitGTK/webkit-2.24

Merge r243233 - appendChild should throw when inserting an ancestor of a template into its content adopted to another document
https://bugs.webkit.org/show_bug.cgi?id=195984

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaselined the test that is not fully passing.

  • web-platform-tests/html/semantics/scripting-1/the-template-element/template-element/template-content-hierarcy-expected.txt:

Source/WebCore:

The WPT test caught a bug that appendChild and other DOM insertion functions were incorrectly assuming that
any node that's in a HTML template element has the current document's template document as its owner.
The assumption is wrong when the template element's content DocumentFragment is adopted to another document.

Fixed the bug by always checking the ancestor host elements in checkAcceptChild. Also

Test: fast/dom/insert-template-parent-into-adopted-content.html

  • dom/ContainerNode.cpp:

(WebCore::isInTemplateContent): Deleted. This code is simply wrong.
(WebCore::containsConsideringHostElements): Deleted. Call sites are updated to use containsIncludingHostElements.
(WebCore::containsIncludingHostElements): Moved from Node.cpp and optimized this code a bit. It's more efficient
to get the parent node and check for ShadowRoot and DocumentFragment only when the parent is null than to check
for those two node types before getting the parent node.
(WebCore::checkAcceptChild): Merged two code paths to call containsIncludingHostElements. The early return for
a pseudo element is there only to prevent tree corruption in release build even in the presence of a major bug
so it shouldn't be an spec compliance issue.

  • dom/Node.cpp:

(WebCore::Node::containsIncludingHostElements const): Deleted.

  • dom/Node.h:

LayoutTests:

Added a regression test.

  • fast/dom/insert-template-parent-into-adopted-content-expected.txt: Added.
  • fast/dom/insert-template-parent-into-adopted-content.html: Added.
5:39 AM Changeset in webkit [244011] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.24/Source/WebKit

Merge r243291 - Fix possible memory leak when dismissing a color picker
https://bugs.webkit.org/show_bug.cgi?id=196026
<rdar://problem/48778568>

Reviewed by Wenson Hsieh.

Fix a problem with WebPageProxy::endColorPicker where an early return could leave a color picker
with a +1 reference count after dismissing it.

  • UIProcess/WebColorPicker.cpp:

(WebKit::WebColorPicker::endPicker):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::endColorPicker):
(WebKit::WebPageProxy::didEndColorPicker):

5:39 AM Changeset in webkit [244010] by Carlos Garcia Campos
  • 8 edits
    1 add in releases/WebKitGTK/webkit-2.24

Merge r243280 - Cap length of an array with spread to MIN_ARRAY_STORAGE_CONSTRUCTION_LENGTH.
https://bugs.webkit.org/show_bug.cgi?id=196055
<rdar://problem/49067448>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/new_array_with_spread-should-cap-array-size-to-MIN_ARRAY_STORAGE_CONSTRUCTION_LENGTH.js: Added.

Source/JavaScriptCore:

We are doing this because:

  1. We expect the array to be densely packed.
  2. SpeculativeJIT::compileAllocateNewArrayWithSize() (and the FTL equivalent) expects the array length to be less than MIN_ARRAY_STORAGE_CONSTRUCTION_LENGTH if we don't want to use an ArrayStorage shape.
  3. There's no reason why an array with spread needs to be that large anyway. MIN_ARRAY_STORAGE_CONSTRUCTION_LENGTH is plenty.

In this patch, we also add a debug assert in compileAllocateNewArrayWithSize() and
emitAllocateButterfly() to check for overflows.

  • assembler/AbortReason.h:
  • dfg/DFGOperations.cpp:
  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileCreateRest):
(JSC::DFG::SpeculativeJIT::compileNewArrayWithSpread):
(JSC::DFG::SpeculativeJIT::emitAllocateButterfly):
(JSC::DFG::SpeculativeJIT::compileAllocateNewArrayWithSize):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNewArrayWithSpread):

  • runtime/ArrayConventions.h:
  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

5:39 AM Changeset in webkit [244009] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.24/LayoutTests

Merge r243182 - Rebaseline the test after r243175. It got somehow landed with failing expectations.

  • fast/dom/replace-child-with-mutation-event-removal-and-circular-template-insertion-expected.txt:
5:39 AM Changeset in webkit [244008] by Carlos Garcia Campos
  • 3 edits
    18 adds in releases/WebKitGTK/webkit-2.24

Merge r243175 - Reparenting during a mutation event inside appendChild could result in a circular DOM tree
https://bugs.webkit.org/show_bug.cgi?id=192825

Reviewed by Zalan Bujtas.

Source/WebCore:

The bug was caused by appendChildWithoutPreInsertionValidityCheck, insertBefore and replaceChild
checking the circular dependency against newChild instead of targets even though when newChild
is a document fragment, appendChildWithoutPreInsertionValidityCheck inserts the children of
the document fragment. Fixed the bug by checking the circular dependency against each target child.

Also fixed the bug that checkAcceptChildGuaranteedNodeTypes was not considering shadow inclusive
ancestors or template host elements.

Tests: fast/dom/append-child-with-mutation-event-removal-and-circular-insertion.html

fast/dom/append-child-with-mutation-event-removal-and-circular-shadow-insertion.html
fast/dom/append-child-with-mutation-event-removal-and-circular-template-insertion.html
fast/dom/insert-child-with-mutation-event-removal-and-circular-insertion.html
fast/dom/insert-child-with-mutation-event-removal-and-circular-shadow-insertion.html
fast/dom/insert-child-with-mutation-event-removal-and-circular-template-insertion.html
fast/dom/replace-child-with-mutation-event-removal-and-circular-insertion.html
fast/dom/replace-child-with-mutation-event-removal-and-circular-shadow-insertion.html
fast/dom/replace-child-with-mutation-event-removal-and-circular-template-insertion.html

  • dom/ContainerNode.cpp:

(WebCore::checkAcceptChildGuaranteedNodeTypes):
(WebCore::ContainerNode::insertBefore):
(WebCore::ContainerNode::replaceChild):
(WebCore::ContainerNode::appendChildWithoutPreInsertionValidityCheck):

LayoutTests:

Added regression tests.

  • fast/dom/append-child-with-mutation-event-removal-and-circular-insertion-expected.txt: Added.
  • fast/dom/append-child-with-mutation-event-removal-and-circular-insertion.html: Added.
  • fast/dom/append-child-with-mutation-event-removal-and-circular-shadow-insertion-expected.txt: Added.
  • fast/dom/append-child-with-mutation-event-removal-and-circular-shadow-insertion.html: Added.
  • fast/dom/append-child-with-mutation-event-removal-and-circular-template-insertion-expected.txt: Added.
  • fast/dom/append-child-with-mutation-event-removal-and-circular-template-insertion.html: Added.
  • fast/dom/insert-child-with-mutation-event-removal-and-circular-insertion-expected.txt: Added.
  • fast/dom/insert-child-with-mutation-event-removal-and-circular-insertion.html: Added.
  • fast/dom/insert-child-with-mutation-event-removal-and-circular-shadow-insertion-expected.txt: Added.
  • fast/dom/insert-child-with-mutation-event-removal-and-circular-shadow-insertion.html: Added.
  • fast/dom/insert-child-with-mutation-event-removal-and-circular-template-insertion-expected.txt: Added.
  • fast/dom/insert-child-with-mutation-event-removal-and-circular-template-insertion.html: Added.
  • fast/dom/replace-child-with-mutation-event-removal-and-circular-insertion-expected.txt: Added.
  • fast/dom/replace-child-with-mutation-event-removal-and-circular-insertion.html: Added.
  • fast/dom/replace-child-with-mutation-event-removal-and-circular-shadow-insertion-expected.txt: Added.
  • fast/dom/replace-child-with-mutation-event-removal-and-circular-shadow-insertion.html: Added.
  • fast/dom/replace-child-with-mutation-event-removal-and-circular-template-insertion-expected.txt: Added.
  • fast/dom/replace-child-with-mutation-event-removal-and-circular-template-insertion.html: Added.
5:39 AM Changeset in webkit [244007] by Carlos Garcia Campos
  • 3 edits
    1 add in releases/WebKitGTK/webkit-2.24

Merge r243069 - Structure::flattenDictionary() should clear unused property slots.
https://bugs.webkit.org/show_bug.cgi?id=195871
<rdar://problem/48959497>

Reviewed by Michael Saboff.

JSTests:

  • stress/structure-flattenDictionary-should-clear-unused-property-slots.js: Added.

Source/JavaScriptCore:

It currently attempts to do this but fails because it's actually clearing up the
preCapacity region instead. The fix is simply to account for the preCapacity
when computing the start address of the property slots.

  • runtime/Structure.cpp:

(JSC::Structure::flattenDictionaryStructure):

5:39 AM Changeset in webkit [244006] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.24/Source/WebCore

Merge r242964 - Storing a Node in Ref/RefPtr inside its destructor results in double delete
https://bugs.webkit.org/show_bug.cgi?id=195661

Reviewed by Brent Fulgham.

Set Node::m_refCount to 1 before calling its virtual destructor.

This is a security mitigation to prevent any code which ends up storing the node to Ref / RefPtr
inside the destructor, which is a programming error caught by debug assertions, from triggering
a double-delete on the same Node.

Such a code would hit the debug assertions in Node::deref() because m_inRemovedLastRefFunction
had been set to true by then.

  • dom/Document.cpp:

(WebCore::Document::removedLastRef):

  • dom/Document.h:

(WebCore::Document::decrementReferencingNodeCount):

  • dom/Node.cpp:

(WebCore::Node::~Node):
(WebCore::Node::removedLastRef):

5:38 AM Changeset in webkit [244005] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.24

Merge r242943 - Cleanup inline boxes when list marker gets blockified
https://bugs.webkit.org/show_bug.cgi?id=195746
<rdar://problem/48049175>

Reviewed by Antti Koivisto.

Source/WebCore:

Normally when an element gets blockified (inline -> block) we destroy its renderer and construct a new one (RenderInline -> RenderBlock).
During this process the associated inline boxtree gets destroyed as well. Since RenderListMarker is just a generic RenderBox, the blockifying
change does not require a new renderer.
This patch takes care of destroying the inline boxtree when the marker gains block display type.

Test: fast/block/float/list-marker-is-float-crash.html

  • rendering/RenderListMarker.cpp:

(WebCore::RenderListMarker::styleDidChange):

LayoutTests:

  • fast/block/float/list-marker-is-float-crash-expected.txt: Added.
  • fast/block/float/list-marker-is-float-crash.html: Added.
5:38 AM Changeset in webkit [244004] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.24/Source/WebCore

Merge r242921 - [WeakPtr] RenderListMarker::m_listItem should be a WeakPtr
https://bugs.webkit.org/show_bug.cgi?id=195704
<rdar://problem/48486278>

Reviewed by Simon Fraser.

  • rendering/RenderListMarker.cpp:

(WebCore::RenderListMarker::RenderListMarker):
(WebCore::RenderListMarker::paint):
(WebCore::RenderListMarker::layout):
(WebCore::RenderListMarker::updateContent):
(WebCore::RenderListMarker::computePreferredLogicalWidths):
(WebCore::RenderListMarker::lineHeight const):
(WebCore::RenderListMarker::baselinePosition const):
(WebCore::RenderListMarker::suffix const):
(WebCore::RenderListMarker::isInside const):
(WebCore::RenderListMarker::getRelativeMarkerRect):

  • rendering/RenderListMarker.h:
5:38 AM Changeset in webkit [244003] by Carlos Garcia Campos
  • 4 edits
    2 adds in releases/WebKitGTK/webkit-2.24

Merge r242919 - Use RenderBox::previousSiblingBox/nextSiblingBox in RenderMultiColumnFlow
https://bugs.webkit.org/show_bug.cgi?id=195701
<rdar://problem/48448658>

Reviewed by Simon Fraser.

Source/WebCore:

It's safer to use existing RenderBox functions to get sibling boxes.

Test: fast/ruby/crash-when-paginated-ruby.html

  • rendering/RenderMultiColumnFlow.cpp:

(WebCore::RenderMultiColumnFlow::nextColumnSetOrSpannerSiblingOf):
(WebCore::RenderMultiColumnFlow::previousColumnSetOrSpannerSiblingOf):

LayoutTests:

  • fast/ruby/crash-when-paginated-ruby-expected.txt: Added.
  • fast/ruby/crash-when-paginated-ruby.html: Added.
5:38 AM Changeset in webkit [244002] by Carlos Garcia Campos
  • 4 edits
    2 adds in releases/WebKitGTK/webkit-2.24

Merge r242917 - Fix an edge case where HTMLFormElement::removeFormElement is invoked twice with the same element
https://bugs.webkit.org/show_bug.cgi?id=195663
<rdar://problem/48576391>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Currently, it's possible for HTMLFormControlElement's destructor to be reentrant. This may happen if the form
control element is ref'd while carrying out its destructor's logic. This may happen in two places in
HTMLFormControlElement (didChangeForm and resetDefaultButton), both of which actually don't require ensuring a
protected reference to the form control element since they should never result in any script execution.

To fix the bug, convert these strong references into raw pointers, and add ScriptDisallowedScope to ensure that
we don't change these codepaths in the future, such that they trigger arbitrary script execution.

Test: fast/forms/remove-associated-element-after-gc.html

  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::didChangeForm):

  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::resetDefaultButton):

LayoutTests:

Add a layout test to exercise the scenario described in the WebCore ChangeLog.

  • fast/forms/remove-associated-element-after-gc-expected.txt: Added.
  • fast/forms/remove-associated-element-after-gc.html: Added.
5:38 AM Changeset in webkit [244001] by Carlos Garcia Campos
  • 5 edits
    1 add in releases/WebKitGTK/webkit-2.24

Merge r243989 - [CMake] Detect SSE2 at compile time
https://bugs.webkit.org/show_bug.cgi?id=196488

Patch by Xan Lopez <Xan Lopez> on 2019-04-08
Reviewed by Carlos Garcia Campos.

.:

  • CMakeLists.txt: Use FindSSE2.cmake to detect SSE2 support.
  • Source/cmake/FindSSE2.cmake: Added.

Source/JavaScriptCore:

  • assembler/MacroAssemblerX86Common.cpp: Remove unnecessary (and

incorrect) static_assert.

5:32 AM Changeset in webkit [244000] by guijemont@igalia.com
  • 6 edits in trunk

Enable DFG on MIPS
https://bugs.webkit.org/show_bug.cgi?id=196689

Reviewed by Žan Doberšek.

Since the bytecode change, we enabled the baseline JIT on mips in
r240432, but DFG is still missing. With this change, all tests are
passing on a ci20 board.

Source/JavaScriptCore:

  • jit/RegisterSet.cpp:

(JSC::RegisterSet::calleeSaveRegisters):
Added s0, which is used in llint.

Source/WTF:

  • wtf/Platform.h: Enable DFG on MIPS by default.

Tools:

  • Scripts/run-jsc-stress-tests: Enable DFG tests on MIPS.
5:14 AM Changeset in webkit [243999] by commit-queue@webkit.org
  • 3 edits in trunk/Tools

[Flatpak] Second run update-webkitwpe-flatpak fails
https://bugs.webkit.org/show_bug.cgi?id=192702

Patch by Philippe Normand <pnormand@igalia.com> on 2019-04-08
Reviewed by Carlos Garcia Campos.

  • flatpak/flatpakutils.py:

(FlatpakObject.flatpak): Fix typo.
(FlatpakPackage.install): When installing, also update to the configured remote commit.

  • flatpak/org.webkit.WebKit.yaml: Update GNOME 3.28 SDK/runtime hashes.
3:44 AM Changeset in webkit [243998] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.24/Source/WebCore

Merge r243866 - [GTK][WPE] Use a timer to request the creation of pending tiles
https://bugs.webkit.org/show_bug.cgi?id=196594

Reviewed by Žan Doberšek.

Use a timer to request pending tile creation, as calls to notifyFlushRequired() are discarded
while inside a layer flush.

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

(WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
(WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
(WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
(WebCore::CoordinatedGraphicsLayer::requestPendingTileCreationTimerFired):

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
3:44 AM Changeset in webkit [243997] by Carlos Garcia Campos
  • 5 edits in releases/WebKitGTK/webkit-2.24

Merge r243289 - [GLIB] User data not correctly passed to callback of functions and constructors with no parameters
https://bugs.webkit.org/show_bug.cgi?id=196073

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2019-03-21
Reviewed by Michael Catanzaro.

Source/JavaScriptCore:

This is because GClosure always expects a first parameter as instance. In case of functions or constructors with
no parameters we insert a fake instance which is just a null pointer that is ignored by the callback. But
if the function/constructor has user data the callback will expect one parameter for the user data. In that case
we can simply swap instance/user data so that the fake instance will be the second argument and user data the
first one.

  • API/glib/JSCClass.cpp:

(jscClassCreateConstructor): Use g_cclosure_new_swap() if parameters is empty and user data was provided.

  • API/glib/JSCValue.cpp:

(jscValueFunctionCreate): Ditto.

Tools:

Add test cases to check functions and constructors with no arguments but receiving user data.

  • TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:

(checkUserData):
(testJSCFunction):
(fooCreateWithUserData):
(testJSCClass):

3:44 AM Changeset in webkit [243996] by Carlos Garcia Campos
  • 6 edits in releases/WebKitGTK/webkit-2.24

Merge r243283 - [GLib] Returning G_TYPE_OBJECT from a method does not work
https://bugs.webkit.org/show_bug.cgi?id=195574

Reviewed by Michael Catanzaro.

Source/JavaScriptCore:

Add more documentation to clarify the ownership of wrapped objects when created and when returned by functions.

  • API/glib/JSCCallbackFunction.cpp:

(JSC::JSCCallbackFunction::construct): Also allow to return boxed types from a constructor.

  • API/glib/JSCClass.cpp:
  • API/glib/JSCValue.cpp:

Tools:

Add new test cases to check the behavior of constructors and functions returning GObject and boxed types.

  • TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:

(getGFile):
(getParent):
(createGString):
(getGString):
(getGStringCopyWillRaise):
(getGStringCopy):
(getGStringStr):
(getGStringLen):
(freeGString):
(testJSCClass):

3:44 AM Changeset in webkit [243995] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.24/Source/JavaScriptCore

Merge r243200 - [GLIB] Optimize jsc_value_object_define_property_data|accessor
https://bugs.webkit.org/show_bug.cgi?id=195679

Reviewed by Saam Barati.

Use direct C++ call instead of using the JSC GLib API to create the descriptor object and invoke Object.defineProperty().

  • API/glib/JSCValue.cpp:

(jsc_value_object_define_property_data):
(jsc_value_object_define_property_accessor):

3:44 AM Changeset in webkit [243994] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.24

Merge r243971 - [GTK][WPE] outlook.live.com displays old-fashioned UI
https://bugs.webkit.org/show_bug.cgi?id=196642

Reviewed by Carlos Garcia Campos.

Source/WebCore:

The new good looking UI is shown as long as pretend we're a Mac in the UA.

  • platform/UserAgentQuirks.cpp:

(WebCore::urlRequiresChromeBrowser):

Tools:

  • TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:

(TestWebKitAPI::TEST): New Mac platform quirk test.

3:23 AM Changeset in webkit [243993] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.24

Merge r243608 - [WPE][GTK] webkit_web_resource_get_data_finish can return NULL without setting error
https://bugs.webkit.org/show_bug.cgi?id=186276

Reviewed by Carlos Garcia Campos.

Source/WebKit:

Currently it's possible for webkit_web_resource_get_data_finish() to return NULL without
setting the error parameter. This is illegal because it is an API guarantee (and a GObject
convention) that if an error parameter exists, it should be set whenever a function call
returns NULL. Epiphany correctly dereferences the error in this case without checking if it
is NULL, because it knows it does not have to, and crashes. Fix this. We'll return a byte
array of length 1 containing a NUL character. This isn't great, but there's not really any
better solution without deprecating the API or returning an error code to indicate an empty
resource, and it at least fixes the Epiphany crash.

This does not fix bug #186276, in which this function incorrectly returns no data when it
ought to. But that is a different bug. Now, at least we won't crash when no data is
available.

  • UIProcess/API/glib/WebKitWebResource.cpp:

(resourceDataCallback):

Tools:

  • TestWebKitAPI/Tests/WebKitGLib/TestResources.cpp:

(webViewLoadChanged):
(testWebResourceGetDataError):
(testWebResourceGetDataEmpty):
(beforeAll):
(webViewloadChanged): Deleted.

3:23 AM Changeset in webkit [243992] by Carlos Garcia Campos
  • 10 edits
    2 deletes in releases/WebKitGTK/webkit-2.24

Merge r243804 - Get rid of HTMLInputElement::setEditingValue
https://bugs.webkit.org/show_bug.cgi?id=196402

Reviewed by Darin Adler.

Source/WebCore:

HTMLInputElement::setEditingValue is only used for Epiphany password autofill. We did it
this way because that's what Chrome uses for autofill, but Apple uses
HTMLInputElement::setValueForUser. Let's switch to that instead, then we can get rid of
setEditingValue.

This fixes logging into ting.com after username and password are autofilled by Epiphany.
Before this change, the login would fail unless you first manually edit either the username
or the password field.

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::setEditingValue): Deleted.

  • html/HTMLInputElement.h:
  • testing/Internals.cpp:

(WebCore::Internals::setEditingValue): Deleted.

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

Source/WebKit:

  • WebProcess/InjectedBundle/API/glib/DOM/WebKitDOMElement.cpp:

(webkit_dom_element_html_input_element_set_editing_value):

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

(webkit_dom_html_input_element_set_editing_value):

LayoutTests:

  • fast/forms/editing-value-expected.txt: Removed.
  • fast/forms/editing-value-null-renderer-expected.txt: Removed.
  • fast/forms/editing-value-null-renderer.html: Removed.
  • fast/forms/editing-value.html: Removed.
3:23 AM Changeset in webkit [243991] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.24/Source/WebKit

Merge r243860 - [ATK] Don't touch accessibility tree in WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld
https://bugs.webkit.org/show_bug.cgi?id=193914

Reviewed by Michael Catanzaro.

Move it to dispatchDidFinishDocumentLoad, since we know we have the document at that point and we can create the
root accessibility object wrapper.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
(WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):

3:23 AM Changeset in webkit [243990] by Carlos Garcia Campos
  • 7 edits in releases/WebKitGTK/webkit-2.24

Merge r243602 - [FreeType] Incorrect application of glyph positioning in the Y direction
https://bugs.webkit.org/show_bug.cgi?id=161493

Reviewed by Michael Catanzaro.

Source/WebCore:

Use the first glyph origin as the initial advance of every complex text run.

  • platform/graphics/cairo/FontCairo.cpp:

(WebCore::FontCascade::drawGlyphs): Update the yOffset using the height advance.

  • platform/graphics/cairo/GraphicsContextImplCairo.cpp:

(WebCore::GraphicsContextImplCairo::drawGlyphs): Ditto.

  • platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:

(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Set the initial advance.

LayoutTests:

Rebaseline fast/text/international/hebrew-vowels.html.

  • platform/gtk/fast/text/international/hebrew-vowels-expected.png:
  • platform/gtk/fast/text/international/hebrew-vowels-expected.txt:
3:23 AM WebKitGTK/2.24.x edited by Carlos Garcia Campos
(diff)
3:16 AM Changeset in webkit [243989] by commit-queue@webkit.org
  • 5 edits
    1 add in trunk

[CMake] Detect SSE2 at compile time
https://bugs.webkit.org/show_bug.cgi?id=196488

Patch by Xan Lopez <Xan Lopez> on 2019-04-08
Reviewed by Carlos Garcia Campos.

.:

  • CMakeLists.txt: Use FindSSE2.cmake to detect SSE2 support.
  • Source/cmake/FindSSE2.cmake: Added.

Source/JavaScriptCore:

  • assembler/MacroAssemblerX86Common.cpp: Remove unnecessary (and

incorrect) static_assert.

3:15 AM Changeset in webkit [243988] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.24/Source/WebKit

Merge r243505 - Assertion failure !isInAcceleratedCompositingMode() in DrawingAreaProxyCoordinatedGraphics::incorporateUpdate when forceCompositingMode is turned on
https://bugs.webkit.org/show_bug.cgi?id=195879

Patch by Tomoki Imai <Tomoki Imai> on 2019-03-26
Reviewed by Carlos Garcia Campos.

The root cause is that DrawingAreaProxyCoordinatedGraphics::isInAcceleratedCompositingMode checks both of alwaysUseCompositing() and !m_layerTreeContext.isEmpty().
alwaysUseCompositing() refers preferences, which is written by the application (UIProcess).
On the other hand, m_layerTreeContext is changed when it receives enterAcceleratedCompositingMode/exitAcceleratedCompositingMode from WebProcess.

It results when we set forceCompositingMode and acceleratedCompositingEnabled to true, WebProcess and UIProcess is out of sync until WebProcess sends enterAcceleratedCompositingMode message.
In such situation, WebProcess sends incorporateUpdate to UIProcess because WebProcess is in non-AC mode, but isInAcceleratedCompositingMode becomes true in UIProcess side.

  • UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp:

(WebKit::DrawingAreaProxyCoordinatedGraphics::~DrawingAreaProxyCoordinatedGraphics): Should call exitAcceleratedCompositingMode even when alwaysUseCompositing is true.
(WebKit::DrawingAreaProxyCoordinatedGraphics::enterAcceleratedCompositingMode): enterAcceleratedCompositingMode should check enterAcceleratedCompositingMode is not called twice.

  • UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h: Remove alwaysUseCompositing from isInAcceleratedCompositingMode
3:15 AM Changeset in webkit [243987] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.24/Source/WebKit

Merge r243796 - [CoordinatedGraphics] Hidden pages are not suspended after a web view resize
https://bugs.webkit.org/show_bug.cgi?id=196487

Reviewed by Žan Doberšek.

When resizing the window, the hidden tabs are updated too, to avoid flickering or getting the old size when
switching tabs. For that we need to resume painting but we are not suspending it again after the update.

  • WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:

(WebKit::DrawingAreaCoordinatedGraphics::updateBackingStoreState): Suspend the painting again after a
synchronous update if needed.

3:15 AM Changeset in webkit [243986] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.24/Source/WebKit

Merge r243475 - [Coordinated Graphics][WinCairo] ASSERTION FAILED: state.id == m_nicosia.state.id
https://bugs.webkit.org/show_bug.cgi?id=196190

Reviewed by Žan Doberšek.

This assertion assumes the pre-committed and the committed scenes
are identical. But, the pre-committed scene is updated in the main
thread. Removed the false assertion.

  • Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:

(WebKit::CoordinatedGraphicsScene::purgeGLResources): Remove the
assertion. Removed layers of committed scene, not pre-committed
scene.

3:15 AM Changeset in webkit [243985] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.24/Source/WebKit

Merge r242771 - [CoordinatedGraphics] ASSERTION FAILED: !m_state.isSuspended
https://bugs.webkit.org/show_bug.cgi?id=195550

Reviewed by Carlos Garcia Campos.

CompositingRunLoop::suspend() locks a mutex and stops the update
timer. But, the timer can be fired after the lock was acquired and
before the timer is stopped.

  • Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:

(WebKit::CompositingRunLoop::updateTimerFired): Removed the
assertion. Return early if m_state.isSuspended.

3:15 AM Changeset in webkit [243984] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.24/Source/WebKit

Merge r242597 - REGRESSION(r242364): [WPE] Do not stop the compositing run loop update timer on suspend
https://bugs.webkit.org/show_bug.cgi?id=195410

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2019-03-07
Reviewed by Žan Doberšek.

Calling CompositingRunLoop::stopUpdates() on suspend is leaving the threaded compositor in an inconsistent
state, failing to resume and stopping the updates forever. This is causing timeouts in WPE layout tests. Instead
of calling stopUpdates(), a new suspend() is called, that stops the update timer, without changing the current
updae tha compositing state. A new method resume() is also added to schedule an update if needed.

  • Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:

(WebKit::CompositingRunLoop::suspend): Set state as suspended and stop the update timer.
(WebKit::CompositingRunLoop::resume): Set state as not suspended and start the update timer if it was scheduled
while suspended.
(WebKit::CompositingRunLoop::scheduleUpdate): Do not start the update timer when suspended.
(WebKit::CompositingRunLoop::compositionCompleted): Ditto.
(WebKit::CompositingRunLoop::updateCompleted): Ditto.
(WebKit::CompositingRunLoop::updateTimerFired): Add an assert to ensure the update timer is not fired while suspended.

  • Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h:
  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:

(WebKit::ThreadedCompositor::suspend): Call CompositingRunLoop::suspend() instead of stopUpdates().
(WebKit::ThreadedCompositor::resume): Call CompositingRunLoop::resume().

3:15 AM Changeset in webkit [243983] by Carlos Garcia Campos
  • 5 edits in releases/WebKitGTK/webkit-2.24/Source/WebKit

Merge r242364 - [CoordinatedGraphics] The compositing loop is still running even after exiting AC mode
https://bugs.webkit.org/show_bug.cgi?id=195270

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2019-03-04
Reviewed by Don Olmstead.

Suspend the threaded compositor when the painting is paused or layer flush disabled, and resume it again when
painting is resumed and layer flush enabled.

  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:

(WebKit::ThreadedCompositor::suspend): Increment the suspend counter and mark the scene as inactive if it was suspended.
(WebKit::ThreadedCompositor::resume): Decrement the suspend counter and mark the scene as active if it's now resumed.

  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
  • WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:

(WebKit::DrawingAreaCoordinatedGraphics::forceRepaint): Return early if layer tree state is frozen.
(WebKit::DrawingAreaCoordinatedGraphics::forceRepaintAsync): Ditto.

  • WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp:

(WebKit::LayerTreeHost::setLayerFlushSchedulingEnabled): Call ThreadedCompositor::suspend()/resume().
(WebKit::LayerTreeHost::pauseRendering): Call ThreadedCompositor::suspend.
(WebKit::LayerTreeHost::resumeRendering): Call ThreadedCompositor::resume().

3:15 AM Changeset in webkit [243982] by Carlos Garcia Campos
  • 15 edits
    2 moves
    3 adds
    6 deletes in releases/WebKitGTK/webkit-2.24/Source/WebKit

Merge r242346 - [CoordinatedGraphics] Unify DrawingArea classes
https://bugs.webkit.org/show_bug.cgi?id=195167

Reviewed by Žan Doberšek.

Add DrawingAreaProxyCoordinatedGraphics and DrawingAreaCoordinatedGraphics.

  • PlatformGTK.cmake:
  • PlatformWPE.cmake:
  • PlatformWin.cmake:
  • Shared/DrawingAreaInfo.h:
  • SourcesGTK.txt:
  • SourcesWPE.txt:
  • UIProcess/API/gtk/PageClientImpl.cpp:

(WebKit::PageClientImpl::createDrawingAreaProxy):
(WebKit::PageClientImpl::viewSize):

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseRealize):
(webkitWebViewBaseUnrealize):
(webkitWebViewBaseDraw):
(webkitWebViewBaseSizeAllocate):
(webkitWebViewBaseDidRelaunchWebProcess):
(webkitWebViewBasePageClosed):

  • UIProcess/API/wpe/PageClientImpl.cpp:

(WebKit::PageClientImpl::createDrawingAreaProxy):

  • UIProcess/AcceleratedDrawingAreaProxy.cpp: Removed.
  • UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp: Added.

(WebKit::DrawingAreaProxyCoordinatedGraphics::DrawingAreaProxyCoordinatedGraphics):
(WebKit::DrawingAreaProxyCoordinatedGraphics::~DrawingAreaProxyCoordinatedGraphics):
(WebKit::DrawingAreaProxyCoordinatedGraphics::paint):
(WebKit::DrawingAreaProxyCoordinatedGraphics::sizeDidChange):
(WebKit::DrawingAreaProxyCoordinatedGraphics::deviceScaleFactorDidChange):
(WebKit::DrawingAreaProxyCoordinatedGraphics::waitForBackingStoreUpdateOnNextPaint):
(WebKit::DrawingAreaProxyCoordinatedGraphics::setBackingStoreIsDiscardable):
(WebKit::DrawingAreaProxyCoordinatedGraphics::update):
(WebKit::DrawingAreaProxyCoordinatedGraphics::didUpdateBackingStoreState):
(WebKit::DrawingAreaProxyCoordinatedGraphics::enterAcceleratedCompositingMode):
(WebKit::DrawingAreaProxyCoordinatedGraphics::exitAcceleratedCompositingMode):
(WebKit::DrawingAreaProxyCoordinatedGraphics::updateAcceleratedCompositingMode):
(WebKit::DrawingAreaProxyCoordinatedGraphics::incorporateUpdate):
(WebKit::DrawingAreaProxyCoordinatedGraphics::alwaysUseCompositing const):
(WebKit::DrawingAreaProxyCoordinatedGraphics::backingStoreStateDidChange):
(WebKit::DrawingAreaProxyCoordinatedGraphics::sendUpdateBackingStoreState):
(WebKit::DrawingAreaProxyCoordinatedGraphics::waitForAndDispatchDidUpdateBackingStoreState):
(WebKit::DrawingAreaProxyCoordinatedGraphics::discardBackingStoreSoon):
(WebKit::DrawingAreaProxyCoordinatedGraphics::discardBackingStore):
(WebKit::DrawingAreaProxyCoordinatedGraphics::setNativeSurfaceHandleForCompositing):
(WebKit::DrawingAreaProxyCoordinatedGraphics::destroyNativeSurfaceHandleForCompositing):
(WebKit::DrawingAreaProxyCoordinatedGraphics::DrawingMonitor::DrawingMonitor):
(WebKit::DrawingAreaProxyCoordinatedGraphics::DrawingMonitor::~DrawingMonitor):
(WebKit::DrawingAreaProxyCoordinatedGraphics::DrawingMonitor::webViewDrawCallback):
(WebKit::DrawingAreaProxyCoordinatedGraphics::DrawingMonitor::start):
(WebKit::DrawingAreaProxyCoordinatedGraphics::DrawingMonitor::stop):
(WebKit::DrawingAreaProxyCoordinatedGraphics::DrawingMonitor::didDraw):
(WebKit::DrawingAreaProxyCoordinatedGraphics::dispatchAfterEnsuringDrawing):

  • UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h: Renamed from Source/WebKit/UIProcess/AcceleratedDrawingAreaProxy.h.
  • UIProcess/DrawingAreaProxyImpl.cpp: Removed.
  • UIProcess/DrawingAreaProxyImpl.h: Removed.
  • UIProcess/gtk/AcceleratedBackingStoreX11.cpp:

(WebKit::AcceleratedBackingStoreX11::update):

  • UIProcess/win/PageClientImpl.cpp:

(WebKit::PageClientImpl::createDrawingAreaProxy):

  • UIProcess/win/WebView.cpp:

(WebKit::WebView::paint):

  • WebProcess/WebPage/AcceleratedDrawingArea.cpp: Removed.
  • WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp: Added.

(WebKit::DrawingAreaCoordinatedGraphics::DrawingAreaCoordinatedGraphics):
(WebKit::DrawingAreaCoordinatedGraphics::~DrawingAreaCoordinatedGraphics):
(WebKit::DrawingAreaCoordinatedGraphics::setNeedsDisplay):
(WebKit::DrawingAreaCoordinatedGraphics::setNeedsDisplayInRect):
(WebKit::DrawingAreaCoordinatedGraphics::scroll):
(WebKit::DrawingAreaCoordinatedGraphics::forceRepaint):
(WebKit::DrawingAreaCoordinatedGraphics::forceRepaintAsync):
(WebKit::DrawingAreaCoordinatedGraphics::setLayerTreeStateIsFrozen):
(WebKit::DrawingAreaCoordinatedGraphics::updatePreferences):
(WebKit::DrawingAreaCoordinatedGraphics::mainFrameContentSizeChanged):
(WebKit::DrawingAreaCoordinatedGraphics::deviceOrPageScaleFactorChanged):
(WebKit::DrawingAreaCoordinatedGraphics::didChangeViewportAttributes):
(WebKit::DrawingAreaCoordinatedGraphics::graphicsLayerFactory):
(WebKit::DrawingAreaCoordinatedGraphics::setRootCompositingLayer):
(WebKit::DrawingAreaCoordinatedGraphics::scheduleCompositingLayerFlush):
(WebKit::DrawingAreaCoordinatedGraphics::layerHostDidFlushLayers):
(WebKit::DrawingAreaCoordinatedGraphics::createDisplayRefreshMonitor):
(WebKit::DrawingAreaCoordinatedGraphics::setNativeSurfaceHandleForCompositing):
(WebKit::DrawingAreaCoordinatedGraphics::destroyNativeSurfaceHandleForCompositing):
(WebKit::DrawingAreaCoordinatedGraphics::activityStateDidChange):
(WebKit::DrawingAreaCoordinatedGraphics::attachViewOverlayGraphicsLayer):
(WebKit::DrawingAreaCoordinatedGraphics::updateBackingStoreState):
(WebKit::DrawingAreaCoordinatedGraphics::didUpdate):
(WebKit::DrawingAreaCoordinatedGraphics::sendDidUpdateBackingStoreState):
(WebKit::DrawingAreaCoordinatedGraphics::exitAcceleratedCompositingModeSoon):
(WebKit::DrawingAreaCoordinatedGraphics::exitAcceleratedCompositingModeNow):
(WebKit::DrawingAreaCoordinatedGraphics::discardPreviousLayerTreeHost):
(WebKit::DrawingAreaCoordinatedGraphics::suspendPainting):
(WebKit::DrawingAreaCoordinatedGraphics::resumePainting):
(WebKit::DrawingAreaCoordinatedGraphics::enterAcceleratedCompositingMode):
(WebKit::DrawingAreaCoordinatedGraphics::exitAcceleratedCompositingMode):
(WebKit::DrawingAreaCoordinatedGraphics::scheduleDisplay):
(WebKit::DrawingAreaCoordinatedGraphics::displayTimerFired):
(WebKit::DrawingAreaCoordinatedGraphics::display):
(WebKit::shouldPaintBoundsRect):

  • WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.h: Renamed from Source/WebKit/WebProcess/WebPage/AcceleratedDrawingArea.h.
  • WebProcess/WebPage/DrawingArea.cpp:

(WebKit::DrawingArea::create):

  • WebProcess/WebPage/DrawingArea.h:

(WebKit::DrawingArea::layerFlushThrottlingIsActive const):

  • WebProcess/WebPage/DrawingAreaImpl.cpp: Removed.
  • WebProcess/WebPage/DrawingAreaImpl.h: Removed.
3:14 AM Changeset in webkit [243981] by Carlos Garcia Campos
  • 43 edits in releases/WebKitGTK/webkit-2.24

Merge r242205 - [CoordinatedGraphics] Remove COORDINATED_GRAPHICS_THREADED option
https://bugs.webkit.org/show_bug.cgi?id=195159

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2019-02-28
Reviewed by Don Olmstead.

.:

  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsPlayStation.cmake:
  • Source/cmake/OptionsWPE.cmake:

Source/WebCore:

Use COORDINATED_GRAPHICS instead.

  • platform/graphics/GraphicsContext3D.h:
  • platform/graphics/PlatformLayer.h:
  • platform/graphics/cairo/ImageBufferCairo.cpp:

(WebCore::ImageBufferData::ImageBufferData):
(WebCore::ImageBufferData::~ImageBufferData):

  • platform/graphics/cairo/ImageBufferDataCairo.h:
  • platform/graphics/nicosia/NicosiaPaintingEngineThreaded.cpp:
  • platform/graphics/nicosia/NicosiaPaintingEngineThreaded.h:
  • platform/graphics/nicosia/texmap/NicosiaGC3DLayer.cpp:

(Nicosia::GC3DLayer::swapBuffersIfNeeded):

  • platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:

(WebCore::GraphicsContext3D::reshapeFBOs):

  • platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:

(WebCore::GraphicsContext3D::prepareTexture):

  • platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:

(WebCore::GraphicsContext3D::reshapeFBOs):

  • platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp:

(WebCore::GraphicsContext3D::GraphicsContext3D):
(WebCore::GraphicsContext3D::~GraphicsContext3D):

  • platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp:

(WebCore::TextureMapperGC3DPlatformLayer::TextureMapperGC3DPlatformLayer):
(WebCore::TextureMapperGC3DPlatformLayer::~TextureMapperGC3DPlatformLayer):

  • platform/graphics/texmap/TextureMapperGC3DPlatformLayer.h:
  • platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
  • platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:
  • platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:
  • platform/graphics/texmap/TextureMapperPlatformLayerProxy.h:
  • platform/graphics/texmap/TextureMapperPlatformLayerProxyProvider.h:
  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::CoordinatedGraphicsLayer::setContentsNeedsDisplay):
(WebCore::CoordinatedGraphicsLayer::setContentsToPlatformLayer):
(WebCore::CoordinatedGraphicsLayer::updatePlatformLayer):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::paintsIntoWindow const):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::shouldCompositeOverflowControls const):

Source/WebKit:

Use COORDINATED_GRAPHICS instead.

  • Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:

(WebKit::CoordinatedGraphicsScene::onNewBufferAvailable):

  • Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
  • Shared/CoordinatedGraphics/SimpleViewportController.cpp:
  • Shared/CoordinatedGraphics/SimpleViewportController.h:
  • Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:
  • Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h:
  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.cpp:
  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.h:
  • WebProcess/WebPage/AcceleratedDrawingArea.cpp:

(WebKit::AcceleratedDrawingArea::mainFrameContentSizeChanged):
(WebKit::AcceleratedDrawingArea::enterAcceleratedCompositingMode):

  • WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp:
  • WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h:
  • WebProcess/WebPage/DrawingAreaImpl.cpp:

(WebKit::DrawingAreaImpl::updatePreferences):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::sendViewportAttributesChanged):
(WebKit::WebPage::viewportPropertiesDidChange):

  • WebProcess/gtk/WebProcessMainGtk.cpp:
3:14 AM Changeset in webkit [243980] by Carlos Garcia Campos
  • 8 edits
    1 move
    1 add
    5 deletes in releases/WebKitGTK/webkit-2.24/Source/WebKit

Merge r242199 - [CoordinatedGraphics] Unify all LayerTreeHost classes
https://bugs.webkit.org/show_bug.cgi?id=195094

Reviewed by Žan Doberšek.

There's no reason to have 3 classes, since currently LayerTreeHost is only used by coordinated graphics based
ports.

  • PlatformWin.cmake:
  • SourcesGTK.txt:
  • SourcesWPE.txt:
  • WebProcess/WebPage/AcceleratedDrawingArea.cpp:

(WebKit::AcceleratedDrawingArea::enterAcceleratedCompositingMode):
(WebKit::AcceleratedDrawingArea::exitAcceleratedCompositingModeNow):

  • WebProcess/WebPage/AcceleratedDrawingArea.h:
  • WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: Removed.
  • WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: Removed.
  • WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp: Renamed from Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp.

(WebKit::LayerTreeHost::LayerTreeHost):
(WebKit::LayerTreeHost::~LayerTreeHost):
(WebKit::LayerTreeHost::setLayerFlushSchedulingEnabled):
(WebKit::LayerTreeHost::scheduleLayerFlush):
(WebKit::LayerTreeHost::cancelPendingLayerFlush):
(WebKit::LayerTreeHost::layerFlushTimerFired):
(WebKit::LayerTreeHost::setRootCompositingLayer):
(WebKit::LayerTreeHost::setViewOverlayRootLayer):
(WebKit::LayerTreeHost::invalidate):
(WebKit::LayerTreeHost::scrollNonCompositedContents):
(WebKit::LayerTreeHost::forceRepaint):
(WebKit::LayerTreeHost::forceRepaintAsync):
(WebKit::LayerTreeHost::sizeDidChange):
(WebKit::LayerTreeHost::pauseRendering):
(WebKit::LayerTreeHost::resumeRendering):
(WebKit::LayerTreeHost::graphicsLayerFactory):
(WebKit::LayerTreeHost::contentsSizeChanged):
(WebKit::LayerTreeHost::didChangeViewportAttributes):
(WebKit::LayerTreeHost::didChangeViewport):
(WebKit::LayerTreeHost::setIsDiscardable):
(WebKit::LayerTreeHost::setNativeSurfaceHandleForCompositing):
(WebKit::LayerTreeHost::deviceOrPageScaleFactorChanged):
(WebKit::LayerTreeHost::createDisplayRefreshMonitor):
(WebKit::LayerTreeHost::didFlushRootLayer):
(WebKit::LayerTreeHost::commitSceneState):
(WebKit::LayerTreeHost::frameComplete):
(WebKit::LayerTreeHost::nativeSurfaceHandleForCompositing):
(WebKit::LayerTreeHost::didDestroyGLContext):
(WebKit::LayerTreeHost::willRenderFrame):
(WebKit::LayerTreeHost::didRenderFrame):
(WebKit::LayerTreeHost::requestDisplayRefreshMonitorUpdate):
(WebKit::LayerTreeHost::handleDisplayRefreshMonitorUpdate):
(WebKit::LayerTreeHost::renderNextFrame):

  • WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h: Renamed from Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h.
  • WebProcess/WebPage/DrawingAreaImpl.cpp:

(WebKit::DrawingAreaImpl::setNeedsDisplay):
(WebKit::DrawingAreaImpl::setNeedsDisplayInRect):

  • WebProcess/WebPage/LayerTreeHost.cpp: Removed.
  • WebProcess/WebPage/LayerTreeHost.h: Removed.
  • WebPage/win/LayerTreeHost.h: Added.
3:14 AM Changeset in webkit [243979] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.24/Source/WebKit

Merge r242266 - [ThreadedCompositor] Simply the compositing run loop worker thread
https://bugs.webkit.org/show_bug.cgi?id=195208

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2019-03-01
Reviewed by Don Olmstead.

We can remove the WorkQueuePool, since we never really supported more than one thread, and now that single
process model non longer exists it doesn't even make sense. We can simply use a RunLoop instead of a WorkQueue
so that the implementation is not specific to the generic WorkQueue implementation.

  • Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:

(WebKit::createRunLoop): Helper function to create the RunLoop in a worker thread before m_updateTimer is initialized.
(WebKit::CompositingRunLoop::CompositingRunLoop): Use createRunLoop().
(WebKit::CompositingRunLoop::~CompositingRunLoop): Stop the worker thread run loop in the next main run loop iteration.
(WebKit::CompositingRunLoop::performTask): Use m_runLoop.
(WebKit::CompositingRunLoop::performTaskSync): Ditto.
(WebKit::WorkQueuePool::singleton): Deleted.
(WebKit::WorkQueuePool::dispatch): Deleted.
(WebKit::WorkQueuePool::runLoop): Deleted.
(WebKit::WorkQueuePool::invalidate): Deleted.
(WebKit::WorkQueuePool::WorkQueuePool): Deleted.
(WebKit::WorkQueuePool::getOrCreateWorkQueueForContext): Deleted.
(): Deleted.

  • Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h:
3:14 AM Changeset in webkit [243978] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.24/Source/WebCore

Merge r243537 - [GStreamer] Remove the HLS queue buffering query hack
https://bugs.webkit.org/show_bug.cgi?id=196244

Reviewed by Xabier Rodriguez-Calvar.

Because the http src element now provides network statistics to
the player we can now compute an estimation of the data loading in
case the buffering query isn't handled by any element of the
pipeline.

No new tests, existing HLS tests cover this change.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
(WebCore::findHLSQueue): Deleted.
(WebCore::isHLSProgressing): Deleted.

3:14 AM Changeset in webkit [243977] by Carlos Garcia Campos
  • 6 edits in releases/WebKitGTK/webkit-2.24/Source/WebCore

Merge r243197 - [GStreamer] Switch back to webkitwebsrc for adaptive streaming fragments downloading
https://bugs.webkit.org/show_bug.cgi?id=195948

Reviewed by Xabier Rodriguez-Calvar.

The webkitwebsrc element now behaves much better when used through
GStreamer's adaptivedemux, so use it for all WebKit media
downloads. The MediaPlayer needed by the webkitwebsrc element now
travels through GstContext messages and queries so that it can be
shared by multiple elements, typically the first webkitwebsrc
element downloads the HLS manifest and then adaptivedemux, through
uridownloader, will create new webkitwebsrc elements for fragments
downloading. Those new elements will query the first webkitwebsrc
element for its context.

The previous hack used to check SecurityOrigins can
also be cleaned-up. The origins are now cached upon reception of
the HTTP headers message from webkitwebsrc.

No new tests, existing http/tests/media/hls tests cover this change.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::setPlaybinURL):
(WebCore::MediaPlayerPrivateGStreamer::loadFull):
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
(WebCore::MediaPlayerPrivateGStreamer::loadNextLocation):
(WebCore::MediaPlayerPrivateGStreamer::wouldTaintOrigin const):
(WebCore::convertToInternalProtocol): Deleted.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::handleSyncMessage):

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(webkit_web_src_class_init):
(webKitWebSrcSetContext):
(webKitWebSrcStart):
(webKitWebSrcGetProtocols):
(webKitWebSrcSetUri):
(CachedResourceStreamingClient::responseReceived):
(convertPlaybinURI): Deleted.
(webKitSrcWouldTaintOrigin): Deleted.

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.h:
3:14 AM Changeset in webkit [243976] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.24/Source/WebCore

Merge r243140 - REGRESSION(r243058): [GStreamer] 3 tests now timing out
https://bugs.webkit.org/show_bug.cgi?id=195888

Reviewed by Xabier Rodriguez-Calvar.

A breaking change was introduced in r243058. Now on-disk-buffering
is disabled when the reported Content-Length is 0 or not present
at all. This broke the progress event logic in didLoadProgress()
because leading to progress events not being fired as expected.

The proposed solution is to make webkitwebsrc notify the player
every time the network process receives data from the network. So
the player can now easily determine if the load progressed by
checking the reported statistics.

No new tests, existing media tests cover this change.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
(WebCore::MediaPlayerPrivateGStreamer::didLoadingProgress const):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(CachedResourceStreamingClient::dataReceived):

3:14 AM Changeset in webkit [243975] by Carlos Garcia Campos
  • 9 edits in releases/WebKitGTK/webkit-2.24

Merge r243058 - [GStreamer] Rewrite HTTP source element using pushsrc base class
https://bugs.webkit.org/show_bug.cgi?id=195631

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

If we want to use webkitwebsrc in adaptivedemux (HLS, DASH, etc)
we need a source element that behaves like souphttpsrc, which is
implemented using pushsrc. This rewrite might also fix some seek
issues.

No new tests, existing http/tests/media tests cover this patch.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::handleMessage):

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(webkit_web_src_class_init):
(webkitWebSrcReset):
(webkit_web_src_init):
(webKitWebSrcCreate):
(webKitWebSrcStart):
(webKitWebSrcCloseSession):
(webKitWebSrcStop):
(webKitWebSrcGetSize):
(webKitWebSrcIsSeekable):
(webKitWebSrcDoSeek):
(webKitWebSrcQuery):
(webKitWebSrcUnLock):
(webKitWebSrcUnLockStop):
(webKitWebSrcChangeState):
(CachedResourceStreamingClient::checkUpdateBlocksize):
(CachedResourceStreamingClient::responseReceived):
(CachedResourceStreamingClient::dataReceived):
(CachedResourceStreamingClient::accessControlCheckFailed):
(CachedResourceStreamingClient::loadFailed):
(CachedResourceStreamingClient::loadFinished):

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.h:

LayoutTests:

  • platform/gtk/TestExpectations:
  • platform/gtk/http/tests/media/hls/video-controls-live-stream-expected.txt:

Update expectations, though it's not really related with this
patch.

3:14 AM Changeset in webkit [243974] by Carlos Garcia Campos
  • 6 edits in releases/WebKitGTK/webkit-2.24/Source/WebCore

Merge r241444 - Stop using setDefersLoading from WebCore
https://bugs.webkit.org/show_bug.cgi?id=194315

Reviewed by Jer Noble.

That is what CompletionHandlers are for.

  • loader/MediaResourceLoader.cpp:

(WebCore::MediaResource::responseReceived):
(WebCore::MediaResource::setDefersLoading): Deleted.

  • loader/MediaResourceLoader.h:
  • platform/graphics/PlatformMediaResourceLoader.h:

(WebCore::PlatformMediaResourceClient::responseReceived):
(WebCore::PlatformMediaResource::stop):
(WebCore::PlatformMediaResource::setDefersLoading): Deleted.

  • platform/network/cocoa/WebCoreNSURLSession.mm:

(WebCore::WebCoreNSURLSessionDataTaskClient::responseReceived):
(-[WebCoreNSURLSessionDataTask resource:receivedResponse:completionHandler:]):
(-[WebCoreNSURLSessionDataTask _setDefersLoading:]): Deleted.
(-[WebCoreNSURLSessionDataTask resource:receivedResponse:]): Deleted.

3:14 AM Changeset in webkit [243973] by Carlos Garcia Campos
  • 5 edits in releases/WebKitGTK/webkit-2.24

Merge r243434 - [GTK][WPE] Do not allow changes in active URI before provisional load starts for non-API requests
https://bugs.webkit.org/show_bug.cgi?id=194208

Reviewed by Michael Catanzaro.

  • UIProcess/API/glib/WebKitWebView.cpp:

(webkitWebViewWillStartLoad): Block updates of active URL.
(webkitWebViewLoadChanged): Unblock updates of active URL on WEBKIT_LOAD_STARTED.

3:13 AM Changeset in webkit [243972] by Carlos Garcia Campos
  • 12 edits in releases/WebKitGTK/webkit-2.24

Merge r242788 - [WPE][GTK] Load events may occur in unexpected order when JS redirects page before subresource load finishes
https://bugs.webkit.org/show_bug.cgi?id=194131

Source/WebKit:

Reviewed by Michael Catanzaro.

Ensure we emit the load-failed and load-changed with finished event when there's still an ongoing load when a
new provisional load strarts. Previous load fails with cancelled error.

  • UIProcess/API/glib/WebKitWebView.cpp:

(webkitWebViewWillStartLoad): Call webkitWebViewLoadFailed() if current page load state is not finished.

  • UIProcess/API/glib/WebKitWebViewPrivate.h:
  • UIProcess/API/gtk/PageClientImpl.cpp:

(WebKit::PageClientImpl::didStartProvisionalLoadForMainFrame): Call webkitWebViewWillStartLoad().

  • UIProcess/API/wpe/APIViewClient.h:

(API::ViewClient::willStartLoad): Add willStartLoad() to API::ViewClient

  • UIProcess/API/wpe/PageClientImpl.cpp:

(WebKit::PageClientImpl::didStartProvisionalLoadForMainFrame): Call WPEView::willStartLoad().

  • UIProcess/API/wpe/PageClientImpl.h:
  • UIProcess/API/wpe/WPEView.cpp:

(WKWPE::View::willStartLoad): Call API::ViewClient::willStartLoad().

  • UIProcess/API/wpe/WPEView.h:
  • UIProcess/PageLoadState.h:

(WebKit::PageLoadState::isProvisional const):
(WebKit::PageLoadState::isCommitted const):
(WebKit::PageLoadState::isFinished const):

Tools:

Patch by Michael Catanzaro <Michael Catanzaro> on 2019-03-12
Reviewed by Michael Catanzaro.

  • TestWebKitAPI/Tests/WebKitGLib/TestLoaderClient.cpp:

(uriChanged):
(testUnfinishedSubresourceLoad):
(serverCallback):
(beforeAll):

2:09 AM Changeset in webkit [243971] by svillar@igalia.com
  • 4 edits in trunk

[GTK][WPE] outlook.live.com displays old-fashioned UI
https://bugs.webkit.org/show_bug.cgi?id=196642

Reviewed by Carlos Garcia Campos.

Source/WebCore:

The new good looking UI is shown as long as pretend we're a Mac in the UA.

  • platform/UserAgentQuirks.cpp:

(WebCore::urlRequiresChromeBrowser):

Tools:

  • TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:

(TestWebKitAPI::TEST): New Mac platform quirk test.

1:11 AM Changeset in webkit [243970] by Carlos Garcia Campos
  • 18 edits
    2 moves in trunk/Source/WebCore

[ATK] Cleanup accessible wrapper base class
https://bugs.webkit.org/show_bug.cgi?id=196601

Reviewed by Mario Sanchez Prada.

Cleanups:

  • Rename WebKitAccessibleWrapperAtk cpp and header as WebKitAccessible for consistency with the class name.
  • Use WEBKIT_DEFINE_TYPE instead of custom type registration. This ensures that all CStrings used in private struct are no longer leaked.
  • Move core object pointer to the private struct.
  • Remove confusing core() function and simply get the core object from the private struct.
  • Use nullptr instead of 0 and other coding style issues.
  • Rename cacheAndReturnAtkProperty as webkitAccessibleCacheAndReturnAtkProperty and use WebKitAccessible as instance parameter.
  • Make webkitAccessibleGetAccessibilityObject() return a reference, since we use a fallback object on detach it never returns nullptr.
  • Move objectFocusedAndCaretOffsetUnignored() to WebKitAccessibleUtil.
  • SourcesGTK.txt:
  • accessibility/atk/AXObjectCacheAtk.cpp:
  • accessibility/atk/WebKitAccessible.cpp: Renamed from Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp.

(webkitAccessibleGetName):
(webkitAccessibleGetDescription):
(setAtkRelationSetFromCoreObject):
(isRootObject):
(webkitAccessibleGetParent):
(webkitAccessibleGetNChildren):
(webkitAccessibleRefChild):
(webkitAccessibleGetIndexInParent):
(webkitAccessibleGetAttributes):
(atkRole):
(webkitAccessibleGetRole):
(webkitAccessibleRefStateSet):
(webkitAccessibleRefRelationSet):
(webkitAccessibleInit):
(webkitAccessibleGetObjectLocale):
(webkit_accessible_class_init):
(interfaceMaskFromObject):
(uniqueAccessibilityTypeName):
(accessibilityTypeFromObject):
(webkitAccessibleNew):
(webkitAccessibleGetAccessibilityObject):
(webkitAccessibleDetach):
(webkitAccessibleIsDetached):
(webkitAccessibleCacheAndReturnAtkProperty):

  • accessibility/atk/WebKitAccessible.h: Renamed from Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.h.
  • accessibility/atk/WebKitAccessibleHyperlink.cpp:

(core):

  • accessibility/atk/WebKitAccessibleInterfaceAction.cpp:

(core):
(webkitAccessibleActionGetKeybinding):
(webkitAccessibleActionGetName):

  • accessibility/atk/WebKitAccessibleInterfaceComponent.cpp:

(core):

  • accessibility/atk/WebKitAccessibleInterfaceDocument.cpp:

(core):
(documentAttributeValue):

  • accessibility/atk/WebKitAccessibleInterfaceEditableText.cpp:

(core):

  • accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp:

(core):

  • accessibility/atk/WebKitAccessibleInterfaceImage.cpp:

(core):
(webkitAccessibleImageGetImageDescription):

  • accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:

(core):

  • accessibility/atk/WebKitAccessibleInterfaceTable.cpp:

(core):

  • accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:

(core):

  • accessibility/atk/WebKitAccessibleInterfaceText.cpp:

(core):

  • accessibility/atk/WebKitAccessibleInterfaceValue.cpp:

(core):

  • accessibility/atk/WebKitAccessibleUtil.cpp:

(objectFocusedAndCaretOffsetUnignored):

  • accessibility/atk/WebKitAccessibleUtil.h:
  • editing/atk/FrameSelectionAtk.cpp:

Apr 7, 2019:

7:58 PM Changeset in webkit [243969] by commit-queue@webkit.org
  • 5 edits in trunk

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

Broke API Test SafeBrowsing.WKWebViewGoBackIFrame (Requested
by aakashjain on #webkit).

Reverted changeset:

"Clicking "Go Back" from a safe browsing warning from an
iframe should navigate the WKWebView back to the previous
page"
https://bugs.webkit.org/show_bug.cgi?id=196665
https://trac.webkit.org/changeset/243956

4:31 PM Changeset in webkit [243968] by ggaren@apple.com
  • 2 edits in trunk/Source/WebKit

Remove stray byte added by r241131
https://bugs.webkit.org/show_bug.cgi?id=196682

Reviewed by Alexey Proskuryakov.

Sublime Text thinks WKWebView.mm is binary instead of text.

According to online documentation and bisecting, this is because r241131
introduced a stray byte (probably a null byte?) into the file.

I fixed this with Cmd-C Cmd-V.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):

4:24 PM Changeset in webkit [243967] by msaboff@apple.com
  • 3 edits
    1 add in trunk

REGRESSION (r243642): Crash in reddit.com page
https://bugs.webkit.org/show_bug.cgi?id=196684

Reviewed by Geoffrey Garen.

JSTests:

New regression test.

  • stress/regexp-nongreedy-charclass-backtracks.js: Added.

Source/JavaScriptCore:

In r243642, the code that saves and restores the count for non-greedy character classes
was inadvertently put inside an if statement. This code should be generated for all
non-greedy character classes.

  • yarr/YarrJIT.cpp:

(JSC::Yarr::YarrGenerator::generateCharacterClassNonGreedy):
(JSC::Yarr::YarrGenerator::backtrackCharacterClassNonGreedy):

12:25 PM Changeset in webkit [243966] by ysuzuki@apple.com
  • 4 edits
    1 add in trunk

[JSC] CallLinkInfo should clear Callee or CodeBlock even if it is unlinked by jettison
https://bugs.webkit.org/show_bug.cgi?id=196683

Reviewed by Saam Barati.

JSTests:

  • stress/clear-callee-or-codeblock-in-calllinkinfo-even-cleared-by-jettison.js: Added.

(foo):

Source/JavaScriptCore:

In r243626, we stop repatching CallLinkInfo when the CallLinkInfo is held by jettisoned CodeBlock.
But we still need to clear the Callee or CodeBlock since they are now dead. Otherwise, CodeBlock's
visitWeak eventually accesses this dead cells and crashes because the owner CodeBlock of CallLinkInfo
can be still live.

We also move all repatching operations from CallLinkInfo.cpp to Repatch.cpp for consistency because the
other repatching operations in CallLinkInfo are implemented in Repatch.cpp side.

  • bytecode/CallLinkInfo.cpp:

(JSC::CallLinkInfo::setCallee):
(JSC::CallLinkInfo::clearCallee):

  • jit/Repatch.cpp:

(JSC::linkFor):
(JSC::revertCall):

Apr 6, 2019:

8:55 PM Changeset in webkit [243965] by rniwa@webkit.org
  • 5 edits in trunk

Added tests for WeakHashSet::computesEmpty and WeakHashSet::computeSize
https://bugs.webkit.org/show_bug.cgi?id=196669

Reviewed by Geoffrey Garen.

Source/WTF:

Removed the superflous type names from forward declarations, and made WeakHashSet::add
take a const object to match other container types in WTF.

  • wtf/WeakHashSet.h:

(WTF::WeakHashSet::add):

  • wtf/WeakPtr.h:

Tools:

Added three new unit tests for WeakHashSet.

  • TestWebKitAPI/Tests/WTF/WeakPtr.cpp:

(WTF_WeakPtr.WeakHashSetConstObjects):
(WTF_WeakPtr.WeakHashSetComputesEmpty):
(WTF_WeakPtr.WeakHashSetComputeSize):

7:54 PM Changeset in webkit [243964] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

REGRESSION(r237196): Web Inspector: Computed panel shouldn't update when it isn't visible
https://bugs.webkit.org/show_bug.cgi?id=196667
<rdar://problem/49664912>

Reviewed by Timothy Hatcher.

Explicitly define hidden and shown methods instead of relying on SidebarPanel's visible getter.

  • UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:

(WI.GeneralStyleDetailsSidebarPanel.prototype.visibilityDidChange): Deleted.
(WI.GeneralStyleDetailsSidebarPanel.prototype.hidden): Added.
(WI.GeneralStyleDetailsSidebarPanel.prototype.shown): Added.

7:25 PM Changeset in webkit [243963] by Wenson Hsieh
  • 8 edits in trunk

Hide next and previous form control buttons when WKWebView is editable
https://bugs.webkit.org/show_bug.cgi?id=196672
<rdar://problem/35625321>

Reviewed by Tim Horton.

Source/WebKit:

Adopt new UIKit SPI to hide or show next and previous controls in the form accessory view when changing
editability.

Test: KeyboardInputTests.FormNavigationAssistantBarButtonItems

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _setEditable:]):

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

(-[WKContentView _updateAccessory]):
(-[WKContentView _didChangeWebViewEditability]):

Tools:

Add a new API test.

  • TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:

(-[TestWKWebView lastTrailingBarButtonGroup]):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/ios/UIKitSPI.h:
9:48 AM Changeset in webkit [243962] by Antti Koivisto
  • 30 edits
    1 move
    1 add
    1 delete in trunk

Combine event and touch action regions into a single class
https://bugs.webkit.org/show_bug.cgi?id=196644
<rdar://problem/49643614>

Reviewed by Darin Adler.

Source/WebCore:

This patch replaces the existing TouchActionRegion class with the more general EventRegion class.
It collects both the overall event region and the touch action regions. This avoids duplication
and simplifies the code.

The patch also adds serialization support for EventRegion, so touch-action regions gets passed
to the UI process too.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::setEventRegion):
(WebCore::GraphicsLayer::dumpProperties const):
(WebCore::GraphicsLayer::setTouchActionRegion): Deleted.

  • platform/graphics/GraphicsLayer.h:

(WebCore::GraphicsLayer::eventRegion const):
(WebCore::GraphicsLayer::touchActionRegion const): Deleted.

  • platform/graphics/Region.cpp:

(WebCore::operator<<):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::setEventRegion):
(WebCore::GraphicsLayerCA::setTouchActionRegion): Deleted.

  • platform/graphics/ca/GraphicsLayerCA.h:
  • platform/graphics/ca/PlatformCALayer.h:
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
  • rendering/EventRegion.cpp: Copied from Source/WebCore/rendering/TouchActionRegion.cpp.

(WebCore::EventRegion::operator== const):
(WebCore::EventRegion::unite):
(WebCore::EventRegion::translate):
(WebCore::EventRegion::uniteTouchActions):
(WebCore::EventRegion::touchActionsForPoint const):
(WebCore::operator<<):
(WebCore::TouchActionRegion::unite): Deleted.
(WebCore::TouchActionRegion::actionsForPoint const): Deleted.
(WebCore::TouchActionRegion::translate): Deleted.

  • rendering/EventRegion.h: Copied from Source/WebCore/rendering/TouchActionRegion.h.

(WebCore::EventRegion::isEmpty const):
(WebCore::EventRegion::contains const):
(WebCore::EventRegion::hasTouchActions const):
(WebCore::EventRegion::encode const):
(WebCore::EventRegion::decode):
(WebCore::TouchActionRegion::isEmpty const): Deleted.
(WebCore::TouchActionRegion::operator== const): Deleted.

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::paint):

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

(WebCore::RenderBlock::paintObject):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::collectEventRegionForFragments):

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

(WebCore::RenderLayerBacking::updateEventRegion):

  • rendering/RenderLayerModelObject.cpp:
  • rendering/SimpleLineLayoutFunctions.cpp:

(WebCore::SimpleLineLayout::paintFlow):

  • rendering/TouchActionRegion.cpp: Removed.
  • rendering/TouchActionRegion.h: Removed.

Source/WebKit:

  • Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h:
  • Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:

(WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):

  • UIProcess/RemoteLayerTree/RemoteLayerTreeNode.h:

(WebKit::RemoteLayerTreeNode::eventRegion const):

  • UIProcess/RemoteLayerTree/RemoteLayerTreeNode.mm:

(WebKit::RemoteLayerTreeNode::setEventRegion):

  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp:

(WebKit::PlatformCALayerRemote::setEventRegion):

  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.h:

LayoutTests:

  • pointerevents/ios/touch-action-region-basic-expected.txt:
  • pointerevents/ios/touch-action-region-layers-expected.txt:
  • pointerevents/ios/touch-action-region-pan-x-y-expected.txt:

Apr 5, 2019:

8:41 PM Changeset in webkit [243961] by commit-queue@webkit.org
  • 13 edits
    2 adds in trunk

We should pass minimumEffectiveDeviceWidth to web process on new page creation.
https://bugs.webkit.org/show_bug.cgi?id=196077
<rdar://problem/49108202>

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2019-04-05
Reviewed by Chris Dumez.

Source/WebCore:

If the page doesn't specify it requires to use the device width in viewport tag, we should try to scale down
the page to fit the window width.

Test: fast/viewport/ios/shrink-to-fit-for-page-without-viewport-meta.html

  • page/ViewportConfiguration.cpp:

(WebCore::ViewportConfiguration::updateDefaultConfiguration): Also update the minimum layout size

when the default configuration is changed.

(WebCore::ViewportConfiguration::nativeWebpageParametersWithShrinkToFit): Make sure we fit the content

to window width.

Source/WebKit:

When a new web view is created, it is possible we don't have the web content process till a load
is requested. This patch stashes minimumEffectiveDeviceWidth in WebPageProxy.cpp and passes that
value down to web process via WebPageCreationParameters when a new process is created, just like
we did for other values like viewportConfigurationLayoutSizeScaleFactor or viewportConfigurationViewLayoutSize.

  • Shared/WebPageCreationParameters.cpp:

(WebKit::WebPageCreationParameters::encode const): Encode viewportConfigurationMinimumEffectiveDeviceWidth value.
(WebKit::WebPageCreationParameters::decode): Decode viewportConfigurationMinimumEffectiveDeviceWidth value.

  • Shared/WebPageCreationParameters.h:
  • UIProcess/API/Cocoa/WKWebView.mm: Now that we stash the minimumEffectiveDeviceWidth value in WebPageProxy, we

don't need the iVar in WKWebView any more.

(-[WKWebView _dispatchSetViewLayoutSize:]): Use _page->minimumEffectiveDeviceWidth().
(-[WKWebView _setViewScale:]): Ditto.
(-[WKWebView _setMinimumEffectiveDeviceWidth:]): Ditto.
(-[WKWebView _minimumEffectiveDeviceWidth]): Ditto.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::creationParameters): Also add viewportConfigurationMinimumEffectiveDeviceWidth to

web process creation parameter.

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::minimumEffectiveDeviceWidth const): Returns m_viewportConfigurationMinimumEffectiveDeviceWidth.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::setViewportConfigurationViewLayoutSize): Pass parameters.viewportConfigurationMinimumEffectiveDeviceWidth

to web process.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::WebPage): Take viewportConfigurationMinimumEffectiveDeviceWidth value from the parameter and

set that to viewport configuration.

Tools:

Add an API test to verify the minimumEffectDeviceWidth is passed to web content process
on new web view.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

LayoutTests:

Add a layout test to verify the page shrinks to fit the window width when ignoreMetaViewport
flag is turned on.

  • fast/viewport/ios/shrink-to-fit-for-page-without-viewport-meta-expected.txt: Added.
  • fast/viewport/ios/shrink-to-fit-for-page-without-viewport-meta.html: Added.
7:05 PM Changeset in webkit [243960] by sbarati@apple.com
  • 2 edits in trunk/Tools

Make compare-results understand MotionMark
https://bugs.webkit.org/show_bug.cgi?id=196666

Reviewed by Yusuke Suzuki.

  • Scripts/compare-results:

(PLT5Results):
(detectMotionMark):
(detectMotionMark1_1):
(motionMarkResults):
(motionMark1_1Results):
(detectBenchmark):
(biggerIsBetter):
(main):

6:57 PM Changeset in webkit [243959] by ysuzuki@apple.com
  • 9 edits
    1 add in trunk

[JSC] OSRExit recovery for SpeculativeAdd does not consier "A = A + A" pattern
https://bugs.webkit.org/show_bug.cgi?id=196582

Reviewed by Saam Barati.

JSTests:

  • stress/add-overflow-check-with-three-same-registers.js: Added.

(foo):
(Number.prototype.valueOf):
(runWithNumber):

Source/JavaScriptCore:

In DFG, our ArithAdd with overflow is executed speculatively, and we recover the value when overflow flag is set.
The recovery is subtracting the operand from the destination to get the original two operands. Our recovery code
handles A + B = A, A + B = B cases. But it misses A + A = A case (here, A and B are GPRReg). Our recovery code
attempts to produce the original operand by performing A - A, and it always produces zero accidentally.

This patch adds the recovery code for A + A = A case. Because we know that this ArithAdd overflows, and operands were
same values, we can calculate the original operand from the destination value by ((int32_t)value >> 1) ^ 0x80000000.

We also found that FTL recovery code is dead. We remove them in this patch.

  • dfg/DFGOSRExit.cpp:

(JSC::DFG::OSRExit::executeOSRExit):
(JSC::DFG::OSRExit::compileExit):

  • dfg/DFGOSRExit.h:

(JSC::DFG::SpeculationRecovery::SpeculationRecovery):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileArithAdd):

  • ftl/FTLExitValue.cpp:

(JSC::FTL::ExitValue::dataFormat const):
(JSC::FTL::ExitValue::dumpInContext const):

  • ftl/FTLExitValue.h:

(JSC::FTL::ExitValue::isArgument const):
(JSC::FTL::ExitValue::hasIndexInStackmapLocations const):
(JSC::FTL::ExitValue::adjustStackmapLocationsIndexByOffset):
(JSC::FTL::ExitValue::recovery): Deleted.
(JSC::FTL::ExitValue::isRecovery const): Deleted.
(JSC::FTL::ExitValue::leftRecoveryArgument const): Deleted.
(JSC::FTL::ExitValue::rightRecoveryArgument const): Deleted.
(JSC::FTL::ExitValue::recoveryFormat const): Deleted.
(JSC::FTL::ExitValue::recoveryOpcode const): Deleted.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::preparePatchpointForExceptions):
(JSC::FTL::DFG::LowerDFGToB3::appendOSRExit):
(JSC::FTL::DFG::LowerDFGToB3::exitValueForNode):
(JSC::FTL::DFG::LowerDFGToB3::addAvailableRecovery): Deleted.

  • ftl/FTLOSRExitCompiler.cpp:

(JSC::FTL::compileRecovery):

6:08 PM Changeset in webkit [243958] by jer.noble@apple.com
  • 12 edits
    2 adds in trunk

[Cocoa] Deactivate the audio session before the WebProcess suspends.
https://bugs.webkit.org/show_bug.cgi?id=196658

Reviewed by Eric Carlson.

Source/WebCore:

Test: platform/mac/media/audio-session-deactivated-when-suspended.html

Deactivate the audio session when we are notified that the session will suspend.

Drive-by fix: don't try to begin playback when the process is suspended.

  • platform/audio/PlatformMediaSessionManager.cpp:

(WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback):
(WebCore::PlatformMediaSessionManager::processWillSuspend):
(WebCore::PlatformMediaSessionManager::processDidResume):

  • platform/audio/PlatformMediaSessionManager.h:

(WebCore::PlatformMediaSessionManager::processIsSuspended const):

  • testing/InternalSettings.cpp:

(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setShouldDeactivateAudioSession):

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

(WebCore::Internals::processWillSuspend):
(WebCore::Internals::processDidResume):

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

Source/WebKit:

Notify the PlatformMediaSessionManager when the process suspends or resumes.

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::actualPrepareToSuspend):
(WebKit::WebProcess::cancelPrepareToSuspend):
(WebKit::WebProcess::processDidResume):

LayoutTests:

  • platform/mac/media/audio-session-deactivated-when-suspended-expected.txt: Added.
  • platform/mac/media/audio-session-deactivated-when-suspended.html: Added.
6:02 PM Changeset in webkit [243957] by sihui_liu@apple.com
  • 5 edits in trunk/Source

[iOS] Web process gets suspended while holding locked database files
https://bugs.webkit.org/show_bug.cgi?id=196519
<rdar://problem/49531797>

Reviewed by Chris Dumez.

Source/WebCore:

Don't use DatabaseTracker singleton before it is initialized.

  • Modules/webdatabase/DatabaseTracker.cpp:

(WebCore::DatabaseTracker::isInitialized):

  • Modules/webdatabase/DatabaseTracker.h:

Source/WebKit:

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::actualPrepareToSuspend):

5:10 PM Changeset in webkit [243956] by achristensen@apple.com
  • 5 edits in trunk

Clicking "Go Back" from a safe browsing warning from an iframe should navigate the WKWebView back to the previous page
https://bugs.webkit.org/show_bug.cgi?id=196665
<rdar://45115669>

Reviewed by Geoff Garen.

Source/WebKit:

It is insufficient to just not navigate the subframe. We must leave the page that contained it.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _showSafeBrowsingWarning:completionHandler:]):

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::showSafeBrowsingWarning):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:

(goBack):
(+[SimpleLookupContext sharedLookupContext]):
(-[SimpleLookupContext lookUpURL:completionHandler:]):
(TEST):
(+[Simple3LookupContext sharedLookupContext]): Deleted.
(-[Simple3LookupContext lookUpURL:completionHandler:]): Deleted.

5:05 PM Changeset in webkit [243955] by Ryan Haddad
  • 3 edits
    1 delete in trunk

Unreviewed, rolling out r243665.

Caused iOS JSC tests to exit with an exception.

Reverted changeset:

"Assertion failed in JSC::createError"
https://bugs.webkit.org/show_bug.cgi?id=196305
https://trac.webkit.org/changeset/243665

5:03 PM Changeset in webkit [243954] by rniwa@webkit.org
  • 22 edits in trunk/Source

Make WeakPtr<Element> possible and deploy it in form associated elements code
https://bugs.webkit.org/show_bug.cgi?id=196626

Reviewed by Antti Koivisto.

Source/WebCore:

Make Element inherit from CanMakeWeakPtr and deploy WeakPtr<*Element> in FormAssociatedElement and HTMLFormElement.

No new tests sine there should be no behavioral change.

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

(WebCore::FormAssociatedElement::FormAssociatedElement):
(WebCore::FormAssociatedElement::insertedIntoAncestor):
(WebCore::FormAssociatedElement::setForm):
(WebCore::FormAssociatedElement::resetFormOwner):
(WebCore::FormAssociatedElement::formAttributeChanged):

  • html/FormAssociatedElement.h:

(WebCore::FormAssociatedElement::form const):

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::asFormNamedItem):
(WebCore::HTMLElement::asFormAssociatedElement):

  • html/HTMLElement.h:

(WebCore::HTMLElement::asFormNamedItem): Deleted.

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

(WebCore::HTMLFormControlsCollection::formImageElements const): Inlined into updateNamedElementCache.
(WebCore::HTMLFormControlsCollection::updateNamedElementCache const):

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

(WebCore::HTMLFormElement::registerInvalidAssociatedFormControl):
(WebCore::HTMLFormElement::removeInvalidAssociatedFormControlIfNeeded):
(WebCore::HTMLFormElement::registerImgElement):
(WebCore::HTMLFormElement::defaultButton const):
(WebCore::HTMLFormElement::resetDefaultButton):
(WebCore::HTMLFormElement::matchesValidPseudoClass const):
(WebCore::HTMLFormElement::matchesInvalidPseudoClass const):

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

(WebCore::HTMLImageElement::HTMLImageElement):
(WebCore::HTMLImageElement::insertedIntoAncestor):

  • html/HTMLImageElement.h:
  • html/HTMLInputElement.h:
  • html/HTMLMediaElement.h:
  • html/HTMLObjectElement.h:
  • html/HTMLPictureElement.h:
  • html/HTMLSlotElement.h:
  • svg/SVGElement.h:

Source/WTF:

Make it possible to call WeakHashSet::remove and WeakHashSet::contains with
a subclass type U of a type T used to define WeakReference<T>.

Also added computesEmpty, which is slightly more efficient than computeSize
when m_set is either empty or when there are non-released weak references in the set.

  • wtf/WeakHashSet.h:

(WTF::WeakHashSet::remove):
(WTF::WeakHashSet::contains const):
(WTF::WeakHashSet::computesEmpty const): Added.

  • wtf/WeakPtr.h: Added an explicit forward declaration of WeakHashSet to avoid

build failures in GTK+ and WPE ports.

4:39 PM Changeset in webkit [243953] by Devin Rousso
  • 17 edits in trunk

Web Inspector: TestSuite test cases should have their own timeout to ensure tests fail with output instead of timeout by test runner
https://bugs.webkit.org/show_bug.cgi?id=162814
<rdar://problem/28574102>

Reviewed by Brian Burg.

Source/WebInspectorUI:

A 10s timer is started for every test case added to an async suite. The timer is cleared
when the test finishes, but if the timer fires, the test is forcibly ended with an error.

This timer can be configured by setting a timeout value when adding the test case. Values
are expected to be in milliseconds. The value -1 will prevent a timer from being set.

This change also relaxes the expectation that any individual test case failure will stop the
rest of the suite from running. Since timers are set per test case, it is possible to
recover from a "bad" test case to still run the remaining test cases.

NOTE: there may be unexpected behaviour if a test times out, as the timer doesn't actually
stop the execution of the test, so it may still run and log information, which may appear
"out of nowhere" in the middle of other tests.

  • UserInterface/Test/TestSuite.js:

(TestSuite.prototype.get passCount):
(AsyncTestSuite.prototype.runTestCases):
(SyncTestSuite.prototype.runTestCases):

LayoutTests:

  • inspector/unit-tests/async-test-suite.html:
  • inspector/unit-tests/async-test-suite-expected.txt:
  • inspector/unit-tests/sync-test-suite.html:
  • inspector/unit-tests/sync-test-suite-expected.txt:
  • http/tests/inspector/network/set-resource-caching-disabled-disk-cache-expected.txt:
  • inspector/canvas/recording-2d.html:
  • inspector/canvas/recording-webgl-snapshots.html:
  • inspector/canvas/recording-webgl.html:
  • inspector/canvas/resources/shaderProgram-utilities.js:

(TestPage.registerInitializer.whenProgramAdded): Added.
(TestPage.registerInitializer.whenProgramRemoved): Added.
(TestPage.registerInitializer.window.initializeTestSuite):
(TestPage.registerInitializer.window.addSimpleTestCase):
(TestPage.registerInitializer.window.addParentCanvasRemovedTestCase):
(TestPage.registerInitializer.awaitProgramAdded): Added.
(TestPage.registerInitializer.awaitProgramRemoved): Added.

  • inspector/console/command-line-api-expected.txt:
  • inspector/console/heap-snapshot.html:
  • inspector/debugger/async-stack-trace-truncate-expected.txt:
  • inspector/debugger/pause-for-internal-scripts-expected.txt:
  • inspector/formatting/resources/utilities.js:

(TestPage.registerInitializer.window.addFormattingTests):

4:25 PM Changeset in webkit [243952] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-build] Add configuration and architecture for windows builders
https://bugs.webkit.org/show_bug.cgi?id=196660

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-build/config.json:
4:06 PM Changeset in webkit [243951] by achristensen@apple.com
  • 5 edits in trunk/Source/WebKit

Undeprecate WKNavigationData
https://bugs.webkit.org/show_bug.cgi?id=196559
<rdar://44927425>

Reviewed by Geoff Garen.

  • UIProcess/API/Cocoa/WKNavigationData.h:

It is used to communicate information from FrameLoaderClient::updateGlobalHistory() to the application.
This use in WKBrowsingContextHistoryDelegate is definitely still deprecated, but its use in
WKHistoryDelegatePrivate does not have an adequate replacement yet, so it must remain undeprecated SPI.

3:08 PM Changeset in webkit [243950] by Alan Coon
  • 9 edits in tags/Safari-608.1.15/Source/JavaScriptCore

Revert r243642. rdar://problem/49654398

3:08 PM Changeset in webkit [243949] by Alan Coon
  • 5 edits in tags/Safari-608.1.15

Revert r243839. rdar://problem/49654398

2:58 PM Changeset in webkit [243948] by ysuzuki@apple.com
  • 7 edits
    2 adds in trunk

SIGSEGV in JSC::BytecodeGenerator::addStringConstant
https://bugs.webkit.org/show_bug.cgi?id=196486

Reviewed by Saam Barati.

JSTests:

  • stress/arrow-function-and-use-strict-directive.js: Added.
  • stress/arrow-function-syntax.js: Added. Checking EOF token handling.

(checkSyntax):
(checkSyntaxError): Currently not using it. But it is useful for testing more things related to arrow function syntax.

Source/JavaScriptCore:

When parsing a FunctionExpression / FunctionDeclaration etc., we use SyntaxChecker for the body of the function because we do not have any interest on the nodes of the body at that time.
The nodes will be parsed with the ASTBuilder when the function itself is parsed for code generation. This works well previously because all the function ends with "}" previously.
SyntaxChecker lexes this "}" token, and parser restores the context back to ASTBuilder and continues parsing.

But now, we have ArrowFunctionExpression without braces arrow => expr. Let's consider the following code.

arrow => expr
"string!"

We parse arrow function's body with SyntaxChecker. At that time, we lex "string!" token under the SyntaxChecker context. But this means that we may not build string content for this token
since SyntaxChecker may not have interest on string content itself in certain case. After the parser is back to ASTBuilder, we parse "string!" as ExpressionStatement with string constant,
generate StringNode with non-built identifier (nullptr), and we accidentally create StringNode with nullptr.

This patch fixes this problem. The root cause of this problem is that the last token lexed in the previous context is used. We add lexCurrentTokenAgainUnderCurrentContext which will re-lex
the current token under the current context (may be ASTBuilder). This should be done only when the caller's context is different from SyntaxChecker, which avoids unnecessary lexing.
We leverage existing SavePoint mechanism to implement lexCurrentTokenAgainUnderCurrentContext cleanly.

And we also fix the bug in the existing SavePoint mechanism, which is shown in the attached test script. When we save LexerState, we do not save line terminator status. This patch also introduces
lexWithoutClearingLineTerminator, which lex the token without clearing line terminator status.

  • parser/ASTBuilder.h:

(JSC::ASTBuilder::createString):

  • parser/Lexer.cpp:

(JSC::Lexer<T>::parseMultilineComment):
(JSC::Lexer<T>::lexWithoutClearingLineTerminator): EOF token also should record offset information. This offset information is correctly handled in Lexer::setOffset too.
(JSC::Lexer<T>::lex): Deleted.

  • parser/Lexer.h:

(JSC::Lexer::hasLineTerminatorBeforeToken const):
(JSC::Lexer::setHasLineTerminatorBeforeToken):
(JSC::Lexer<T>::lex):
(JSC::Lexer::prevTerminator const): Deleted.
(JSC::Lexer::setTerminator): Deleted.

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::allowAutomaticSemicolon):
(JSC::Parser<LexerType>::parseSingleFunction):
(JSC::Parser<LexerType>::parseStatementListItem):
(JSC::Parser<LexerType>::maybeParseAsyncFunctionDeclarationStatement):
(JSC::Parser<LexerType>::parseFunctionInfo):
(JSC::Parser<LexerType>::parseClass):
(JSC::Parser<LexerType>::parseExportDeclaration):
(JSC::Parser<LexerType>::parseAssignmentExpression):
(JSC::Parser<LexerType>::parseYieldExpression):
(JSC::Parser<LexerType>::parseProperty):
(JSC::Parser<LexerType>::parsePrimaryExpression):
(JSC::Parser<LexerType>::parseMemberExpression):

  • parser/Parser.h:

(JSC::Parser::nextWithoutClearingLineTerminator):
(JSC::Parser::lexCurrentTokenAgainUnderCurrentContext):
(JSC::Parser::internalSaveLexerState):
(JSC::Parser::restoreLexerState):

2:52 PM Changeset in webkit [243947] by achristensen@apple.com
  • 4 edits
    1 add in /

REGRESSION(AppleWebKit/605.1.15): WebDownloadDelegate delegate methods called on non-main thread
https://bugs.webkit.org/show_bug.cgi?id=190918
<rdar://problem/45603890>

Reviewed by Darin Adler.

Source/WebKitLegacy/mac:

Since we not doing networking on the main thread but WebView is to be used on the main thread,
we need to hop delegate calls to the main thread similarly to how we do it in the non-download
delegate calls in WebCoreResourceHandleAsOperationQueueDelegate.

  • Misc/WebDownload.mm:

(-[WebDownloadInternal downloadDidBegin:]):
(-[WebDownloadInternal download:willSendRequest:redirectResponse:]):
(-[WebDownloadInternal download:didReceiveAuthenticationChallenge:]):
(-[WebDownloadInternal download:didReceiveResponse:]):
(-[WebDownloadInternal download:didReceiveDataOfLength:]):
(-[WebDownloadInternal download:shouldDecodeSourceDataOfMIMEType:]):
(-[WebDownloadInternal download:decideDestinationWithSuggestedFilename:]):
(-[WebDownloadInternal download:didCreateDestination:]):
(-[WebDownloadInternal downloadDidFinish:]):
(-[WebDownloadInternal download:didFailWithError:]):

Tools:

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

(-[DownloadThreadChecker webView:decidePolicyForMIMEType:request:frame:decisionListener:]):
(-[DownloadThreadChecker downloadDidBegin:]):
(-[DownloadThreadChecker download:shouldDecodeSourceDataOfMIMEType:]):
(-[DownloadThreadChecker download:decideDestinationWithSuggestedFilename:]):
(-[DownloadThreadChecker download:didCreateDestination:]):
(-[DownloadThreadChecker downloadDidFinish:]):
(TestWebKitAPI::TEST):

2:50 PM Changeset in webkit [243946] by achristensen@apple.com
  • 2 edits in /

Flaky API Test TestWebKitAPI.WebKit.PerformedActionForURL
https://bugs.webkit.org/show_bug.cgi?id=196151

Reviewed by Chris Dumez.

  • TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm:

(TEST):
We were assuming that messages were received in a certain order.
Actually wait for all messages to be received before checking results.

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

[Mac WK2 iOS Sim] Layout Test imported/w3c/web-platform-tests/webrtc/RTCRtpReceiver-getSynchronizationSources.https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=196633

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations: Mark test as flaky.
  • platform/mac-wk2/TestExpectations: Ditto.
2:36 PM Changeset in webkit [243944] by eric.carlson@apple.com
  • 4 edits in trunk/Source

Remove AUDIO_TOOLBOX_AUDIO_SESSION
https://bugs.webkit.org/show_bug.cgi?id=196653
<rdar://problem/49652098>

Reviewed by Jer Noble.

Source/WebKitLegacy/mac:

  • WebView/WebPreferences.mm:

(-[WebPreferences setAudioSessionCategoryOverride:]):

Source/WTF:

  • wtf/Platform.h:
2:28 PM Changeset in webkit [243943] by caitp@igalia.com
  • 7 edits in trunk

[JSC] Filter DontEnum properties in ProxyObject::getOwnPropertyNames()
https://bugs.webkit.org/show_bug.cgi?id=176810

Reviewed by Saam Barati.

JSTests:

Add tests for the DontEnum filtering, and variations of other tests
take the DontEnum-filtering path.

  • stress/proxy-own-keys.js:

(i.catch):
(set assert):
(set add):
(let.set new):
(get let):

Source/JavaScriptCore:

This adds conditional logic following the invariant checks, to perform
filtering in common uses of getOwnPropertyNames.

While this would ideally only be done in JSPropertyNameEnumerator, adding
the filtering to ProxyObject::performGetOwnPropertyNames maintains the
invariant that the EnumerationMode is properly followed.

  • runtime/PropertyNameArray.h:

(JSC::PropertyNameArray::reset):

  • runtime/ProxyObject.cpp:

(JSC::ProxyObject::performGetOwnPropertyNames):

Source/WebCore:

Previously, there was a comment here indicating uncertainty of whether it
was necessary to filter DontEnum properties explicitly or not. It turns
out that it was necessary in the case of JSC ProxyObjects.

This patch adds DontEnum filtering for ProxyObjects, however we continue
to explicitly filter them in JSDOMConvertRecord, which needs to use the
property descriptor after filtering. This change prevents observably
fetching the property descriptor twice per property.

  • bindings/js/JSDOMConvertRecord.h:
2:13 PM Changeset in webkit [243942] by Shawn Roberts
  • 2 edits in trunk/LayoutTests

editing/execCommand/print.html is crashing on iOS Debug
https://bugs.webkit.org/show_bug.cgi?id=196654

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations: Skipping test on iOS Debug while waiting for a fix
11:32 AM Changeset in webkit [243941] by Michael Catanzaro
  • 21 edits in trunk/Source

Unreviewed manual rollout of r243929
https://bugs.webkit.org/show_bug.cgi?id=196626

Source/WebCore:

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

(WebCore::FormAssociatedElement::FormAssociatedElement):
(WebCore::FormAssociatedElement::insertedIntoAncestor):
(WebCore::FormAssociatedElement::setForm):
(WebCore::FormAssociatedElement::resetFormOwner):
(WebCore::FormAssociatedElement::formAttributeChanged):

  • html/FormAssociatedElement.h:

(WebCore::FormAssociatedElement::form const):

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::asFormNamedItem): Deleted.
(WebCore::HTMLElement::asFormAssociatedElement): Deleted.

  • html/HTMLElement.h:

(WebCore::HTMLElement::asFormNamedItem):

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

(WebCore:: const):
(WebCore::HTMLFormControlsCollection::updateNamedElementCache const):

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

(WebCore::HTMLFormElement::registerInvalidAssociatedFormControl):
(WebCore::HTMLFormElement::removeInvalidAssociatedFormControlIfNeeded):
(WebCore::HTMLFormElement::registerImgElement):
(WebCore::HTMLFormElement::defaultButton const):
(WebCore::HTMLFormElement::resetDefaultButton):
(WebCore::HTMLFormElement::matchesValidPseudoClass const):
(WebCore::HTMLFormElement::matchesInvalidPseudoClass const):

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

(WebCore::HTMLImageElement::HTMLImageElement):
(WebCore::HTMLImageElement::insertedIntoAncestor):

  • html/HTMLImageElement.h:
  • html/HTMLInputElement.h:
  • html/HTMLMediaElement.h:
  • html/HTMLObjectElement.h:
  • html/HTMLPictureElement.h:
  • html/HTMLSlotElement.h:
  • svg/SVGElement.h:

Source/WTF:

  • wtf/WeakHashSet.h:

(WTF::WeakHashSet::remove):
(WTF::WeakHashSet::contains const):
(WTF::WeakHashSet::computesEmpty const): Deleted.

11:21 AM Changeset in webkit [243940] by eric.carlson@apple.com
  • 3 edits in trunk/Source/WebKitLegacy/mac

Stop including <AudioToolbox/AudioSession.h>
https://bugs.webkit.org/show_bug.cgi?id=196648
<rdar://problem/39665771>

Reviewed by Jer Noble.

  • WebView/WebPreferencesPrivate.h:
11:06 AM Changeset in webkit [243939] by sihui_liu@apple.com
  • 9 edits in trunk/Source

[iOS] Web process gets suspended while holding locked database files
https://bugs.webkit.org/show_bug.cgi?id=196519
<rdar://problem/49531797>

Reviewed by Chris Dumez.

Source/WebCore:

We should close all databases and make sure not open new databases when web process is ready to suspend.

  • platform/sql/SQLiteDatabase.cpp:

(WebCore::SQLiteDatabase::setIsDatabaseOpeningForbidden):
(WebCore::SQLiteDatabase::open):

  • platform/sql/SQLiteDatabase.h:
  • platform/sql/SQLiteDatabaseTracker.cpp:

(WebCore::SQLiteDatabaseTracker::setClient):
(WebCore::SQLiteDatabaseTracker::incrementTransactionInProgressCount):
(WebCore::SQLiteDatabaseTracker::decrementTransactionInProgressCount):
(WebCore::SQLiteDatabaseTracker::hasTransactionInProgress):

Source/WebKit:

  • Shared/WebSQLiteDatabaseTracker.cpp:

(WebKit::WebSQLiteDatabaseTracker::~WebSQLiteDatabaseTracker):

  • Shared/WebSQLiteDatabaseTracker.h:
  • WebProcess/WebProcess.cpp:

(WebKit::m_webSQLiteDatabaseTracker):
(WebKit::WebProcess::actualPrepareToSuspend):
(WebKit::WebProcess::processWillSuspendImminently):
(WebKit::WebProcess::cancelPrepareToSuspend):
(WebKit::WebProcess::processDidResume):

  • WebProcess/WebProcess.h:
11:01 AM Changeset in webkit [243938] by Kocsen Chung
  • 7 edits in tags/Safari-608.1.13.3.1/Source

Versioning.

10:22 AM Changeset in webkit [243937] by Kocsen Chung
  • 1 copy in tags/Safari-608.1.13.3.1

New tag.

10:14 AM Changeset in webkit [243936] by Jonathan Bedard
  • 2 edits in trunk/Tools

webkitpy: Don't run subsequent rounds if interrupted
https://bugs.webkit.org/show_bug.cgi?id=196646

Reviewed by Aakash Jain.

  • Scripts/webkitpy/layout_tests/controllers/manager.py:

(Manager.run): Bail out if interrupted.

9:30 AM Changeset in webkit [243935] by sihui_liu@apple.com
  • 2 edits in trunk/Tools

Test sessionStorage in PSON private browsing mode
https://bugs.webkit.org/show_bug.cgi?id=196561

Reviewed by Alex Christensen.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
8:35 AM Changeset in webkit [243934] by commit-queue@webkit.org
  • 28 edits
    1 delete in trunk

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

This change breaks build of WPE and GTK ports (Requested by
annulen on #webkit).

Reverted changeset:

"[CMake][WTF] Mirror XCode header directories"
https://bugs.webkit.org/show_bug.cgi?id=191662
https://trac.webkit.org/changeset/243833

6:45 AM Changeset in webkit [243933] by caitp@igalia.com
  • 8 edits in trunk

JSTests:
[JSC] throw if 'ownKeys' Proxy trap result contains duplicate keys
https://bugs.webkit.org/show_bug.cgi?id=185211

Reviewed by Saam Barati.

This is for the normative spec change in https://github.com/tc39/ecma262/pull/833

This changes several assertions to expect a TypeError to be thrown (in some cases,
changing thee expected message).

  • es6/Proxy_ownKeys_duplicates.js:

(handler):
(shouldThrow):
(test):

  • stress/Object_static_methods_Object.getOwnPropertyDescriptors-proxy.js:

(shouldThrow):

  • stress/proxy-own-keys.js:

(i.catch):
(assert):

LayoutTests/imported/w3c:
[JSC] throw if 'ownKeys' Proxy trap result contains duplicate keys
https://bugs.webkit.org/show_bug.cgi?id=185211

Reviewed by Saam Barati.

This is for the normative spec change in https://github.com/tc39/ecma262/pull/833

Change some test expectations which were previously expected to fail.

  • web-platform-tests/fetch/api/headers/headers-record-expected.txt:

Source/JavaScriptCore:
[JSC] throw if ownKeys Proxy trap result contains duplicate keys
https://bugs.webkit.org/show_bug.cgi?id=185211

Reviewed by Saam Barati.

Implements the normative spec change in https://github.com/tc39/ecma262/pull/833

This involves tracking duplicate keys returned from the ownKeys trap in yet
another HashTable, and may incur a minor performance penalty in some cases. This
is not expected to significantly affect web performance.

  • runtime/ProxyObject.cpp:

(JSC::ProxyObject::performGetOwnPropertyNames):

5:42 AM Changeset in webkit [243932] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit

REGRESSION(r240685): Remove duplicate Headers entry for _WKInspectorWindow.h in Xcode project
<https://bugs.webkit.org/show_bug.cgi?id=193951>
<rdar://problem/47621366>

Fixes the following build warnings:

Warning: Multiple build commands for output file WebKit2_WebKit.roots/BuildRecords/WebKit2_installhdrs/Root/System/Library/Frameworks/WebKit.framework/PrivateHeaders/_WKInspectorWindow.h
Warning: Multiple build commands for output file WebKit2_WebKit.roots/BuildRecords/WebKit2_installapi/Root/System/Library/Frameworks/WebKit.framework/PrivateHeaders/_WKInspectorWindow.h
Warning: Multiple build commands for output file WebKit2_WebKit.roots/BuildRecords/WebKit2_install/Root/System/Library/Frameworks/WebKit.framework/PrivateHeaders/_WKInspectorWindow.h

  • WebKit.xcodeproj/project.pbxproj: Remove duplicate entry for

_WKInspectorWindow.h. In r240685, a second Headers entry was
added, but the first one was never removed.

5:25 AM Changeset in webkit [243931] by ddkilzer@apple.com
  • 14 edits in trunk/Source/WebCore

REGRESSION(r243887): Try to fix Windows builds by including <wtf/IsoMalloc.h>

Caused by:

[WebCore] Put most of derived classes of ScriptWrappable into IsoHeap
https://bugs.webkit.org/show_bug.cgi?id=196475

  • css/CSSComputedStyleDeclaration.h:
  • dom/DOMRectReadOnly.h:
  • dom/LiveNodeList.h:
  • dom/NodeIterator.h:
  • dom/TreeWalker.h:
  • fileapi/Blob.h:
  • fileapi/File.h:
  • fileapi/FileList.h:
  • html/CachedHTMLCollection.h:
  • html/HTMLFormElement.h:
  • html/HTMLNameCollection.h:
  • html/canvas/GPUBasedCanvasRenderingContext.h:
  • page/RemoteDOMWindow.h:
4:30 AM Changeset in webkit [243930] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[WPE] Unreviewed gardening, update unexpected passes

  • platform/wpe/TestExpectations:
1:22 AM Changeset in webkit [243929] by rniwa@webkit.org
  • 21 edits in trunk/Source

Make WeakPtr<Element> possible and deploy it in form associated elements code
https://bugs.webkit.org/show_bug.cgi?id=196626

Reviewed by Antti Koivisto.

Source/WebCore:

Make Element inherit from CanMakeWeakPtr and deploy WeakPtr<*Element> in FormAssociatedElement and HTMLFormElement.

No new tests sine there should be no behavioral change.

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

(WebCore::FormAssociatedElement::FormAssociatedElement):
(WebCore::FormAssociatedElement::insertedIntoAncestor):
(WebCore::FormAssociatedElement::setForm):
(WebCore::FormAssociatedElement::resetFormOwner):
(WebCore::FormAssociatedElement::formAttributeChanged):

  • html/FormAssociatedElement.h:

(WebCore::FormAssociatedElement::form const):

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::asFormNamedItem):
(WebCore::HTMLElement::asFormAssociatedElement):

  • html/HTMLElement.h:

(WebCore::HTMLElement::asFormNamedItem): Deleted.

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

(WebCore::HTMLFormControlsCollection::formImageElements const): Inlined into updateNamedElementCache.
(WebCore::HTMLFormControlsCollection::updateNamedElementCache const):

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

(WebCore::HTMLFormElement::registerInvalidAssociatedFormControl):
(WebCore::HTMLFormElement::removeInvalidAssociatedFormControlIfNeeded):
(WebCore::HTMLFormElement::registerImgElement):
(WebCore::HTMLFormElement::defaultButton const):
(WebCore::HTMLFormElement::resetDefaultButton):
(WebCore::HTMLFormElement::matchesValidPseudoClass const):
(WebCore::HTMLFormElement::matchesInvalidPseudoClass const):

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

(WebCore::HTMLImageElement::HTMLImageElement):
(WebCore::HTMLImageElement::insertedIntoAncestor):

  • html/HTMLImageElement.h:
  • html/HTMLInputElement.h:
  • html/HTMLMediaElement.h:
  • html/HTMLObjectElement.h:
  • html/HTMLPictureElement.h:
  • html/HTMLSlotElement.h:
  • svg/SVGElement.h:

Source/WTF:

Make it possible to call WeakHashSet::remove and WeakHashSet::contains with
a subclass type U of a type T used to define WeakReference<T>.

Also added computesEmpty, which is slightly more efficient than computeSize
when m_set is either empty or when there are non-released weak references in the set.

  • wtf/WeakHashSet.h:

(WTF::WeakHashSet::remove):
(WTF::WeakHashSet::contains const):
(WTF::WeakHashSet::computesEmpty const): Added.

12:35 AM Changeset in webkit [243928] by Carlos Garcia Campos
  • 15 edits in trunk/Source

[ATK] Use a smart pointer for AccessibilityObject wrapper and remove GTK specific code
https://bugs.webkit.org/show_bug.cgi?id=196593
<rdar://problem/49599153>

Reviewed by Michael Catanzaro.

Source/WebCore:

We have specific code for GTK to get/set the wrapper only because we don't use smart pointers. Also use
WebKitAccessible as AccessibilityObjectWrapper instead of generic AtkObject, to enforce wrappers to be
WebKitAccessible instances. This requires a few casts to AtkObject.

  • accessibility/AccessibilityObject.h:

(WebCore::AccessibilityObject::setWrapper):

  • accessibility/AccessibilityObjectInterface.h:
  • accessibility/atk/AXObjectCacheAtk.cpp:

(WebCore::AXObjectCache::detachWrapper):
(WebCore::AXObjectCache::attachWrapper):
(WebCore::notifyChildrenSelectionChange):
(WebCore::AXObjectCache::postPlatformNotification):
(WebCore::AXObjectCache::nodeTextChangePlatformNotification):
(WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
(WebCore::AXObjectCache::platformHandleFocusedUIElementChanged):

  • accessibility/atk/AccessibilityObjectAtk.cpp:
  • accessibility/atk/WebKitAccessibleInterfaceComponent.cpp:

(webkitAccessibleComponentRefAccessibleAtPoint):

  • accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp:

(webkitAccessibleHypertextGetLink):
(webkitAccessibleHypertextGetNLinks):

  • accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:

(webkitAccessibleSelectionRefSelection):

  • accessibility/atk/WebKitAccessibleInterfaceTable.cpp:

(webkitAccessibleTableRefAt):
(webkitAccessibleTableGetColumnHeader):
(webkitAccessibleTableGetRowHeader):
(webkitAccessibleTableGetCaption):

  • accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:

(convertToGPtrArray):
(webkitAccessibleTableCellGetTable):

  • accessibility/atk/WebKitAccessibleInterfaceText.cpp:

(accessibilityObjectLength):

  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(setAtkRelationSetFromCoreObject):
(atkParentOfRootObject):
(webkitAccessibleGetParent):
(webkitAccessibleRefChild):
(isTextWithCaret):

  • editing/atk/FrameSelectionAtk.cpp:

(WebCore::emitTextSelectionChange):
(WebCore::maybeEmitTextFocusChange):

Source/WebKit:

  • WebProcess/WebPage/atk/WebKitWebPageAccessibilityObject.cpp:

(accessibilityRootObjectWrapper): Cast wrapper() as AtkObject.

Note: See TracTimeline for information about the timeline view.