Timeline



Sep 18, 2018:

8:53 PM Changeset in webkit [236162] by ajuma@chromium.org
  • 2 edits in trunk/LayoutTests

[macOS WK1] Mark intersection-observer/no-document-leak.html as a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=189731

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
7:03 PM BuildingCairoOnWindows edited by Fujii Hironori
(diff)
6:35 PM BuildingCairoOnWindows edited by Fujii Hironori
(diff)
5:57 PM Changeset in webkit [236161] by mark.lam@apple.com
  • 6 edits
    1 add in trunk

Ensure that ForInContexts are invalidated if their loop local is over-written.
https://bugs.webkit.org/show_bug.cgi?id=189571
<rdar://problem/44402277>

Reviewed by Saam Barati.

JSTests:

  • stress/regress-189571.js: Added.

Source/JavaScriptCore:

Instead of hunting down every place in the BytecodeGenerator that potentially
needs to invalidate an enclosing ForInContext (if one exists), we simply iterate
the bytecode range of the loop body when the ForInContext is popped, and
invalidate the context if we ever find the loop temp variable over-written.

This has 2 benefits:

  1. It ensures that every type of opcode that can write to the loop temp will be handled appropriately, not just the op_mov that we've hunted down.
  2. It avoids us having to check the BytecodeGenerator's m_forInContextStack every time we emit an op_mov (or other opcodes that can write to a local) even when we're not inside a for-in loop.

JSC benchmarks show that that this change is performance neutral.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::pushIndexedForInScope):
(JSC::BytecodeGenerator::popIndexedForInScope):
(JSC::BytecodeGenerator::pushStructureForInScope):
(JSC::BytecodeGenerator::popStructureForInScope):
(JSC::ForInContext::finalize):
(JSC::StructureForInContext::finalize):
(JSC::IndexedForInContext::finalize):
(JSC::BytecodeGenerator::invalidateForInContextForLocal): Deleted.

  • bytecompiler/BytecodeGenerator.h:

(JSC::ForInContext::ForInContext):
(JSC::ForInContext::bodyBytecodeStartOffset const):
(JSC::StructureForInContext::StructureForInContext):
(JSC::IndexedForInContext::IndexedForInContext):

  • bytecompiler/NodesCodegen.cpp:

(JSC::PostfixNode::emitResolve):
(JSC::PrefixNode::emitResolve):
(JSC::ReadModifyResolveNode::emitBytecode):
(JSC::AssignResolveNode::emitBytecode):
(JSC::EmptyLetExpression::emitBytecode):
(JSC::ForInNode::emitLoopHeader):
(JSC::ForOfNode::emitBytecode):
(JSC::BindingNode::bindValue const):
(JSC::AssignmentElementNode::bindValue const):

  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

5:51 PM Changeset in webkit [236160] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

[iOS] Layout Test imported/w3c/web-platform-tests/service-workers/service-worker/fetch-cors-xhr.https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=189727

Unreviewed test gardening.

  • platform/ios/TestExpectations:
5:51 PM Changeset in webkit [236159] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

[iOS] Layout test imported/w3c/web-platform-tests/service-workers/service-worker/fetch-mixed-content-to-inscope.https.html and fetch-mixed-content-to-outscope.https.html are flaky failures
https://bugs.webkit.org/show_bug.cgi?id=189726

Unreviewed test gardening.

  • platform/ios/TestExpectations:
5:01 PM October 2018 Meeting edited by Simon Fraser
(diff)
5:00 PM October 2018 Meeting edited by Simon Fraser
(diff)
4:59 PM October 2018 Meeting edited by Simon Fraser
(diff)
4:17 PM Changeset in webkit [236158] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

[iOS] Allow WebContent process to check the "Protocol Characteristics" of files to which it has access
https://bugs.webkit.org/show_bug.cgi?id=189712
<rdar://problem/44386429>

Reviewed by Alex Christensen.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
4:16 PM October 2018 Meeting edited by Jon Davis
(diff)
4:16 PM October 2018 Meeting created by Jon Davis
3:05 PM Changeset in webkit [236157] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

[iOS] Crash under WebPageProxy::navigationGestureSnapshotWasRemoved()
https://bugs.webkit.org/show_bug.cgi?id=189714
<rdar://problem/32839498>

Reviewed by Tim Horton.

The ViewGestureController::removeSwipeSnapshot() implementation for iOS calls
navigationGestureSnapshotWasRemoved() on m_webPageProxyForBackForwardListForCurrentSwipe.
m_webPageProxyForBackForwardListForCurrentSwipe can differ from m_webPageProxy, and
is a RefPtr<>. This means that this WebPageProxy's WKWebView might have been deallocated,
in which case we'll crash when trying to use the pageClient in
WebPageProxy::navigationGestureSnapshotWasRemoved(). To address the issue, we now return
early in WebPageProxy::navigationGestureSnapshotWasRemoved() if m_isClosed is true,
after resetting m_isShowingNavigationGestureSnapshot to false but *before* trying to use
the pageClient. When a WKWebView is deallocated, it calls WebPageProxy::close(), which
sets m_isClosed to true.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::navigationGestureSnapshotWasRemoved):

2:52 PM Changeset in webkit [236156] by Basuke Suzuki
  • 8 edits in trunk/Source

[Curl] Limit capturing extra metrics for Web Inspector when not required.
https://bugs.webkit.org/show_bug.cgi?id=189520

Reviewed by Alex Christensen.

Respect the value of NetworkDataTask::shouldCaptureExtraNetworkLoadMetrics() to reduce the process
time when they are not needed.

Source/WebCore:

No new tests because there's no behavior change.

  • platform/network/curl/CurlContext.cpp:

(WebCore::CurlHandle::getNetworkLoadMetrics):
(WebCore::CurlHandle::addExtraNetworkLoadMetrics):

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

(WebCore::CurlRequest::CurlRequest):
(WebCore::CurlRequest::updateNetworkLoadMetrics):

  • platform/network/curl/CurlRequest.h:

(WebCore::CurlRequest::create):

  • platform/network/curl/ResourceHandleCurl.cpp:

(WebCore::ResourceHandle::createCurlRequest):

Source/WebKit:

  • NetworkProcess/curl/NetworkDataTaskCurl.cpp:

(WebKit::NetworkDataTaskCurl::createCurlRequest):

2:38 PM Changeset in webkit [236155] by Megan Gardner
  • 6 edits
    8 adds in trunk

Support Images Module Level 4's double-position gradient color stop syntax
https://bugs.webkit.org/show_bug.cgi?id=186154
<rdar://problem/44158152>

Reviewed by Simon Fraser.

Source/WebCore:

The CSS spec for all gradients allows for each color stop to have two angles to be used for hints.
This makes pie chart and checkerboard conic gradients much simpler to write.
Any time you want to have a hard line in a gradient, this syntax simplifies the gradient specification.

Test: fast/gradients/conic-two-hints.html
Test: fast/gradients/linear-two-hints-angle.html
Test: fast/gradients/linear-two-hints.html
Test: fast/gradients/radial-two-hints.html

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::consumeAngularGradientColorStops): Removed.
(WebCore::CSSPropertyParserHelpers::consumeGradientColorStops):

LayoutTests:

Test that uses two angles or positions per color stop.

  • TestExpectations:
  • fast/gradients/conic-two-hints-expected.html: Added.
  • fast/gradients/conic-two-hints.html: Added.
  • fast/gradients/linear-two-hints-angle-expected.html: Added.
  • fast/gradients/linear-two-hints-angle.html: Added.
  • fast/gradients/linear-two-hints-expected.html: Added.
  • fast/gradients/linear-two-hints.html: Added.
  • fast/gradients/radial-two-hints-expected.html: Added.
  • fast/gradients/radial-two-hints.html: Added.
  • platform/ios-12/TestExpectations:
  • platform/mac/TestExpectations:
2:03 PM Changeset in webkit [236154] by achristensen@apple.com
  • 8 edits in trunk/Source/WebKit

Make WebPageProxy always have a API::NavigationClient instead of always having a API::LoaderClient and API::PolicyClient
https://bugs.webkit.org/show_bug.cgi?id=189012

Reviewed by Andy Estes.

When WebKit2 was being developed, we initially made the C API WKPageSetPagePolicyClient and WKPageSetPageLoaderClient.
When we released WKWebView, it was using WKNavigationDelegate, equivalent to WKPageSetPageNavigationClient.
To support one or the other, we would use the navigation client if it was present, but if not we would fall back to the
loader or policy client. Since the loader and policy clients are now being minimally supported only until legacy
software migrates to the navigation client, we are adding new functionality to the navigation client.
Making the navigation client the default and using the loader or policy client only if they are present supports
the legacy software and makes us have fewer forgotten null checks when adding new functionality to the navigation client.

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetPageNavigationClient):

  • UIProcess/Cocoa/NavigationState.h:
  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::NavigationState::createNavigationClient):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::setNavigationClient):
(WebKit::WebPageProxy::setLoaderClient):
(WebKit::WebPageProxy::setPolicyClient):
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::didChangeBackForwardList):
(WebKit::WebPageProxy::willGoToBackForwardListItem):
(WebKit::WebPageProxy::findPlugin):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::WebPageProxy::willPerformClientRedirectForFrame):
(WebKit::WebPageProxy::didCancelClientRedirectForFrame):
(WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
(WebKit::WebPageProxy::didFinishLoadForFrame):
(WebKit::WebPageProxy::didFailLoadForFrame):
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
(WebKit::WebPageProxy::didReachLayoutMilestone):
(WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
(WebKit::WebPageProxy::didRunInsecureContentForFrame):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponse):
(WebKit::WebPageProxy::contentRuleListNotification):
(WebKit::WebPageProxy::webGLPolicyForURL):
(WebKit::WebPageProxy::resolveWebGLPolicyForURL):
(WebKit::WebPageProxy::processDidBecomeUnresponsive):
(WebKit::WebPageProxy::processDidBecomeResponsive):
(WebKit::WebPageProxy::dispatchProcessDidTerminate):
(WebKit::WebPageProxy::didReceiveAuthenticationChallengeProxy):
(WebKit::WebPageProxy::wrapCryptoKey):
(WebKit::WebPageProxy::unwrapCryptoKey):
(WebKit::WebPageProxy::signedPublicKeyAndChallengeString):
(WebKit::WebPageProxy::navigationGestureDidBegin):
(WebKit::WebPageProxy::navigationGestureWillEnd):
(WebKit::WebPageProxy::navigationGestureDidEnd):
(WebKit::WebPageProxy::navigationGestureSnapshotWasRemoved):

  • UIProcess/WebPageProxy.h:
1:55 PM Changeset in webkit [236153] by achristensen@apple.com
  • 21 edits in trunk/Source/WebKit

Clean up AuthenticationChallengeProxy
https://bugs.webkit.org/show_bug.cgi?id=189668

Reviewed by Youenn Fablet.

At its core, it's a CompletionHandler with some information.
Make it more elegant and simple with no change in behavior and reduce the complexity of this security-sensitive object.

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(toNSURLSessionAuthChallengeDisposition):

  • Shared/Authentication/AuthenticationManager.cpp:

(WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge):

  • Shared/Authentication/AuthenticationManager.h:
  • UIProcess/API/C/WKAuthenticationChallenge.cpp:

(WKAuthenticationChallengeGetDecisionListener):
(WKAuthenticationChallengeGetProtectionSpace):
(WKAuthenticationChallengeGetProposedCredential):
(WKAuthenticationChallengeGetPreviousFailureCount):

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetPageNavigationClient):

  • UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.mm:

(-[WKNSURLAuthenticationChallengeSender cancelAuthenticationChallenge:]):
(-[WKNSURLAuthenticationChallengeSender continueWithoutCredentialForAuthenticationChallenge:]):
(-[WKNSURLAuthenticationChallengeSender useCredential:forAuthenticationChallenge:]):
(-[WKNSURLAuthenticationChallengeSender performDefaultHandlingForAuthenticationChallenge:]):
(-[WKNSURLAuthenticationChallengeSender rejectProtectionSpaceAndContinueWithChallenge:]):

  • UIProcess/Authentication/AuthenticationChallengeProxy.cpp:

(WebKit::AuthenticationChallengeProxy::AuthenticationChallengeProxy):
(WebKit::AuthenticationChallengeProxy::~AuthenticationChallengeProxy): Deleted.
(WebKit::AuthenticationChallengeProxy::useCredential): Deleted.
(WebKit::AuthenticationChallengeProxy::cancel): Deleted.
(WebKit::AuthenticationChallengeProxy::performDefaultHandling): Deleted.
(WebKit::AuthenticationChallengeProxy::rejectProtectionSpaceAndContinue): Deleted.
(WebKit::AuthenticationChallengeProxy::proposedCredential const): Deleted.
(WebKit::AuthenticationChallengeProxy::protectionSpace const): Deleted.
(WebKit::AuthenticationChallengeProxy::setSecKeyProxyStore): Deleted.

  • UIProcess/Authentication/AuthenticationChallengeProxy.h:

(WebKit::AuthenticationChallengeProxy::create):
(WebKit::AuthenticationChallengeProxy::listener const):
(WebKit::AuthenticationChallengeProxy::previousFailureCount const): Deleted.

  • UIProcess/Authentication/AuthenticationDecisionListener.cpp:

(WebKit::AuthenticationDecisionListener::AuthenticationDecisionListener):
(WebKit::AuthenticationDecisionListener::~AuthenticationDecisionListener):
(WebKit::AuthenticationDecisionListener::useCredential):
(WebKit::AuthenticationDecisionListener::cancel):
(WebKit::AuthenticationDecisionListener::performDefaultHandling):
(WebKit::AuthenticationDecisionListener::rejectProtectionSpaceAndContinue):
(WebKit::AuthenticationDecisionListener::detachChallenge): Deleted.

  • UIProcess/Authentication/AuthenticationDecisionListener.h:

(WebKit::AuthenticationDecisionListener::create):

  • UIProcess/Authentication/cocoa/AuthenticationChallengeProxyCocoa.mm:

(WebKit::AuthenticationChallengeProxy::sendClientCertificateCredentialOverXpc):
(WebKit::AuthenticationChallengeProxy::sendClientCertificateCredentialOverXpc const): Deleted.

  • UIProcess/Cocoa/DownloadClient.mm:

(WebKit::DownloadClient::didReceiveAuthenticationChallenge):

  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::NavigationState::NavigationClient::didReceiveAuthenticationChallenge):

  • UIProcess/Downloads/DownloadProxy.cpp:

(WebKit::DownloadProxy::didReceiveAuthenticationChallenge):

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::didReceiveAuthenticationChallenge):

  • UIProcess/ServiceWorkerProcessProxy.cpp:

(WebKit::ServiceWorkerProcessProxy::didReceiveAuthenticationChallenge):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::secKeyProxyStore):
(WebKit::WebPageProxy::didReceiveAuthenticationChallengeProxy):

  • UIProcess/WebPageProxy.h:
1:54 PM Changeset in webkit [236152] by achristensen@apple.com
  • 3 edits
    1 add in trunk/Source/WebKit

Add script to generate WebContent service resource files and change XPC service main SPI to have it's own header
https://bugs.webkit.org/show_bug.cgi?id=188601

Patch by Ben Richards <benton_richards@apple.com> on 2018-09-18
Reviewed by Dan Bernstein.

Added a script to the process entitlements build phase of the WebContent service that copies resource
files to WebKit.framework/PrivateHeaders/CustomWebContentResources. These resource files are to
be used by clients who would like to make a custom WebContent service.

  • Scripts/copy-webcontent-resources-to-private-headers.sh: Added.
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/API/Cocoa/WKWebProcess.h: Drive-by fix to make this header compileable alone.
1:10 PM Changeset in webkit [236151] by Jonathan Bedard
  • 2 edits in trunk/Tools

webkitpy: Clobbering and building occurs multiple times for iOS Simulator ports
https://bugs.webkit.org/show_bug.cgi?id=189702
<rdar://problem/44541704>

Reviewed by Aakash Jain.

  • Scripts/webkitpy/layout_tests/controllers/manager.py:

(Manager._set_up_run): Move build check and clobbering to run, since set up is
run multiple times for iOS simulator.
(Manager.run):

11:45 AM Changeset in webkit [236150] by Ryan Haddad
  • 1 edit
    3 adds in branches/safari-606-branch/LayoutTests

Unreviewed test gardening, rebaseline http/tests/ssl/applepay/ApplePayButton.html.

  • platform/mac-highsierra/http/tests/ssl/applepay/ApplePayButton-expected.txt: Added.
11:34 AM Changeset in webkit [236149] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

Remove the unused RenderLayerCompositor::enclosingCompositorFlushingLayers()
https://bugs.webkit.org/show_bug.cgi?id=189689

Reviewed by Alex Christensen.

enclosingCompositorFlushingLayers() was added in r76196 but never used. Also use
a SetForScope<>.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::flushPendingLayerChanges):
(WebCore::RenderLayerCompositor::enclosingCompositorFlushingLayers const): Deleted.

  • rendering/RenderLayerCompositor.h:
11:30 AM Changeset in webkit [236148] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[macOS] Frequent leaks seen under WebCore::gpuIDForDisplayMask
https://bugs.webkit.org/show_bug.cgi?id=189685
<rdar://problem/44541974>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2018-09-18
Reviewed by Per Arne Vollan.

  • platform/mac/PlatformScreenMac.mm:

(WebCore::gpuIDForDisplayMask):

11:29 AM Changeset in webkit [236147] by youenn@apple.com
  • 17 edits
    4 adds
    1 delete in trunk

Implement RTCRtpReceiver getContributingSources/getSynchronizationSources
https://bugs.webkit.org/show_bug.cgi?id=189671

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

  • web-platform-tests/webrtc/RTCRtpReceiver-getContributingSources.https-expected.txt:
  • web-platform-tests/webrtc/RTCRtpReceiver-getSynchronizationSources.https-expected.txt:
  • web-platform-tests/webrtc/interfaces-expected.txt: Removed, as no longer needed.

Source/ThirdParty/libwebrtc:

  • Configurations/libwebrtc.iOS.exp:
  • Configurations/libwebrtc.iOSsim.exp:
  • Configurations/libwebrtc.mac.exp:

Source/WebCore:

Introduce implementation of these two methods by calling the libwebrtc corresponding method.
Add corresponding IDL as per spec.
Covered by rebased WPT tests.

  • CMakeLists.txt:
  • DerivedSources.make:
  • Modules/mediastream/RTCRtpContributingSource.h: Added.
  • Modules/mediastream/RTCRtpContributingSource.idl: Added.
  • Modules/mediastream/RTCRtpReceiver.h:

(WebCore::RTCRtpReceiver::getContributingSources const):
(WebCore::RTCRtpReceiver::getSynchronizationSources const):

  • Modules/mediastream/RTCRtpReceiver.idl:
  • Modules/mediastream/RTCRtpReceiverBackend.h:

(WebCore::RTCRtpReceiverBackend::getContributingSources const):
(WebCore::RTCRtpReceiverBackend::getSynchronizationSources const):

  • Modules/mediastream/RTCRtpSynchronizationSource.h: Added.
  • Modules/mediastream/RTCRtpSynchronizationSource.idl: Added.
  • Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.cpp:

(WebCore::fillRTCRtpContributingSource):
(WebCore::toRTCRtpContributingSource):
(WebCore::toRTCRtpSynchronizationSource):
(WebCore::LibWebRTCRtpReceiverBackend::getContributingSources const):
(WebCore::LibWebRTCRtpReceiverBackend::getSynchronizationSources const):

  • Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.h:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
10:59 AM Changeset in webkit [236146] by Ryan Haddad
  • 16 edits in trunk/Source/WebKit

Unreviewed, rolling out r236138.

Caused API test and layout test failures on iOS.

Reverted changeset:

"REGRESSION (PSON): White or Black flash occurs when process
swapping on navigation on Mac"
https://bugs.webkit.org/show_bug.cgi?id=189663
https://trac.webkit.org/changeset/236138

10:32 AM Changeset in webkit [236145] by eric.carlson@apple.com
  • 3 edits in trunk/Source/WebKit

Always log when granting/revoking capture sandbox extensions
https://bugs.webkit.org/show_bug.cgi?id=189701
<rdar://problem/44564029>

Reviewed by Youenn Fablet.

  • UIProcess/UserMediaProcessManager.cpp:

(WebKit::UserMediaProcessManager::willCreateMediaStream): Always log.
(WebKit::UserMediaProcessManager::endedCaptureSession): Ditto.

  • WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:

(WebKit::UserMediaPermissionRequestManager::grantUserMediaDeviceSandboxExtensions): Ditto.
(WebKit::UserMediaPermissionRequestManager::revokeUserMediaDeviceSandboxExtensions): Ditto.

10:11 AM Changeset in webkit [236144] by youenn@apple.com
  • 7 edits in trunk

Enable Unified Plan by default
https://bugs.webkit.org/show_bug.cgi?id=189675

Reviewed by Eric Carlson.

Source/WebCore:

RTCRtpTransceiver.currentDirection is now gated by the unified plan runtime flag.
This will allow easy feature detection of unified plan support.
Covered by updated test.

  • Modules/mediastream/RTCRtpTransceiver.idl:

Source/WebKit:

  • Shared/WebPreferences.yaml:

LayoutTests:

  • webrtc/video-addLegacyTransceiver-expected.txt:
  • webrtc/video-addLegacyTransceiver.html:
9:07 AM Changeset in webkit [236143] by pvollan@apple.com
  • 24 edits in trunk

[WebVTT] change "middle" to "center" for consistency with CSS
https://bugs.webkit.org/show_bug.cgi?id=158478

Reviewed by Eric Carlson.

Source/WebCore:

No new tests, covered by existing tests.

  • html/track/TextTrackCueGeneric.cpp:

(WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):

  • html/track/VTTCue.cpp:

(WebCore::centerKeyword):
(WebCore::VTTCue::initialize):
(WebCore::VTTCue::align const):
(WebCore::VTTCue::setAlign):
(WebCore::VTTCue::calculateDisplayParameters):
(WebCore::VTTCue::setCueSettings):
(WebCore::middleKeyword): Deleted.

  • html/track/VTTCue.h:
  • html/track/WebVTTParser.cpp:

(WebCore::WebVTTTreeBuilder::buildFromString):

LayoutTests:

  • media/track/track-add-remove-cue-expected.txt:
  • media/track/track-add-remove-cue.html:
  • media/track/track-cue-mutable-expected.txt:
  • media/track/track-cue-mutable.html:
  • media/track/track-cue-rendering-snap-to-lines-not-set-expected.txt:
  • media/track/track-vttcue-expected.txt:
  • media/track/track-vttcue.html:
  • media/track/track-webvtt-tc013-settings-expected.txt:
  • media/track/track-webvtt-tc013-settings.html:
  • media/track/track-webvtt-tc014-alignment-expected.txt:
  • media/track/track-webvtt-tc014-alignment.html:
  • media/track/track-webvtt-tc016-align-positioning-expected.txt:
  • media/track/track-webvtt-tc016-align-positioning.html:
  • media/track/track-webvtt-tc018-align-text-line-position-expected.txt:
  • media/track/track-webvtt-tc018-align-text-line-position.html:
  • media/track/track-webvtt-tc020-cue-size-align-expected.txt:
  • media/track/track-webvtt-tc020-cue-size-align.html:
  • media/track/track-webvtt-tc021-valign-expected.txt:
  • media/track/track-webvtt-tc021-valign.html:
9:06 AM Changeset in webkit [236142] by Chris Dumez
  • 6 edits in trunk

"DidFirstVisuallyNonEmptyLayout" callback does not get called when restoring a page from PageCache
https://bugs.webkit.org/show_bug.cgi?id=189681
<rdar://problem/44526171>

Reviewed by Alex Christensen and Zalan Bujtas.

Source/WebCore:

The "DidFirstVisuallyNonEmptyLayout" callback was not getting called when restoring a page from PageCache
because the FrameView is restored from PageCache and we would fail to restore its flags (such as
m_firstVisuallyNonEmptyLayoutCallbackPending) when entering Page Cache. We now call reset those flags that
are related to layout miletones when entering PageCache so that layout milestone events properly get sent
again when restoring from Page Cache.

  • history/CachedFrame.cpp:

(WebCore::CachedFrame::CachedFrame):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKit/LayoutMilestonesWithAllContentInFrame.cpp:

(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::TEST):

8:59 AM Changeset in webkit [236141] by Carlos Garcia Campos
  • 3 edits
    1 add in releases/WebKitGTK/webkit-2.22

Merge r235662 - isAsyncGeneratorMethodParseMode() should check for SourceParseMode::AsyncGeneratorWrapperMethodMode.
https://bugs.webkit.org/show_bug.cgi?id=189292
<rdar://problem/38907433>

Reviewed by Saam Barati.

JSTests:

  • stress/regress-189292.js: Added.

Source/JavaScriptCore:

Previously, isAsyncGeneratorMethodParseMode() was checking for AsyncGeneratorWrapperFunctionMode
instead of AsyncGeneratorWrapperMethodMode. This patch fixes it
to check for AsyncGeneratorWrapperMethodMode (to match what is expected as indicated
in the name isAsyncGeneratorMethodParseMode).

  • parser/ParserModes.h:

(JSC::isAsyncGeneratorMethodParseMode):

8:59 AM Changeset in webkit [236140] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.22/Source/WebCore

Merge r235621 - Attempt to fix failing tests following r235615 (https://bugs.webkit.org/show_bug.cgi?id=187925)

An inline text box that does not have combined text and contains a single character
should be considered as having text content.

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::hasTextContent const):

8:59 AM Changeset in webkit [236139] by Carlos Garcia Campos
  • 7 edits in releases/WebKitGTK/webkit-2.22

Merge r235615 - Remove redundant inline text boxes for empty combined text
https://bugs.webkit.org/show_bug.cgi?id=189119

Reviewed by Zalan Bujtas.

Source/WebCore:

We should consider inline text boxes that have a combined text renderer (RenderCombineText)
whose composed string is empty as "redundant" just as we do for inline text boxes that have
a non-combined text renderer that have zero length so that we remove them. Such boxes are
visibly empty and do not take up space visually. By removing them we reduce memory and make
it easier to reason about the line box tree.

Currently RenderBlockFlow::computeBlockDirectionPositionsForLine() tests if an inline text
box is empty by checking if it has a zero length (InlineTextBox::len()). However an inline
text box associated with a RenderCombineText always has length 1 regardless of whether the
composed string it represents is the empty string. Instead we should expose a way to check
if an inline text box is visually empty and have RenderBlockFlow::computeBlockDirectionPositionsForLine()
query the inline text box for this answer.

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::hasTextContent const): Added. Returns whether an inline text box
has text content. We do not need to consider hypenation since hypens are an embellishment (i.e.
they are not part of the markup of the page).
(WebCore::InlineTextBox::paint): Write in terms of hasTextContent().
(WebCore::InlineTextBox::subdivideAndResolveStyle): Assert that WebCore::subdivide() always
returns a non-empty list of subdivisions. A non-empty text box should always have at least
one subdivision, say for the unmarked text. I left the existing conditonal (though marked
it as UNLIKELY()) so as to be forgiving and avoid a bad user experience should WebCore::subdivide()
return an empty vector in a non-debug build.

  • rendering/InlineTextBox.h:
  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::computeBlockDirectionPositionsForLine): Write in terms of InlineTextBox::hasTextContent()
so that we remove empty inline text boxes associated with combined text.

  • rendering/RenderText.cpp:

(WebCore::RenderText::positionLineBox): Write in terms of InlineTextBox::hasTextContent().

LayoutTests:

Update expected result now that we do not create an inline text box associated with combined text
when we do not have any combined text to render.

  • fast/text/text-combine-surroundContents-crash-expected.txt:
8:41 AM Changeset in webkit [236138] by Antti Koivisto
  • 16 edits in trunk/Source/WebKit

REGRESSION (PSON): White or Black flash occurs when process swapping on navigation on Mac
https://bugs.webkit.org/show_bug.cgi?id=189663
<rdar://problem/44184955>

Reviewed by Geoff Garen.

We need to keep the layer tree of the previous page alive and visible until we have something
to render on the new page. With PSON on Mac this means that we should keep displaying the
layer tree from the previus process.

This patch moves the management of 'attaching' the drawing area (Mac only concept) from web process
to UI process. This is when we parent the layer tree to the view root layer. It also ensures that
the layer tree is not deleted too early on process swap and that it still eventually gets deleted.

  • UIProcess/DrawingAreaProxy.h:

(WebKit::DrawingAreaProxy::attachInWebProcess):

  • UIProcess/SuspendedPageProxy.cpp:

(WebKit::messageNamesToIgnoreWhileSuspended):
(WebKit::SuspendedPageProxy::tearDownDrawingAreaInWebProcess):

We no longer tear down drawing area (layer tree) for suspended pages automatically. Send an explicit
message for it.

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

(WebKit::WebPageProxy::reattachToWebProcess):

Only call didRelaunchProcess when process actually relaunched (not navigation process launch) to
match not calling processDidExit in resetStateAfterProcessExited.

(WebKit::WebPageProxy::didCompletePageTransition):

Attach the drawing area if appropriate.

(WebKit::WebPageProxy::decidePolicyForNavigationAction):

Send suspend message to WebPage immediately instead waiting for the runloop callback. This is needed so we
can avoid flashing the initial empty document load when the new Page object is created.

(WebKit::WebPageProxy::resetStateAfterProcessExited):

Don't call processDidExit when suspending, not exiting the process (this function needs a new name or rafactoring).
This avoids clearing the drawing area and flashing to black.

(WebKit::WebPageProxy::enterAcceleratedCompositingMode):

This is called when we have switched to the new layer tree.
Tear down the drawing area in the previus process.

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
  • UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:

(WebKit::TiledCoreAnimationDrawingAreaProxy::attachInWebProcess):

Send a message to the web process to attach the drawing area.

  • WebProcess/WebPage/DrawingArea.h:

(WebKit::DrawingArea::attach):
(WebKit::DrawingArea::attachDrawingArea): Deleted.

Rename to be less redundant.

  • WebProcess/WebPage/DrawingArea.messages.in:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::reinitializeWebPage):

Don't attach drawing area automatically. It will be done by a message from UI process.

(WebKit::WebPage::setLayerTreeStateIsFrozen):

Layer tree is always frozen in a suspended process (if it exists).

(WebKit::WebPage::didStartPageTransition):
(WebKit::WebPage::didCompletePageTransition):

Notify UI process of transition completion.

(WebKit::WebPage::setIsSuspended):
(WebKit::WebPage::tearDownDrawingAreaForSuspend):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):

Don't attach drawing area automatically. It will be done by a message from UI process.

(WebKit::TiledCoreAnimationDrawingArea::attach):
(WebKit::TiledCoreAnimationDrawingArea::attachDrawingArea): Deleted.

8:40 AM Changeset in webkit [236137] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.22/Source/JavaScriptCore

Merge r235612 - [WPE][GTK] Add more unused result warnings to JSC API
https://bugs.webkit.org/show_bug.cgi?id=189243

Reviewed by Carlos Garcia Campos.

The jsc_context_evaluate() family of functions has a (transfer full) return value, but the
caller may be tempted to not inspect it if uninterested in the return value. This would be
an error, because it must be freed.

  • API/glib/JSCContext.h:
8:40 AM Changeset in webkit [236136] by Carlos Garcia Campos
  • 11 edits
    1 add in releases/WebKitGTK/webkit-2.22

Merge r235605 - The watchdog sometimes fails to terminate a script.
https://bugs.webkit.org/show_bug.cgi?id=189227
<rdar://problem/39932857>

Reviewed by Saam Barati.

JSTests:

  • stress/regress-189227-watchdog-on-infinite-loop.js: Added.

Source/JavaScriptCore:

Consider the following scenario:

  1. We have an infinite loop bytecode sequence as follows:

[ 13] loop_hint
[ 14] check_traps
[ 15] jmp -2(->13)

  1. The VM tiers up from LLInt -> BaselineJIT -> DFG -> FTL.

Note that op_check_traps is represented as a CheckTraps node in the DFG and FTL.
When we're not using pollingTraps (JSC_usePollingTraps is false by default),
we emit no code for CheckTraps, but only record an InvalidationPoint there.

  1. The watchdog fires, and invalidates all InvalidationPoints in the FTL CodeBlock.

InvalidationPoints OSR exits to the next instruction by design. In this case,
that means the VM will resumes executing at the op_jmp, which jumps to the
op_loop_hint opcode. At the loop_hint, the VM discovers that the function is
already hot, and attempts to tier up. It immediately discovers that a replacement
CodeBlock is available because we still haven't jettisoned the DFG CodeBlock
nor the FTL CodeBlock that was previously compiled for this function.

Note that jettisoning a CodeBlock necessarily means the VM will invalidate
its InvalidationPoints (if the CodeBlock is DFG/FTL). However, the reverse
is not true: merely invalidating the InvalidationPoints does not necessarily
mean that the CodeBlock is jettisoned.

VMTraps::tryInstallTrapBreakpoints() runs from a separate thread. Hence,
it is only safe for it to invalidate a CodeBlock's InvalidationPoints. It
is not safe for the CodeBlock to be jettisoned from another thread. Instead,
the VMTraps mechanism relies on the script thread running to an op_check_traps
in the baseline JIT code where it will do the necessary jettisoning of optimized
CodeBlocks.

Since the op_check_traps never get executed, the VM will perpetually tier up in
the op_loop_hint, OSR exit to the op_jmp, jump to the op_loop_hint, and repeat.
Consequently, the watchdog fails to terminate this script.

In this patch, we fix this by making the DFG BytecodeParser emit an InvalidationPoint
node directly (when the VM is not configured to use polling traps). This ensures
that the check traps invalidation point will OSR exit to the op_check_traps opcode
in the baseline JIT.

In this patch, we also change VMTraps::tryInstallTrapBreakpoints() to use
CallFrame::unsafeCodeBlock() instead of CallFrame::codeBlock(). This is because
we don't really know if the frame is properly set up. We're just conservatively
probing the stack. ASAN does not like this probing. Using unsafeCodeBlock() here
will suppress the false positive ASAN complaint.

  • dfg/DFGByteCodeParser.cpp:

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

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGFixupPhase.cpp:

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

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

(JSC::DFG::SpeculativeJIT::compileCheckTraps):

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):

  • runtime/VMTraps.cpp:

(JSC::VMTraps::tryInstallTrapBreakpoints):

8:40 AM Changeset in webkit [236135] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.22/Source/JavaScriptCore

Merge r235603 - CallFrame::unsafeCallee() should use an ASAN suppressed Register::asanUnsafePointer().
https://bugs.webkit.org/show_bug.cgi?id=189247

Reviewed by Saam Barati.

  • interpreter/CallFrame.h:

(JSC::ExecState::unsafeCallee const):

  • interpreter/Register.h:

(JSC::Register::asanUnsafePointer const):
(JSC::Register::unsafePayload const):

8:39 AM Changeset in webkit [236134] by Carlos Garcia Campos
  • 7 edits in releases/WebKitGTK/webkit-2.22

Merge r235602 - REGRESSION: Layout Test http/tests/security/bypassing-cors-checks-for-extension-urls.html is Flaky
https://bugs.webkit.org/show_bug.cgi?id=187658
<rdar://problem/42306442>

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Test is flaky as a previous test was setting the isRunningUserScripts state on the Page and it was never reset.
This patch moves this state to the topDocument so that it will be reset for every navigation.
Covered by existing test being no longer flaky.

  • dom/Document.h:

(WebCore::Document::setAsRunningUserScripts):
(WebCore::Document::isRunningUserScripts const):

  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::DocumentThreadableLoader):

  • page/Frame.cpp:

(WebCore::Frame::injectUserScriptImmediately):

  • page/Page.h:

(WebCore::Page::setAsRunningUserScripts): Deleted.
(WebCore::Page::isRunningUserScripts const): Deleted.

  • testing/Internals.cpp:

(WebCore::Internals::setAsRunningUserScripts):

LayoutTests:

  • platform/mac-wk2/TestExpectations:
8:39 AM Changeset in webkit [236133] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.22

Merge r235590 - REGRESSION (r191336): RenderFlexibleBox::adjustChildSizeForMinAndMax crashes in std::optional<>::value()
https://bugs.webkit.org/show_bug.cgi?id=189232
<rdar://problem/43886373>

Reviewed by Brent Fulgham.

Source/WebCore:

It's not guaranteed that RenderFlexibleBox::computeMainAxisExtentForChild() always returns with a valid value.

Test: fast/flexbox/crash-when-min-max-content-is-not-computed.html

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):

LayoutTests:

  • fast/flexbox/crash-when-min-max-content-is-not-computed-expected.txt: Added.
  • fast/flexbox/crash-when-min-max-content-is-not-computed.html: Added.
8:39 AM Changeset in webkit [236132] by Carlos Garcia Campos
  • 3 edits
    1 add in releases/WebKitGTK/webkit-2.22

Merge r235582 - Function object should convert params to string before throw a parsing error
https://bugs.webkit.org/show_bug.cgi?id=188874

Reviewed by Darin Adler.

JSTests:

  • stress/function-body-to-string-before-parameter-syntax-check.js: Added.

(shouldThrow):

Source/JavaScriptCore:

ToString operation onto the body of the Function constructor should be performed
before checking syntax correctness of the parameters.

  • runtime/FunctionConstructor.cpp:

(JSC::constructFunctionSkippingEvalEnabledCheck):

8:39 AM Changeset in webkit [236131] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.22/Source/WebCore

Merge r235573 - Compilation error in FormData.cpp: incomplete type 'WebCore::SharedBuffer'
https://bugs.webkit.org/show_bug.cgi?id=189207

Reviewed by Youenn Fablet.

If FormData.cpp is compiled alone (non-unified) or if it is the first file compiled in
a unified build, SharedBuffer.h is not included.

  • platform/network/FormData.cpp:
8:39 AM Changeset in webkit [236130] by Carlos Garcia Campos
  • 13 edits
    2 copies
    2 moves in releases/WebKitGTK/webkit-2.22

Merge r235569 - Storage Access API: Maintain access through same-site navigations
https://bugs.webkit.org/show_bug.cgi?id=188564
<rdar://problem/43445160>

Reviewed by Alex Christensen.

Source/WebCore:

Tests: http/tests/storageAccess/request-and-grant-access-then-navigate-cross-site-should-not-have-access.html

http/tests/storageAccess/request-and-grant-access-then-navigate-same-site-should-have-access.html

  • dom/Document.h:

Removed unused member variable m_hasFrameSpecificStorageAccess.

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::willSendRequest):

  • loader/FrameLoaderClient.h:

Source/WebKit:

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchWillChangeDocument):

Now takes the current URL and the new URL as parameters
and only clears out storage access if the navigation is
cross-site, i.e. with differing eTLD+1s.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

LayoutTests:

  • http/tests/storageAccess/request-and-grant-access-cross-origin-sandboxed-iframe-from-prevalent-domain-with-user-interaction-and-access-from-right-frame-expected.txt:
  • http/tests/storageAccess/request-and-grant-access-cross-origin-sandboxed-iframe-from-prevalent-domain-with-user-interaction-and-access-from-right-frame.html:

Added both a same-site and a cross-site navigation to the sub frame to test maintained and cleared access.

  • http/tests/storageAccess/request-and-grant-access-then-navigate-cross-site-should-not-have-access-expected.txt: Copied from LayoutTests/http/tests/storageAccess/request-and-grant-access-then-navigate-should-not-have-access-expected.txt.
  • http/tests/storageAccess/request-and-grant-access-then-navigate-cross-site-should-not-have-access.html: Copied from LayoutTests/http/tests/storageAccess/request-and-grant-access-then-navigate-should-not-have-access.html.
  • http/tests/storageAccess/request-and-grant-access-then-navigate-same-site-should-have-access-expected.txt: Renamed from LayoutTests/http/tests/storageAccess/request-and-grant-access-then-navigate-should-not-have-access-expected.txt.
  • http/tests/storageAccess/request-and-grant-access-then-navigate-same-site-should-have-access.html: Renamed from LayoutTests/http/tests/storageAccess/request-and-grant-access-then-navigate-should-not-have-access.html.
  • http/tests/storageAccess/resources/get-cookies.php:

Support for the new test scenarios.

  • http/tests/storageAccess/resources/self-navigating-frame-after-granted-access.html:

Support for the new test scenarios.

  • platform/mac-wk2/TestExpectations:

Marked the new and the renamed tests as [ Pass ].

8:39 AM Changeset in webkit [236129] by Carlos Garcia Campos
  • 17 edits in releases/WebKitGTK/webkit-2.22/Source

Merge r235562 - Assertion hit in ~CompletionHandler() from ~WebFrame()
https://bugs.webkit.org/show_bug.cgi?id=189199
<rdar://problem/42657233>

Reviewed by Youenn Fablet.

Source/WebCore:

The issue was caused by WebFrame::m_willSubmitFormCompletionHandlers implicitly containing
CompletionHandlers (wrapped in WTF::Functions) and not calling them upon WebFrame
destruction.

No new tests, covered by fast/frames/iframe-target.html.

  • loader/EmptyClients.cpp:

(WebCore::EmptyFrameLoaderClient::dispatchWillSubmitForm):

  • loader/EmptyFrameLoaderClient.h:
  • loader/FrameLoaderClient.h:

Source/WebKit:

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
  • WebProcess/WebPage/WebFrame.cpp:

(WebKit::WebFrame::~WebFrame):
(WebKit::WebFrame::setUpWillSubmitFormListener):
(WebKit::WebFrame::invalidatePolicyListener):

  • WebProcess/WebPage/WebFrame.h:

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebFrameLoaderClient.h:
  • WebCoreSupport/WebFrameLoaderClient.mm:

(WebFrameLoaderClient::dispatchWillSubmitForm):

Source/WebKitLegacy/win:

  • WebCoreSupport/WebFrameLoaderClient.cpp:

(WebFrameLoaderClient::dispatchWillSubmitForm):

  • WebCoreSupport/WebFrameLoaderClient.h:
8:39 AM Changeset in webkit [236128] by Carlos Garcia Campos
  • 4 edits
    1 add in releases/WebKitGTK/webkit-2.22

Merge r235558 - Fix exception check accounting in constructJSWebAssemblyCompileError().
https://bugs.webkit.org/show_bug.cgi?id=189185
<rdar://problem/39786007>

Reviewed by Michael Saboff.

JSTests:

  • stress/regress-189185.js: Added.

(new.WebAssembly.CompileError.valueOf):

Source/JavaScriptCore:

Also add an exception check in JSWebAssemblyModule::createStub() so that we don't
inadvertently overwrite a pre-existing exception (if present).

  • wasm/js/JSWebAssemblyModule.cpp:

(JSC::JSWebAssemblyModule::createStub):

  • wasm/js/WebAssemblyCompileErrorConstructor.cpp:

(JSC::constructJSWebAssemblyCompileError):

8:38 AM Changeset in webkit [236127] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.22/Source/JavaScriptCore

Merge r235557 - Gardening: ARMv7 build fix.
https://bugs.webkit.org/show_bug.cgi?id=158911

Not reviewed.

  • assembler/MacroAssemblerARMv7.h:

(JSC::MacroAssemblerARMv7::patchableBranch8):

8:13 AM Changeset in webkit [236126] by Manuel Rego Casasnovas
  • 4 edits in trunk

[css-grid] Static position should use content-box, not padding-box
https://bugs.webkit.org/show_bug.cgi?id=189698

Reviewed by Javier Fernandez.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-grid/abspos/absolute-positioning-grid-container-parent-001.html:

Update tests from WPT.

Source/WebCore:

This is a recent change by the CSSWG:
https://github.com/w3c/csswg-drafts/issues/3020

The spec text (https://drafts.csswg.org/css-grid/#static-position):

"The static position of an absolutely-positioned child

of a grid container is determined as if it were the sole grid item
in a grid area whose edges coincide with the content edges
of the grid container."

Test: imported/w3c/web-platform-tests/css/css-grid/abspos/absolute-positioning-grid-container-parent-001.html

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::prepareChildForPositionedLayout):
Simple change to use border and padding.

7:50 AM Changeset in webkit [236125] by Claudio Saavedra
  • 3 edits in trunk/LayoutTests

[WPE] Gardening after r236124

Quick gardening. There might be more tests that are now passing or
need updated results but this was the most obvious for now.
Unreviewed gardening.

  • platform/wpe/TestExpectations:
  • platform/wpe/svg/custom/pan-direction-expected.txt:
6:44 AM Changeset in webkit [236124] by Claudio Saavedra
  • 4 edits in trunk

[WPE] Implement mouse event modifiers
https://bugs.webkit.org/show_bug.cgi?id=189697

Reviewed by Carlos Garcia Campos.

Source/WebKit:

Only "CapsLocks" is missing, as WPE doesn't support that modifier.

  • Shared/wpe/WebEventFactory.cpp:

(WebKit::modifiersForEventModifiers):
(WebKit::WebEventFactory::createWebKeyboardEvent):
(WebKit::WebEventFactory::createWebMouseEvent):
(WebKit::modifiersForEvent): Deleted.

Tools:

  • WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:

(WTR::wkEventModifiersToWPE):
(WTR::EventSenderProxy::mouseDown):
(WTR::EventSenderProxy::mouseUp):

6:32 AM Changeset in webkit [236123] by Carlos Garcia Campos
  • 3 edits
    1 add in releases/WebKitGTK/webkit-2.22

Merge r235554 - Fix exception check accounting in JSDataView::defineOwnProperty().
https://bugs.webkit.org/show_bug.cgi?id=189186
<rdar://problem/39786049>

Reviewed by Michael Saboff.

JSTests:

  • stress/regress-189186.js: Added.

Source/JavaScriptCore:

  • runtime/JSDataView.cpp:

(JSC::JSDataView::defineOwnProperty):

6:32 AM Changeset in webkit [236122] by Carlos Garcia Campos
  • 3 edits
    1 add in releases/WebKitGTK/webkit-2.22

Merge r235540 - Add missing exception check in arrayProtoFuncLastIndexOf().
https://bugs.webkit.org/show_bug.cgi?id=189184
<rdar://problem/39785959>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/regress-189184.js: Added.

Source/JavaScriptCore:

  • runtime/ArrayPrototype.cpp:

(JSC::arrayProtoFuncLastIndexOf):

6:32 AM Changeset in webkit [236121] by Carlos Garcia Campos
  • 6 edits
    1 add in releases/WebKitGTK/webkit-2.22

Merge r235538 - convertToRegExpMatchFastGlobal must use KnownString as the child use kind
https://bugs.webkit.org/show_bug.cgi?id=189173
<rdar://problem/43501645>

Reviewed by Michael Saboff.

JSTests:

  • stress/may-exit-should-be-false-regexp-constant-folding.js: Added.

(foo):
(bar):

Source/JavaScriptCore:

We were crashing during validation because mayExit returned true
at a point in the program when we weren't allowed to exit.

The issue was is in StrengthReduction: we end up emitting code that
had a StringUse on an edge after a node that did side effects and before
an ExitOK/bytecode number transition. However, StrenghReduction did the
right thing here and also emitted the type checks before the node with
side effects. It just did bad bookkeeping. The node we convert to needs
to use KnownStringUse instead of StringUse for the child edge.

  • dfg/DFGNode.cpp:

(JSC::DFG::Node::convertToRegExpExecNonGlobalOrStickyWithoutChecks):
(JSC::DFG::Node::convertToRegExpMatchFastGlobalWithoutChecks):
(JSC::DFG::Node::convertToRegExpExecNonGlobalOrSticky): Deleted.
(JSC::DFG::Node::convertToRegExpMatchFastGlobal): Deleted.

  • dfg/DFGNode.h:
  • dfg/DFGStrengthReductionPhase.cpp:

(JSC::DFG::StrengthReductionPhase::handleNode):

6:31 AM Changeset in webkit [236120] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.22

Merge r235537 - CounterMaps should hold a unique_ptr of CounterMap.
https://bugs.webkit.org/show_bug.cgi?id=189174
<rdar://problem/43686458>

Reviewed by Ryosuke Niwa.

Source/WebCore:

In certain cases calls to CounterMaps might lead to unexpected deletion of the CounterMap object.

Test: fast/css/counters/crash-when-cloning-body.html

  • rendering/RenderCounter.cpp:

(WebCore::makeCounterNode):
(WebCore::destroyCounterNodeWithoutMapRemoval):
(WebCore::RenderCounter::destroyCounterNodes):
(WebCore::RenderCounter::destroyCounterNode):
(WebCore::updateCounters):
(showCounterRendererTree):

LayoutTests:

  • fast/css/counters/crash-when-cloning-body-expected.txt: Added.
  • fast/css/counters/crash-when-cloning-body.html: Added.
6:31 AM Changeset in webkit [236119] by Carlos Garcia Campos
  • 7 edits in releases/WebKitGTK/webkit-2.22/Source/JavaScriptCore

Merge r235527 - Switch int8_t to GPRReg in StructureStubInfo because sizeof(GPRReg) == sizeof(int8_t)
https://bugs.webkit.org/show_bug.cgi?id=189166

Reviewed by Mark Lam.

  • bytecode/AccessCase.cpp:

(JSC::AccessCase::generateImpl):

  • bytecode/GetterSetterAccessCase.cpp:

(JSC::GetterSetterAccessCase::emitDOMJITGetter):

  • bytecode/InlineAccess.cpp:

(JSC::getScratchRegister):

  • bytecode/PolymorphicAccess.cpp:

(JSC::PolymorphicAccess::regenerate):

  • bytecode/StructureStubInfo.h:

(JSC::StructureStubInfo::valueRegs const):

  • jit/JITInlineCacheGenerator.cpp:

(JSC::JITByIdGenerator::JITByIdGenerator):
(JSC::JITGetByIdWithThisGenerator::JITGetByIdWithThisGenerator):
(JSC::JITInstanceOfGenerator::JITInstanceOfGenerator):

6:31 AM Changeset in webkit [236118] by Carlos Garcia Campos
  • 52 edits in releases/WebKitGTK/webkit-2.22/Source

Merge r235521 - Bundle unified sources more tightly in projects with deep directory structures
https://bugs.webkit.org/show_bug.cgi?id=189009

Reviewed by Simon Fraser.

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

It turns out our plan to switch unified source bundle every time the directory
changes is not a good fit for projects like WebKit2 with many small directories.
It leaves many unified source bundles with only a single source file,
achieving only ~40% density.

Instead, switch unified source bundles every time the top-level directory changes.
This still achieves the goal of *usually* only rebuilding the one top-level
directory you touched, and increases source bundle density wildly, to ~95%.

Fix a variety of unification errors due to reshuffling the bundles.

  • Modules/mediastream/RTCController.cpp:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • crypto/algorithms/CryptoAlgorithmECDSA.cpp:

(WebCore::CryptoAlgorithmECDSA::importKey):

  • dom/Document.h:
  • html/parser/HTMLTreeBuilder.cpp:
  • loader/appcache/ApplicationCacheResourceLoader.h:
  • page/AlternativeTextClient.h:
  • platform/Pasteboard.h:
  • platform/graphics/DisplayRefreshMonitor.cpp:
  • platform/graphics/FontFamilySpecificationNull.cpp:
  • platform/graphics/cocoa/WebGLLayer.mm:

(-[WebGLLayer initWithGraphicsContext3D:]):
(-[WebGLLayer copyImageSnapshotWithColorSpace:]):
(-[WebGLLayer display]):
(-[WebGLLayer allocateIOSurfaceBackingStoreWithSize:usingAlpha:]):

  • platform/graphics/cocoa/WebGPULayer.mm:

(-[WebGPULayer initWithGPUDevice:]):

  • platform/graphics/metal/GPUCommandQueueMetal.mm:
  • platform/mac/PasteboardMac.mm:
  • platform/mediastream/mac/DisplayCaptureManagerCocoa.cpp:
  • platform/network/ResourceRequestBase.cpp:
  • rendering/updating/RenderTreeBuilderBlockFlow.cpp:
  • rendering/updating/RenderTreeBuilderInline.cpp:
  • Shared/APIWebArchive.mm:
  • Shared/APIWebArchiveResource.mm:
  • Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
  • Shared/Plugins/Netscape/mac/PluginInformationMac.mm:
  • SourcesCocoa.txt:
  • SourcesGTK.txt:
  • UIProcess/API/APIAutomationSessionClient.h:

(API::AutomationSessionClient::sessionIdentifier const):
(API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage):
(API::AutomationSessionClient::setUserInputForCurrentJavaScriptPromptOnPage):

  • UIProcess/Cocoa/LegacyCustomProtocolManagerClient.mm:

(-[WKCustomProtocolLoader initWithLegacyCustomProtocolManagerProxy:customProtocolID:request:]):
(-[WKCustomProtocolLoader connection:didFailWithError:]):
(-[WKCustomProtocolLoader connection:didReceiveResponse:]):

  • UIProcess/Plugins/PluginProcessProxy.cpp:

(WebKit::generatePluginProcessCallbackID):
(WebKit::PluginProcessProxy::fetchWebsiteData):
(WebKit::PluginProcessProxy::deleteWebsiteData):
(WebKit::PluginProcessProxy::deleteWebsiteDataForHostNames):
(WebKit::generateCallbackID): Deleted.

  • UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:

(-[WKScrollingNodeScrollViewDelegate scrollViewWillEndDragging:withVelocity:targetContentOffset:]):

  • UIProcess/Storage/StorageProcessProxy.cpp:

(WebKit::generateStorageProcessCallbackID):
(WebKit::StorageProcessProxy::fetchWebsiteData):
(WebKit::StorageProcessProxy::deleteWebsiteData):
(WebKit::StorageProcessProxy::deleteWebsiteDataForOrigins):
(WebKit::generateCallbackID): Deleted.

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(-[WKPDFPluginAccessibilityObject accessibilityPerformAction:]):
(-[WKPDFPluginAccessibilityObject accessibilityFocusedUIElement]):
(-[WKPDFPluginAccessibilityObject accessibilityAssociatedControlForAnnotation:]):
(-[WKPDFPluginAccessibilityObject accessibilityHitTest:]):
(-[WKPDFLayerControllerDelegate updateScrollPosition:]):
(WebKit::PDFPlugin::updateCursor):
(WebKit::coreCursor):
(appendValuesInPDFNameSubtreeToVector): Deleted.
(getAllValuesInPDFNameTree): Deleted.
(getAllScriptsInPDFDocument): Deleted.

6:31 AM Changeset in webkit [236117] by Carlos Garcia Campos
  • 11 edits in releases/WebKitGTK/webkit-2.22/Source/JavaScriptCore

Merge r235517 - InlineAccess should do StringLength
https://bugs.webkit.org/show_bug.cgi?id=158911

Reviewed by Yusuke Suzuki.

This patch extends InlineAccess to support StringLength. This patch also
fixes AccessCase::fromStructureStubInfo to support ArrayLength and StringLength.
I forgot to implement this for ArrayLength in the initial InlineAccess
implementation. Supporting StringLength is a natural extension of the
InlineAccess machinery.

  • assembler/MacroAssembler.h:

(JSC::MacroAssembler::patchableBranch8):

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::patchableBranch8):

  • bytecode/AccessCase.cpp:

(JSC::AccessCase::fromStructureStubInfo):

  • bytecode/BytecodeDumper.cpp:

(JSC::BytecodeDumper<Block>::printGetByIdCacheStatus):

  • bytecode/InlineAccess.cpp:

(JSC::InlineAccess::dumpCacheSizesAndCrash):
(JSC::InlineAccess::generateSelfPropertyAccess):
(JSC::getScratchRegister):
(JSC::InlineAccess::generateSelfPropertyReplace):
(JSC::InlineAccess::generateArrayLength):
(JSC::InlineAccess::generateSelfInAccess):
(JSC::InlineAccess::generateStringLength):

  • bytecode/InlineAccess.h:
  • bytecode/PolymorphicAccess.cpp:

(JSC::PolymorphicAccess::regenerate):

  • bytecode/StructureStubInfo.cpp:

(JSC::StructureStubInfo::initStringLength):
(JSC::StructureStubInfo::deref):
(JSC::StructureStubInfo::aboutToDie):
(JSC::StructureStubInfo::propagateTransitions):

  • bytecode/StructureStubInfo.h:

(JSC::StructureStubInfo::baseGPR const):

  • jit/Repatch.cpp:

(JSC::tryCacheGetByID):

6:30 AM Changeset in webkit [236116] by Carlos Garcia Campos
  • 6 edits
    2 adds in releases/WebKitGTK/webkit-2.22

Merge r235515 - CSE DataViewGet* DFG nodes
https://bugs.webkit.org/show_bug.cgi?id=188768

Reviewed by Yusuke Suzuki.

JSTests:

  • microbenchmarks/dataview-cse.js: Added.

(assert):
(test):

  • stress/dataview-get-cse.js: Added.

(assert):
(test1.foo):
(test1):
(test2.foo):
(test2):
(test3.foo):
(test3):
(test4.foo):
(test4):
(test5.foo):
(test5):
(test6.foo):
(test6):

Source/JavaScriptCore:

This patch makes it so that we CSE DataViewGet* accesses. To do this,
I needed to add a third descriptor to HeapLocation to represent the
isLittleEndian child. This patch is neutral on compile time benchmarks,
and is a 50% speedup on a trivial CSE microbenchmark that I added.

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGFixupPhase.cpp:

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

  • dfg/DFGHeapLocation.cpp:

(WTF::printInternal):

  • dfg/DFGHeapLocation.h:

(JSC::DFG::HeapLocation::HeapLocation):
(JSC::DFG::HeapLocation::hash const):
(JSC::DFG::HeapLocation::operator== const):
(JSC::DFG::indexedPropertyLocForResultType):

6:30 AM Changeset in webkit [236115] by Carlos Garcia Campos
  • 4 edits
    1 add in releases/WebKitGTK/webkit-2.22

Merge r235514 - output of toString() of Generator is wrong
https://bugs.webkit.org/show_bug.cgi?id=188952

Reviewed by Saam Barati.

JSTests:

  • stress/function-to-string.js: Added.

(shouldBe):
(shouldBe.test):
(test):
(shouldBe.async.test):
(async.test):
(shouldBe.async):
(async):

  • test262/expectations.yaml:

Source/JavaScriptCore:

Function#toString does not respect generator and async generator.
This patch fixes them and supports all the function types.

  • runtime/FunctionPrototype.cpp:

(JSC::functionProtoFuncToString):

6:30 AM Changeset in webkit [236114] by Carlos Garcia Campos
  • 4 edits
    1 add in releases/WebKitGTK/webkit-2.22

Merge r235491 - Add some missing exception checks in JSRopeString::resolveRopeToAtomicString().
https://bugs.webkit.org/show_bug.cgi?id=189132
<rdar://problem/42513068>

Reviewed by Saam Barati.

JSTests:

  • stress/regress-189132.js: Added.

Source/JavaScriptCore:

  • runtime/JSCJSValueInlines.h:

(JSC::JSValue::toPropertyKey const):

  • runtime/JSString.cpp:

(JSC::JSRopeString::resolveRopeToAtomicString const):

2:47 AM Changeset in webkit [236113] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.22

Merge r235485 - REGRESSION (r226138): WebCore::subdivide() may return an empty vector; Web process can crash when performing find in Epiphany
https://bugs.webkit.org/show_bug.cgi?id=184390
<rdar://problem/41804994>
And
<rdar://problem/39771867>

Reviewed by Simon Fraser.

Source/WebCore:

Speculative fix for Epiphany.

In theory, WebCore::subdivide() should never return an empty vector - no subdivisions - as such a
result represents a programmer error. In practice, InlineTextBox can invoke WebCore::subdivide()
such that it returns an empty vector. One way this can happen is when subdividing an empty inline
text box associated with combined text (RenderCombineText). For now we add a check to bail out of
resolving the style of subdivisions when WebCore::subdivide() returns no subdivisions. In a
subsequent patch we will look to assert that WebCore::subdivide() always returns subdivisions.

Test: fast/text/text-combine-surroundContents-crash.html

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::subdivideAndResolveStyle):

LayoutTests:

Add a test to ensure that we do not crash when painting an empty inline text box associated
with combined text.

  • fast/text/text-combine-surroundContents-crash-expected.txt: Added.
  • fast/text/text-combine-surroundContents-crash.html: Added.
2:47 AM Changeset in webkit [236112] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.22

Merge r235457 - Check for null renderer in canBeScrolledIntoView
https://bugs.webkit.org/show_bug.cgi?id=188935

Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/spatial-navigation/snav-display-contents-crash.html

  • page/SpatialNavigation.cpp:

(WebCore::canBeScrolledIntoView):

LayoutTests:

  • fast/spatial-navigation/snav-display-contents-crash-expected.txt: Added.
  • fast/spatial-navigation/snav-display-contents-crash.html: Added.
2:16 AM Changeset in webkit [236111] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.22/Source/WebCore

Merge r235456 - IDBDatabase should not return true to hasPendingActivity after being stopped
https://bugs.webkit.org/show_bug.cgi?id=189073

Reviewed by Darin Adler.

There is a chance that IDBDatabase::hasPendingActivity returns true.
The case that might happen is when stop() is called but there are still some active/being committed transactions.
In that case, hasPendingActivity will return true until these transactions get finalized.
While these transactions will probably be finalized at some point, it delays GC for no good reason.
And we might want in a follow-up patch to assert that ActiveDOMObject are GC-able whenever their context is stopped.
For that purpose, make sure hasPendingActivity returns false when context is stopped.

  • Modules/indexeddb/IDBDatabase.cpp:

(WebCore::IDBDatabase::hasPendingActivity const):

2:16 AM Changeset in webkit [236110] by Carlos Garcia Campos
  • 5 edits in releases/WebKitGTK/webkit-2.22

Merge r235438 - MediaDevices should be collectable as soon as its document is stopped
https://bugs.webkit.org/show_bug.cgi?id=189021

Reviewed by Eric Carlson.

Source/WebCore:

Introduce ActiveDOMObject::isContextStopped to check whether the context is stopped.
Use this check in MediaDevices::hasPendingActivity so that it returns false as soon as active dom objects are stopped.

Test: http/tests/media/collect-media-devices.https.html

  • Modules/mediastream/MediaDevices.cpp:

(WebCore::MediaDevices::hasPendingActivity const):

  • dom/ActiveDOMObject.cpp:

(WebCore::ActiveDOMObject::hasPendingActivity const):
(WebCore::ActiveDOMObject::isContextStopped const):

  • dom/ActiveDOMObject.h:

LayoutTests:

  • http/tests/media/media-stream/collect-media-devices.https-expected.txt: Added.
  • http/tests/media/media-stream/collect-media-devices.https.html: Added.
  • http/tests/media/media-stream/resources/mymediadevicesframe.htm: Added.
2:16 AM Changeset in webkit [236109] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.22

Merge r235416 - Null pointer deref in WidthIterator
https://bugs.webkit.org/show_bug.cgi?id=188993

Reviewed by Brent Fulgham.

Source/WebCore:

Test: fast/text/rtl-justification.html

We simply need to guard glyphBuffer like we do in the rest of the function.

  • platform/graphics/WidthIterator.cpp:

(WebCore::WidthIterator::advanceInternal):

LayoutTests:

  • fast/text/rtl-justification-expected.html: Added.
  • fast/text/rtl-justification.html: Added.
2:16 AM Changeset in webkit [236108] by Carlos Garcia Campos
  • 6 edits
    6 adds in releases/WebKitGTK/webkit-2.22

Merge r235410 - Various IndexDB tests abandon documents
https://bugs.webkit.org/show_bug.cgi?id=188728
<rdar://problem/43651095>

Reviewed by Alex Christensen.

Source/WebCore:

Some IDB objects implement hasPendingActivity but there are some possibilities that they continue returning true after being stopped.
This is the case for requests that get stopped while still waiting for some pending activity.
This is also the case for requests that emits upgradeneeded or blocked events.

Enforce that these objects return false to hasPendingActivity once being stopped.
This ensures that they can be garbage collected once their context is preparing for destruction like in Document::prepareForDestruction.

Test: http/tests/IndexedDB/collect-IDB-objects.https.html

  • Modules/indexeddb/IDBIndex.cpp:

(WebCore::IDBIndex::hasPendingActivity const):

  • Modules/indexeddb/IDBObjectStore.cpp:

(WebCore::IDBObjectStore::hasPendingActivity const):

  • Modules/indexeddb/IDBRequest.cpp:

(WebCore::IDBRequest::hasPendingActivity const):
(WebCore::IDBRequest::enqueueEvent):

  • Modules/indexeddb/IDBTransaction.cpp:

(WebCore::IDBTransaction::notifyDidAbort):
In case the context is stopped, IDBTransaction should not ask IDBRequest to fire an event.

LayoutTests:

  • http/tests/IndexedDB/collect-IDB-objects.https-expected.txt: Added.
  • http/tests/IndexedDB/collect-IDB-objects.https.html: Added.
  • http/tests/IndexedDB/resources/myidbframe.htm: Added.
  • http/tests/IndexedDB/resources/support.js: Added.
2:16 AM Changeset in webkit [236107] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.22/Source/WebKit

Merge r235400 - Pass webPageID and webFrameID to NetworkLoad for speculative loads
https://bugs.webkit.org/show_bug.cgi?id=188682

Reviewed by Youenn Fablet.

This also removes an authentication shortcut I introduced in r234941

  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:

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

  • Shared/Authentication/AuthenticationManager.cpp:

(WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):

2:16 AM Changeset in webkit [236106] by Carlos Garcia Campos
  • 8 edits in releases/WebKitGTK/webkit-2.22

Merge r235360 - XMLHTTPRequest.send for Document should have same Content-Type processing rules as String
https://bugs.webkit.org/show_bug.cgi?id=188953

Patch by Rob Buis <rbuis@igalia.com> on 2018-08-27
Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/xhr/setrequestheader-content-type-expected.txt:

Source/WebCore:

Processing rules for Content-Type have been implemented for send with String as parameter, but
not for Document, but both should be treated the same according to the spec [1]. This patch
implements this.

Behavior matches Firefox.

[1] https://xhr.spec.whatwg.org/#the-send()-method

Test: web-platform-tests/XMLHttpRequest/setrequestheader-content-type.htm

  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::send):

LayoutTests:

  • platform/gtk/imported/w3c/web-platform-tests/xhr/setrequestheader-content-type-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/xhr/setrequestheader-content-type-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/xhr/setrequestheader-content-type-expected.txt:
2:15 AM Changeset in webkit [236105] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.22/Source/WebCore

Merge r235357 - Shrink size of HTMLCollection
https://bugs.webkit.org/show_bug.cgi?id=188945

Reviewed by Darin Adler.

Shrink the size of HTMLCollection by reordering members.

No behavior change.

  • html/HTMLCollection.cpp:

(WebCore::HTMLCollection::HTMLCollection):

  • html/HTMLCollection.h:
2:14 AM Changeset in webkit [236104] by calvaris@igalia.com
  • 8 edits in trunk

[EME][GStreamer] The current EME implementation doesn't support the waitingforkey event
https://bugs.webkit.org/show_bug.cgi?id=185590

Reviewed by Philippe Normand.

Source/WebCore:

When decryptors are blocked waiting for the key, instruct the
player to run the Wait for key algorithm. As per spec, if we run
out of blocks pending to decrypt because we don't have the key, we
request running the algorithm again.

Test: imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-waitingforkey.https.html.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::handleMessage):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::initializationDataEncountered):
(WebCore::MediaPlayerPrivateGStreamerBase::reportWaitingForKey):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
  • platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:

(webkitMediaCommonEncryptionDecryptTransformInPlace):
(webkitMediaCommonEncryptionDecryptSinkEventHandler):

LayoutTests:

Updated status of
imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-waitingforkey.https
and expectations.

  • platform/wpe/TestExpectations:
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-waitingforkey.https-expected.txt:
12:47 AM Changeset in webkit [236103] by rniwa@webkit.org
  • 6 edits in trunk

Update composedPath to match the latest spec
https://bugs.webkit.org/show_bug.cgi?id=180378
<rdar://problem/42843004>

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaselined the test now that all test cases pass.

  • web-platform-tests/shadow-dom/event-composed-path-after-dom-mutation-expected.txt:

Source/WebCore:

This patch makes the check for whether a given node in the event path be included in composedPath
pre-determined at the time of the event dispatching per https://github.com/whatwg/dom/issues/525.
This was a fix for the issue that if an event listener in a closed shadow tree removes a node in the
same tree in the event path, then composedPath called on its shadow host, for example, will include
the removed node since it's no longer in the closed shadow tree.

Naively, implementing this behavior would require remembering the original document or shadow root
of each node in the event path as well as its parent shadow root, or worse which node is disclosed
to every other node at the time of computing the event path.

This patch takes a more novel and efficient approach to implement the new behavior by adding a single
integer indicating the number of closed-mode shadow root ancestors of each node in the event path.
In computePathUnclosedToTarget, any node whose *depth* is greater than the context object is excluded.

Consider the following example:
div ------- ShadowRoot (closed)

+- span +- slot

If an event is dispatched on span, then the event path would be [span, slot, ShadowRoot, div]. Then
the values of integers assigned to each node would be: [0, 1, 1, 0] respectively. When composedPath
is called on span or div, slot and ShadowRoot are excluded because they have a greater *depth* value.

Unfortunately, this simplistic solution doesn't work when there are multiple shadow roots of the same
depth through which an event is dispatched as in:
section -- ShadowRoot (closed, SR2)

| +- slot (s2)
+div ------ ShadowRoot (closed, SR1)

+- span +- slot (s1)

If an event is dispatched on span, the event path would be [span, s1, SR1, div, s2, SR2, section].
The values of integers assigned are: [0, 1, 1, 0, 1, 1, 0] respectively. When composedPath is called
on SR1, the simplistic approach would include s2 and SR2, which would be wrong.

To account for this case, in computePathUnclosedToTarget, we traverse the event path upwards (i.e.
ancestors) and downwards (i.e. descendants) from the context object and decrease the *allowed depth*
of shadow trees when we traverse out of a shadow tree in either direction. When traversing upwards,
therefore, moving out of a shadow root to its host would would decrease the allowed depth. When
traversing dowards, moving from a slot element to its assigned node would decrease the allowed depth.

Note that the depths can be negative when a composed event is dispatched inside a closed shadow tree,
and it gets out of its shadow host.

Unfortunately, the latest DOM specification has a bug and doesn't match the behavior of Chrome. This
patch proposes a new algorithm which can be adopted in https://github.com/whatwg/dom/issues/684.

Test: imported/w3c/web-platform-tests/shadow-dom/event-composed-path-after-dom-mutation.html

  • dom/EventContext.cpp:

(WebCore::EventContext::EventContext):
(WebCore::MouseOrFocusEventContext::MouseOrFocusEventContext):
(WebCore::TouchEventContext::TouchEventContext):

  • dom/EventContext.h:

(WebCore::EventContext::closedShadowDepth const): Added.

  • dom/EventPath.cpp:

(WebCore::WindowEventContext::WindowEventContext):
(WebCore::EventPath::buildPath): Compute the closed shadow tree's depths for each node in the path.
(WebCore::computePathUnclosedToTarget const): Implemented the aforementioned algorithm.
(WebCore::EventPath::EventPath):

Sep 17, 2018:

11:36 PM Changeset in webkit [236102] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebKit

Unreviewed build fix after r236101.

  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::flushAndDestroyPersistentStore):
Correct a BinarySemaphore::wait() call which now accepts no arguments.

10:47 PM Changeset in webkit [236101] by yusukesuzuki@slowstart.org
  • 28 edits
    1 add in trunk

[WTF] Use Semaphore and BinarySemaphore instead of dispatch_semaphore_t
https://bugs.webkit.org/show_bug.cgi?id=185339

Patch by Yusuke Suzuki <Yusuke Suzuki> on 2018-09-17
Reviewed by Mark Lam.

Source/WebCore:

  • fileapi/ThreadableBlobRegistry.cpp:

(WebCore::ThreadableBlobRegistry::blobSize):

  • platform/cocoa/NetworkExtensionContentFilter.h:
  • platform/cocoa/NetworkExtensionContentFilter.mm:

(WebCore::NetworkExtensionContentFilter::initialize):
(WebCore::NetworkExtensionContentFilter::willSendRequest):
(WebCore::NetworkExtensionContentFilter::responseReceived):
(WebCore::NetworkExtensionContentFilter::addData):
(WebCore::NetworkExtensionContentFilter::finishedAddingData):
(WebCore::NetworkExtensionContentFilter::handleDecision):
Use per-function BinarySemaphore instead of holding it in NetworkExtensionContentFilter's field.

  • platform/glib/FileMonitorGLib.cpp:

(WebCore::FileMonitor::FileMonitor):
(WebCore::FileMonitor::~FileMonitor):

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
(WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC):
(WebCore::MediaPlayerPrivateAVFoundationObjC::waitForVideoOutputMediaDataWillChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::outputMediaDataWillChange):
Use BinarySemaphore. And remove unused dispatch_semaphore_t.

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

(-[WebAVStreamDataParserListener streamDataParserWillProvideContentKeyRequestInitializationData:forTrackID:]):
(-[WebAVStreamDataParserListener streamDataParser:didProvideContentKeyRequestInitializationData:forTrackID:]):
(WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID):
(WebCore::SourceBufferPrivateAVFObjC::abort):
(WebCore::SourceBufferPrivateAVFObjC::setCDMSession):
(WebCore::SourceBufferPrivateAVFObjC::setCDMInstance):
Use Box<Semaphore> and Box<BinarySemaphore>.

  • platform/graphics/cocoa/WebCoreDecompressionSession.h:
  • platform/graphics/cocoa/WebCoreDecompressionSession.mm:

(WebCore::WebCoreDecompressionSession::WebCoreDecompressionSession):
Remove unused dispatch_semaphore_t.

  • platform/network/cf/ResourceHandleCFNet.cpp:

(WebCore::ResourceHandle::platformLoadResourceSynchronously):

  • platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:

(WebCore::getRunLoop):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willCacheResponse):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace):

  • platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h:
  • platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:

(-[WebCoreResourceHandleAsOperationQueueDelegate initWithHandle:messageQueue:]):
(-[WebCoreResourceHandleAsOperationQueueDelegate detachHandle]):
(-[WebCoreResourceHandleAsOperationQueueDelegate dealloc]):
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]):
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:canAuthenticateAgainstProtectionSpace:]):
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:willCacheResponse:]):
Use BinarySemaphore instead.

Source/WebKit:

  • Platform/IPC/Connection.cpp:

(IPC::Connection::SyncMessageState::wait):

  • Shared/mac/SecItemShim.cpp:

(WebKit::sendSecItemRequest):
Use BinarySemaphore.

  • UIProcess/ResourceLoadStatisticsPersistentStorage.cpp:

(WebKit::ResourceLoadStatisticsPersistentStorage::finishAllPendingWorkSynchronously):

  • UIProcess/WebStorage/StorageManager.cpp:

(WebKit::StorageManager::applicationWillTerminate):

  • UIProcess/ios/WKActionSheetAssistant.mm:

(appLinkForURL):
Use BinarySemaphore to wait for async completion handler. We also fix memory leak
since the old code does not call dispatch_release for the used semaphore.

Source/WTF:

This patch adds WTF::Semaphore, which is based on WTF::Lock and WTF::Condition.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/Semaphore.h: Added.

(WTF::Semaphore::Semaphore):
(WTF::Semaphore::signal):
(WTF::Semaphore::waitUntil):
(WTF::Semaphore::waitFor):
(WTF::Semaphore::wait):

  • wtf/generic/WorkQueueGeneric.cpp:

(WorkQueue::platformInitialize):

  • wtf/threads/BinarySemaphore.cpp:

(WTF::BinarySemaphore::waitUntil):
(WTF::BinarySemaphore::wait): Deleted.

  • wtf/threads/BinarySemaphore.h:

(WTF::BinarySemaphore::waitFor):
(WTF::BinarySemaphore::wait):
Align the names of the functions to WTF::Condition.
Add BinarySemaphore::wait(), which is the same to waitUntil(WallTime::infinity()).

Tools:

  • TestWebKitAPI/Tests/WTF/SynchronizedFixedQueue.cpp:

(TestWebKitAPI::ToUpperConverter::stopProducing):
(TestWebKitAPI::ToUpperConverter::stopConsuming):

9:14 PM Changeset in webkit [236100] by Simon Fraser
  • 7 edits in trunk

Many modern media control tests leak documents in testing
https://bugs.webkit.org/show_bug.cgi?id=189437

Reviewed by Darin Adler.
Source/WebCore:

In order to accurately detect leaks in media controls tests which use lots of
SVGImages, we have to:

  • Fire a zero-delay timer after the postTask, in order for ImagesLoader's m_derefElementTimer to clear references to elements.
  • Have releaseCriticalMemory() call CachedResourceLoader's garbageCollectDocumentResources() to drop the last handle to the CachedResource for an SVGImage.
  • Call WKBundleReleaseMemory() after the GC and timer, since we need garbageCollectDocumentResources() to run again after that timer has fired.

This should fix most of the spurious leak reports involving SVGImage documents.

  • page/MemoryRelease.cpp:

(WebCore::releaseCriticalMemory):

Source/WebKit:

In order to accurately detect leaks in media controls tests which use lots of
SVGImages, we have to:

  • Fire a zero-delay timer after the postTask, in order for ImagesLoader's m_derefElementTimer to clear references to elements.
  • Have releaseCriticalMemory() call CachedResourceLoader's garbageCollectDocumentResources() to drop the last handle to the CachedResource for an SVGImage.
  • Call WKBundleReleaseMemory() after the GC and timer, since we need garbageCollectDocumentResources() to run again after that timer has fired.

This should fix most of the spurious leak reports involving SVGImage documents.

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

(WKBundlePageCallAfterTasksAndTimers):
(WKBundlePagePostTask): Deleted.

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

Tools:

In order to accurately detect leaks in media controls tests which use lots of
SVGImages, we have to:

  • Fire a zero-delay timer after the postTask, in order for ImagesLoader's m_derefElementTimer to clear references to elements.
  • Have releaseCriticalMemory() call CachedResourceLoader's garbageCollectDocumentResources() to drop the last handle to the CachedResource for an SVGImage.
  • Call WKBundleReleaseMemory() after the GC and timer, since we need garbageCollectDocumentResources() to run again after that timer has fired.

This should fix most of the spurious leak reports involving SVGImage documents.

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::reportLiveDocuments):
(WTR::InjectedBundle::didReceiveMessageToPage):

7:54 PM Changeset in webkit [236099] by Fujii Hironori
  • 3 edits in trunk/Source/WebKitLegacy/win

[Win][Clang][WebKitLegacy] error: cannot pass object of non-trivial type through variadic function
https://bugs.webkit.org/show_bug.cgi?id=189612

Reviewed by Alex Christensen.

Non-trivial types can't be used as aruguments of LOG_ERROR and
ASSERT_WITH_MESSAGE.

  • DefaultPolicyDelegate.cpp:

(DefaultPolicyDelegate::unableToImplementPolicyWithError): Apply
static_cast<BSTR> to convert BString.

  • WebLocalizableStrings.cpp:

(copyLocalizedStringFromBundle): Convert 'key' from WTF::String to
char* by using 'key.utf8().data()'.

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

Try to fix Apple internal builds with the iOS 12.0 SDK.

  • Configurations/WebKit.xcconfig: Disable framework header postprocessing for iOS 12.0.
6:01 PM Changeset in webkit [236097] by Ryan Haddad
  • 2 edits
    1 delete in trunk/Source/WebKit

Unreviewed, rolling out r236092 because it breaks internal builds. Also, remove stray '+' character from ChangeLog file.

  • Scripts/copy-webcontent-resources-to-private-headers.sh: Removed.
  • WebKit.xcodeproj/project.pbxproj:
5:54 PM Changeset in webkit [236096] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Layout Test legacy-animation-engine/animations/play-state-in-shorthand.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=185651

Unreviewed test gardening.

  • platform/mac/TestExpectations: Mark test as flaky.
5:31 PM Changeset in webkit [236095] by Justin Fan
  • 2538 edits in trunk/LayoutTests

Updated expected test [ PASS ] messages for new test-harness format for webgl tests
https://bugs.webkit.org/show_bug.cgi?id=189677

Reviewed by Dean Jackson.

Update generate-webgl-tests.py's test expectation template
for my new version of webgl-test-harness.js for the webgl 2 suite,
and update all webgl/2.0.0 test expectations to match.

  • webgl/resources/webgl-expectation-template.txt:
  • webgl/2.0.0/.../*expected.txt: Modified all *expected.txts to match.
4:24 PM Changeset in webkit [236094] by jer.noble@apple.com
  • 15 edits
    9 adds in trunk

Add support for HEVC codec types in Media Capabilities
https://bugs.webkit.org/show_bug.cgi?id=189565

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/hevc-codec-parameters.html

Add some utility methods for parsing HEVC codec strings, and using those parsed
values to query the platform for detailed support for HEVC decoding.

Drive-by fix: Modify MediaEngineConfigurationFactory to allow for null function
pointers in the encode/decode factory pair.

  • Sources.txt:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/cocoa/VideoToolboxSoftLink.cpp:
  • platform/cocoa/VideoToolboxSoftLink.h:
  • platform/graphics/HEVCUtilities.cpp: Added.

(WebCore::parseHEVCCodecParameters):

  • platform/graphics/HEVCUtilities.h: Added.
  • platform/graphics/cocoa/HEVCUtilitiesCocoa.cpp: Added.

(WebCore::validateHEVCParameters):

  • platform/graphics/cocoa/HEVCUtilitiesCocoa.h: Added.
  • platform/graphics/cocoa/MediaEngineConfigurationFactoryCocoa.cpp: Added.

(WebCore::videoCodecTypeFromRFC4281Type):
(WebCore::createMediaPlayerDecodingConfigurationCocoa):

  • platform/graphics/cocoa/MediaEngineConfigurationFactoryCocoa.h: Added.
  • platform/mediacapabilities/MediaEngineConfigurationFactory.cpp:

(WebCore::factories):
(WebCore::MediaEngineConfigurationFactory::createDecodingConfiguration):
(WebCore::MediaEngineConfigurationFactory::createEncodingConfiguration):

  • testing/Internals.cpp:

(WebCore::Internals::parseHEVCCodecParameters):

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

Source/WTF:

Extract the toIntegralType template into its own header.

  • wtf/CMakeLists.txt:
  • wtf/text/StringConversion.h: Added.

(isCharacterAllowedInBase):
(toIntegralType):

  • wtf/text/WTFString.cpp:

LayoutTests:

  • media/hevc-codec-parameters-expected.txt: Added.
  • media/hevc-codec-parameters.html: Added.
4:21 PM Changeset in webkit [236093] by youenn@apple.com
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

Build fix after https://trac.webkit.org/changeset/236070
https://bugs.webkit.org/show_bug.cgi?id=189635
<rdar://problem/44361849>

Unreviewed.
Fix for iOS internal builds.

  • Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm:

(-[RTCVideoEncoderH264 resetCompressionSessionWithPixelFormat:]):

4:00 PM Changeset in webkit [236092] by achristensen@apple.com
  • 2 edits
    1 add in trunk/Source/WebKit

+2018-08-17 Ben Richards <benton_richards@apple.com>

Add script to generate WebContent service resource files and change XPC service main SPI to have it's own header
https://bugs.webkit.org/show_bug.cgi?id=188601

Reviewed by Dan Bernstein.

Added a script to the process entitlements build phase of the WebContent service that copies resource
files to WebKit.framework/PrivateHeaders/CustomWebContentResources. These resource files are to
be used by clients who would like to make a custom WebContent service.

  • Scripts/copy-webcontent-resources-to-private-headers.sh: Added.
  • WebKit.xcodeproj/project.pbxproj:
3:43 PM Changeset in webkit [236091] by Devin Rousso
  • 16 edits in trunk

Web Inspector: generate CSSKeywordCompletions from backend values
https://bugs.webkit.org/show_bug.cgi?id=189041

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

  • inspector/protocol/CSS.json:

Include an optional aliases array and inherited boolean for CSSPropertyInfo.

Source/WebCore:

Modified existing test inspector/css/getSupportedCSSProperties.html.

  • inspector/agents/InspectorCSSAgent.cpp:

(WebCore::InspectorCSSAgent::getSupportedCSSProperties):
Send alias and longhand information for all properties, and any known keyword values for
those applicable. This makes use of CSSParserFastPaths::isValidKeywordPropertyAndValue to
determine if a given keyword is a valid value for each property. This only generates a list
for properties who have no non-keyword values.

  • css/makeprop.pl:
  • css/makevalues.pl:

Create additional helper functions/constants for retrieving strings of each CSS keyword.

  • css/CSSProperty.h:

(WebCore::CSSProperty::aliasesForProperty):

  • css/CSSPrimitiveValue.cpp:

(WebCore::valueName):

  • css/CSSValuePool.cpp:

(WebCore::CSSValuePool::CSSValuePool):
(WebCore::CSSValuePool::createIdentifierValue):

Source/WebInspectorUI:

Moves the longhands map to WI.CSSKeywordCompletions for more global access. Creates an
aliases map to support completions on aliases with the same values as the non-alias name.
Removes all keyword-only properties from WI.CSSKeywordCompletions._propertyKeywordMap as
they are now generated by the backend (kept for compatibility).

  • UserInterface/Models/CSSCompletions.js:

(WI.CSSCompletions):
(WI.CSSCompletions.requestCSSCompletions.propertyNamesCallback):
(WI.CSSCompletions.prototype.isShorthandPropertyName):

  • UserInterface/Models/CSSKeywordCompletions.js:

(WI.CSSKeywordCompletions.forProperty.addKeywordsForName): Added.
(WI.CSSKeywordCompletions.forProperty):
(WI.CSSKeywordCompletions.addCustomCompletions):

  • UserInterface/Models/CSSProperty.js:

(WI.CSSProperty.isInheritedPropertyName):

LayoutTests:

  • inspector/css/getSupportedCSSProperties-expected.txt:
  • inspector/css/getSupportedCSSProperties.html:
3:22 PM Changeset in webkit [236090] by youenn@apple.com
  • 5 edits
    2 adds in trunk

track.onmute isn't called for a remote MediaStreamTrack when its counter part track is removed from the peer connection
https://bugs.webkit.org/show_bug.cgi?id=176281
<rdar://problem/44525674>

Reviewed by Eric Carlson.

Source/WebCore:

Listen to libwebrtc remove track callbacks.
Implement handling as per https://w3c.github.io/webrtc-pc/#process-remote-track-removal.
This triggers a mute event on the track.

Test: webrtc/remove-track.html

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::LibWebRTCMediaEndpoint::removeRemoteTrack):
(WebCore::LibWebRTCMediaEndpoint::OnRemoveTrack):

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:

(WebCore::LibWebRTCPeerConnectionBackend::shouldOfferAllowToReceive const):
Drive by fix: Plan B code path does not mandate having an rtc backend for each sender.

LayoutTests:

  • webrtc/remove-track-expected.txt: Added.
  • webrtc/remove-track.html: Added.
3:21 PM Changeset in webkit [236089] by sbarati@apple.com
  • 4 edits
    1 add in trunk

We must convert ProfileType to CheckStructureOrEmpty instead of CheckStructure
https://bugs.webkit.org/show_bug.cgi?id=189676
<rdar://problem/39682897>

Reviewed by Michael Saboff.

JSTests:

  • typeProfiler/check-structure-or-empty-in-fixup.js: Added.

(A):
(K):
(i.catch):

Source/JavaScriptCore:

Because the incoming value may be TDZ, CheckStructure may end up crashing.
Since the Type Profile does not currently record TDZ values in any of its
data structures, this is not a semantic change in how it will show you data.
It just fixes crashes when we emit a CheckStructure and the incoming value
is TDZ.

  • dfg/DFGFixupPhase.cpp:

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

  • dfg/DFGNode.h:

(JSC::DFG::Node::convertToCheckStructureOrEmpty):

3:05 PM Changeset in webkit [236088] by Simon Fraser
  • 5 edits in trunk/Source

Add more Fullscreen logging
https://bugs.webkit.org/show_bug.cgi?id=189656

Reviewed by Jer Noble.

Add some fullscreen logging so I can tell whether WebFullScreenManager ever releases
the fullscreen element.

Source/WebCore:

  • platform/cocoa/VideoFullscreenModelVideoElement.mm:

(VideoFullscreenModelVideoElement::VideoFullscreenModelVideoElement):
(VideoFullscreenModelVideoElement::~VideoFullscreenModelVideoElement):
(VideoFullscreenModelVideoElement::setVideoElement):

Source/WebKit:

  • WebProcess/FullScreen/WebFullScreenManager.cpp:

(WebKit::WebFullScreenManager::WebFullScreenManager):
(WebKit::WebFullScreenManager::videoControlsManagerDidChange):
(WebKit::WebFullScreenManager::setPIPStandbyElement):
(WebKit::WebFullScreenManager::enterFullScreenForElement):
(WebKit::WebFullScreenManager::exitFullScreenForElement):
(WebKit::WebFullScreenManager::willEnterFullScreen):
(WebKit::WebFullScreenManager::didEnterFullScreen):
(WebKit::WebFullScreenManager::willExitFullScreen):
(WebKit::WebFullScreenManager::didExitFullScreen):
(WebKit::WebFullScreenManager::close):

  • WebProcess/FullScreen/WebFullScreenManager.h:
3:05 PM Changeset in webkit [236087] by Simon Fraser
  • 7 edits in trunk/Source/WebCore

Add support for dumping the GraphicsLayer tree via notifyutil
https://bugs.webkit.org/show_bug.cgi?id=189639

Reviewed by Zalan Bujtas.

Make "notifyutil -p com.apple.WebKit.showGraphicsLayerTree" work. It dumps the GraphicsLayer tree
for each top-level document (GraphicsLayers are connected across frame boundaries, so this prints
the entire tree for each main frame).

It uses WTFLogAlways rather than fprintf() so output shows on all platforms (other tree dumps should
be converted in the same way).

  • page/mac/PageMac.mm:

(WebCore::Page::platformInitialize):

  • platform/graphics/GraphicsLayer.cpp:

(showGraphicsLayerTree):

  • rendering/RenderLayerCompositor.cpp:

(showGraphicsLayerTreeForCompositor):

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

(WebCore::printGraphicsLayerTreeForLiveDocuments):

  • rendering/RenderObject.h:
2:59 PM Changeset in webkit [236086] by timothy_horton@apple.com
  • 4 edits in trunk/Source/WebKit

Swipe snapshot can get stuck if swiping is disabled while it is visible
https://bugs.webkit.org/show_bug.cgi?id=189667
<rdar://problem/40367780>

Reviewed by Simon Fraser.

If navigation gestures are disabled while a swipe snapshot is visible,
WKWebView will tear down the ViewGestureController, which means that
the SnapshotRemovalTracker will no longer be around to ever remove
the snapshot.

It's currently very hard to write a test for this because we have
yet to come up with a good mechanism for testing swiping on iOS.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView setAllowsBackForwardNavigationGestures:]):
Instead of tearing down the ViewGestureController when navigation
gestures are disabled, just set a bit on it that disables gestures.

  • UIProcess/Cocoa/ViewGestureController.cpp:

(WebKit::ViewGestureController::canSwipeInDirection const):

  • UIProcess/Cocoa/ViewGestureController.h:

(WebKit::ViewGestureController::setSwipeGestureEnabled):
(WebKit::ViewGestureController::isSwipeGestureEnabled):
Add a bit to ViewGestureController that makes starting new gestures
always fail, but allows e.g. snapshots from existing swipes to continue
their usual behavior.

2:41 PM Changeset in webkit [236085] by chris.reid@sony.com
  • 5 edits in trunk/Source/WebCore

[Curl] Add schema version and enable auto vacuum for cookie database.
https://bugs.webkit.org/show_bug.cgi?id=189669

Reviewed by Alex Christensen.

Turning on auto incremental vacuuming and adding versioning to the database. Right now we
reset tables if there's an unknown schema or if the none is set. There is placeholder logic
in place to upgrade databases as the schema changes in the future.

Tested by checking the database manually after launching MiniBrowser.

  • platform/network/curl/CookieJarDB.cpp:

(WebCore::CookieJarDB::openDatabase):
(WebCore::CookieJarDB::verifySchemaVersion):
(WebCore::CookieJarDB::deleteAllTables):
(WebCore::CookieJarDB::createPrepareStatement):
(WebCore::CookieJarDB::getPrepareStatement):
(WebCore::CookieJarDB::executeSimpleSql):

  • platform/network/curl/CookieJarDB.h:
  • platform/network/curl/NetworkStorageSessionCurl.cpp:

(WebCore::defaultSession):

  • platform/sql/SQLiteDatabase.cpp:

(WebCore::SQLiteDatabase::turnOnIncrementalAutoVacuum): fixed a bug.

2:14 PM Changeset in webkit [236084] by david_fenton@apple.com
  • 2 edits in trunk/LayoutTests

Fixed typo in TestExpectations file.
https://bugs.webkit.org/show_bug.cgi?id=188020.

Unreviewed test gardening.

Patch by Dawei Fenton <realdawei@apple.com> on 2018-09-17

  • platform/ios/TestExpectations:
2:07 PM Changeset in webkit [236083] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

Re-order Node flags based on semantics
https://bugs.webkit.org/show_bug.cgi?id=189643

Reviewed by Simon Fraser.

Re-ordered Node flags based on their category and subclasses of Node which use them.

  • dom/Node.h:
1:50 PM Changeset in webkit [236082] by mitz@apple.com
  • 7 copies
    1 add in releases/Apple/watchOS 5.0

Added a tag for watchOS 5.0.

1:50 PM Changeset in webkit [236081] by mitz@apple.com
  • 8 copies
    1 add in releases/Apple/iOS 12.0

Added a tag for iOS 12.0.

1:50 PM Changeset in webkit [236080] by mitz@apple.com
  • 9 copies
    1 add in releases/Apple/Safari 12.0

Added a tag for Safari 12.0.

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

Expose WKWebProcess.h as a private header
https://bugs.webkit.org/show_bug.cgi?id=189636

  • WebKit.xcodeproj/project.pbxproj:
12:39 PM Changeset in webkit [236078] by Simon Fraser
  • 4 edits in trunk/Source/WebCore

Add more ResourceLoading logging, particularly in MemoryCache code
https://bugs.webkit.org/show_bug.cgi?id=189651

Reviewed by Tim Horton.

Adding more logging to the ResourceLoading log channel, which I found useful
when trying to understand cached SVGImage lifetimes (bug 189437).

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::deleteIfPossible):

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::garbageCollectDocumentResources):

  • loader/cache/MemoryCache.cpp:

(WebCore::MemoryCache::add):
(WebCore::MemoryCache::pruneLiveResourcesToSize):
(WebCore::MemoryCache::pruneDeadResources):
(WebCore::MemoryCache::pruneDeadResourcesToSize):
(WebCore::MemoryCache::remove):
(WebCore::MemoryCache::dumpLRULists const):

11:57 AM Changeset in webkit [236077] by jer.noble@apple.com
  • 9 edits
    1 move
    2 deletes in trunk

Enable USE_MEDIAREMOTE on iOS
https://bugs.webkit.org/show_bug.cgi?id=189096

Reviewed by Eric Carlson.

Source/WebCore:

Migrate to using MediaRemote.framework on iOS from MediaPlayer.framework. This unifies the
Now Playing implementation on iOS and Mac.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/audio/cocoa/MediaSessionManagerCocoa.cpp: Removed.
  • platform/audio/cocoa/MediaSessionManagerCocoa.h:
  • platform/audio/cocoa/MediaSessionManagerCocoa.mm: Renamed from Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm.

(PlatformMediaSessionManager::sharedManager):
(PlatformMediaSessionManager::sharedManagerIfExists):
(MediaSessionManagerCocoa::updateSessionState):
(MediaSessionManagerCocoa::beginInterruption):
(MediaSessionManagerCocoa::scheduleUpdateNowPlayingInfo):
(MediaSessionManagerCocoa::sessionWillBeginPlayback):
(MediaSessionManagerCocoa::sessionDidEndRemoteScrubbing):
(MediaSessionManagerCocoa::removeSession):
(MediaSessionManagerCocoa::sessionWillEndPlayback):
(MediaSessionManagerCocoa::clientCharacteristicsChanged):
(MediaSessionManagerCocoa::sessionCanProduceAudioChanged):
(MediaSessionManagerCocoa::nowPlayingEligibleSession):
(MediaSessionManagerCocoa::updateNowPlayingInfo):

  • platform/audio/ios/MediaSessionManagerIOS.h:

(): Deleted.

  • platform/audio/ios/MediaSessionManagerIOS.mm:

(WebCore::MediaSessionManageriOS::nowPlayingEligibleSession): Deleted.
(WebCore::MediaSessionManageriOS::updateNowPlayingInfo): Deleted.
(WebCore::MediaSessionManageriOS::sessionWillBeginPlayback): Deleted.
(WebCore::MediaSessionManageriOS::removeSession): Deleted.
(WebCore::MediaSessionManageriOS::sessionWillEndPlayback): Deleted.
(WebCore::MediaSessionManageriOS::clientCharacteristicsChanged): Deleted.

  • platform/audio/mac/MediaSessionManagerMac.h: Removed.

Source/WTF:

  • wtf/Platform.h:
11:49 AM Changeset in webkit [236076] by youenn@apple.com
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

Enable VCP for iOS and reenable it for MacOS
https://bugs.webkit.org/show_bug.cgi?id=189635
<rdar://problem/43621029>

Unreviewed, build fix for iOS simulator.

  • Source/webrtc/sdk/WebKit/VideoProcessingSoftLink.h:
11:45 AM Changeset in webkit [236075] by commit-queue@webkit.org
  • 9 edits
    4 adds in trunk/Source/WebKit

Expose XPCServiceMain in a WebProcess header rather than WKProcessPool
https://bugs.webkit.org/show_bug.cgi?id=189636

Patch by Alex Christensen <achristensen@webkit.org> on 2018-09-17
Reviewed by Dan Bernstein.

Fix a few build failures along the way.

  • PluginProcess/mac/PluginControllerProxyMac.mm:

(WebKit::PluginControllerProxy::windowAndViewFramesChanged):
(WebKit::PluginControllerProxy::updateLayerHostingContext):

  • PluginProcess/mac/PluginProcessMac.mm:

(WebKit::replacedNSWorkspace_launchApplicationAtURL_options_configuration_error):
(WebKit::PluginProcess::platformInitializeProcess):

  • Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
  • Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:

(WebKit::XPCServiceMain):
(main):

  • SourcesCocoa.txt:
  • UIProcess/API/Cocoa/WKProcessPool.mm:

(+[WKProcessPool _webContentProcessXPCMain]): Deleted.

  • UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/API: Added.
  • WebProcess/API/Cocoa: Added.
  • WebProcess/API/Cocoa/WKWebProcess.cpp: Added.

(WKWebProcessMain):

  • WebProcess/API/Cocoa/WKWebProcess.h: Added.
  • WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:

(-[WKAccessibilityWebPageObject convertScreenPointToRootView:]):
(-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):
(-[WKAccessibilityWebPageObject accessibilityHitTest:]):

11:24 AM Changeset in webkit [236074] by commit-queue@webkit.org
  • 6 edits in trunk/Source

Build error in ImageBufferCG when compiled with IOSurfacePool
https://bugs.webkit.org/show_bug.cgi?id=189579

Patch by Frederic Wang <fwang@igalia.com> on 2018-09-17
Reviewed by Tim Horton.

IOSurface.h might be included with different value of IOSURFACE_CANVAS_BACKING_STORE, causing
compilation errors when files in the same unified source do not agree on the definition.
This patch moves the definition of IOSURFACE_CANVAS_BACKING_STORE from ImageBufferDataCG.h
to Platform.h so that IOSURFACE_CANVAS_BACKING_STORE is set to the same value in all files.
Finally some minors changes to explicitly declare/define ImageBuffer are performed in order
to prevent future issues with Unified build rotating.

Source/WebCore:

No new tests, behavior unchanged.

  • html/HTMLCanvasElement.cpp: Explicitly include ImageBuffer.h since it's used in this file.
  • platform/graphics/cg/ImageBufferDataCG.h: Move definition into Platform.h.
  • platform/graphics/cocoa/IOSurface.h: Forward-declare ImageBuffer since it's used in this

header.

Source/WTF:

  • wtf/Platform.h: Move definition from ImageBufferDataCG.h.
11:19 AM Changeset in webkit [236073] by Basuke Suzuki
  • 12 edits in trunk

[Curl] Respond with requested authentication scheme for authentication challenge.
https://bugs.webkit.org/show_bug.cgi?id=189318

Reviewed by Alex Christensen.

Source/WebCore:

Curl port depends on libcurl's authentication handling by enabling CURLAUTH_ANY. With this
mode, the round-trip communication between the client and the server is handled by libcurl
internally. That's okay for many cases. But when initial request has a credentials
(i.e. XMLHttpRequest), there's no valid chance to store credential to the storage because
the returned response is not 401.

Passes following tests:

  • http/tests/websocket/tests/hybi/httponly-cookie.pl
  • http/tests/websocket/tests/hybi/secure-cookie-insecure-connection.pl
  • http/tests/websocket/tests/hybi/secure-cookie-secure-connection.pl
  • http/tests/xmlhttprequest/basic-auth-default.html
  • http/tests/xmlhttprequest/cross-origin-authorization.html
  • http/tests/xmlhttprequest/logout.html
  • http/tests/xmlhttprequest/null-auth.php
  • http/tests/xmlhttprequest/re-login-async.html
  • http/tests/xmlhttprequest/re-login.html
  • http/tests/xmlhttprequest/redirect-credentials-responseURL.html
  • http/tests/xmlhttprequest/remember-bad-password.html
  • platform/network/ResourceHandle.h:
  • platform/network/curl/CurlContext.cpp:

(WebCore::CurlHandle::setHttpAuthUserPass):
(WebCore::CurlHandle::enableHttpAuthentication): Deleted.

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

(WebCore::CurlRequest::setAuthenticationScheme):
(WebCore::CurlRequest::setupTransfer):

  • platform/network/curl/CurlRequest.h:
  • platform/network/curl/ResourceHandleCurl.cpp:

(WebCore::ResourceHandle::start):
(WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
(WebCore::ResourceHandle::receivedCredential):
(WebCore::ResourceHandle::getCredential):
(WebCore::ResourceHandle::restartRequestWithCredential):
(WebCore::ResourceHandle::platformLoadResourceSynchronously):
(WebCore::ResourceHandle::continueAfterWillSendRequest):

Source/WebKit:

Curl port depends on libcurl's authentication handling by enabling CURLAUTH_ANY. With this
mode, the round-trip communication between the client and the server is handled by libcurl
internally. That's okay for many cases. But when initial request has a credentials
(i.e. XMLHttpRequest), there's no valid chance to store credential to the storage because
the returned response is not 401.

  • NetworkProcess/curl/NetworkDataTaskCurl.cpp:

(WebKit::NetworkDataTaskCurl::NetworkDataTaskCurl):
(WebKit::NetworkDataTaskCurl::willPerformHTTPRedirection):
(WebKit::NetworkDataTaskCurl::tryHttpAuthentication):
(WebKit::NetworkDataTaskCurl::tryProxyAuthentication):
(WebKit::NetworkDataTaskCurl::restartWithCredential):

  • NetworkProcess/curl/NetworkDataTaskCurl.h:

LayoutTests:

  • platform/wincairo/TestExpectations:
10:37 AM Changeset in webkit [236072] by graouts@webkit.org
  • 3 edits in trunk/LayoutTests

[Web Animations] Positive delays of accelerated animations are not respected
https://bugs.webkit.org/show_bug.cgi?id=189411
<rdar://problem/44151416>

Reviewed by Dean Jackson.

Use a mask over the animated rectangle to allow for a 1px rounding error when seeking to fix flakiness.

  • webanimations/accelerated-animation-with-delay-and-seek-expected.html:
  • webanimations/accelerated-animation-with-delay-and-seek.html:
10:18 AM Changeset in webkit [236071] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Clear pending resource load statistics' writes after tests
https://bugs.webkit.org/show_bug.cgi?id=189632
<rdar://problem/44469275>

Patch by Woodrow Wang <woodrow_wang@apple.com> on 2018-09-17
Reviewed by Chris Dumez.

  • UIProcess/API/C/WKWebsiteDataStoreRef.cpp:

(WKWebsiteDataStoreStatisticsResetToConsistentState):

10:15 AM Changeset in webkit [236070] by youenn@apple.com
  • 20 edits in trunk

Enable VCP for iOS and reenable it for MacOS
https://bugs.webkit.org/show_bug.cgi?id=189635
<rdar://problem/43621029>

Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

Make sure VCP API is used to set encoding session parameters.

  • Source/webrtc/sdk/WebKit/VideoProcessingSoftLink.h:
  • Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm:

(-[RTCVideoEncoderH264 resetCompressionSessionWithPixelFormat:]):

  • Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/helpers.cc:
  • Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/helpers.h:

Source/WebCore:

Covered by exsiting and modified tests.
Instead of using libwebrtc YUV frames for black frames, use CVPixelBuffer to make it efficient.
Add internal API to know whether VCP is enabled so as to make capture-webrtc test pass on all platforms.

  • platform/mediastream/RealtimeOutgoingVideoSource.cpp:

(WebCore::RealtimeOutgoingVideoSource::sendBlackFramesIfNeeded):

  • platform/mediastream/RealtimeOutgoingVideoSource.h:
  • platform/mediastream/gstreamer/RealtimeOutgoingVideoSourceLibWebRTC.h:
  • platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.h:
  • platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:

(WebCore::createBlackPixelBuffer):
(WebCore::RealtimeIncomingVideoSourceCocoa::pixelBufferFromVideoFrame):

  • platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp:

(WebCore::RealtimeOutgoingVideoSourceCocoa::createBlackFrame):

  • platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.h:
  • testing/Internals.cpp:

(WebCore::Internals::supportsVCPEncoder):

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

LayoutTests:

  • platform/mac/webrtc/captureCanvas-webrtc-software-encoder.html:

For platforms suppporting VCP, arbitrary size should be supported.

  • webrtc/routines.js:
10:15 AM Changeset in webkit [236069] by Chris Dumez
  • 19 edits in trunk

PSON: window.open() with 'noopener' should only process-swap cross-site, not cross-origin
https://bugs.webkit.org/show_bug.cgi?id=189602
<rdar://problem/44430549>

Reviewed by Geoff Garen.

Source/WebCore:

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::setTriggeringAction):

  • loader/DocumentLoader.h:
  • loader/FrameLoadRequest.h:
  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::loadWithNavigationAction):
(WebCore::FrameLoader::loadWithDocumentLoader):
(WebCore::FrameLoader::loadPostRequest):
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
(WebCore::FrameLoader::loadDifferentDocumentItem):
Move NavigationAction's opener setting to loadWithNavigationAction() as this is a better bottleneck.
Otherwise, we'd have to set it at several call sites. Also move the NavigationAction around instead
of copying it.

  • loader/FrameLoader.h:

(WebCore::FrameLoader::loadWithNavigationAction):

  • loader/NavigationAction.h:

(WebCore::NavigationAction::setShouldOpenExternalURLsPolicy):

  • loader/PolicyChecker.cpp:

(WebCore::PolicyChecker::checkNavigationPolicy):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::createWindow):

Source/WebKit:

The following fixes were made to our process swap on navigation logic:

  • Browsing contexts opened via window.open() with 'noopener' option now only same if they are cross-site, instead of doing a stricter cross-origin check.
  • Support process swapping when opening a new window via <a target="_blank" rel="noopener"> that is cross-site.

In order to support this, the following changes were made:

  • Stop passing a 'isCrossOriginWindowOpenNavigation' flag to the UIProcess when navigating because:
    • This is specific to window.open() and does not apply to other windows opened by DOM
    • This forces the origin check to happens on WebContent process side instead of relying on the one in WebProcessPool in the UIProcess
  • Pass the origin of the requester to the UIProcess when navigating, so that the WebProcessPool can use the requester's host for the cross-site check for the initial navigation in a new window created by DOM.
  • Add 2 flags to WebPageProxy which indicate if the page was created by the DOM and if any provisional loads have been committed. The WebProcessPool uses theses flags to recognize initial loads in new windows created by the DOM, so that it uses the requester's origin for the cross-site check.
  • Shared/NavigationActionData.cpp:

(WebKit::NavigationActionData::encode const):
(WebKit::NavigationActionData::decode):

  • Shared/NavigationActionData.h:
  • UIProcess/API/APINavigation.h:

(API::Navigation::setRequesterOrigin):
(API::Navigation::requesterOrigin const):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::continueNavigationInNewProcess):
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::createNewPage):

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::setOpenedByDOM):
(WebKit::WebPageProxy::openedByDOM const):
(WebKit::WebPageProxy::hasCommittedAnyProvisionalLoads const):

  • UIProcess/WebProcessPool.cpp:

(WebKit::shouldUseSameProcessBasedOnURLs):
(WebKit::WebProcessPool::processForNavigationInternal):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
10:11 AM Changeset in webkit [236068] by ap@apple.com
  • 4 edits
    2 deletes in trunk

Revert https://trac.webkit.org/r235910, because the new test times out.
Crash under PlatformPopupMenuData::encode when interacting with a select menu that has variable fonts
https://bugs.webkit.org/show_bug.cgi?id=188008

Source/WebKit:

  • Shared/cf/ArgumentCodersCF.cpp:

(IPC::encode):
(IPC::decode):

LayoutTests:

  • fast/text/variations/ipc2-expected.txt: Removed.
  • fast/text/variations/ipc2.html: Removed.
  • platform/mac-wk1/TestExpectations:
10:09 AM Changeset in webkit [236067] by commit-queue@webkit.org
  • 9 edits in trunk/Source/WebKit

Refactoring related to Safe Browsing
https://bugs.webkit.org/show_bug.cgi?id=189631

Patch by Alex Christensen <achristensen@webkit.org> on 2018-09-17
Reviewed by Tim Horton.

Make SafeBrowsingResult RefCounted.
Move logic from an unnamed lambda to WebPageProxy::receivedNavigationPolicyDecision.

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::beginSafeBrowsingCheck):
(WebKit::WebPageProxy::contentFilterDidBlockLoadForFrame): Deleted.
(WebKit::WebPageProxy::addPlatformLoadParameters): Deleted.
(WebKit::WebPageProxy::createSandboxExtensionsIfNeeded): Deleted.
(WebKit::WebPageProxy::startDrag): Deleted.
(WebKit::WebPageProxy::setPromisedDataForImage): Deleted.
(WebKit::WebPageProxy::setDragCaretRect): Deleted.
(WebKit::WebPageProxy::platformRegisterAttachment): Deleted.
(WebKit::WebPageProxy::platformCloneAttachment): Deleted.

  • UIProcess/SafeBrowsingResult.h:

(WebKit::SafeBrowsingResult::create):

  • UIProcess/WebFramePolicyListenerProxy.cpp:

(WebKit::WebFramePolicyListenerProxy::didReceiveSafeBrowsingResults):

  • UIProcess/WebFramePolicyListenerProxy.h:
  • UIProcess/WebFrameProxy.cpp:

(WebKit::WebFrameProxy::setUpPolicyListenerProxy):

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

(WebKit::WebPageProxy::receivedNavigationPolicyDecision):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponse):

  • UIProcess/WebPageProxy.h:
9:54 AM Changeset in webkit [236066] by Darin Adler
  • 17 edits in trunk/Source

Use OpaqueJSString rather than JSRetainPtr inside WebKit
https://bugs.webkit.org/show_bug.cgi?id=189652

Reviewed by Saam Barati.

Source/JavaScriptCore:

  • API/JSCallbackObjectFunctions.h: Removed an uneeded include of

JSStringRef.h.

  • API/JSContext.mm:

(-[JSContext evaluateScript:withSourceURL:]): Use OpaqueJSString::create rather
than JSStringCreateWithCFString, simplifying the code and also obviating the
need for explicit JSStringRelease.
(-[JSContext setName:]): Ditto.

  • API/JSStringRef.cpp:

(JSStringIsEqualToUTF8CString): Use adoptRef rather than explicit JSStringRelease.
It seems that additional optimization is possible, obviating the need to allocate
an OpaqueJSString, but that's true almost everywhere else in this patch, too.

  • API/JSValue.mm:

(+[JSValue valueWithNewRegularExpressionFromPattern:flags:inContext:]): Use
OpaqueJSString::create and adoptRef as appropriate.
(+[JSValue valueWithNewErrorFromMessage:inContext:]): Ditto.
(+[JSValue valueWithNewSymbolFromDescription:inContext:]): Ditto.
(performPropertyOperation): Ditto.
(-[JSValue invokeMethod:withArguments:]): Ditto.
(valueToObjectWithoutCopy): Ditto.
(containerValueToObject): Ditto.
(valueToString): Ditto.
(objectToValueWithoutCopy): Ditto.
(objectToValue): Ditto.

Source/WebCore:

  • Modules/plugins/QuickTimePluginReplacement.mm:

(WebCore::jsValueWithDictionaryInContext): Use OpaqueJSString::create.
(WebCore::jsValueWithAVMetadataItemInContext): Use adoptCF.

  • platform/mac/SerializedPlatformRepresentationMac.mm:

(WebCore::jsValueWithDictionaryInContext): Use OpaqueJSString::create.

Source/WebKit:

  • Shared/API/c/WKString.cpp: Removed unneeded include of JSStringRef.h.
  • WebProcess/Automation/WebAutomationSessionProxy.cpp: Removed unneeded

include of JSRetainPtr.
(WebKit::toJSString): Deleted.
(WebKit::toJSValue): Use OpaqueJSString::create.
(WebKit::callPropertyFunction): Ditto.
(WebKit::evaluate): Use adoptRef.
(WebKit::evaluateJavaScriptCallback): Ditto.
(WebKit::WebAutomationSessionProxy::scriptObjectForFrame):
Use OpaqueJSString::create.
(WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction): Use
String rather than JSStringRef.

  • WebProcess/Plugins/PDF/PDFPlugin.mm: Removed unneeded includes.

(WebKit::PDFPlugin::runScriptsInPDFDocument): Use OpaqueJSString::create.

Source/WebKitLegacy/ios:

  • WebView/WebPDFViewIOS.mm:

(-[WebPDFView finishedLoadingWithDataSource:]): Use OpaqueJSString::create.

  • WebView/WebPDFViewPlaceholder.mm:

(-[WebPDFViewPlaceholder _evaluateJSForDocument:]): Ditto.

Source/WebKitLegacy/mac:

  • WebView/WebPDFRepresentation.mm:

(-[WebPDFRepresentation finishedLoadingWithDataSource:]): Use OpaqueJSString::create.

9:41 AM Changeset in webkit [236065] by david_fenton@apple.com
  • 2 edits in trunk/LayoutTests

Layout Test imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=188020.

Unreviewed test gardening.

Patch by Dawei Fenton <realdawei@apple.com> on 2018-09-17

  • platform/ios/TestExpectations:
8:04 AM Changeset in webkit [236064] by Claudio Saavedra
  • 2 edits in trunk/LayoutTests

[WPE] Add new failure

Unreviewed gardening.

  • platform/wpe/TestExpectations:
7:36 AM Changeset in webkit [236063] by Claudio Saavedra
  • 4 edits in trunk/LayoutTests

[GTK][WPE] Update baseline for fast/dom/navigator-detached-no-crash

In GTK it's just a matter of updating the baseline. In WPE
there's some JS output that just needs to be ignored.

  • platform/gtk/TestExpectations:
  • platform/gtk/fast/dom/navigator-detached-no-crash-expected.txt:
  • platform/wpe/TestExpectations:
7:09 AM Changeset in webkit [236062] by Claudio Saavedra
  • 2 edits in trunk/LayoutTests

[WPE] Mark crashing animations test.

animations/play-state-start-paused.html crashing.
Unreviewed gardening.

  • platform/wpe/TestExpectations:
6:42 AM Changeset in webkit [236061] by Carlos Garcia Campos
  • 7 edits
    1 add in releases/WebKitGTK/webkit-2.22

[JSC] Array.prototype.reverse modifies JSImmutableButterfly
https://bugs.webkit.org/show_bug.cgi?id=188794

Reviewed by Saam Barati.

JSTests:

  • stress/reverse-with-immutable-butterfly.js: Added.

(shouldBe):
(reverseInt):
(reverseDouble):
(reverseContiguous):

Source/JavaScriptCore:

While Array.prototype.reverse modifies the butterfly of the given Array,
it does not account JSImmutableButterfly case. So it accidentally modifies
the content of JSImmutableButterfly.
This patch converts CoW arrays to writable arrays before reversing.

  • runtime/ArrayPrototype.cpp:

(JSC::arrayProtoFuncReverse):

  • runtime/JSObject.h:

(JSC::JSObject::ensureWritable):

5:45 AM WebKitGTK/2.22.x edited by Adrian Perez de Castro
Add a few items for WPE noted by Pablo Saavedra (diff)
5:23 AM Changeset in webkit [236060] by Claudio Saavedra
  • 2 edits in trunk/LayoutTests

[WPE] Unmark now passing tests

Unreviewed gardening.

  • platform/wpe/TestExpectations:
5:07 AM Changeset in webkit [236059] by Claudio Saavedra
  • 2 edits in trunk/LayoutTests

[GTK] Unmark now passing tests.

Unreviewed gardening.

  • platform/gtk/TestExpectations:
5:03 AM Changeset in webkit [236058] by Carlos Garcia Campos
  • 7 edits in releases/WebKitGTK/webkit-2.22/Source

Merge r235355 - Shrink size of XMLHttpRequest
https://bugs.webkit.org/show_bug.cgi?id=188944

Reviewed by Saam Barati.

Source/WebCore:

Shrink the size of XMLHttpRequest by packing bits and reordering members.
It reduces the size from 1248 to 1176.

No behavior change.

  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::XMLHttpRequest):
(WebCore::XMLHttpRequest::responseText):
(WebCore::XMLHttpRequest::createResponseBlob):
(WebCore::XMLHttpRequest::createResponseArrayBuffer):
(WebCore::XMLHttpRequest::setResponseType):
(WebCore::XMLHttpRequest::changeState):
(WebCore::XMLHttpRequest::callReadyStateChangeListener):
(WebCore::XMLHttpRequest::setWithCredentials):
(WebCore::XMLHttpRequest::open):
(WebCore::XMLHttpRequest::prepareToSend):
(WebCore::XMLHttpRequest::createRequest):
(WebCore::XMLHttpRequest::abort):
(WebCore::XMLHttpRequest::overrideMimeType):
(WebCore::XMLHttpRequest::setRequestHeader):
(WebCore::XMLHttpRequest::getAllResponseHeaders const):
(WebCore::XMLHttpRequest::getResponseHeader const):
(WebCore::XMLHttpRequest::status const):
(WebCore::XMLHttpRequest::statusText const):
(WebCore::XMLHttpRequest::didFinishLoading):
(WebCore::XMLHttpRequest::createDecoder const):
(WebCore::XMLHttpRequest::didReceiveData):
(WebCore::XMLHttpRequest::didReachTimeout):
(WebCore::XMLHttpRequest::readyState const): Deleted.

  • xml/XMLHttpRequest.h:

(WebCore::XMLHttpRequest::responseType const):
(WebCore::XMLHttpRequest::readyState const):

  • xml/XMLHttpRequestProgressEventThrottle.cpp:

(WebCore::XMLHttpRequestProgressEventThrottle::XMLHttpRequestProgressEventThrottle):

  • xml/XMLHttpRequestProgressEventThrottle.h:

Source/WTF:

StringBuilder is included in XMLHttpRequest. We reduce the size of StringBuilder too
by reordering members.

  • wtf/text/StringBuilder.h:

(WTF::StringBuilder::StringBuilder):

5:03 AM Changeset in webkit [236057] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.22/Source/WebCore

Merge r235345 - Make IDBCursor::m_request a WeakPtr
https://bugs.webkit.org/show_bug.cgi?id=188938

Reviewed by Alex Christensen.

Make m_request a WeakPtr so that if m_request is destroyed, the related cursor will not use the invalid pointer.

Covered by existing tests.

  • Modules/indexeddb/IDBCursor.cpp:

(WebCore::IDBCursor::continuePrimaryKey): Other continue and advance methods that are calling uncheckedIterateCursor do check for m_request.
Apply the same check for continuePrimaryKey.
(WebCore::IDBCursor::uncheckedIterateCursor):

  • Modules/indexeddb/IDBCursor.h:

(WebCore::IDBCursor::setRequest):
(WebCore::IDBCursor::clearRequest):
(WebCore::IDBCursor::request):

  • Modules/indexeddb/IDBRequest.h:
5:02 AM Changeset in webkit [236056] by Carlos Garcia Campos
  • 10 edits in releases/WebKitGTK/webkit-2.22/Source/WebCore

Merge r235344 - IDBCursor does not need to be an ActiveDOMObject
https://bugs.webkit.org/show_bug.cgi?id=188937

Reviewed by Alex Christensen.

Remove ActiveDOMObject from IDBCursor IDL.
Update constructors and call sites accordingly.
This allows removing m_outstandingRequestCount and related code in IDBRequest.

Covered by existing tests.

  • Modules/indexeddb/IDBCursor.cpp:

(WebCore::IDBCursor::create):
(WebCore::IDBCursor::IDBCursor):
(WebCore::IDBCursor::update):
(WebCore::IDBCursor::uncheckedIterateCursor):
(WebCore::IDBCursor::deleteFunction):
(WebCore::IDBCursor::activeDOMObjectName const): Deleted.
(WebCore::IDBCursor::canSuspendForDocumentSuspension const): Deleted.
(WebCore::IDBCursor::hasPendingActivity const): Deleted.
(WebCore::IDBCursor::decrementOutstandingRequestCount): Deleted.

  • Modules/indexeddb/IDBCursor.h:
  • Modules/indexeddb/IDBCursor.idl:
  • Modules/indexeddb/IDBCursorWithValue.cpp:

(WebCore::IDBCursorWithValue::create):
(WebCore::IDBCursorWithValue::IDBCursorWithValue):

  • Modules/indexeddb/IDBCursorWithValue.h:
  • Modules/indexeddb/IDBCursorWithValue.idl:
  • Modules/indexeddb/IDBRequest.cpp:

(WebCore::IDBRequest::setSource):
(WebCore::IDBRequest::dispatchEvent):
(WebCore::IDBRequest::willIterateCursor):
(WebCore::IDBRequest::didOpenOrIterateCursor):

  • Modules/indexeddb/IDBRequest.h:
  • Modules/indexeddb/IDBTransaction.cpp:

(WebCore::IDBTransaction::requestOpenCursor):

  • WebCore.xcodeproj/project.pbxproj:
5:02 AM Changeset in webkit [236055] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.22/Source/WTF

Merge r235336 - Improve unified source generator script logging and error messages
https://bugs.webkit.org/show_bug.cgi?id=188932

Reviewed by Simon Fraser.

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

Add the ability to explain why you're getting usage() instead of just printing it.
Capitalize log messages, and improve the wording in a few places.

5:02 AM Changeset in webkit [236054] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.22/Source/JavaScriptCore

Merge r235333 - YARR: Update UCS canonicalization tables for Unicode 11
https://bugs.webkit.org/show_bug.cgi?id=188928

Reviewed by Mark Lam.

Generated YarrCanonicalizeUCS2.cpp from YarrCanonicalizeUCS2.js.

This passes JavaScriptCore and test262 tests.

  • yarr/YarrCanonicalizeUCS2.cpp:
  • yarr/YarrCanonicalizeUCS2.js:

(printHeader):

5:02 AM Changeset in webkit [236053] by Carlos Garcia Campos
  • 13 edits
    1 copy
    3 adds in releases/WebKitGTK/webkit-2.22

Merge r235329 - Add getModifierState to MouseEvent
https://bugs.webkit.org/show_bug.cgi?id=188913
<rdar://problem/43668772>

Reviewed by Simon Fraser.

Source/WebCore:

Moved getModifierState from KeyboardEvent to UIEventWithKeyState and exposed it in MouseEvent.
See https://www.w3.org/TR/2016/WD-uievents-20160804/#mouseevent

This patch also fixes the bug that initMouseEvent was not clearing AltGraph and CapsLock states,
which was preserved in the refactoring done in r235158.

Tests: fast/events/constructors/mouse-event-getModifierState.html

fast/events/dblclick-event-getModifierState.html

  • dom/KeyboardEvent.cpp:

(WebCore::KeyboardEvent::getModifierState const): Moved to UIEventWithKeyState.

  • dom/KeyboardEvent.h:
  • dom/KeyboardEvent.idl: Insert a blank line to match the spec's IDL.
  • dom/MouseEvent.idl: Added getModifierState.
  • dom/UIEventWithKeyState.cpp:

(WebCore::UIEventWithKeyState::modifiersFromInitializer): Moved from the header file.
(WebCore::UIEventWithKeyState::getModifierState const):
(WebCore::UIEventWithKeyState::setModifierKeys): Moved from the header file.

  • dom/UIEventWithKeyState.h:

(WebCore::UIEventWithKeyState::modifierKeys const):
(WebCore::UIEventWithKeyState::setModifierKeys): Deleted the variant which didn't take altGraphKey
since that variant behaves same as the one which takes altGraphKey.

LayoutTests:

Added two tests for getModifierState: one manually setting modifier key states in MouseEvent's constructor,
and another one for dblclick inheriting modifier key states from the click event.

Also improved the test coverage for KeyboardEvent's getModifierState.

  • fast/events/constructors/keyboard-event-getModifierState-expected.txt:
  • fast/events/constructors/keyboard-event-getModifierState.html: Added more test cases.
  • fast/events/constructors/mouse-event-getModifierState-expected.txt: Added.
  • fast/events/constructors/mouse-event-getModifierState.html: Added.
  • fast/events/dblclick-event-getModifierState-expected.txt: Added.
  • fast/events/dblclick-event-getModifierState.html: Added.
  • fast/events/init-event-clears-capslock-expected.txt:
  • fast/events/init-event-clears-capslock.html: Added tests for MouseEvent. Note that initMouseEvent doesn't

take altGraphKey boolean unlike initKeyboardEvent.

  • platform/ios/TestExpectations: Skip the dblclick test in iOS since click event isn't supported on iOS.
5:02 AM Changeset in webkit [236052] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.22/Source/JavaScriptCore

Merge r235322 - YARR: JIT RegExps with non-greedy parenthesized sub patterns
https://bugs.webkit.org/show_bug.cgi?id=180876

Reviewed by Filip Pizlo.

Implemented the non-greedy nested parenthesis based on the prior greedy nested parenthesis work.
For the matching code, the greedy path was correct except that we don't try matching for the
non-greedy case. Added a jump out to the term after the parenthesis and a label to perform the
first / next match when we backtrack. The backtracking code needs to check to see if we have
tried the first match or if we can do another match.

Updated the disassembly annotations to include parenthesis capturing info, quantifier type and
count. Did other minor cleanup as well.

Fixed function name typo, added missing 't' in "setUsesPaternContextBuffer()".

Updated the text in some comments, both for this change as well as accuracy for existing code.

  • yarr/YarrJIT.cpp:

(JSC::Yarr::YarrGenerator::generate):
(JSC::Yarr::YarrGenerator::backtrack):
(JSC::Yarr::YarrGenerator::opCompileParenthesesSubpattern):
(JSC::Yarr::YarrGenerator::compile):
(JSC::Yarr::dumpCompileFailure):
(JSC::Yarr::jitCompile):

  • yarr/YarrJIT.h:

(JSC::Yarr::YarrCodeBlock::setUsesPatternContextBuffer):
(JSC::Yarr::YarrCodeBlock::setUsesPaternContextBuffer): Deleted.

4:23 AM Changeset in webkit [236051] by Michael Catanzaro
  • 3 edits in trunk/Source/WebKit

Unreviewed, fix incorrect WPE build fix made in r236009

This isn't the right place to add the typedef. I failed to notice that the WebKitWebView
type is not actually used anywhere in this header. Actually, the problematic function is no
longer declared or used anywhere and was just missed when WebKitScriptDialog was refactored,
so remove it.

  • UIProcess/API/wpe/WebKitScriptDialog.h:
  • UIProcess/API/wpe/WebKitScriptDialogWPE.cpp:

(webkitScriptDialogRun): Deleted.

4:06 AM Changeset in webkit [236050] by Philippe Normand
  • 2 edits in trunk/Tools

[JHBuild] Update to GStreamer 1.14.3
https://bugs.webkit.org/show_bug.cgi?id=189450

Reviewed by Xabier Rodriguez-Calvar.

  • gstreamer/jhbuild.modules: Bump GStreamer modules from 1.14.1 to 1.14.3.
2:54 AM Changeset in webkit [236049] by Carlos Garcia Campos
  • 9 edits in releases/WebKitGTK/webkit-2.22

Merge r235315 - Allow creating WeakPtrs to const objects
https://bugs.webkit.org/show_bug.cgi?id=188785

Reviewed by Geoff Garen.

Source/WebCore:

Remove some unneeded const_casts.

  • css/MediaQueryEvaluator.cpp:

(WebCore::MediaQueryEvaluator::MediaQueryEvaluator):
(WebCore::MediaQueryEvaluator::evaluate const):

  • css/MediaQueryEvaluator.h:
  • rendering/FloatingObjects.cpp:

(WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
(WebCore::ComputeFloatOffsetForFloatLayoutAdapter::ComputeFloatOffsetForFloatLayoutAdapter):
(WebCore::ComputeFloatOffsetForLineLayoutAdapter::ComputeFloatOffsetForLineLayoutAdapter):
(WebCore::FindNextFloatLogicalBottomAdapter::FindNextFloatLogicalBottomAdapter):
(WebCore::FloatingObjects::FloatingObjects):

  • rendering/FloatingObjects.h:

(WebCore::FloatingObjects::renderer const):

Source/WTF:

const Foo foo;
WeakPtr<const Foo> weakConstFoo = makeWeakPtr(foo);

  • wtf/WeakPtr.h:

(WTF::WeakPtrFactory::createWeakPtr const):

Add a separate factory function for const T.
The underlying WeakReference is kept non-const in all cases.

Tools:

  • TestWebKitAPI/Tests/WTF/WeakPtr.cpp:

(TestWebKitAPI::Base::weakPtrFactory const):
(TestWebKitAPI::TEST):
(TestWebKitAPI::Base::weakPtrFactory): Deleted.

2:54 AM Changeset in webkit [236048] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.22

Merge r235268 - initKeyboardEvent doesn't clear CapsLock state
https://bugs.webkit.org/show_bug.cgi?id=188909

Reviewed by Wenson Hsieh.

Source/WebCore:

Fixed the bug by not preserving CapsLock state in setModifierKeys variant which takes boolean
for altGraphKey, which is only called by KeyboardEvent::initKeyboardEvent.

Test: fast/events/init-event-clears-capslock.html

  • dom/UIEventWithKeyState.h:

(WebCore::UIEventWithKeyState::setModifierKeys):

LayoutTests:

Added a regression test. Note that altGraph is only supported in WebKit
so Chrome and Firefox would fail to reset it via initKeyboardEvent.

  • fast/events/init-event-clears-capslock-expected.txt: Added.
  • fast/events/init-event-clears-capslock.html: Added.
2:54 AM Changeset in webkit [236047] by Carlos Garcia Campos
  • 116 edits in releases/WebKitGTK/webkit-2.22/Source/WebKit

Merge r235265 - Use unified build for UIProcess
https://bugs.webkit.org/show_bug.cgi?id=185014

Reviewed by Alex Christensen.

  • Sources.txt:
  • SourcesCocoa.txt:
  • UIProcess/API/APIWebsiteDataStore.h:
  • UIProcess/API/Cocoa/WKWebView.mm:
  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration urlSchemeHandlerForURLScheme:]):

  • UIProcess/API/glib/IconDatabase.cpp:
  • UIProcess/API/gtk/PageClientImpl.cpp:
  • UIProcess/API/gtk/WebKitColorChooser.cpp:
  • UIProcess/API/gtk/WebKitPopupMenu.cpp:
  • UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp:
  • UIProcess/ApplicationStateTracker.mm:
  • UIProcess/Authentication/mac/WebCredentialMac.mm:
  • UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm:
  • UIProcess/Automation/ios/WebAutomationSessionIOS.mm:
  • UIProcess/Automation/mac/WebAutomationSessionMac.mm:
  • UIProcess/Cocoa/NavigationState.mm:
  • UIProcess/Cocoa/PlaybackSessionManagerProxy.mm:
  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
  • UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:
  • UIProcess/Cocoa/ViewGestureController.cpp:
  • UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:

(-[WKWebViewContentProviderRegistry initWithConfiguration:]):
(-[WKWebViewContentProviderRegistry addPage:]):
(-[WKWebViewContentProviderRegistry removePage:]):

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:
  • UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:
  • UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm:
  • UIProcess/Cocoa/WebViewImpl.mm:

(-[WKTextTouchBarItemController itemForIdentifier:]):
(WebKit::WebViewImpl::performDragOperation):

  • UIProcess/Downloads/DownloadProxy.cpp:
  • UIProcess/DrawingAreaProxy.cpp:
  • UIProcess/Gamepad/UIGamepad.cpp:
  • UIProcess/Gamepad/UIGamepadProvider.cpp:
  • UIProcess/Gamepad/cocoa/UIGamepadProviderCocoa.mm:
  • UIProcess/HighPerformanceGraphicsUsageSampler.cpp:
  • UIProcess/Network/NetworkProcessProxy.cpp:
  • UIProcess/Notifications/WebNotificationManagerProxy.cpp:
  • UIProcess/PerActivityStateCPUUsageSampler.cpp:
  • UIProcess/Plugins/PluginInfoStore.cpp:
  • UIProcess/Plugins/PluginProcessProxy.cpp:
  • UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
  • UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
  • UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:
  • UIProcess/RemoteLayerTree/RemoteLayerTreeScrollingPerformanceData.mm:
  • UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
  • UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp:
  • UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
  • UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
  • UIProcess/RemoteWebInspectorProxy.cpp:
  • UIProcess/ResourceLoadStatisticsMemoryStore.cpp:
  • UIProcess/ServiceWorkerProcessProxy.cpp:
  • UIProcess/Storage/StorageProcessProxy.cpp:
  • UIProcess/SuspendedPageProxy.cpp:
  • UIProcess/TextCheckerCompletion.cpp:
  • UIProcess/UIMessagePortChannelProvider.cpp:
  • UIProcess/UserMediaPermissionCheckProxy.cpp:
  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
  • UIProcess/UserMediaPermissionRequestProxy.cpp:
  • UIProcess/VisitedLinkStore.cpp:
  • UIProcess/WKInspectorHighlightView.mm:

(findIntersectionOnLineBetweenPoints):
(quadIntersection):
(layerPathWithHole):
(layerPath):
(-[WKInspectorHighlightView _layoutForNodeHighlight:offset:]):
(-[WKInspectorHighlightView _layoutForNodeListHighlight:]):
(-[WKInspectorHighlightView _layoutForRectsHighlight:]):
(-[WKInspectorHighlightView update:]):

  • UIProcess/WebBackForwardList.cpp:
  • UIProcess/WebContextMenuListenerProxy.cpp:
  • UIProcess/WebCookieManagerProxy.cpp:
  • UIProcess/WebEditCommandProxy.cpp:
  • UIProcess/WebFrameProxy.cpp:
  • UIProcess/WebFullScreenManagerProxy.cpp:
  • UIProcess/WebInspectorProxy.cpp:
  • UIProcess/WebNavigationState.cpp:
  • UIProcess/WebOpenPanelResultListenerProxy.cpp:
  • UIProcess/WebPageInjectedBundleClient.cpp:
  • UIProcess/WebPageProxy.cpp:
  • UIProcess/WebProcessPool.cpp:
  • UIProcess/WebProcessProxy.cpp:
  • UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp:
  • UIProcess/WebURLSchemeHandler.cpp:
  • UIProcess/WebURLSchemeTask.cpp:
  • UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
  • UIProcess/gtk/AcceleratedBackingStoreX11.cpp:
  • UIProcess/ios/DragDropInteractionState.mm:
  • UIProcess/ios/InputViewUpdateDeferrer.mm:
  • UIProcess/ios/PageClientImplIOS.mm:

(-[WKEditCommandObjC initWithWebEditCommandProxy:]):
(-[WKEditCommandObjC command]):

  • UIProcess/ios/SmartMagnificationController.mm:
  • UIProcess/ios/TextCheckerIOS.mm:
  • UIProcess/ios/ViewGestureControllerIOS.mm:

(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::removeSwipeSnapshot):

  • UIProcess/ios/WKActionSheetAssistant.mm:

(presentationStyleForView):

  • UIProcess/ios/WKApplicationStateTrackingView.mm:

(-[WKApplicationStateTrackingView initWithFrame:webView:]):
(-[WKApplicationStateTrackingView _applicationDidEnterBackground]):
(-[WKApplicationStateTrackingView _applicationDidFinishSnapshottingAfterEnteringBackground]):
(-[WKApplicationStateTrackingView _applicationWillEnterForeground]):

  • UIProcess/ios/WKGeolocationProviderIOS.mm:

(-[WKGeolocationProviderIOS _startUpdating]):
(-[WKGeolocationProviderIOS _stopUpdating]):
(-[WKGeolocationProviderIOS _setEnableHighAccuracy:]):
(-[WKGeolocationProviderIOS init]):
(-[WKGeolocationProviderIOS initWithProcessPool:]):
(-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:completionHandler:view:]):
(-[WKGeolocationProviderIOS geolocationAuthorizationGranted]):
(-[WKLegacyCoreLocationProvider positionChanged:]):

  • UIProcess/ios/WKKeyboardScrollingAnimator.mm:

(-[WKKeyboardScrollingAnimator _scrollOffsetForEvent:]):
(-[WKKeyboardScrollingAnimator beginWithEvent:]):
(-[WKKeyboardScrollingAnimator handleKeyEvent:]):
(-[WKKeyboardScrollingAnimator startAnimatedScroll]):
(-[WKKeyboardScrollingAnimator stopAnimatedScroll]):

  • UIProcess/ios/WKLegacyPDFView.mm:
  • UIProcess/ios/WKPDFView.mm:

(-[WKPDFView web_setContentProviderData:suggestedFilename:]):

  • UIProcess/ios/WKScrollView.mm:

(-[WKScrollView _systemContentInset]):

  • UIProcess/ios/WKSystemPreviewView.mm:
  • UIProcess/ios/WebPageProxyIOS.mm:
  • UIProcess/mac/CorrectionPanel.mm:

(correctionIndicatorType):

  • UIProcess/mac/PageClientImplMac.mm:
  • UIProcess/mac/RemoteWebInspectorProxyMac.mm:

(-[WKRemoteWebInspectorProxyObjCAdapter initWithRemoteWebInspectorProxy:]):

  • UIProcess/mac/TextCheckerMac.mm:
  • UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
  • UIProcess/mac/ViewGestureControllerMac.mm:
  • UIProcess/mac/ViewSnapshotStore.mm:
  • UIProcess/mac/WKFullKeyboardAccessWatcher.mm:

(-[WKFullKeyboardAccessWatcher notifyAllProcessPools]):

  • UIProcess/mac/WKFullScreenWindowController.mm:

(WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::setInterface):
(WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::interface const):
(-[WKFullScreenWindowController initWithWindow:webView:page:]):
(-[WKFullScreenWindowController enterFullScreen:]):
(-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
(-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
(-[WKFullScreenWindowController windowDidEnterFullScreen:]):
(-[WKFullScreenWindowController windowDidExitFullScreen:]):
(-[WKFullScreenWindowController _manager]):
(-[WKFullScreenWindowController _replaceView:with:]):
(zoomAnimation):
(createMask):
(maskAnimation):

  • UIProcess/mac/WKImmediateActionController.mm:

(-[WKImmediateActionController initWithPage:view:viewImpl:recognizer:]):
(-[WKImmediateActionController willDestroyView:]):
(-[WKImmediateActionController _clearImmediateActionState]):
(-[WKImmediateActionController didPerformImmediateActionHitTest:contentPreventsDefault:userData:]):
(-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
(-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
(-[WKImmediateActionController _webHitTestResult]):
(-[WKImmediateActionController _defaultAnimationController]):
(-[WKImmediateActionController menuItem:maxSizeForPoint:]):
(-[WKImmediateActionController _animationControllerForDataDetectedText]):
(-[WKImmediateActionController _animationControllerForDataDetectedLink]):
(-[WKImmediateActionController _animationControllerForText]):

  • UIProcess/mac/WKInspectorViewController.mm:

(-[WKInspectorViewController initWithInspectedPage:]):
(-[WKInspectorViewController webView]):
(-[WKInspectorViewController configuration]):
(-[WKInspectorViewController webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]):
(-[WKInspectorViewController webView:decidePolicyForNavigationAction:decisionHandler:]):
(-[WKInspectorViewController inspectorWKWebViewReload:]):

  • UIProcess/mac/WKPrintingView.mm:

(-[WKPrintingView _expectedPreviewCallbackForRect:]):
(pageDidDrawToImage):
(-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]):
(pageDidComputePageRects):
(-[WKPrintingView _askPageToComputePageRects]):
(-[WKPrintingView _pageForRect:]):
(-[WKPrintingView _drawPDFDocument:page:atPoint:]):
(-[WKPrintingView _drawPreview:]):
(-[WKPrintingView drawRect:]):
(-[WKPrintingView rectForPage:]):

  • UIProcess/mac/WKTextFinderClient.mm:

(-[WKTextFinderClient initWithPage:view:]):
(-[WKTextFinderClient findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]):
(-[WKTextFinderClient getSelectedText:]):
(arrayFromRects):
(-[WKTextFinderClient didFindStringMatchesWithRects:didWrapAround:]):
(-[WKTextFinderClient didGetImageForMatchResult:]):

  • UIProcess/mac/WKTextInputWindowController.mm:
  • UIProcess/mac/WKViewLayoutStrategy.mm:

(+[WKViewLayoutStrategy layoutStrategyWithPage:view:viewImpl:mode:]):
(-[WKViewLayoutStrategy initWithPage:view:viewImpl:mode:]):
(-[WKViewViewSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
(-[WKViewFixedSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
(-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:viewImpl:mode:]):
(-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):

  • UIProcess/mac/WebColorPickerMac.mm:
  • UIProcess/mac/WebContextMenuProxyMac.mm:

(-[WKMenuTarget forwardContextMenuAction:]):
(WebKit::menuItemIdentifier):
(WebKit::WebContextMenuProxyMac::createContextMenuItem):

  • UIProcess/mac/WebInspectorProxyMac.mm:

(-[WKWebInspectorProxyObjCAdapter initWithWebInspectorProxy:]):

  • UIProcess/mac/WebPageProxyMac.mm:
  • UIProcess/mac/WebPopupMenuProxyMac.mm:
  • UIProcess/win/PageClientImpl.cpp:
  • UIProcess/win/TextCheckerWin.cpp:
  • UIProcess/win/WebContextMenuProxyWin.cpp:
  • UIProcess/win/WebPopupMenuProxyWin.cpp:
  • UIProcess/win/WebView.cpp:
  • UIProcess/wpe/TextCheckerWPE.cpp:
  • UIProcess/wpe/WebPasteboardProxyWPE.cpp:
  • WebKit.xcodeproj/project.pbxproj:
2:25 AM Changeset in webkit [236046] by Carlos Garcia Campos
  • 22 edits in releases/WebKitGTK/webkit-2.22/Source

Merge r235261 - JSRunLoopTimer may run part of a member function after it's destroyed
https://bugs.webkit.org/show_bug.cgi?id=188426

Reviewed by Mark Lam.

Source/JavaScriptCore:

When I was reading the JSRunLoopTimer code, I noticed that it is possible
to end up running timer code after the class had been destroyed.

The issue I spotted was in this function:
`
void JSRunLoopTimer::timerDidFire()
{

JSLock* apiLock = m_apiLock.get();
if (!apiLock) {

Likely a buggy usage: the timer fired while JSRunLoopTimer was being destroyed.
return;

}
HERE
std::lock_guard<JSLock> lock(*apiLock);
RefPtr<VM> vm = apiLock->vm();
if (!vm) {

The VM has been destroyed, so we should just give up.
return;

}

doWork();

}
`

Look at the comment 'HERE'. Let's say that the timer callback thread gets context
switched before grabbing the API lock. Then, some other thread destroys the VM.
And let's say that the VM owns (perhaps transitively) this timer. Then, the
timer would run code and access member variables after it was destroyed.

This patch fixes this issue by introducing a new timer manager class.
This class manages timers on a per VM basis. When a timer is scheduled,
this class refs the timer. It also calls the timer callback while actively
maintaining a +1 ref to it. So, it's no longer possible to call the timer
callback after the timer has been destroyed. However, calling a timer callback
can still race with the VM being destroyed. We continue to detect this case and
bail out of the callback early.

This patch also removes a lot of duplicate code between GCActivityCallback
and JSRunLoopTimer.

  • heap/EdenGCActivityCallback.cpp:

(JSC::EdenGCActivityCallback::doCollection):
(JSC::EdenGCActivityCallback::lastGCLength):
(JSC::EdenGCActivityCallback::deathRate):

  • heap/EdenGCActivityCallback.h:
  • heap/FullGCActivityCallback.cpp:

(JSC::FullGCActivityCallback::doCollection):
(JSC::FullGCActivityCallback::lastGCLength):
(JSC::FullGCActivityCallback::deathRate):

  • heap/FullGCActivityCallback.h:
  • heap/GCActivityCallback.cpp:

(JSC::GCActivityCallback::doWork):
(JSC::GCActivityCallback::scheduleTimer):
(JSC::GCActivityCallback::didAllocate):
(JSC::GCActivityCallback::willCollect):
(JSC::GCActivityCallback::cancel):
(JSC::GCActivityCallback::cancelTimer): Deleted.
(JSC::GCActivityCallback::nextFireTime): Deleted.

  • heap/GCActivityCallback.h:
  • heap/Heap.cpp:

(JSC::Heap::reportAbandonedObjectGraph):
(JSC::Heap::notifyIncrementalSweeper):
(JSC::Heap::updateAllocationLimits):
(JSC::Heap::didAllocate):

  • heap/IncrementalSweeper.cpp:

(JSC::IncrementalSweeper::scheduleTimer):
(JSC::IncrementalSweeper::doWork):
(JSC::IncrementalSweeper::doSweep):
(JSC::IncrementalSweeper::sweepNextBlock):
(JSC::IncrementalSweeper::startSweeping):
(JSC::IncrementalSweeper::stopSweeping):

  • heap/IncrementalSweeper.h:
  • heap/StopIfNecessaryTimer.cpp:

(JSC::StopIfNecessaryTimer::doWork):
(JSC::StopIfNecessaryTimer::scheduleSoon):

  • heap/StopIfNecessaryTimer.h:
  • runtime/JSRunLoopTimer.cpp:

(JSC::epochTime):
(JSC::JSRunLoopTimer::Manager::timerDidFireCallback):
(JSC::JSRunLoopTimer::Manager::PerVMData::setRunLoop):
(JSC::JSRunLoopTimer::Manager::PerVMData::PerVMData):
(JSC::JSRunLoopTimer::Manager::PerVMData::~PerVMData):
(JSC::JSRunLoopTimer::Manager::timerDidFire):
(JSC::JSRunLoopTimer::Manager::shared):
(JSC::JSRunLoopTimer::Manager::registerVM):
(JSC::JSRunLoopTimer::Manager::unregisterVM):
(JSC::JSRunLoopTimer::Manager::scheduleTimer):
(JSC::JSRunLoopTimer::Manager::cancelTimer):
(JSC::JSRunLoopTimer::Manager::timeUntilFire):
(JSC::JSRunLoopTimer::Manager::didChangeRunLoop):
(JSC::JSRunLoopTimer::timerDidFire):
(JSC::JSRunLoopTimer::JSRunLoopTimer):
(JSC::JSRunLoopTimer::timeUntilFire):
(JSC::JSRunLoopTimer::setTimeUntilFire):
(JSC::JSRunLoopTimer::cancelTimer):
(JSC::JSRunLoopTimer::setRunLoop): Deleted.
(JSC::JSRunLoopTimer::timerDidFireCallback): Deleted.
(JSC::JSRunLoopTimer::scheduleTimer): Deleted.

  • runtime/JSRunLoopTimer.h:

(JSC::JSRunLoopTimer::Manager::PerVMData::PerVMData):

  • runtime/PromiseDeferredTimer.cpp:

(JSC::PromiseDeferredTimer::doWork):
(JSC::PromiseDeferredTimer::runRunLoop):
(JSC::PromiseDeferredTimer::addPendingPromise):
(JSC::PromiseDeferredTimer::hasPendingPromise):
(JSC::PromiseDeferredTimer::hasDependancyInPendingPromise):
(JSC::PromiseDeferredTimer::cancelPendingPromise):
(JSC::PromiseDeferredTimer::scheduleWorkSoon):

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

(JSC::VM::VM):
(JSC::VM::~VM):
(JSC::VM::setRunLoop):
(JSC::VM::registerRunLoopTimer): Deleted.
(JSC::VM::unregisterRunLoopTimer): Deleted.

  • runtime/VM.h:

(JSC::VM::runLoop const):

  • wasm/js/WebAssemblyPrototype.cpp:

(JSC::webAssemblyModuleValidateAsyncInternal):
(JSC::instantiate):
(JSC::compileAndInstantiate):
(JSC::webAssemblyModuleInstantinateAsyncInternal):
(JSC::webAssemblyCompileStreamingInternal):
(JSC::webAssemblyInstantiateStreamingInternal):

Source/WebCore:

  • page/cocoa/ResourceUsageThreadCocoa.mm:

(WebCore::ResourceUsageThread::platformThreadBody):

  • page/linux/ResourceUsageThreadLinux.cpp:

(WebCore::ResourceUsageThread::platformThreadBody):

2:25 AM Changeset in webkit [236045] by Carlos Garcia Campos
  • 30 edits in releases/WebKitGTK/webkit-2.22/Source

Merge r235254 - Move vmEntryGlobalObject() to VM from CallFrame.
https://bugs.webkit.org/show_bug.cgi?id=188900
<rdar://problem/43655753>

Reviewed by Michael Saboff.

Source/JavaScriptCore:

Also introduced CallFrame::isGlobalExec() which makes use of one property of
GlobalExecs to identify them i.e. GlobalExecs have null callerFrame and returnPCs.
CallFrame::initGlobalExec() ensures this.

In contrast, normal CallFrames always have a callerFrame (because they must at
least be preceded by a VM EntryFrame) and a returnPC (at least return to the
VM entry glue).

  • API/APIUtils.h:

(handleExceptionIfNeeded):
(setException):

  • API/JSBase.cpp:

(JSEvaluateScript):
(JSCheckScriptSyntax):

  • API/JSContextRef.cpp:

(JSGlobalContextRetain):
(JSGlobalContextRelease):
(JSGlobalContextCopyName):
(JSGlobalContextSetName):
(JSGlobalContextGetRemoteInspectionEnabled):
(JSGlobalContextSetRemoteInspectionEnabled):
(JSGlobalContextGetIncludesNativeCallStackWhenReportingExceptions):
(JSGlobalContextSetIncludesNativeCallStackWhenReportingExceptions):
(JSGlobalContextGetDebuggerRunLoop):
(JSGlobalContextSetDebuggerRunLoop):
(JSGlobalContextGetAugmentableInspectorController):

  • API/JSValue.mm:

(reportExceptionToInspector):

  • API/glib/JSCClass.cpp:

(jscContextForObject):

  • API/glib/JSCContext.cpp:

(jsc_context_evaluate_in_object):

  • debugger/Debugger.cpp:

(JSC::Debugger::pauseIfNeeded):

  • debugger/DebuggerCallFrame.cpp:

(JSC::DebuggerCallFrame::vmEntryGlobalObject const):
(JSC::DebuggerCallFrame::evaluateWithScopeExtension):

  • interpreter/CallFrame.cpp:

(JSC::CallFrame::vmEntryGlobalObject): Deleted.

  • interpreter/CallFrame.h:

(JSC::ExecState::scope const):
(JSC::ExecState::noCaller):
(JSC::ExecState::isGlobalExec const):

  • interpreter/Interpreter.cpp:

(JSC::notifyDebuggerOfUnwinding):
(JSC::Interpreter::notifyDebuggerOfExceptionToBeThrown):
(JSC::Interpreter::debug):

  • runtime/CallData.cpp:

(JSC::profiledCall):

  • runtime/Completion.cpp:

(JSC::evaluate):
(JSC::profiledEvaluate):
(JSC::evaluateWithScopeExtension):
(JSC::loadAndEvaluateModule):
(JSC::loadModule):
(JSC::linkAndEvaluateModule):
(JSC::importModule):

  • runtime/ConstructData.cpp:

(JSC::profiledConstruct):

  • runtime/Error.cpp:

(JSC::getStackTrace):

  • runtime/VM.cpp:

(JSC::VM::throwException):
(JSC::VM::vmEntryGlobalObject const):

  • runtime/VM.h:

Source/WebCore:

No new tests needed because this patch does not introduce new functionality.

  • bindings/js/JSCustomXPathNSResolver.cpp:

(WebCore::JSCustomXPathNSResolver::create):

  • bindings/js/JSDOMGlobalObject.cpp:

(WebCore::callerGlobalObject):
(WebCore::toJSDOMGlobalObject): Deleted.

  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::firstDOMWindow):

  • bridge/c/c_utility.cpp:

(JSC::Bindings::convertValueToNPVariant):

  • bridge/objc/WebScriptObject.mm:

(WebCore::addExceptionToConsole):

  • bridge/objc/objc_instance.mm:

(ObjcInstance::moveGlobalExceptionToExecState):

  • bridge/objc/objc_runtime.mm:

(JSC::Bindings::convertValueToObjcObject):

  • bridge/objc/objc_utility.mm:

(JSC::Bindings::convertValueToObjcValue):

  • testing/Internals.cpp:

(WebCore::Internals::cloneArrayBuffer):

Source/WebKitLegacy/mac:

  • WebView/WebScriptDebugger.mm:

(WebScriptDebugger::sourceParsed):

2:24 AM Changeset in webkit [236044] by Carlos Garcia Campos
  • 8 edits
    2 adds in releases/WebKitGTK/webkit-2.22

Merge r235243 - Assert in NetworkBlobRegistry::unregisterBlobURL after network process had terminated
https://bugs.webkit.org/show_bug.cgi?id=188880

Reviewed by Saam Barati.

Source/WebKit:

Removed the debug assertion. WebContent process might be asking this network process
to unregister a blob registered from another network processs which had since crashed.

We could keep track of which blob had been registered with which network process
in WebContent process and avoid sending IPC to the network process but that's a lot of
house-keeping for virtually no benefit other than not hitting this assertion.

  • NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:

(WebKit::NetworkBlobRegistry::unregisterBlobURL):

Tools:

Fixed the bug that testRunner's terminateNetworkProcess, terminateServiceWorkerProcess, and terminateStorageProcess
were asynchronously terminating respective processes. Do so synchronously so that we can deterministically
test WebKit's behavior in layout tests.

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::terminateNetworkProcess):
(WTR::TestRunner::terminateServiceWorkerProcess):
(WTR::TestRunner::terminateStorageProcess):

  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

Added a layout test which demonstrates this debug assertion.

  • TestExpectations:
  • fast/files/blob-network-process-crash-expected.txt: Added.
  • fast/files/blob-network-process-crash.html: Added.
  • platform/wk2/TestExpectations:
1:50 AM Changeset in webkit [236043] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.22/Source/JavaScriptCore

Merge r235238 - YARR: Need to JIT compile a RegExp before using containsNestedSubpatterns flag
https://bugs.webkit.org/show_bug.cgi?id=188895

Reviewed by Mark Lam.

Found while working on another change. This will allow processing of nested
parenthesis that require saved ParenContext structures.

  • yarr/YarrJIT.cpp:

(JSC::Yarr::YarrGenerator::compile):

1:50 AM Changeset in webkit [236042] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.22/Source/WebKit

Merge r235208 - De-unify WebPage
https://bugs.webkit.org/show_bug.cgi?id=188865

Reviewed by Wenson Hsieh.

  • Sources.txt:
  • WebKit.xcodeproj/project.pbxproj:

WebPage being unified is causing mysterious build issues inside Carbon headers
on High Sierra only. Also, WebPage by itself takes longer to build than
most full unified source files, so it might not make sense to unify it
with others (to maximize parallelism).

1:50 AM Changeset in webkit [236041] by Carlos Garcia Campos
  • 159 edits in releases/WebKitGTK/webkit-2.22/Source/WebKit

Merge r235176 - Use unified build for WebProcess
https://bugs.webkit.org/show_bug.cgi?id=185015

Reviewed by Alex Christensen.

  • Sources.txt:
  • SourcesCocoa.txt:
  • UIProcess/WebPageProxy.h:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
  • WebProcess/Databases/WebDatabaseProvider.cpp:
  • WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
  • WebProcess/FileAPI/BlobRegistryProxy.cpp:
  • WebProcess/FullScreen/WebFullScreenManager.cpp:
  • WebProcess/Gamepad/WebGamepadProvider.cpp:
  • WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
  • WebProcess/Geolocation/WebGeolocationManager.cpp:
  • WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm:
  • WebProcess/InjectedBundle/API/gtk/DOM/GObjectEventListener.cpp:
  • WebProcess/InjectedBundle/DOM/InjectedBundleCSSStyleDeclarationHandle.cpp:
  • WebProcess/InjectedBundle/DOM/InjectedBundleFileHandle.cpp:
  • WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
  • WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:
  • WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp:
  • WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
  • WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
  • WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
  • WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
  • WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
  • WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
  • WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
  • WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.cpp:
  • WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
  • WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
  • WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp:
  • WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
  • WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
  • WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
  • WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
  • WebProcess/Network/NetworkProcessConnection.cpp:
  • WebProcess/Network/WebLoaderStrategy.cpp:
  • WebProcess/Network/WebResourceLoader.cpp:
  • WebProcess/Network/WebSocketProvider.cpp:
  • WebProcess/Network/WebSocketStream.cpp:
  • WebProcess/Network/webrtc/LibWebRTCProvider.cpp:
  • WebProcess/Network/webrtc/LibWebRTCResolver.cpp:
  • WebProcess/Network/webrtc/LibWebRTCResolver.h:
  • WebProcess/Network/webrtc/LibWebRTCSocket.cpp:
  • WebProcess/Network/webrtc/LibWebRTCSocket.h:
  • WebProcess/Network/webrtc/WebMDNSRegister.cpp:
  • WebProcess/Network/webrtc/WebRTCMonitor.cpp:
  • WebProcess/Network/webrtc/WebRTCMonitor.h:
  • WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
  • WebProcess/Notifications/WebNotificationManager.cpp:
  • WebProcess/Plugins/Netscape/JSNPMethod.cpp:
  • WebProcess/Plugins/Netscape/JSNPObject.cpp:
  • WebProcess/Plugins/Netscape/NPJSObject.cpp:
  • WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
  • WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
  • WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
  • WebProcess/Plugins/Netscape/NetscapePluginNone.cpp:
  • WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
  • WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
  • WebProcess/Plugins/PDF/PDFPlugin.mm:
  • WebProcess/Plugins/PDF/PDFPluginAnnotation.mm:
  • WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
  • WebProcess/Plugins/PDF/PDFPluginPasswordField.mm:
  • WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
  • WebProcess/Plugins/Plugin.cpp:
  • WebProcess/Plugins/PluginProcessConnection.cpp:
  • WebProcess/Plugins/PluginProxy.cpp:
  • WebProcess/Plugins/PluginView.cpp:
  • WebProcess/Plugins/WebPluginInfoProvider.cpp:
  • WebProcess/Storage/ServiceWorkerClientFetch.cpp:
  • WebProcess/Storage/WebSWClientConnection.cpp:
  • WebProcess/Storage/WebSWContextManagerConnection.cpp:
  • WebProcess/Storage/WebSWOriginTable.cpp:
  • WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp:
  • WebProcess/Storage/WebServiceWorkerProvider.cpp:
  • WebProcess/Storage/WebToStorageProcessConnection.cpp:
  • WebProcess/UserContent/WebUserContentController.cpp:
  • WebProcess/WebConnectionToUIProcess.cpp:
  • WebProcess/WebCoreSupport/SessionStateConversion.cpp:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:
  • WebProcess/WebCoreSupport/WebColorChooser.cpp:
  • WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
  • WebProcess/WebCoreSupport/WebDataListSuggestionPicker.cpp:
  • WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
  • WebProcess/WebCoreSupport/WebDragClient.cpp:
  • WebProcess/WebCoreSupport/WebEditorClient.cpp:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
  • WebProcess/WebCoreSupport/WebGeolocationClient.cpp:
  • WebProcess/WebCoreSupport/WebInspectorClient.cpp:
  • WebProcess/WebCoreSupport/WebMessagePortChannelProvider.cpp:
  • WebProcess/WebCoreSupport/WebNotificationClient.cpp:
  • WebProcess/WebCoreSupport/WebPerformanceLoggingClient.cpp:
  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
  • WebProcess/WebCoreSupport/WebPopupMenu.cpp:
  • WebProcess/WebCoreSupport/WebProgressTrackerClient.cpp:
  • WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
  • WebProcess/WebCoreSupport/WebUserMediaClient.cpp:
  • WebProcess/WebCoreSupport/WebValidationMessageClient.cpp:
  • WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
  • WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
  • WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
  • WebProcess/WebCoreSupport/mac/WebAlternativeTextClient.cpp:
  • WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
  • WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
  • WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
  • WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
  • WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
  • WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
  • WebProcess/WebCoreSupport/win/WebContextMenuClientWin.cpp:
  • WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
  • WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp:
  • WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
  • WebProcess/WebPage/DrawingArea.cpp:
  • WebProcess/WebPage/EventDispatcher.cpp:
  • WebProcess/WebPage/FindController.cpp:
  • WebProcess/WebPage/LayerTreeHost.cpp:
  • WebProcess/WebPage/RemoteLayerTree/GraphicsLayerCARemote.cpp:
  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp:
  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.mm:
  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteTiledBacking.cpp:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDisplayRefreshMonitor.mm:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
  • WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.mm:
  • WebProcess/WebPage/RemoteWebInspectorUI.cpp:
  • WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
  • WebProcess/WebPage/VisitedLinkTableController.cpp:
  • WebProcess/WebPage/WebBackForwardListProxy.cpp:
  • WebProcess/WebPage/WebContextMenu.cpp:
  • WebProcess/WebPage/WebDocumentLoader.cpp:
  • WebProcess/WebPage/WebFrame.cpp:
  • WebProcess/WebPage/WebInspector.cpp:
  • WebProcess/WebPage/WebInspectorUI.cpp:
  • WebProcess/WebPage/WebPage.cpp:
  • WebProcess/WebPage/WebPageOverlay.cpp:
  • WebProcess/WebPage/WebURLSchemeHandlerProxy.cpp:
  • WebProcess/WebPage/WebURLSchemeTaskProxy.cpp:
  • WebProcess/WebPage/ios/FindControllerIOS.mm:
  • WebProcess/WebPage/ios/WebPageIOS.mm:
  • WebProcess/WebPage/mac/DrawingAreaMac.cpp:
  • WebProcess/WebPage/mac/PageBannerMac.mm:
  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
  • WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
  • WebProcess/WebPage/mac/WebPageMac.mm:
  • WebProcess/WebPage/win/WebPageWin.cpp:
  • WebProcess/WebPage/wpe/AcceleratedSurfaceWPE.cpp:
  • WebProcess/WebPage/wpe/WebPageWPE.cpp:
  • WebProcess/WebProcess.cpp:
  • WebProcess/WebStorage/StorageAreaImpl.cpp:
  • WebProcess/WebStorage/StorageAreaMap.cpp:
  • WebProcess/WebStorage/StorageNamespaceImpl.cpp:
  • WebProcess/WebStorage/WebStorageNamespaceProvider.cpp:
  • WebProcess/cocoa/PlaybackSessionManager.mm:
  • WebProcess/cocoa/UserMediaCaptureManager.cpp:
  • WebProcess/cocoa/VideoFullscreenManager.mm:
  • WebProcess/cocoa/WebProcessCocoa.mm:
  • WebProcess/win/WebProcessMainWin.cpp:
  • WebProcess/win/WebProcessWin.cpp:
  • WebProcess/wpe/WebProcessMainWPE.cpp:
1:49 AM Changeset in webkit [236040] by Carlos Garcia Campos
  • 4 edits
    1 add in releases/WebKitGTK/webkit-2.22

Merge r235177 - The DFG CFGSimplification phase shouldn’t jettison a block when it’s the target of both branch directions.
https://bugs.webkit.org/show_bug.cgi?id=188298
<rdar://problem/42888427>

Reviewed by Saam Barati.

JSTests:

  • stress/bug-188298.js: Added.

Source/JavaScriptCore:

In the event that both targets of a Branch is the same block, then even if we'll
always take one path of the branch, the other target is not unreachable because
it is the same target as the one in the taken path. Hence, it should not be
jettisoned.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Added DFGCFG.h which is in use and should have been added to the project.
  • dfg/DFGCFGSimplificationPhase.cpp:

(JSC::DFG::CFGSimplificationPhase::run):

1:49 AM Changeset in webkit [236039] by Carlos Garcia Campos
  • 7 edits in releases/WebKitGTK/webkit-2.22

Merge r235174 - Fetch: Stop checking Request.integrity's value in no-cors mode
https://bugs.webkit.org/show_bug.cgi?id=188802

Patch by Rob Buis <rbuis@igalia.com> on 2018-08-22
Reviewed by Frédéric Wang.

LayoutTests/imported/w3c:

Update integrity.html expected result.

  • web-platform-tests/fetch/api/basic/integrity-expected.txt:

Source/WebCore:

Remove this check since it was removed from the spec.

Behavior matches Chrome and Firefox.

Test: http/tests/subresource-integrity/sri-fetch.js:

  • Modules/fetch/FetchRequest.cpp:

(WebCore::FetchRequest::initializeOptions):

LayoutTests:

Unskip fetch/api/basic/integrity.html and adjust sri-fetch.js.

1:49 AM Changeset in webkit [236038] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.22/Source/WebCore

Merge r235171 - [GTK] Never return an uninitialized ImageGStreamer object.
https://bugs.webkit.org/show_bug.cgi?id=188305

Reviewed by Philippe Normand.

The single caller was already checking for a null return value, so
make that check actually do something. Also remove the null-check on
the return value of image(), which asserted that it would never return
null.

Test: fast/canvas/canvas-createPattern-video-loading.html

  • platform/graphics/gstreamer/ImageGStreamer.h:

(WebCore::ImageGStreamer::createImage): Return null if m_image wasn't created.
(WebCore::ImageGStreamer::image): Return a reference.
(WebCore::ImageGStreamer::rect): Always assert that m_image is present.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::paint): Update for new signature.

1:30 AM Changeset in webkit [236037] by Philippe Normand
  • 2 edits in trunk/Tools

[JHBuild] Doesn't check sha256 sums
https://bugs.webkit.org/show_bug.cgi?id=189646

Reviewed by Michael Catanzaro.

  • gstreamer/jhbuild.modules: Properly set the sha256: prefix on hashes.
1:14 AM Changeset in webkit [236036] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.22/Source/WebCore

Merge r235170 - Add changes missing from r234925.

  • layout/blockformatting/BlockMarginCollapse.cpp:

(WebCore::Layout::isMarginTopCollapsedWithParent):
(WebCore::Layout::isMarginBottomCollapsedThrough):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::isMarginBottomCollapsedWithParent):

12:11 AM Changeset in webkit [236035] by sihui_liu@apple.com
  • 47 edits
    3 copies
    1 add
    1 delete in trunk

Move IndexedDB to Network Process
https://bugs.webkit.org/show_bug.cgi?id=189415
<rdar://problem/44396973>

Reviewed by Chris Dumez.

Source/WebKit:

We are going to eliminate storage process and move its functionality to network process.
The reasons why we want to do this:

  1. Lower resource usage of having an additional process for storage operations, especially

memory. Single storage process takes about 5MB memory on macOS.

  1. Reduce latency of Service Workers. After enabling Service Workers, we've seen

regression in app launch. The launch time of storage process is partly attributed to this:
Service Workers delay page loading until receiving response from storage process.

  1. We choose network process because UI process may have broader access in file system

that we don't want the storage operations to have.

This patch is the first piece towards the goal. It mainly moves indexedDB from storage process
to corresponding components of network process. Moving of Service Worker and stopping to
launch storage process will be done in following patches.

We expect to see the higher cpu and memory usage of network process as it is taking more work,
but the overall gain in memory and latency after we completely remove storage process should be
positive.

  • CMakeLists.txt:
  • DerivedSources.make:
  • NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp: Renamed from Source/WebKit/StorageProcess/IndexedDB/WebIDBConnectionToClient.cpp.

(WebKit::WebIDBConnectionToClient::create):
(WebKit::WebIDBConnectionToClient::WebIDBConnectionToClient):
(WebKit::WebIDBConnectionToClient::~WebIDBConnectionToClient):
(WebKit::WebIDBConnectionToClient::disconnectedFromWebProcess):
(WebKit::WebIDBConnectionToClient::messageSenderConnection):
(WebKit::WebIDBConnectionToClient::connectionToClient):
(WebKit::WebIDBConnectionToClient::didDeleteDatabase):
(WebKit::WebIDBConnectionToClient::didOpenDatabase):
(WebKit::WebIDBConnectionToClient::didAbortTransaction):
(WebKit::WebIDBConnectionToClient::didCommitTransaction):
(WebKit::WebIDBConnectionToClient::didCreateObjectStore):
(WebKit::WebIDBConnectionToClient::didDeleteObjectStore):
(WebKit::WebIDBConnectionToClient::didRenameObjectStore):
(WebKit::WebIDBConnectionToClient::didClearObjectStore):
(WebKit::WebIDBConnectionToClient::didCreateIndex):
(WebKit::WebIDBConnectionToClient::didDeleteIndex):
(WebKit::WebIDBConnectionToClient::didRenameIndex):
(WebKit::WebIDBConnectionToClient::didPutOrAdd):
(WebKit::WebIDBConnectionToClient::handleGetResult):
(WebKit::WebIDBConnectionToClient::didGetRecord):
(WebKit::WebIDBConnectionToClient::didGetAllRecords):
(WebKit::WebIDBConnectionToClient::didGetCount):
(WebKit::WebIDBConnectionToClient::didDeleteRecord):
(WebKit::WebIDBConnectionToClient::didOpenCursor):
(WebKit::WebIDBConnectionToClient::didIterateCursor):
(WebKit::WebIDBConnectionToClient::fireVersionChangeEvent):
(WebKit::WebIDBConnectionToClient::didStartTransaction):
(WebKit::WebIDBConnectionToClient::didCloseFromServer):
(WebKit::WebIDBConnectionToClient::notifyOpenDBRequestBlocked):
(WebKit::WebIDBConnectionToClient::didGetAllDatabaseNames):
(WebKit::WebIDBConnectionToClient::deleteDatabase):
(WebKit::WebIDBConnectionToClient::openDatabase):
(WebKit::WebIDBConnectionToClient::abortTransaction):
(WebKit::WebIDBConnectionToClient::commitTransaction):
(WebKit::WebIDBConnectionToClient::didFinishHandlingVersionChangeTransaction):
(WebKit::WebIDBConnectionToClient::createObjectStore):
(WebKit::WebIDBConnectionToClient::deleteObjectStore):
(WebKit::WebIDBConnectionToClient::renameObjectStore):
(WebKit::WebIDBConnectionToClient::clearObjectStore):
(WebKit::WebIDBConnectionToClient::createIndex):
(WebKit::WebIDBConnectionToClient::deleteIndex):
(WebKit::WebIDBConnectionToClient::renameIndex):
(WebKit::WebIDBConnectionToClient::putOrAdd):
(WebKit::WebIDBConnectionToClient::getRecord):
(WebKit::WebIDBConnectionToClient::getAllRecords):
(WebKit::WebIDBConnectionToClient::getCount):
(WebKit::WebIDBConnectionToClient::deleteRecord):
(WebKit::WebIDBConnectionToClient::openCursor):
(WebKit::WebIDBConnectionToClient::iterateCursor):
(WebKit::WebIDBConnectionToClient::establishTransaction):
(WebKit::WebIDBConnectionToClient::databaseConnectionPendingClose):
(WebKit::WebIDBConnectionToClient::databaseConnectionClosed):
(WebKit::WebIDBConnectionToClient::abortOpenAndUpgradeNeeded):
(WebKit::WebIDBConnectionToClient::didFireVersionChangeEvent):
(WebKit::WebIDBConnectionToClient::openDBRequestCancelled):
(WebKit::WebIDBConnectionToClient::confirmDidCloseFromServer):
(WebKit::WebIDBConnectionToClient::getAllDatabaseNames):

  • NetworkProcess/IndexedDB/WebIDBConnectionToClient.h: Renamed from Source/WebKit/StorageProcess/IndexedDB/WebIDBConnectionToClient.h.
  • NetworkProcess/IndexedDB/WebIDBConnectionToClient.messages.in: Renamed from Source/WebKit/StorageProcess/IndexedDB/WebIDBConnectionToClient.messages.in.
  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::didReceiveMessage):

Code moved from StorageToWebProcessConnection::didReceiveMessage.

(WebKit::NetworkConnectionToWebProcess::didClose):
(WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):

Network process receives and stores sandbox extension of temporary files for later indexedDB
use.

(WebKit::NetworkConnectionToWebProcess::didClose):
(WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):
(WebKit::generateIDBConnectionToServerIdentifier):
(WebKit::NetworkConnectionToWebProcess::establishIDBConnectionToServer):
(WebKit::NetworkConnectionToWebProcess::removeIDBConnectionToServer):

  • NetworkProcess/NetworkConnectionToWebProcess.h:
  • NetworkProcess/NetworkConnectionToWebProcess.messages.in:
  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::NetworkProcess):
(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::addWebsiteDataStore):
(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
(WebKit::NetworkProcess::idbServer):
(WebKit::NetworkProcess::ensurePathExists):
(WebKit::NetworkProcess::postStorageTask):
(WebKit::NetworkProcess::performNextStorageTask):
(WebKit::NetworkProcess::prepareForAccessToTemporaryFile):
(WebKit::NetworkProcess::accessToTemporaryFileComplete):
(WebKit::NetworkProcess::indexedDatabaseOrigins):
(WebKit::NetworkProcess::addIndexedDatabaseSession):
(WebKit::NetworkProcess::getSandboxExtensionsForBlobFiles):

Instead of asking UI process to grant sandbox extension to storage process, now network
process just asks for sandbox extension fot itself.

(WebKit::NetworkProcess::didGetSandboxExtensionsForBlobFiles):
(WebKit::NetworkProcess::updateTemporaryFileSandboxExtensions):
(WebKit::NetworkProcess::grantSandboxExtensionsToStorageProcessForBlobs): Deleted.
(WebKit::NetworkProcess::didGrantSandboxExtensionsToStorageProcessForBlobs): Deleted.

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/NetworkProcessCreationParameters.cpp:

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

  • NetworkProcess/NetworkProcessCreationParameters.h:
  • Shared/Storage/StorageProcessCreationParameters.cpp:

(WebKit::StorageProcessCreationParameters::encode const):
(WebKit::StorageProcessCreationParameters::decode):

  • Shared/Storage/StorageProcessCreationParameters.h:
  • Shared/WebsiteDataStoreParameters.cpp:

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

  • Shared/WebsiteDataStoreParameters.h:
  • Sources.txt:
  • StorageProcess/StorageProcess.cpp:

(WebKit::StorageProcess::initializeWebsiteDataStore):
(WebKit::StorageProcess::fetchWebsiteData):
(WebKit::StorageProcess::deleteWebsiteData):
(WebKit::StorageProcess::deleteWebsiteDataForOrigins):
(WebKit::StorageProcess::idbServer): Deleted.
(WebKit::StorageProcess::grantSandboxExtensionsForBlobs): Deleted.
(WebKit::StorageProcess::prepareForAccessToTemporaryFile): Deleted.
(WebKit::StorageProcess::accessToTemporaryFileComplete): Deleted.
(WebKit::StorageProcess::indexedDatabaseOrigins): Deleted.
(WebKit::StorageProcess::getSandboxExtensionsForBlobFiles): Deleted.
(WebKit::StorageProcess::didGetSandboxExtensionsForBlobFiles): Deleted.

  • StorageProcess/StorageProcess.h:

(WebKit::StorageProcess::queue): Deleted.

  • StorageProcess/StorageProcess.messages.in:
  • StorageProcess/StorageToWebProcessConnection.cpp:

(WebKit::StorageToWebProcessConnection::didReceiveMessage):
(WebKit::StorageToWebProcessConnection::didClose):
(WebKit::generateIDBConnectionToServerIdentifier): Deleted.
(WebKit::StorageToWebProcessConnection::establishIDBConnectionToServer): Deleted.
(WebKit::StorageToWebProcessConnection::removeIDBConnectionToServer): Deleted.

  • StorageProcess/StorageToWebProcessConnection.h:
  • StorageProcess/StorageToWebProcessConnection.messages.in:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::getSandboxExtensionsForBlobFiles):
(WebKit::NetworkProcessProxy::grantSandboxExtensionsToStorageProcessForBlobs): Deleted.

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.messages.in:
  • UIProcess/Storage/StorageProcessProxy.cpp:

(WebKit::StorageProcessProxy::getSandboxExtensionsForBlobFiles): Deleted.

  • UIProcess/Storage/StorageProcessProxy.h:
  • UIProcess/Storage/StorageProcessProxy.messages.in:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::ensureNetworkProcess):
(WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore):
(WebKit::WebProcessPool::pageBeginUsingWebsiteDataStore):

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::parameters):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::computeNetworkProcessAccessTypeForDataFetch):
(WebKit::WebsiteDataStore::fetchDataAndApply):
(WebKit::computeNetworkProcessAccessTypeForDataRemoval):
(WebKit::WebsiteDataStore::removeData):
(WebKit::WebsiteDataStore::storageProcessParameters):
(WebKit::WebsiteDataStore::parameters):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:

(WebKit::WebIDBConnectionToServer::WebIDBConnectionToServer):
(WebKit::WebIDBConnectionToServer::~WebIDBConnectionToServer):
(WebKit::WebIDBConnectionToServer::messageSenderConnection):

  • WebProcess/Databases/WebDatabaseProvider.cpp:

(WebKit::WebDatabaseProvider::idbConnectionToServerForSession):

  • WebProcess/Network/NetworkProcessConnection.cpp:

(WebKit::NetworkProcessConnection::didReceiveMessage):
(WebKit::NetworkProcessConnection::didClose):
(WebKit::NetworkProcessConnection::idbConnectionToServerForSession):

  • WebProcess/Network/NetworkProcessConnection.h:

(WebKit::NetworkProcessConnection::existingIDBConnectionToServerForIdentifier const):

  • WebProcess/Storage/WebToStorageProcessConnection.cpp:

(WebKit::WebToStorageProcessConnection::didReceiveMessage):
(WebKit::WebToStorageProcessConnection::didClose):
(WebKit::WebToStorageProcessConnection::idbConnectionToServerForSession): Deleted.

  • WebProcess/Storage/WebToStorageProcessConnection.h:

(WebKit::WebToStorageProcessConnection::existingIDBConnectionToServerForIdentifier): Deleted.

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::networkProcessConnectionClosed):
(WebKit::WebProcess::webToStorageProcessConnectionClosed):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/IDBDeleteRecovery.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/IDBIndexUpgradeToV2.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/IndexedDBDatabaseProcessKill.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/IndexedDBMultiProcess.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm:

(TEST):

LayoutTests:

  • storage/indexeddb/modern/opendatabase-after-storage-crash.html:

Sep 16, 2018:

5:35 PM Changeset in webkit [236034] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Unreviewed test gardening, mark fast/text/variations/ipc2.html as slow.

  • platform/mac-wk2/TestExpectations:

Sep 15, 2018:

11:41 AM Changeset in webkit [236033] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION: breakpoint context menu appears twice in DOM tree
https://bugs.webkit.org/show_bug.cgi?id=189308

Reviewed by Joseph Pecoraro.

  • UserInterface/Controllers/DOMBreakpointTreeController.js:

(WI.DOMBreakpointTreeController.appendBreakpointContextMenuItems):
Set a symbol on the contextMenu to ensure that the same items are not added twice.

9:17 AM Changeset in webkit [236032] by Darin Adler
  • 60 edits in trunk

Streamline JSRetainPtr, fix leaks of JSString and JSGlobalContext
https://bugs.webkit.org/show_bug.cgi?id=189455

Reviewed by Keith Miller.

Source/JavaScriptCore:

  • API/JSObjectRef.cpp:

(OpaqueJSPropertyNameArray): Use Ref<OpaqueJSString> instead of
JSRetainPtr<JSStringRef>.
(JSObjectCopyPropertyNames): Remove now-unneeded use of leakRef and
adopt constructor.
(JSPropertyNameArrayGetNameAtIndex): Use ptr() instead of get() since
the array elements are now Ref.

  • API/JSRetainPtr.h: While JSRetainPtr is written as a template,

it only works for two specific unrelated types, JSStringRef and
JSGlobalContextRef. Simplified the default constructor using data
member initialization. Prepared to make the adopt constructor private
(got everything compiling that way, then made it public again so that
Apple internal software will still build). Got rid of unneeded
templated constructor and assignment operator, since it's not relevant
since there is no inheritance between JSRetainPtr template types.
Added WARN_UNUSED_RETURN to leakRef as in RefPtr and RetainPtr.
Added move constructor and move assignment operator for slightly better
performance. Simplified implementations of various member functions
so they are more obviously correct, by using leakPtr in more of them
and using std::exchange to make the flow of values more obvious.

  • API/JSValue.mm:

(+[JSValue valueWithNewSymbolFromDescription:inContext:]): Added a
missing JSStringRelease to fix a leak.

  • API/tests/CustomGlobalObjectClassTest.c:

(customGlobalObjectClassTest): Added a JSGlobalContextRelease to fix a leak.
(globalObjectSetPrototypeTest): Ditto.
(globalObjectPrivatePropertyTest): Ditto.

  • API/tests/ExecutionTimeLimitTest.cpp:

(testResetAfterTimeout): Added a call to JSStringRelease to fix a leak.
(testExecutionTimeLimit): Ditto, lots more.

  • API/tests/FunctionOverridesTest.cpp:

(testFunctionOverrides): Added a call to JSStringRelease to fix a leak.

  • API/tests/JSObjectGetProxyTargetTest.cpp:

(testJSObjectGetProxyTarget): Added a call to JSGlobalContextRelease to fix
a leak.

  • API/tests/PingPongStackOverflowTest.cpp:

(testPingPongStackOverflow): Added calls to JSGlobalContextRelease and
JSStringRelease to fix leaks.

  • API/tests/testapi.c:

(throwException): Added. Helper function for repeated idiom where we want
to throw an exception, but with additional JSStringRelease calls so we don't
have to leak just to keep the code simpler to read.
(MyObject_getProperty): Use throwException.
(MyObject_setProperty): Ditto.
(MyObject_deleteProperty): Ditto.
(isValueEqualToString): Added. Helper function for an idiom where we check
if something is a string and then if it's equal to a particular string
constant, but a version that has an additional JSStringRelease call so we
don't have to leak just to keep the code simpler to read.
(MyObject_callAsFunction): Use isValueEqualToString and throwException.
(MyObject_callAsConstructor): Ditto.
(MyObject_hasInstance): Ditto.
(globalContextNameTest): Added a JSGlobalContextRelease to fix a leak.
(testMarkingConstraintsAndHeapFinalizers): Ditto.

Source/WebCore:

  • Modules/plugins/QuickTimePluginReplacement.mm:

(WebCore::jsValueWithDictionaryInContext): Adding a missing
JSStringRelease to fix a leak.

Source/WebKit:

  • WebProcess/Automation/WebAutomationSessionProxy.cpp:

(WebKit::toJSString): Use adopt function instead of adopt construuctor.
(WebKit::evaluate): Ditto.
(WebKit::evaluateJavaScriptCallback): Ditto.
(WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction): Ditto.

Tools:

There is a lot of copied and pasted code for WebKit vs. Legacy WebKit
testing and even for macOS vs. iOS vs. Windows platform-specific code.
For now, this patch just makes corresponding changes to the copied code.
Later we might get better results by merging more code instead of having
all these separate copies.

  • DumpRenderTree/AccessibilityController.cpp:

(AccessibilityController::makeWindowObject): Use the adopt function
instead of the special Adopt constructor of JSRetainPtr.

  • DumpRenderTree/AccessibilityTextMarker.cpp: Removed unneeded include.
  • DumpRenderTree/AccessibilityUIElement.cpp: Ditto.

(allAttributesCallback): Don't adopt at this level; changed the
underlying function to return a JSRetainPtr so the adopt is right next
to the call to the create or copy function.
(attributesOfLinkedUIElementsCallback): Ditto.
(attributesOfDocumentLinksCallback): Ditto.
(attributesOfChildrenCallback): Ditto.
(parameterizedAttributeNamesCallback): Ditto.
(attributesOfColumnHeadersCallback): Ditto.
(attributesOfRowHeadersCallback): Ditto.
(attributesOfColumnsCallback): Ditto.
(attributesOfRowsCallback): Ditto.
(attributesOfVisibleCellsCallback): Ditto.
(attributesOfHeaderCallback): Ditto.
(rowIndexRangeCallback): Ditto.
(columnIndexRangeCallback): Ditto.
(rangeForLineCallback): Ditto.
(boundsForRangeCallback): Ditto.
(rangeForPositionCallback): Ditto.
(stringForRangeCallback): Ditto.
(attributedStringForRangeCallback): Ditto.
(uiElementCountForSearchPredicateCallback): Use the free adopt
function instead of the adopt member function.
(uiElementForSearchPredicateCallback): Ditto.
(selectTextWithCriteriaCallback): Don't adopt at this level.
(attributedStringForElementCallback): Ditto.
(setValueCallback): Use free adopt.
(stringAttributeValueCallback): Don't adopt at this level.
(uiElementArrayAttributeValueCallback): Ditto.
(uiElementAttributeValueCallback): Ditto.
(stringForTextMarkerRangeCallback): Ditto.
(attributedStringForTextMarkerRangeCallback): Ditto.
(attributedStringForTextMarkerRangeWithOptionsCallback): Ditto.
(getARIADropEffectsCallback): Ditto.
(getClassListCallback): Ditto.
(getRoleCallback): Ditto.
(getSubroleCallback): Ditto.
(getRoleDescriptionCallback): Ditto.
(getComputedRoleStringCallback): Ditto.
(getTitleCallback): Ditto.
(getDescriptionCallback): Ditto.
(getStringValueCallback): Ditto.
(getLanguageCallback): Ditto.
(getHelpTextCallback): Ditto.
(getOrientationCallback): Ditto.
(getPathDescriptionCallback): Ditto.
(getSelectedTextRangeCallback): Ditto.
(speakAsCallback): Ditto.
(getValueDescriptionCallback): Ditto.
(getAccessibilityValueCallback): Ditto.
(getDocumentEncodingCallback): Ditto.
(getDocumentURICallback): Ditto.
(getURLCallback): Ditto.
(characterAtOffsetCallback): Ditto.
(wordAtOffsetCallback): Ditto.
(lineAtOffsetCallback): Ditto.
(sentenceAtOffsetCallback): Ditto.
(stringForSelectionCallback): Ditto.
(getIdentifierCallback): Ditto.
(getTraitsCallback): Ditto.
(supportedActionsCallback): Ditto.
(mathPostscriptsDescriptionCallback): Ditto.
(mathPrescriptsDescriptionCallback): Ditto.
(AccessibilityUIElement::rangeForLine): Updated to return JSRetainPtr.
(AccessibilityUIElement::rangeForPosition): Ditto.
(AccessibilityUIElement::speakAs): Ditto.
(AccessibilityUIElement::pathDescription const): Ditto.
(AccessibilityUIElement::stringForTextMarkerRange): Ditto.
(AccessibilityUIElement::attributedStringForTextMarkerRange): Ditto.
(AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions): Ditto.

  • DumpRenderTree/AccessibilityUIElement.h: Use JSRetainPtr instead of

raw pointers for the results of the functions that create strings.
The old way was difficult to get right; the functions didn't even follow
the create/copy naming rule.

  • DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm:

(_platformTypeConstructor): Use the adopt function instead of the
JSRetainPtr adopt constructor. Also nullptr instead of 0.

  • DumpRenderTree/GCController.cpp:

(GCController::makeWindowObject): Use adopt function instead of constructor.

  • DumpRenderTree/TestRunner.cpp:

(pathToLocalResourceCallback): Use adopt function instead of constructor.
(addDisallowedURLCallback): Ditto.
(addURLToRedirectCallback): Ditto.
(clearApplicationCacheForOriginCallback): Ditto.
(applicationCacheDiskUsageForOriginCallback): Ditto.
(decodeHostNameCallback): Don't adopt at this level.
(encodeHostNameCallback): Ditto.
(execCommandCallback): Use adopt instead of JSRetainPtr::adopt.
(findStringCallback): Use adopt function instead of constructor.
(isCommandEnabledCallback): Ditto.
(overridePreferenceCallback): Ditto.
(queueLoadCallback): Ditto.
(queueLoadHTMLStringCallback): Ditto.
(queueLoadingScriptCallback): Ditto.
(queueNonLoadingScriptCallback): Ditto.
(setAuthenticationPasswordCallback): Ditto.
(setAuthenticationUsernameCallback): Ditto.
(setDomainRelaxationForbiddenForURLSchemeCallback): Ditto.
(setMockGeolocationPositionUnavailableErrorCallback): Ditto.
(setPOSIXLocaleCallback): Ditto.
(setPersistentUserStyleSheetLocationCallback): Ditto.
(setUserStyleSheetLocationCallback): Ditto.
(setValueForUserCallback): Ditto.
(setWillSendRequestClearHeaderCallback): Ditto.
(setPageVisibilityCallback): Ditto.
(evaluateInWebInspectorCallback): Ditto.
(evaluateScriptInIsolatedWorldCallback): Ditto.
(evaluateScriptInIsolatedWorldAndReturnValueCallback): Ditto.
(addOriginAccessWhitelistEntryCallback): Ditto.
(removeOriginAccessWhitelistEntryCallback): Ditto.
(setScrollbarPolicyCallback): Ditto.
(addUserScriptCallback): Ditto.
(addUserStyleSheetCallback): Ditto.
(apiTestNewWindowDataLoadBaseURLCallback): Ditto.
(authenticateSessionCallback): Ditto.
(getTitleTextDirectionCallback): Ditto.
(getInspectorTestStubURLCallback): Ditto.
(simulateLegacyWebNotificationClickCallback): Ditto.
(setTextDirectionCallback): Ditto.
(grantWebNotificationPermissionCallback): Ditto.
(denyWebNotificationPermissionCallback): Ditto.
(accummulateLogsForChannel): Ditto.
(runUIScriptCallback): Ditto.
(TestRunner::makeWindowObject): Ditto.
(TestRunner::uiScriptDidComplete): Ditto.
(TestRunner::setOpenPanelFiles): Ditto.

  • DumpRenderTree/TestRunner.h: Use JSRetainPtr instead of

raw pointers for the results of the functions that create strings.

  • DumpRenderTree/ios/AccessibilityControllerIOS.mm:

(AccessibilityController::platformName const): Use the adopt
function instead of the adopt constructor.

  • DumpRenderTree/ios/AccessibilityUIElementIOS.mm:

(createEmptyJSString): Added. This helper function makes reduces the
repetitive code to create empty strings.
(concatenateAttributeAndValue): Changed to return a JSRetainPtr.
(AccessibilityUIElement::identifier): Ditto.
(AccessibilityUIElement::traits): Ditto.
(AccessibilityUIElement::url): Ditto.
(AccessibilityUIElement::speakAs): Ditto.
(AccessibilityUIElement::stringForSelection): Ditto.
(AccessibilityUIElement::stringForRange): Ditto.
(AccessibilityUIElement::attributedStringForRange): Ditto.
(AccessibilityUIElement::attributedStringForElement): Ditto.
(AccessibilityUIElement::pathDescription const): Ditto.
(AccessibilityUIElement::stringForTextMarkerRange): Ditto.
(AccessibilityUIElement::attributedStringForTextMarkerRange): Ditto.
(AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions): Ditto.
(AccessibilityUIElement::attributesOfLinkedUIElements): Ditto.
(AccessibilityUIElement::attributesOfDocumentLinks): Ditto.
(AccessibilityUIElement::attributesOfChildren): Ditto.
(AccessibilityUIElement::allAttributes): Ditto.
(AccessibilityUIElement::stringAttributeValue): Ditto.
(AccessibilityUIElement::parameterizedAttributeNames): Ditto.
(AccessibilityUIElement::role): Ditto.
(AccessibilityUIElement::subrole): Ditto.
(AccessibilityUIElement::roleDescription): Ditto.
(AccessibilityUIElement::computedRoleString): Ditto.
(AccessibilityUIElement::title): Ditto.
(AccessibilityUIElement::description): Ditto.
(AccessibilityUIElement::orientation const): Ditto.
(AccessibilityUIElement::stringValue): Ditto.
(AccessibilityUIElement::language): Ditto.
(AccessibilityUIElement::helpText const): Ditto.
(AccessibilityUIElement::valueDescription): Ditto.
(AccessibilityUIElement::ariaDropEffects const): Ditto.
(AccessibilityUIElement::boundsForRange): Ditto.
(AccessibilityUIElement::attributesOfColumnHeaders): Ditto.
(AccessibilityUIElement::attributesOfRowHeaders): Ditto.
(AccessibilityUIElement::attributesOfColumns): Ditto.
(AccessibilityUIElement::attributesOfRows): Ditto.
(AccessibilityUIElement::attributesOfVisibleCells): Ditto.
(AccessibilityUIElement::attributesOfHeader): Ditto.
(AccessibilityUIElement::rowIndexRange): Ditto.
(AccessibilityUIElement::columnIndexRange): Ditto.
(AccessibilityUIElement::selectedTextRange): Ditto.
(AccessibilityUIElement::accessibilityValue const): Ditto.
(AccessibilityUIElement::documentEncoding): Ditto.
(AccessibilityUIElement::documentURI): Ditto.
(AccessibilityUIElement::selectTextWithCriteria): Ditto.
(AccessibilityUIElement::classList const): Ditto.

  • DumpRenderTree/mac/AccessibilityCommonMac.h: Changed the

createJSStringRef method to return a JSRetainPtr.

  • DumpRenderTree/mac/AccessibilityCommonMac.mm:

(-[NSString createJSStringRef]): Ditto.
(searchPredicateParameterizedAttributeForSearchCriteria): Use the
adopt function instead of the adopt constructor.

  • DumpRenderTree/mac/AccessibilityControllerMac.mm:

(AccessibilityController::platformName const): Ditto.

  • DumpRenderTree/mac/AccessibilityNotificationHandler.mm:

(-[NSString createJSStringRef]): Return a JSRetainPtr.
(makeValueRefForValue): Updated for the above, no adopt needed here now.
(makeObjectRefForDictionary): Ditto.
(-[AccessibilityNotificationHandler _notificationReceived:]): Ditto.

  • DumpRenderTree/mac/AccessibilityUIElementMac.mm:

(createEmptyJSString): Added. This helper function makes reduces the
repetitive code to create empty strings.
(concatenateAttributeAndValue): Changed to return a JSRetainPtr.
(descriptionOfElements): Ditto.
(selectTextParameterizedAttributeForCriteria): Ditto.
(AccessibilityUIElement::attributesOfLinkedUIElements): Ditto.
(AccessibilityUIElement::attributesOfDocumentLinks): Ditto.
(AccessibilityUIElement::attributesOfChildren): Ditto.
(AccessibilityUIElement::allAttributes): Ditto.
(AccessibilityUIElement::stringAttributeValue): Ditto.
(AccessibilityUIElement::parameterizedAttributeNames): Ditto.
(AccessibilityUIElement::role): Ditto.
(AccessibilityUIElement::subrole): Ditto.
(AccessibilityUIElement::roleDescription): Ditto.
(AccessibilityUIElement::computedRoleString): Ditto.
(AccessibilityUIElement::title): Ditto.
(AccessibilityUIElement::description): Ditto.
(AccessibilityUIElement::orientation const): Ditto.
(AccessibilityUIElement::stringValue): Ditto.
(AccessibilityUIElement::language): Ditto.
(AccessibilityUIElement::helpText const): Ditto.
(AccessibilityUIElement::valueDescription): Ditto.
(AccessibilityUIElement::speakAs): Ditto.
(AccessibilityUIElement::classList const): Ditto.
(AccessibilityUIElement::ariaDropEffects const): Ditto.
(AccessibilityUIElement::rangeForLine): Ditto.
(AccessibilityUIElement::rangeForPosition): Ditto.
(AccessibilityUIElement::boundsForRange): Ditto.
(AccessibilityUIElement::stringForRange): Ditto.
(AccessibilityUIElement::attributedStringForRange): Ditto.
(AccessibilityUIElement::selectTextWithCriteria): Ditto.
(AccessibilityUIElement::attributesOfColumnHeaders): Ditto.
(AccessibilityUIElement::attributesOfRowHeaders): Ditto.
(AccessibilityUIElement::attributesOfColumns): Ditto.
(AccessibilityUIElement::attributesOfRows): Ditto.
(AccessibilityUIElement::attributesOfVisibleCells): Ditto.
(AccessibilityUIElement::attributesOfHeader): Ditto.
(AccessibilityUIElement::rowIndexRange): Ditto.
(AccessibilityUIElement::columnIndexRange): Ditto.
(AccessibilityUIElement::pathDescription const): Ditto.
(AccessibilityUIElement::selectedTextRange): Ditto.
(AccessibilityUIElement::accessibilityValue const): Ditto.
(AccessibilityUIElement::documentEncoding): Ditto.
(AccessibilityUIElement::documentURI): Ditto.
(AccessibilityUIElement::url): Ditto.
(AccessibilityUIElement::stringForTextMarkerRange): Ditto.
(createJSStringRef): Ditto.
(AccessibilityUIElement::attributedStringForTextMarkerRange): Ditto.
(AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions): Ditto.
(AccessibilityUIElement::supportedActions): Ditto.
(AccessibilityUIElement::mathPostscriptsDescription const): Ditto.
(AccessibilityUIElement::mathPrescriptsDescription const): Ditto.

  • DumpRenderTree/mac/FrameLoadDelegate.mm:

(-[FrameLoadDelegate didClearWindowObjectForFrame:inIsolatedWorld:]):
Use the adopt function instead of the adopt constructor.

  • DumpRenderTree/mac/TestRunnerMac.mm:

(originsArrayToJS): Ditto.
(TestRunner::copyDecodedHostName): Return a JSRetainPtr.
(TestRunner::copyEncodedHostName): Ditto.
(TestRunner::pathToLocalResource): Ditto.
(TestRunner::queueLoad): Use adopt function instead of constructor.
(TestRunner::findString): Ditto.
(TestRunner::inspectorTestStubURL): Return a JSRetainPtr.

  • DumpRenderTree/win/AccessibilityControllerWin.cpp:

(AccessibilityController::winNotificationReceived): Use adopt function
instead of adopt constructor.
(AccessibilityController::platformName const): Ditto.

  • DumpRenderTree/win/AccessibilityUIElementWin.cpp:

(createEmptyJSString): Added. This helper function makes reduces the
repetitive code to create empty strings.
(AccessibilityUIElement::allAttributes): Changed to return a JSRetainPtr.
(AccessibilityUIElement::attributesOfLinkedUIElements): Ditto.
(AccessibilityUIElement::attributesOfDocumentLinks): Ditto.
(AccessibilityUIElement::attributesOfChildren): Ditto.
(AccessibilityUIElement::parameterizedAttributeNames): Ditto.
(AccessibilityUIElement::role): Ditto.
(AccessibilityUIElement::subrole): Ditto.
(AccessibilityUIElement::roleDescription): Ditto.
(AccessibilityUIElement::computedRoleString): Ditto.
(AccessibilityUIElement::title): Ditto.
(AccessibilityUIElement::description): Ditto.
(AccessibilityUIElement::stringValue): Ditto.
(AccessibilityUIElement::language): Ditto.
(AccessibilityUIElement::helpText const): Ditto.
(AccessibilityUIElement::valueDescription): Ditto.
(AccessibilityUIElement::ariaDropEffects const): Ditto.
(AccessibilityUIElement::orientation const): Ditto.
(AccessibilityUIElement::attributesOfColumnHeaders): Ditto.
(AccessibilityUIElement::attributesOfRowHeaders): Ditto.
(AccessibilityUIElement::attributesOfColumns): Ditto.
(AccessibilityUIElement::attributesOfRows): Ditto.
(AccessibilityUIElement::attributesOfVisibleCells): Ditto.
(AccessibilityUIElement::attributesOfHeader): Ditto.
(AccessibilityUIElement::rowIndexRange): Ditto.
(AccessibilityUIElement::columnIndexRange): Ditto.
(AccessibilityUIElement::boundsForRange): Ditto.
(AccessibilityUIElement::stringForRange): Ditto.
(AccessibilityUIElement::attributedStringForRange): Ditto.
(AccessibilityUIElement::selectTextWithCriteria): Ditto.
(AccessibilityUIElement::selectedTextRange): Ditto.
(AccessibilityUIElement::stringAttributeValue): Ditto.
(AccessibilityUIElement::accessibilityValue const): Ditto.
(AccessibilityUIElement::documentEncoding): Ditto.
(AccessibilityUIElement::documentURI): Ditto.
(AccessibilityUIElement::url): Ditto.
(AccessibilityUIElement::classList const): Ditto.

  • DumpRenderTree/win/TestRunnerWin.cpp:

(TestRunner::copyDecodedHostName): Changed to return a JSRetainPtr.
(TestRunner::copyEncodedHostName): Ditto.
(TestRunner::pathToLocalResource): Ditto.
(TestRunner::queueLoad): Ditto.
(TestRunner::findString): Ditto.
(TestRunner::inspectorTestStubURL): Ditto.

  • TestRunnerShared/Bindings/JSWrapper.h:

(WTR::setProperty): Use adopt function instead of constructor.

  • TestRunnerShared/UIScriptContext/UIScriptContext.cpp:

(UIScriptContext::UIScriptContext): Ditto.
(UIScriptContext::runUIScript): Ditto.

  • TestRunnerShared/UIScriptContext/UIScriptController.cpp:

(WTR::toDeviceOrientation): Ditto.

  • TestRunnerShared/cocoa/LayoutTestSpellChecker.mm:

(nsTextCheckingType): Changed this function to not take an rvalue
reference to a JSRetainPtr since it doesn't take ownership.
(-[LayoutTestSpellChecker setResultsFromJSObject:inContext:]): Updated
for the above change.

  • TestWebKitAPI/JavaScriptTest.cpp:

(TestWebKitAPI::javaScriptCallback): Use adopt function instead of
adopt member function.

  • TestWebKitAPI/Tests/WebKit/WKPageIsPlayingAudio.cpp: Removed unneeded include.
  • TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm: Ditto.
  • TestWebKitAPI/Tests/mac/DOMNodeFromJSObject.mm: Use adopt function instead of

adopt constructor.

  • TestWebKitAPI/Tests/mac/JSWrapperForNodeInWebFrame.mm: Ditto.
  • WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:

Removed unneeded includes.

  • WebKitTestRunner/InjectedBundle/AccessibilityTextMarker.cpp: Ditto.
  • WebKitTestRunner/InjectedBundle/AccessibilityTextMarkerRange.cpp: Ditto.
  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp: Ditto.
  • WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm:

(_platformTypeConstructor): Use the adopt function instead of the
JSRetainPtr adopt constructor. Also nullptr instead of 0.

  • WebKitTestRunner/InjectedBundle/EventSendingController.cpp:

(WTR::arrayLength): Use adopt function instead of constructor.
(WTR::parseModifierArray): Ditto.

  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:

(WTR::propertyValue): Ditto.
(WTR::dumpPath): Ditto.
(WTR::toJS): Ditto.

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::findString): Ditto.
(WTR::TestRunner::statisticsDidRunTelemetryCallback): Ditto.
(WTR::TestRunner::callDidReceiveAllStorageAccessEntriesCallback): Ditto.
(WTR::TestRunner::setOpenPanelFiles): Ditto.

  • WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm:

(WTR::AccessibilityController::platformName): Ditto.

  • WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:

(-[NSString createJSStringRef]): Return a JSRetainPtr.
This fixes storage leaks in many functions below, which were using
the create function and putting the value right into a JSRetainPtr
without adoption.
(WTR::createEmptyJSString): Added. This helper function reduces the
repetitive code to create empty strings.
(WTR::concatenateAttributeAndValue): Return a JSRetainPtr.
(WTR::AccessibilityUIElement::attributesOfLinkedUIElements):
Use createEmptyJSString, fixing a storage leak due to missing adoption.
(WTR::AccessibilityUIElement::attributesOfDocumentLinks): Ditto.
(WTR::AccessibilityUIElement::attributesOfChildren): Ditto.
(WTR::AccessibilityUIElement::allAttributes): Ditto.
(WTR::AccessibilityUIElement::stringAttributeValue): Ditto.
(WTR::AccessibilityUIElement::parameterizedAttributeNames): Ditto.
(WTR::AccessibilityUIElement::role): Ditto.
(WTR::AccessibilityUIElement::subrole): Ditto.
(WTR::AccessibilityUIElement::roleDescription): Ditto.
(WTR::AccessibilityUIElement::computedRoleString): Ditto.
(WTR::AccessibilityUIElement::title): Ditto.
(WTR::AccessibilityUIElement::orientation const): Ditto.
(WTR::AccessibilityUIElement::language): Ditto.
(WTR::AccessibilityUIElement::valueDescription): Ditto.
(WTR::AccessibilityUIElement::ariaDropEffects const): Ditto.
(WTR::AccessibilityUIElement::boundsForRange): Ditto.
(WTR::AccessibilityUIElement::stringForRange): Removed unneeded null check.
(WTR::AccessibilityUIElement::attributedStringForRange): Ditto.
(WTR::AccessibilityUIElement::attributesOfColumnHeaders):
Use createEmptyJSString, fixing a storage leak due to missing adoption.
(WTR::AccessibilityUIElement::attributesOfRowHeaders): Ditto.
(WTR::AccessibilityUIElement::attributesOfColumns): Ditto.
(WTR::AccessibilityUIElement::attributesOfRows): Ditto.
(WTR::AccessibilityUIElement::attributesOfVisibleCells): Ditto.
(WTR::AccessibilityUIElement::attributesOfHeader): Ditto.
(WTR::AccessibilityUIElement::selectedTextRange): Ditto.
(WTR::AccessibilityUIElement::accessibilityValue const): Ditto.
(WTR::AccessibilityUIElement::documentEncoding): Ditto.
(WTR::AccessibilityUIElement::documentURI): Ditto.
(WTR::AccessibilityUIElement::stringForSelection): Removed unneeded
null check.
(WTR::AccessibilityUIElement::stringForTextMarkerRange):
Use createEmptyJSString, fixing a storage leak due to missing adoption.

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.h:

Use JSRetainPtr for the return value of createJSStringRef.

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm:

(-[NSString createJSStringRef]): Ditto.
(WTR::searchPredicateParameterizedAttributeForSearchCriteria): Use the
adopt function instead of the adopt constructor.

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm:

(WTR::AccessibilityController::platformName): Ditto

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm:

(-[NSString createJSStringRef]): Return a JSRetainPtr.
(makeValueRefForValue): Updated for above by removing adopt.
(makeObjectRefForDictionary): Ditto.
(-[AccessibilityNotificationHandler _notificationReceived:]): Ditto.

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:

(WTR::createEmptyJSString): Added. This helper function makes reduces the
repetitive code to create empty strings.
(WTR::concatenateAttributeAndValue): Return a JSRetainPtr.
(WTR::descriptionOfElements): Ditto.
(WTR::selectTextParameterizedAttributeForCriteria): Ditto.
(WTR::AccessibilityUIElement::accessibilityValue const): Use createEmptyJSString,
fixing a storage leak due to missing adoption.
(WTR::AccessibilityUIElement::documentEncoding): Ditto.
(WTR::AccessibilityUIElement::documentURI): Ditto.
(WTR::createJSStringRef): Return a JSRetainPtr.

  • WebKitTestRunner/StringFunctions.h:

(WTR::toWK): Take a const& to eliminate a little bit of reference count churn.
(WTR::toJS): Use the adopt function instead of the constructor.

7:08 AM Changeset in webkit [236031] by rwlbuis@webkit.org
  • 7 edits in trunk

2018-09-15 Rob Buis <rbuis@igalia.com>

XMLHttpRequest::createResponseBlob() should create a Blob with type for empty response
https://bugs.webkit.org/show_bug.cgi?id=189627

Reviewed by Alexey Proskuryakov.

Right now we return an empty Blob without type when the response is empty, but
it should always include the type [1].

Test: web-platform-tests/xhr/overridemimetype-blob.html

[1] https://xhr.spec.whatwg.org/#blob-response

  • xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::createResponseBlob):

Sep 14, 2018:

6:20 PM Changeset in webkit [236030] by Matt Lewis
  • 9 edits in trunk/Source/WebKit

Unreviewed, rolling out r236020.

This caused an api failure on High Sierra

Reverted changeset:

"Refactoring related to Safe Browsing"
https://bugs.webkit.org/show_bug.cgi?id=189631
https://trac.webkit.org/changeset/236020

5:46 PM Changeset in webkit [236029] by Basuke Suzuki
  • 10 edits in trunk/Source

[Curl] Bug fix on some inaccurate values in NetworkLoadMetrics.
https://bugs.webkit.org/show_bug.cgi?id=189530

Reviewed by Alex Christensen.

Curl port uses the start time libcurl provided. But there's a lug between main thread and Curl thread.
Record the start time of request instead of libcurl's start timing and use it to measure the metrics.
Source/WebCore:

Also respondEnd was not correctly recorded and fixed.

No new tests because it cannot be measured from DRT.

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

(WebCore::CurlHandle::getNetworkLoadMetrics):

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

(WebCore::CurlRequest::start):
(WebCore::CurlRequest::setupTransfer):
(WebCore::CurlRequest::didCompleteTransfer):
(WebCore::CurlRequest::updateNetworkLoadMetrics):

  • platform/network/curl/CurlRequest.h:

(WebCore::CurlRequest::setStartTime):

  • platform/network/curl/ResourceHandleCurl.cpp:

(WebCore::ResourceHandle::start):
(WebCore::ResourceHandle::restartRequestWithCredential):
(WebCore::ResourceHandle::platformLoadResourceSynchronously):
(WebCore::ResourceHandle::willSendRequest):
(WebCore::ResourceHandle::continueAfterWillSendRequest):

Source/WebKit:

  • NetworkProcess/curl/NetworkDataTaskCurl.cpp:

(WebKit::NetworkDataTaskCurl::NetworkDataTaskCurl):
(WebKit::NetworkDataTaskCurl::willPerformHTTPRedirection):
(WebKit::NetworkDataTaskCurl::restartWithCredential):

  • NetworkProcess/curl/NetworkDataTaskCurl.h:
5:39 PM Changeset in webkit [236028] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Source View doesn't scroll to show line when breakpoint is hit inside of <script> in HTML resource
https://bugs.webkit.org/show_bug.cgi?id=189638
<rdar://problem/43359278>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2018-09-14
Reviewed by Matt Baker.

Pausing in Document resources on page load have special considerations where we
may not receive their full content immediately, so we may synthesize inline script
content for the resource until we have full content. Unfortunately, when we get
full content and update the TextEditor we were losing the revealed position and
other editor information. This change specifically targets those cases, by
re-applying editor state when updating such a resource from partial to full content.

  • UserInterface/Views/SourceCodeTextEditor.js:

(WI.SourceCodeTextEditor.prototype._contentAvailable):
Signal to the editor that when updating the content it should carry
over editor state. Only do this if we had partial content before.

  • UserInterface/Views/TextEditor.js:

(WI.TextEditor):
(WI.TextEditor.prototype.set repeatReveal):
Provide a way to signal we should restore state when update the content.

(WI.TextEditor.set string.update):
(WI.TextEditor.prototype.set string):
When repeatReveal was enabled, restore editor state such as the
revealed location and text selection.

5:33 PM Changeset in webkit [236027] by Megan Gardner
  • 4 edits
    6 adds in trunk/LayoutTests

Additional tests for conic gradients
https://bugs.webkit.org/show_bug.cgi?id=189566

Reviewed by Simon Fraser.

Adding tests that actually test the gradient nature of gradients.
This is done by using an svg filter to consolidate the sections
of the gradient to sections we can actuall test the color of. Also,
the seams are clipped out, to reduce noise. Since gradients are
highly noise prone, this is the best way to check and make sure
that gradients are functional without sevear noise issues.

  • TestExpectations:
  • fast/gradients/conic-gradient-alpha-expected.html: Added.
  • fast/gradients/conic-gradient-alpha.html: Added.
  • fast/gradients/conic-gradient-expected.html: Added.
  • fast/gradients/conic-gradient-extended-stops-expected.html: Added.
  • fast/gradients/conic-gradient-extended-stops.html: Added.
  • fast/gradients/conic-gradient.html: Added.
  • platform/ios-12/TestExpectations:
  • platform/mac/TestExpectations:
5:22 PM Changeset in webkit [236026] by dino@apple.com
  • 2 edits in trunk/Tools

Add Justin Michaud.

  • Scripts/webkitpy/common/config/contributors.json:
5:05 PM Changeset in webkit [236025] by Justin Fan
  • 8 edits in trunk

WebGL 2 conformance: rgb-format-support.html
https://bugs.webkit.org/show_bug.cgi?id=189610
<rdar://problem/44403343>

Reviewed by Dean Jackson.

Source/WebCore:

Implementing getInternalformatParameter (emulating on macOS) and updating
renderbufferStorage{Multisample} for WebGL 2 conformance.

Test: webgl/2.0.0/conformance2/rendering/rgb-format-support.html enabled.

  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::isRenderableInternalformat):
(WebCore::WebGL2RenderingContext::getInternalformatParameter):
(WebCore::WebGL2RenderingContext::renderbufferStorageMultisample):
(WebCore::WebGL2RenderingContext::renderbufferStorage):
(WebCore::WebGL2RenderingContext::baseInternalFormatFromInternalFormat):
(WebCore::WebGL2RenderingContext::isIntegerFormat):

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

(WebCore::GraphicsContext3D::getInternalformativ):
(WebCore::GraphicsContext3D::renderbufferStorageMultisample):

LayoutTests:

Enabled rgb-format-support.html, and updated expectation for gl-teximage.html.

  • TestExpectations:
  • platform/mac/TestExpectations:
  • webgl/2.0.0/conformance2/rendering/rgb-format-support-expected.txt:
4:55 PM Changeset in webkit [236024] by commit-queue@webkit.org
  • 5 edits
    25 adds in trunk

Add support for spreadMethod=reflect and repeat on SVG gradients (for CoreGraphics platforms)
https://bugs.webkit.org/show_bug.cgi?id=5968

Source/WebCore:

Add support for spreadMethod=repeat and reflect. Also, the opacity of a gradient is now
the result of multiplying stop-opacity with the opacity of the color.

Patch by Justin Michaud <Justin Michaud> on 2018-09-14
Reviewed by Simon Fraser.

Tests: svg/gradients/spreadMethod-expected.svg

svg/gradients/spreadMethod.svg
svg/gradients/spreadMethodAlpha-expected.svg
svg/gradients/spreadMethodAlpha.svg
svg/gradients/spreadMethodClose0-expected-mismatch.svg
svg/gradients/spreadMethodClose0.svg
svg/gradients/spreadMethodClose1-expected-mismatch.svg
svg/gradients/spreadMethodClose1.svg
svg/gradients/spreadMethodClose2-expected.svg
svg/gradients/spreadMethodClose2.svg
svg/gradients/spreadMethodDiagonal-expected.svg
svg/gradients/spreadMethodDiagonal.svg
svg/gradients/spreadMethodDiagonal2-expected.svg
svg/gradients/spreadMethodDiagonal2.svg
svg/gradients/spreadMethodDuplicateStop-expected.svg
svg/gradients/spreadMethodDuplicateStop.svg
svg/gradients/spreadMethodReversed-expected.svg
svg/gradients/spreadMethodReversed.svg
svg/gradients/stopAlpha-expected.svg
svg/gradients/stopAlpha.svg

  • platform/graphics/cg/GradientCG.cpp:

(WebCore::Gradient::paint):

  • svg/SVGStopElement.cpp:

(WebCore::SVGStopElement::stopColorIncludingOpacity const):

LayoutTests:

Add new svg tests for linear gradients with spreadMethod, and alpha values specified in
both stop-opacity and color.

Patch by Justin Michaud <Justin Michaud> on 2018-09-14
Reviewed by Simon Fraser.

  • platform/mac/svg/W3C-SVG-1.1/pservers-grad-10-b-expected.png:
  • svg/gradients/spreadMethod-expected.svg: Added.
  • svg/gradients/spreadMethod.svg: Added.
  • svg/gradients/spreadMethodAlpha-expected.svg: Added.
  • svg/gradients/spreadMethodAlpha.svg: Added.
  • svg/gradients/spreadMethodClose0-expected-mismatch.svg: Added.
  • svg/gradients/spreadMethodClose0.svg: Added.
  • svg/gradients/spreadMethodClose1-expected-mismatch.svg: Added.
  • svg/gradients/spreadMethodClose1.svg: Added.
  • svg/gradients/spreadMethodClose2-expected.svg: Added.
  • svg/gradients/spreadMethodClose2.svg: Added.
  • svg/gradients/spreadMethodDiagonal-expected.svg: Added.
  • svg/gradients/spreadMethodDiagonal.svg: Added.
  • svg/gradients/spreadMethodDiagonal2-expected.svg: Added.
  • svg/gradients/spreadMethodDiagonal2.svg: Added.
  • svg/gradients/spreadMethodDuplicateStop-expected.svg: Added.
  • svg/gradients/spreadMethodDuplicateStop.svg: Added.
  • svg/gradients/spreadMethodReversed-expected.svg: Added.
  • svg/gradients/spreadMethodReversed.svg: Added.
  • svg/gradients/stopAlpha-expected.svg: Added.
  • svg/gradients/stopAlpha.svg: Added.
4:54 PM Changeset in webkit [236023] by Ross Kirsling
  • 3 edits in trunk/LayoutTests

[WinCairo] Unreviewed test gardening.

4:47 PM Changeset in webkit [236022] by sbarati@apple.com
  • 3 edits
    1 add in trunk

Don't dump OSRAvailabilityData in Graph::dump because a stale Availability may point to a Node that is already freed
https://bugs.webkit.org/show_bug.cgi?id=189628
<rdar://problem/39481690>

Reviewed by Mark Lam.

JSTests:

  • stress/verbose-failure-dont-graph-dump-availability-already-freed.js: Added.

(foo):

Source/JavaScriptCore:

An Availability may point to a Node. And that Node may be removed from
the graph, e.g, it's freed and its memory is no longer owned by Graph.
This patch makes it so we no longer dump this metadata by default. If
this metadata is interesting to you, you'll need to go in and change
Graph::dump to dump the needed metadata.

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::dump):

4:15 PM Changeset in webkit [236021] by commit-queue@webkit.org
  • 9 edits in trunk/LayoutTests

Add stability to tests for web API statistics
https://bugs.webkit.org/show_bug.cgi?id=189560
<rdar://problem/44396413>

Patch by Woodrow Wang <woodrow_wang@apple.com> on 2018-09-14
Reviewed by Chris Dumez.

Using js-test added some data to the font loading collection, which made the tests dependent on
js-test.js. Thus, if any changes were made to js-test.js the tests for web API statistics would
fail. This patch removes the dependency on js-test. Also, this patch speeds up each test
significantly by bypassing the timer in ResourceLoadObserver for recording the statistics.

  • http/tests/webAPIStatistics/canvas-read-and-write-data-collection-expected.txt:
  • http/tests/webAPIStatistics/canvas-read-and-write-data-collection.html:
  • http/tests/webAPIStatistics/font-load-data-collection-expected.txt:
  • http/tests/webAPIStatistics/font-load-data-collection.html:
  • http/tests/webAPIStatistics/navigator-functions-accessed-data-collection-expected.txt:
  • http/tests/webAPIStatistics/navigator-functions-accessed-data-collection.html:
  • http/tests/webAPIStatistics/screen-functions-accessed-data-collection-expected.txt:
  • http/tests/webAPIStatistics/screen-functions-accessed-data-collection.html:
3:09 PM Changeset in webkit [236020] by commit-queue@webkit.org
  • 9 edits in trunk/Source/WebKit

Refactoring related to Safe Browsing
https://bugs.webkit.org/show_bug.cgi?id=189631

Patch by Alex Christensen <achristensen@webkit.org> on 2018-09-14
Reviewed by Tim Horton.

Make SafeBrowsingResult RefCounted.
Move logic from an unnamed lambda to WebPageProxy::receivedNavigationPolicyDecision.

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::beginSafeBrowsingCheck):
(WebKit::WebPageProxy::contentFilterDidBlockLoadForFrame): Deleted.
(WebKit::WebPageProxy::addPlatformLoadParameters): Deleted.
(WebKit::WebPageProxy::createSandboxExtensionsIfNeeded): Deleted.
(WebKit::WebPageProxy::startDrag): Deleted.
(WebKit::WebPageProxy::setPromisedDataForImage): Deleted.
(WebKit::WebPageProxy::setDragCaretRect): Deleted.
(WebKit::WebPageProxy::platformRegisterAttachment): Deleted.
(WebKit::WebPageProxy::platformCloneAttachment): Deleted.

  • UIProcess/SafeBrowsingResult.h:

(WebKit::SafeBrowsingResult::create):

  • UIProcess/WebFramePolicyListenerProxy.cpp:

(WebKit::WebFramePolicyListenerProxy::didReceiveSafeBrowsingResults):

  • UIProcess/WebFramePolicyListenerProxy.h:
  • UIProcess/WebFrameProxy.cpp:

(WebKit::WebFrameProxy::setUpPolicyListenerProxy):

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

(WebKit::WebPageProxy::receivedNavigationPolicyDecision):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponse):

  • UIProcess/WebPageProxy.h:
2:59 PM Changeset in webkit [236019] by ggaren@apple.com
  • 2 edits in trunk/Source/WebKit

Clarify the configuration used by WKUIDelegate's createWebViewWithConfiguration
https://bugs.webkit.org/show_bug.cgi?id=189634

Reviewed by Tim Horton.

  • UIProcess/API/Cocoa/WKUIDelegate.h:
2:00 PM Changeset in webkit [236018] by mark.lam@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Refactor some ForInContext code for better encapsulation.
https://bugs.webkit.org/show_bug.cgi?id=189626
<rdar://problem/44466415>

Reviewed by Keith Miller.

  1. Add a ForInContext::m_type field to store the context type. This does not increase the class size, but eliminates the need for a virtual call to get the type.

Note: we still need a virtual destructor because we'll be mingling
IndexedForInContexts and StructureForInContexts in the BytecodeGenerator::m_forInContextStack.

  1. Add ForInContext::isIndexedForInContext() and ForInContext::isStructureForInContext() convenience methods.
  1. Add ForInContext::asIndexedForInContext() and ForInContext::asStructureForInContext() to do the casting to the subclass types. This ensures that we'll properly assert that the casting is legal.
  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitGetByVal):
(JSC::BytecodeGenerator::popIndexedForInScope):
(JSC::BytecodeGenerator::popStructureForInScope):

  • bytecompiler/BytecodeGenerator.h:

(JSC::ForInContext::type const):
(JSC::ForInContext::isIndexedForInContext const):
(JSC::ForInContext::isStructureForInContext const):
(JSC::ForInContext::asIndexedForInContext):
(JSC::ForInContext::asStructureForInContext):
(JSC::ForInContext::ForInContext):
(JSC::StructureForInContext::StructureForInContext):
(JSC::IndexedForInContext::IndexedForInContext):
(JSC::ForInContext::~ForInContext): Deleted.

1:36 PM Changeset in webkit [236017] by Ryan Haddad
  • 2 edits in trunk/Source/WebCore

Unreviewed, attempt to fix the iOSMac build after r236015.

  • platform/graphics/cv/PixelBufferResizer.mm:

(WebCore::PixelBufferResizer::PixelBufferResizer):

12:49 PM Changeset in webkit [236016] by Simon Fraser
  • 34 edits in trunk/Source

Make GraphicsLayers ref-counted, so their tree can persist when disconnected from RenderLayerBackings
https://bugs.webkit.org/show_bug.cgi?id=189521

Reviewed by Tim Horton.
Source/WebCore:

Make GraphicsLayer be RefCounted<GraphicsLayer>. GraphicsLayers own their children, via a Vector<Ref<GraphicsLayer>>.

RenderLayerBacking and other holders of GraphicsLayers use RefPtr<GraphicsLayer>.

All the other changes are just to adapt to the new ownership patterns.

I verified that no GraphicsLayers were leaked or abandoned after this change.

No behavior change.

  • page/PageOverlayController.cpp:

(WebCore::PageOverlayController::layerWithDocumentOverlays):
(WebCore::PageOverlayController::layerWithViewOverlays):
(WebCore::PageOverlayController::installPageOverlay):
(WebCore::PageOverlayController::uninstallPageOverlay):
(WebCore::PageOverlayController::setPageOverlayNeedsDisplay):
(WebCore::PageOverlayController::didChangeViewSize):
(WebCore::PageOverlayController::didChangeDocumentSize):
(WebCore::PageOverlayController::didChangeSettings):
(WebCore::PageOverlayController::paintContents):
(WebCore::PageOverlayController::didChangeOverlayFrame):
(WebCore::PageOverlayController::didChangeOverlayBackgroundColor):

  • page/PageOverlayController.h:
  • page/mac/ServicesOverlayController.h:

(WebCore::ServicesOverlayController::Highlight::layer const):

  • page/mac/ServicesOverlayController.mm:

(WebCore::ServicesOverlayController::Highlight::Highlight):
(WebCore::ServicesOverlayController::Highlight::invalidate):
(WebCore::ServicesOverlayController::Highlight::fadeIn):
(WebCore::ServicesOverlayController::Highlight::fadeOut):
(WebCore::ServicesOverlayController::Highlight::didFinishFadeOutAnimation):
(WebCore::ServicesOverlayController::determineActiveHighlight):

  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::GraphicsLayer):
(WebCore::GraphicsLayer::willBeDestroyed):
(WebCore::GraphicsLayer::setChildren):
(WebCore::GraphicsLayer::addChild):
(WebCore::GraphicsLayer::addChildAtIndex):
(WebCore::GraphicsLayer::addChildBelow):
(WebCore::GraphicsLayer::addChildAbove):
(WebCore::GraphicsLayer::replaceChild):
(WebCore::GraphicsLayer::removeAllChildren):
(WebCore::GraphicsLayer::removeFromParent):
(WebCore::GraphicsLayer::setMaskLayer):
(WebCore::GraphicsLayer::noteDeviceOrPageScaleFactorChangedIncludingDescendants):
(WebCore::GraphicsLayer::distributeOpacity):
(WebCore::GraphicsLayer::traverse):
(WebCore::dumpChildren):

  • platform/graphics/GraphicsLayer.h:

(WebCore::GraphicsLayer::children const):
(WebCore::GraphicsLayer::children):
(WebCore::GraphicsLayer::maskLayer const):
(WebCore::GraphicsLayer::replicaLayer const):
(WebCore::GraphicsLayer::beingDestroyed const):
(WebCore::GraphicsLayer:: const): Deleted.

  • platform/graphics/GraphicsLayerFactory.h:
  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayer::create):
(WebCore::GraphicsLayerCA::setChildren):
(WebCore::GraphicsLayerCA::addChild):
(WebCore::GraphicsLayerCA::addChildAtIndex):
(WebCore::GraphicsLayerCA::addChildBelow):
(WebCore::GraphicsLayerCA::addChildAbove):
(WebCore::GraphicsLayerCA::replaceChild):
(WebCore::GraphicsLayerCA::setMaskLayer):
(WebCore::GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush const):
(WebCore::GraphicsLayerCA::recursiveCommitChanges):
(WebCore::GraphicsLayerCA::updateSublayerList):
(WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):

  • platform/graphics/ca/GraphicsLayerCA.h:
  • platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:

(WebCore::GraphicsLayer::create):
(WebCore::GraphicsLayerTextureMapper::setChildren):
(WebCore::GraphicsLayerTextureMapper::addChild):
(WebCore::GraphicsLayerTextureMapper::addChildAtIndex):
(WebCore::GraphicsLayerTextureMapper::addChildAbove):
(WebCore::GraphicsLayerTextureMapper::addChildBelow):
(WebCore::GraphicsLayerTextureMapper::replaceChild):
(WebCore::GraphicsLayerTextureMapper::setMaskLayer):
(WebCore::GraphicsLayerTextureMapper::updateBackingStoreIncludingSubLayers):

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

(WebCore::GraphicsLayer::create):
(WebCore::CoordinatedGraphicsLayer::setShouldUpdateVisibleRect):
(WebCore::CoordinatedGraphicsLayer::addChild):
(WebCore::CoordinatedGraphicsLayer::addChildAtIndex):
(WebCore::CoordinatedGraphicsLayer::addChildAbove):
(WebCore::CoordinatedGraphicsLayer::addChildBelow):
(WebCore::CoordinatedGraphicsLayer::replaceChild):
(WebCore::CoordinatedGraphicsLayer::setMaskLayer):
(WebCore::CoordinatedGraphicsLayer::syncPendingStateChangesIncludingSubLayers):
(WebCore::CoordinatedGraphicsLayer::updateContentBuffersIncludingSubLayers):
(WebCore::CoordinatedGraphicsLayer::setCoordinatorIncludingSubLayersIfNeeded):

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
  • platform/graphics/win/GraphicsLayerDirect2D.cpp:

(WebCore::GraphicsLayer::create):
(WebCore::GraphicsLayerDirect2D::GraphicsLayerDirect2D): Deleted.
(WebCore::GraphicsLayerDirect2D::initialize): Deleted.
(WebCore::GraphicsLayerDirect2D::~GraphicsLayerDirect2D): Deleted.
(WebCore::GraphicsLayerDirect2D::setNeedsDisplay): Deleted.
(WebCore::GraphicsLayerDirect2D::setNeedsDisplayInRect): Deleted.

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::createGraphicsLayer):
(WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
(WebCore::RenderLayerBacking::updateConfiguration):
(WebCore::RenderLayerBacking::updateInternalHierarchy):
(WebCore::RenderLayerBacking::updateMaskingLayer):
(WebCore::RenderLayerBacking::updateChildClippingStrategy):
(WebCore::RenderLayerBacking::updateScrollingLayers):

  • rendering/RenderLayerBacking.h:
  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateCompositingLayers):
(WebCore::RenderLayerCompositor::appendDocumentOverlayLayers):
(WebCore::RenderLayerCompositor::setCompositingParent):
(WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
(WebCore::RenderLayerCompositor::parentFrameContentLayers):
(WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
(WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
(WebCore::RenderLayerCompositor::updateLayerForHeader):
(WebCore::RenderLayerCompositor::updateLayerForFooter):
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
(WebCore::RenderLayerCompositor::ensureRootLayer):
(WebCore::RenderLayerCompositor::rootLayerAttachmentChanged):

  • rendering/RenderLayerCompositor.h:

Source/WebKit:

Make GraphicsLayer be RefCounted<GraphicsLayer>. GraphicsLayers own their children, via a Vector<Ref<GraphicsLayer>>.

RenderLayerBacking and other holders of GraphicsLayers use RefPtr<GraphicsLayer>.

Added some helper functions to null out a RefPtr<GraphicsLayer> after removing from the tree,
clearing the client. GraphicsLayer.m_client becomes a pointer, so it can be set to point to a singleton
empty client when a GraphicsLayer gets detached from its owner. More explicit layer unparenting,
and removed some unnecessary parent checks, and redundant unparenting.

Other changes are just to adapt to the new ownership patterns.

I verified that no GraphicsLayers were leaked or abandoned after this change.

  • WebProcess/WebCoreSupport/WebInspectorClient.cpp:

(WebKit::WebInspectorClient::~WebInspectorClient):
(WebKit::WebInspectorClient::showPaintRect):
(WebKit::WebInspectorClient::animationEndedForLayer):

  • WebProcess/WebCoreSupport/WebInspectorClient.h:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.h:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm:

(WebKit::RemoteLayerTreeContext::createGraphicsLayer):

  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:

(WebKit::RemoteLayerTreeDrawingArea::updateRootLayers):
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):

12:01 PM Changeset in webkit [236015] by eric.carlson@apple.com
  • 50 edits
    1 copy
    2 adds in trunk

Support arbitrary video resolution in getUserMedia API
https://bugs.webkit.org/show_bug.cgi?id=178109
<rdar://problem/35083128>

Reviewed by Youenn Fablet.

Source/WebCore:

Support arbitrary video resolutions by configuring the camera to capture at the closest
larger size it supports and scaling/cropping frames as necessary.

No new tests, existing tests updated.

  • Modules/mediastream/CanvasCaptureMediaStreamTrack.h:
  • Modules/webaudio/MediaStreamAudioSource.cpp:

(WebCore::MediaStreamAudioSource::capabilities): Make non-const, it wasn't helpful.
(WebCore::MediaStreamAudioSource::settings): Ditto.
(WebCore::MediaStreamAudioSource::capabilities const): Deleted.
(WebCore::MediaStreamAudioSource::settings const): Deleted.

  • Modules/webaudio/MediaStreamAudioSource.h:
  • SourcesCocoa.txt: Add PixelBufferResizer.
  • WebCore.xcodeproj/project.pbxproj: Ditto.
  • platform/cocoa/CoreVideoSoftLink.h:
  • platform/cocoa/VideoToolboxSoftLink.cpp:
  • platform/cocoa/VideoToolboxSoftLink.h:
  • platform/graphics/cv/PixelBufferResizer.h: Added.

(WebCore::PixelBufferResizer::canResizeTo):

  • platform/graphics/cv/PixelBufferResizer.mm: Added.

(WebCore::PixelBufferResizer::PixelBufferResizer):
(WebCore::PixelBufferResizer::resize):

  • platform/mediastream/RealtimeIncomingAudioSource.cpp:

(WebCore::RealtimeIncomingAudioSource::capabilities): Make non-const, it wasn't helpful.
(WebCore::RealtimeIncomingAudioSource::settings): Ditto.
(WebCore::RealtimeIncomingAudioSource::capabilities const): Deleted.
(WebCore::RealtimeIncomingAudioSource::settings const): Deleted.

  • platform/mediastream/RealtimeIncomingAudioSource.h:
  • platform/mediastream/RealtimeIncomingVideoSource.cpp:

(WebCore::RealtimeIncomingVideoSource::capabilities): Make non-const, it wasn't helpful.
(WebCore::RealtimeIncomingVideoSource::settings): Ditto.
(WebCore::RealtimeIncomingVideoSource::capabilities const): Deleted.
(WebCore::RealtimeIncomingVideoSource::settings const): Deleted.

  • platform/mediastream/RealtimeIncomingVideoSource.h:
  • platform/mediastream/RealtimeMediaSource.cpp:

(WebCore::RealtimeMediaSource::supportsConstraint):
(WebCore::RealtimeMediaSource::supportsConstraint const): Deleted.

  • platform/mediastream/RealtimeMediaSource.h:
  • platform/mediastream/RealtimeVideoSource.cpp:

(WebCore::RealtimeVideoSource::presets):
(WebCore::RealtimeVideoSource::setSupportedPresets):
(WebCore::standardVideoSizes):
(WebCore::RealtimeVideoSource::updateCapabilities): Make non-const, it wasn't helpful.
(WebCore::presetSupportsFrameRate):
(WebCore::RealtimeVideoSource::supportsCaptureSize):
(WebCore::RealtimeVideoSource::shouldUsePreset):
(WebCore::RealtimeVideoSource::bestSupportedSizeAndFrameRate):
(WebCore::RealtimeVideoSource::setSizeAndFrameRate):
(WebCore::RealtimeVideoSource::addSupportedCapabilities const): Deleted.

  • platform/mediastream/RealtimeVideoSource.h:

(WebCore::VideoPresetData::encode const):
(WebCore::VideoPresetData::decode):
(WebCore::VideoPreset::create):
(WebCore::VideoPreset::VideoPreset):
(WebCore::RealtimeVideoSource::prefersPreset):
(WebCore::RealtimeVideoSource::canResizeVideoFrames const):
(WebCore::RealtimeVideoSource::setDefaultSize):
(WebCore::RealtimeVideoSource::observedFrameRate const):
(WebCore::VideoPreset::encode const): Deleted.
(WebCore::VideoPreset::decode): Deleted.

  • platform/mediastream/mac/AVVideoCaptureSource.h:

(WebCore::AVVideoCaptureSource::videoPresets): Deleted.

  • platform/mediastream/mac/AVVideoCaptureSource.mm:

(WebCore::AVVideoPreset::create):
(WebCore::AVVideoPreset::AVVideoPreset):
(WebCore::AVVideoCaptureSource::AVVideoCaptureSource):
(WebCore::AVVideoCaptureSource::settings):
(WebCore::AVVideoCaptureSource::capabilities): Make non-const, it wasn't helpful.
(WebCore::AVVideoCaptureSource::setFrameRate):
(WebCore::AVVideoCaptureSource::prefersPreset):
(WebCore::AVVideoCaptureSource::setSizeAndFrameRateWithPreset):
(WebCore::AVVideoCaptureSource::frameDurationForFrameRate):
(WebCore::AVVideoCaptureSource::setupCaptureSession):
(WebCore::AVVideoCaptureSource::processNewFrame):
(WebCore::AVVideoCaptureSource::captureOutputDidOutputSampleBufferFromConnection):
(WebCore::AVVideoCaptureSource::isFrameRateSupported):
(WebCore::AVVideoCaptureSource::generatePresets):
(WebCore::updateSizeMinMax): Deleted.
(WebCore::updateAspectRatioMinMax): Deleted.
(WebCore::AVVideoCaptureSource::settings const): Deleted.
(WebCore::AVVideoCaptureSource::capabilities const): Deleted.
(WebCore::AVVideoCaptureSource::sizeForPreset): Deleted.
(WebCore::AVVideoCaptureSource::setPreset): Deleted.
(WebCore::AVVideoCaptureSource::setSizeAndFrameRate): Deleted.
(WebCore::AVVideoCaptureSource::bestSessionPresetForVideoDimensions): Deleted.
(WebCore::AVVideoCaptureSource::supportsSizeAndFrameRate): Deleted.

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioCaptureSource::capabilities): Make non-const, it wasn't helpful.
(WebCore::CoreAudioCaptureSource::settings): Ditto.
(WebCore::CoreAudioCaptureSource::capabilities const): Deleted.
(WebCore::CoreAudioCaptureSource::settings const): Deleted.

  • platform/mediastream/mac/CoreAudioCaptureSource.h:
  • platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp:

(WebCore::DisplayCaptureSourceCocoa::capabilities): Make non-const, it wasn't helpful.
(WebCore::DisplayCaptureSourceCocoa::settings): Ditto.
(WebCore::DisplayCaptureSourceCocoa::capabilities const): Deleted.
(WebCore::DisplayCaptureSourceCocoa::settings const): Deleted.

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

(WebCore::MockRealtimeVideoSourceMac::CMSampleBufferFromPixelBuffer):
(WebCore::MockRealtimeVideoSourceMac::updateSampleBuffer):
(WebCore::MockRealtimeVideoSourceMac::setSizeAndFrameRateWithPreset):

  • platform/mock/MockMediaDevice.h:

(WebCore::MockCameraProperties::decode):

  • platform/mock/MockRealtimeAudioSource.cpp:

(WebCore::MockRealtimeAudioSource::settings): Make non-const, it wasn't helpful.
(WebCore::MockRealtimeAudioSource::capabilities): Ditto.
(WebCore::MockRealtimeAudioSource::settings const): Deleted.
(WebCore::MockRealtimeAudioSource::capabilities const): Deleted.

  • platform/mock/MockRealtimeAudioSource.h:
  • platform/mock/MockRealtimeMediaSourceCenter.cpp:

(WebCore::defaultDevices): Change video device presets to trigger resize code more often.

  • platform/mock/MockRealtimeVideoSource.cpp:

(WebCore::MockRealtimeVideoSource::MockRealtimeVideoSource):
(WebCore::MockRealtimeVideoSource::generatePresets):
(WebCore::MockRealtimeVideoSource::capabilities): Make non-const, it wasn't helpful.
(WebCore::MockRealtimeVideoSource::settings): Ditto.
(WebCore::MockRealtimeVideoSource::capabilities const): Deleted.
(WebCore::MockRealtimeVideoSource::settings const): Deleted.

  • platform/mock/MockRealtimeVideoSource.h:

Source/WebCore/PAL:

  • pal/cf/CoreMediaSoftLink.cpp:
  • pal/cf/CoreMediaSoftLink.h:

Source/WebKit:

  • WebProcess/cocoa/UserMediaCaptureManager.cpp:

LayoutTests:

  • fast/mediastream/MediaStreamTrack-getCapabilities-expected.txt:
  • fast/mediastream/apply-constraints-advanced-expected.txt:
  • fast/mediastream/apply-constraints-advanced.html:
  • fast/mediastream/apply-constraints-video.html:
11:47 AM Changeset in webkit [236014] by Ryan Haddad
  • 2 edits in trunk/Tools

bots should pass --clobber-old-results to run-webkit-tests
https://bugs.webkit.org/show_bug.cgi?id=189623

Reviewed by Aakash Jain.

In order to ensure that bots to not produce confusing results due to transient execptions,
or run out of space if they continually hit an exception, old layout test results should be clobbered.

  • BuildSlaveSupport/build.webkit.org-config/steps.py:

(RunWebKitTests):

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

Bug 189541 - Build error in FontDescriptionKey::computeHash when compiling FontTaggedSettings and FontCascadeFonts together
https://bugs.webkit.org/show_bug.cgi?id=189541

Patch by Frederic Wang <fwang@igalia.com> on 2018-09-14
Reviewed by Alex Christensen.

FontDescriptionKey::computeHash() from In FontCache.h requires implicit instantiation of the
FontTaggedSettings::hash() template function. This instantiation may happen before
FontTaggedSettings::hash() is actually fully specialized in FontTaggedSettings.cpp. To avoid
compiler errors when FontCache.h and FontTaggedSettings.cpp are in the same translation unit,
we declare full specialization of the hash() functions in FontTaggedSettings.h.

No new tests, behavior unchanged.

  • platform/graphics/FontCache.h: Explicitly include FontTaggedSettings to avoid possible future breakage.
  • platform/graphics/FontTaggedSettings.h: Declare full specialization of FontTaggedSettings::hash().
11:28 AM Changeset in webkit [236012] by Basuke Suzuki
  • 3 edits in trunk/Source/WebKit

[Curl][WebKit] Bug fix for continuously retrying with empty credentials.
https://bugs.webkit.org/show_bug.cgi?id=189601

Reviewed by Alex Christensen.

Added stop condition for empty credentials passed by client.

  • NetworkProcess/curl/NetworkDataTaskCurl.cpp:

(WebKit::NetworkDataTaskCurl::curlDidReceiveResponse):
(WebKit::NetworkDataTaskCurl::invokeDidReceiveResponse):
(WebKit::NetworkDataTaskCurl::tryHttpAuthentication):
(WebKit::NetworkDataTaskCurl::tryProxyAuthentication):

  • NetworkProcess/curl/NetworkDataTaskCurl.h:
11:17 AM Changeset in webkit [236011] by Ryan Haddad
  • 8 edits
    1 copy
    1 move
    1 add in trunk/Source

Unreviewed, rolling out r235990.

Introduced TestWebKitAPI.NowPlayingTest timeouts on iOS

Reverted changeset:

"Enable USE_MEDIAREMOTE on iOS"
https://bugs.webkit.org/show_bug.cgi?id=189096
https://trac.webkit.org/changeset/235990

10:03 AM Changeset in webkit [236010] by jer.noble@apple.com
  • 7 edits in trunk/Source

Turn SourceBufferChangeTypeEnabled on by default
https://bugs.webkit.org/show_bug.cgi?id=189527

Reviewed by Eric Carlson.

Source/WebCore:

  • page/Settings.yaml:

Source/WebKit:

  • Shared/WebPreferences.yaml:
  • UIProcess/API/C/WKPreferencesRefPrivate.h:

Source/WebKitLegacy/mac:

  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):

9:50 AM Changeset in webkit [236009] by Michael Catanzaro
  • 2 edits in trunk/Source/WebKit

Unreviewed, speculative WPE build fix after r236004
https://bugs.webkit.org/show_bug.cgi?id=189545

  • UIProcess/API/wpe/WebKitScriptDialog.h:
9:44 AM Changeset in webkit [236008] by webkit@devinrousso.com
  • 19 edits
    2 adds in trunk

Web Inspector: Record actions performed on ImageBitmapRenderingContext
https://bugs.webkit.org/show_bug.cgi?id=181341

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

  • inspector/protocol/Recording.json:
  • inspector/scripts/codegen/generator.py:

Source/WebCore:

Test: inspector/canvas/recording-bitmaprenderer.html

  • html/canvas/ImageBitmapRenderingContext.idl:
  • inspector/InspectorCanvas.cpp:

(WebCore::shouldSnapshotBitmapRendererAction):
(WebCore::InspectorCanvas::recordAction):

  • inspector/agents/InspectorCanvasAgent.cpp:

(WebCore::InspectorCanvasAgent::didFinishRecordingCanvasFrame):

  • page/PageConsoleClient.cpp:

(canvasRenderingContext):

Source/WebInspectorUI:

  • UserInterface/Models/Recording.js:

(WI.Recording.fromPayload):
(WI.Recording.prototype.createContext):

  • UserInterface/Models/RecordingAction.js:

(WI.RecordingAction._prototypeForType):
(WI.RecordingAction.prototype.getImageParameters):

  • UserInterface/Views/RecordingActionTreeElement.js:

(WI.RecordingActionTreeElement._classNameForAction.classNameForActionName):

  • UserInterface/Views/RecordingContentView.js:

(WI.RecordingContentView):
(WI.RecordingContentView.prototype.get navigationItems):
(WI.RecordingContentView.prototype.updateActionIndex):
(WI.RecordingContentView.prototype.shown):
(WI.RecordingContentView.prototype.hidden):
(WI.RecordingContentView.prototype._generateContentFromSnapshot): Renamed.
(WI.RecordingContentView.prototype._updateImageGrid):
(WI.RecordingContentView.prototype._generateContentCanvasWebGL): Deleted.

  • UserInterface/Views/CanvasContentView.js:

(WI.CanvasContentView):

LayoutTests:

  • inspector/canvas/recording-2d-expected.txt:
  • inspector/canvas/recording-bitmaprenderer-expected.txt: Added.
  • inspector/canvas/recording-bitmaprenderer.html: Added.
  • inspector/canvas/recording-webgl-expected.txt:
  • inspector/canvas/recording-webgl-snapshots-expected.txt:
  • inspector/canvas/resources/recording-utilities.js:

Simplify the test output to avoid unrelated failures, such as if line numbers change.
Also remove non-human-readable text, as it makes it more difficult for those unfamiliar with
the test to determine if any differences are acceptable.

9:38 AM Changeset in webkit [236007] by ddkilzer@apple.com
  • 7 edits in trunk/Source/WebCore

REGRESSION (r235954): Fix build failure on watchOS
<https://webkit.org/b/189605>

Reviewed by Geoffrey Garen.

Remove using WebCore::IndexedDB::KeyType; from
Source/WebCore/Modules/indexeddb/IDBKey.h and fix all the
resulting build failures.

  • Modules/indexeddb/IDBKey.cpp:

(WebCore::IDBKey::IDBKey):
(WebCore::IDBKey::isValid const):
(WebCore::IDBKey::compare const):

  • Modules/indexeddb/IDBKey.h:

(WebCore::IDBKey::createNumber):
(WebCore::IDBKey::createDate):
(WebCore::IDBKey::type const):
(WebCore::IDBKey::array const):
(WebCore::IDBKey::string const):
(WebCore::IDBKey::date const):
(WebCore::IDBKey::number const):
(WebCore::IDBKey::binary const):
(WebCore::IDBKey::compareTypes):
(WebCore::IDBKey::IDBKey):

  • Modules/indexeddb/IDBKeyData.cpp:

(WebCore::IDBKeyData::IDBKeyData):
(WebCore::IDBKeyData::maybeCreateIDBKey const):
(WebCore::IDBKeyData::isolatedCopy):
(WebCore::IDBKeyData::encode const):
(WebCore::IDBKeyData::decode):
(WebCore::IDBKeyData::compare const):
(WebCore::IDBKeyData::loggingString const):
(WebCore::IDBKeyData::setArrayValue):
(WebCore::IDBKeyData::setBinaryValue):
(WebCore::IDBKeyData::setStringValue):
(WebCore::IDBKeyData::setDateValue):
(WebCore::IDBKeyData::setNumberValue):
(WebCore::IDBKeyData::isValid const):
(WebCore::IDBKeyData::operator== const):

  • Modules/indexeddb/IDBKeyData.h:

(WebCore::IDBKeyData::IDBKeyData):
(WebCore::IDBKeyData::minimum):
(WebCore::IDBKeyData::maximum):
(WebCore::IDBKeyData::type const):
(WebCore::IDBKeyData::hash const):
(WebCore::IDBKeyData::string const):
(WebCore::IDBKeyData::date const):
(WebCore::IDBKeyData::number const):
(WebCore::IDBKeyData::binary const):
(WebCore::IDBKeyData::array const):
(WebCore::IDBKeyData::encode const):
(WebCore::IDBKeyData::decode):

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetIndexRecordForOneKey):

  • bindings/js/IDBBindingUtilities.cpp:

(WebCore::toJS):

8:37 AM Changeset in webkit [236006] by calvaris@igalia.com
  • 5 edits in trunk/Source/WebCore

[EME] Add support the waitingforkey event
https://bugs.webkit.org/show_bug.cgi?id=189616

Reviewed by Philippe Normand.

Crossplatform support to fire the waitingforkey event from the
player to the element. The element implements the W3C specified
algorithm.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaPlayerWaitingForKey):
(WebCore::HTMLMediaElement::attemptToResumePlaybackIfNecessary):

  • html/HTMLMediaElement.h:
  • platform/graphics/MediaPlayer.cpp:

(WebCore::MediaPlayer::waitingForKey):

  • platform/graphics/MediaPlayer.h:

(WebCore::MediaPlayerClient::mediaPlayerWaitingForKey):

8:16 AM Changeset in webkit [236005] by commit-queue@webkit.org
  • 8 edits
    13 copies
    1 add
    1 delete in trunk/Source

builtins directory causes name conflict on Python 3
https://bugs.webkit.org/show_bug.cgi?id=189552

Patch by Mike Gorse <mgorse@suse.com> on 2018-09-14
Reviewed by Michael Catanzaro.

Source/JavaScriptCore:

  • CMakeLists.txt: builtins -> wkbuiltins.
  • DerivedSources.make: builtins -> wkbuiltins.
  • Scripts/generate-js-builtins.py: import wkbuiltins, rather than builtins.
  • Scripts/wkbuiltins/init.py: Renamed from Source/JavaScriptCore/Scripts/builtins/init.py.
  • Scripts/wkbuiltins/builtins_generate_combined_header.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generate_combined_header.py.
  • Scripts/wkbuiltins/builtins_generate_internals_wrapper_implementation.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generate_internals_wrapper_implementation.py.
  • Scripts/wkbuiltins/builtins_generate_separate_header.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_header.py.
  • Scripts/wkbuiltins/builtins_generate_separate_implementation.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_implementation.py.
  • Scripts/wkbuiltins/builtins_generate_wrapper_header.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generate_wrapper_header.py.
  • Scripts/wkbuiltins/builtins_generate_wrapper_implementation.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generate_wrapper_implementation.py.
  • Scripts/wkbuiltins/builtins_generator.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generator.py.
  • Scripts/wkbuiltins/builtins_model.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_model.py.
  • Scripts/wkbuiltins/builtins_templates.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_templates.py.
  • Scripts/wkbuiltins/wkbuiltins.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins.py.
  • JavaScriptCore.xcodeproj/project.pbxproj: Update for the renaming.

Source/WebCore:

No new tests (No behavior change).

  • CMakeLists.txt: builtins -> wkbuiltins.
  • DerivedSources.make: builtins -> wkbuiltins.
4:01 AM Changeset in webkit [236004] by Carlos Garcia Campos
  • 11 edits
    4 adds in trunk/Source

[GTK] Make script dialogs modal to the current web view only
https://bugs.webkit.org/show_bug.cgi?id=189545

Reviewed by Michael Catanzaro.

Source/WebCore/platform/gtk/po:

  • POTFILES.in:

Source/WebKit:

Change the default implementation of script dialogs to use an embedded window, like the HTTP auth dialog,
instead of a GtkMessageDialog. This patch adds a base class WebKitWebViewDialog shared by
WebKitAuthenticationDialog and the new WebKitScriptDialogImpl.

  • SourcesGTK.txt: Add new files to compilation.
  • UIProcess/API/glib/WebKitScriptDialogPrivate.h:
  • UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:

(webkitAuthenticationDialogInitialize): Do not use a frame and use a better styled title.
(webkit_authentication_dialog_class_init): Remove implementation of vfuncs that are now implemented by the
parent.

  • UIProcess/API/gtk/WebKitAuthenticationDialog.h:
  • UIProcess/API/gtk/WebKitScriptDialogGtk.cpp:

(webkitScriptDialogAccept): Use WebKitScriptDialogImpl API.
(webkitScriptDialogDismiss): Ditto.
(webkitScriptDialogSetUserInput): Ditto.

  • UIProcess/API/gtk/WebKitScriptDialogImpl.cpp: Added.

(webkitScriptDialogImplClose):
(webkitScriptDialogImplKeyPressEvent):
(webkitScriptDialogImplMap):
(webkitScriptDialogImplConstructed):
(webkitScriptDialogImplDispose):
(webkit_script_dialog_impl_class_init):
(webkitScriptDialogImplAddButton):
(webkitScriptDialogImplNew):
(webkitScriptDialogImplCancel):
(webkitScriptDialogImplConfirm):
(webkitScriptDialogImplSetEntryText):

  • UIProcess/API/gtk/WebKitScriptDialogImpl.h: Added.
  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewChildIsInternalWidget): Rename authenticationDialog as just dialog.
(webkitWebViewBaseAddDialog): Ditto.
(webkitWebViewBaseContainerRemove): Ditto.
(webkitWebViewBaseContainerForall): Ditto.
(webkitWebViewBaseConstructed): Ditto.
(webkitWebViewBaseSizeAllocate): Ditto.
(webkitWebViewBaseKeyPressEvent): Ditto.
(webkitWebViewBaseHandleMouseEvent): Ditto.
(webkitWebViewBaseButtonPressEvent): Ditto.
(webkitWebViewBaseButtonReleaseEvent): Ditto.
(webkitWebViewBaseHandleWheelEvent): Ditto.
(webkitWebViewBaseScrollEvent): Ditto.
(webkitWebViewBaseMotionNotifyEvent): Ditto.
(webkitWebViewBaseCrossingNotifyEvent): Ditto.
(webkitWebViewBaseTouchEvent): Ditto.
(webkitWebViewBaseFocus): Ditto.
(webkitWebViewBaseDestroy): Ditto.

  • UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
  • UIProcess/API/gtk/WebKitWebViewDialog.cpp: Added.

(webkitWebViewDialogDraw):
(webkitWebViewDialogSizeAllocate):
(webkitWebViewDialogConstructed):
(webkit_web_view_dialog_class_init):

  • UIProcess/API/gtk/WebKitWebViewDialog.h: Added.
  • UIProcess/API/gtk/WebKitWebViewGtk.cpp:

(webkitWebViewAuthenticate):
(webkitWebViewScriptDialog):

12:20 AM Changeset in webkit [236003] by Ms2ger@igalia.com
  • 3 edits
    29 deletes in trunk/LayoutTests

Remove some obsolete XHR tests
https://bugs.webkit.org/show_bug.cgi?id=189581

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

These tests were removed upstream, but stuck around in WebKit.

  • web-platform-tests/xhr/OWNERS: Removed.
  • web-platform-tests/xhr/abort-during-open-expected.txt: Removed.
  • web-platform-tests/xhr/abort-during-open.htm: Removed.
  • web-platform-tests/xhr/abort-during-open.js: Removed.
  • web-platform-tests/xhr/abort-during-open.worker-expected.txt: Removed.
  • web-platform-tests/xhr/abort-during-open.worker.html: Removed.
  • web-platform-tests/xhr/abort-during-open.worker.js: Removed.
  • web-platform-tests/xhr/getallresponseheaders-cl-expected.txt: Removed.
  • web-platform-tests/xhr/getallresponseheaders-cl.htm: Removed.
  • web-platform-tests/xhr/interfaces-expected.txt: Removed.
  • web-platform-tests/xhr/interfaces.html: Removed.
  • web-platform-tests/xhr/open-url-bogus-expected.txt: Removed.
  • web-platform-tests/xhr/open-url-bogus.htm: Removed.
  • web-platform-tests/xhr/overridemimetype-done-state-expected.txt: Removed.
  • web-platform-tests/xhr/overridemimetype-done-state.htm: Removed.
  • web-platform-tests/xhr/readme.txt: Removed.
  • web-platform-tests/xhr/responsetype-expected.txt: Removed.
  • web-platform-tests/xhr/responsetype.html: Removed.
  • web-platform-tests/xhr/send-non-same-origin.sub-expected.txt: Removed.
  • web-platform-tests/xhr/send-non-same-origin.sub.htm: Removed.
  • web-platform-tests/xhr/send-send-expected.txt: Removed.
  • web-platform-tests/xhr/send-send.htm: Removed.
  • web-platform-tests/xhr/send-send.js: Removed.
  • web-platform-tests/xhr/send-send.worker-expected.txt: Removed.
  • web-platform-tests/xhr/send-send.worker.html: Removed.
  • web-platform-tests/xhr/send-send.worker.js: Removed.
  • web-platform-tests/xhr/send-usp-expected.txt: Removed.
  • web-platform-tests/xhr/send-usp.html: Removed.
  • web-platform-tests/xhr/send-usp.js: Removed.

LayoutTests:

Note: See TracTimeline for information about the timeline view.