Timeline



Jan 25, 2021:

10:56 PM Changeset in webkit [271878] by rniwa@webkit.org
  • 19 edits
    1 delete in trunk

Unreviewed, reverting r271514 and r271549

Made TestWebKitAPI.WebKit.PrintFrame flaky

Reverted changeset:

"Use event loop to set title"
https://bugs.webkit.org/show_bug.cgi?id=218496
https://trac.webkit.org/changeset/271514

10:21 PM Changeset in webkit [271877] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations: Expand scope of tests skipped due to rdar://65287528.
9:09 PM Changeset in webkit [271876] by Simon Fraser
  • 3 edits in trunk/Source/JavaScriptCore

Crash when remote inspecting in debug builds
https://bugs.webkit.org/show_bug.cgi?id=220956
<rdar://73379637>

Reviewed by Devin Rousso.

Convert RemoteConnectionToTarget from using BlockPtr<> to Function<> because BlockPtr<>
was triggering crashes which seem to be related to mixing ARC and non-ARC code.

  • inspector/remote/RemoteConnectionToTarget.h:
  • inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm:

(Inspector::RemoteTargetHandleRunSourceGlobal):
(Inspector::RemoteTargetQueueTaskOnGlobalQueue):
(Inspector::RemoteTargetHandleRunSourceWithInfo):
(Inspector::RemoteConnectionToTarget::dispatchAsyncOnTarget):
(Inspector::RemoteConnectionToTarget::setup):
(Inspector::RemoteConnectionToTarget::close):
(Inspector::RemoteConnectionToTarget::sendMessageToTarget):
(Inspector::RemoteConnectionToTarget::queueTaskOnPrivateRunLoop):
(Inspector::RemoteConnectionToTarget::takeQueue):

7:43 PM Changeset in webkit [271875] by Alan Bujtas
  • 5 edits in trunk

[Legacy Line Layout] Multiple inline boxes may stretch the line
https://bugs.webkit.org/show_bug.cgi?id=220905

Reviewed by Antti Koivisto.

Source/WebCore:

This is a follow-up on r271110 where the top position of the inline box with the maximum ascent
gets adjusted to make sure it does not stick out of the line. This patch fixes the case when
multiple inline boxes have the same maximum ascent value.

  • rendering/InlineFlowBox.cpp:

(WebCore::InlineFlowBox::computeLogicalBoxHeights):

LayoutTests:

  • platform/ios/fast/block/basic/014-expected.txt:
  • platform/mac/fast/block/basic/014-expected.txt:
7:29 PM Changeset in webkit [271874] by Nikita Vasilyev
  • 6 edits
    1 add in trunk/Source/WebInspectorUI

Web Inspector: Add experimental setting to show Layout panel in Elements tab
https://bugs.webkit.org/show_bug.cgi?id=220954
<rdar://problem/73590856>

Reviewed by BJ Burg.

Add "Show layout panel" checkbox to the Experimental settings that shows an empty
panel (for now) in Elements tab.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Base/Setting.js:
  • UserInterface/Main.html:
  • UserInterface/Views/ElementsTabContentView.js:

(WI.ElementsTabContentView):

  • UserInterface/Views/LayoutDetailsSidebarPanel.js: Added.

(WI.LayoutDetailsSidebarPanel):
(WI.LayoutDetailsSidebarPanel.prototype.supportsDOMNode):
(WI.LayoutDetailsSidebarPanel.prototype.attached):
(WI.LayoutDetailsSidebarPanel.prototype.detached):
(WI.LayoutDetailsSidebarPanel.prototype.initialLayout):
(WI.LayoutDetailsSidebarPanel.prototype.layout):
(WI.LayoutDetailsSidebarPanel.prototype._mainResourceDidChange):

  • UserInterface/Views/SettingsTabContentView.js:

(WI.SettingsTabContentView.prototype._createExperimentalSettingsView):

6:13 PM Changeset in webkit [271873] by Alexey Shvayka
  • 10 edits in trunk/Source

REGRESSION (r270874): Some React Native apps are reported broken on iOS
https://bugs.webkit.org/show_bug.cgi?id=220809

Reviewed by Saam Barati.

Source/JavaScriptCore:

r270874 fixed for/in shadowing issue by introducing an invariant: a property
returned by getOwn*PropertyNames() in DontEnumPropertiesMode::Exclude should be
reported as Enumerable by getOwnPropertySlot(). Otherwise, for/in skips the
property, which causes RN apps to break.

Since there is no way to enforce this invariant for opaque API objects like
JSCallbackObject, this change skips Enumerable check for them by introducing
GetOwnPropertySlotMayBeWrongAboutDontEnum out of line type info flag.

Also, this patch reverts JSCallbackObject::getOwnPropertySlot() changes of r270874
that are no longer necessary and observable (via Object.getOwnPropertyDescriptor).

  • API/JSCallbackObject.h:
  • API/JSCallbackObjectFunctions.h:

(JSC::JSCallbackObject<Parent>::getOwnPropertySlot):

  • API/tests/testapiScripts/testapi.js:
  • runtime/JSObject.cpp:

(JSC::JSObject::hasEnumerableProperty const):

  • runtime/JSTypeInfo.h:

(JSC::TypeInfo::getOwnPropertySlotMayBeWrongAboutDontEnum const):

Source/WebCore:

  • bridge/runtime_object.h:

Source/WebKit:

  • WebProcess/Plugins/Netscape/JSNPObject.h:
5:33 PM Changeset in webkit [271872] by Chris Dumez
  • 7 edits in trunk/Source

Unreviewed, add missing header includes to address build issues.

Source/WebCore:

  • Modules/webauthn/AuthenticationExtensionsClientOutputs.h:

Source/WebKit:

  • UIProcess/API/Cocoa/WKUserScript.mm:
  • UIProcess/API/Cocoa/_WKInspectorExtension.mm:
  • UIProcess/Cocoa/AutomationClient.mm:
  • UIProcess/WebAuthentication/Cocoa/AuthenticatorPresenterCoordinator.h:
5:30 PM Changeset in webkit [271871] by Wenson Hsieh
  • 4 edits in trunk

ASSERT NOT REACHED in WebCore::DisplayList::isDrawingItem
https://bugs.webkit.org/show_bug.cgi?id=220948
<rdar://problem/73588734>

Reviewed by Tim Horton.

Source/WebCore:

Additionally, fix a bug that is also caught when running this API test under debug. In the case where an out of
line item failed to decode (and is thus invalid), we still attempt to invoke its destructor when we're done
iterating, under DisplayList::iterator::clearCurrentItem(); we should not be doing this in the case where
m_isValid is false, since we already know that m_currentBufferForItem either contains an item that has
already been destroyed, or contains garbage data.

  • platform/graphics/displaylists/DisplayList.cpp:

(WebCore::DisplayList::DisplayList::iterator::clearCurrentItem):

Tools:

The API test DisplayListTests.OutOfLineItemDecodingFailure was intended to read from the display list copy
rather than the original list, in order to exercise the (intentional) decoding failure.

Instead, this test erroneously attempts to read from the original display list (which, importantly, doesn't have
a reading client) and ends up exercising the decoding failure anyways, but additionally hits a debug assertion
in the process. Simply fix this by reading out of the correct display list (and rename the original display list
in the process to make the test more clear).

  • TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp:

(TestWebKitAPI::TEST)

4:58 PM Changeset in webkit [271870] by Peng Liu
  • 6 edits in trunk/Source/WebCore

Twitter PiP video pauses when scrolling
https://bugs.webkit.org/show_bug.cgi?id=220887

This patch adds two quirks (requiresUserGestureToPauseInPictureInPicture and
requiresUserGestureToLoadInPictureInPicture) for twitter.com, so that when we scroll
the page while a video is in picture-in-picture, the video won't pause or close.

This patch also fixes a race condition related to function MediaElementSession::playbackPermitted()
by adding a parameter (MediaPlaybackOperation) to it. Because of the race condition, we
cannot resume a paused video in a picture-in-picture window on some sites (e.g., twitter.com).
That happens because when we click the play button on the picture-in-picture window to resume
a video, MediaElementSession::playbackPermitted() will be called by
HTMLMediaElement::mediaPlayerDidAddAudioTrack() when HTMLMediaElement::pause() returns false
(means the playback has already been resumed), so the request to add audio track will be rejected
due to the requiresUserGestureToPauseInPictureInPicture quirk and the video will be paused.
This patch fixes this race condition by enabling the requiresUserGestureToPauseInPictureInPicture
quirk only when the playback operation is "pause".

Reviewed by Eric Carlson.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::load):
(WebCore::HTMLMediaElement::pause):
(WebCore::HTMLMediaElement::suspendPlayback): We should use pauseInternal() instead of pause() here,
otherwise, it will be prevented by the requiresUserGestureToPauseInPictureInPicture quirk.

  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::playbackPermitted const):

  • html/MediaElementSession.h:
  • page/Quirks.cpp:

(WebCore::Quirks::requiresUserGestureToPauseInPictureInPicture const):
(WebCore::Quirks::requiresUserGestureToLoadInPictureInPicture const):

  • page/Quirks.h:
4:50 PM Changeset in webkit [271869] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

Changes to commit-log-editor should trigger webkitpy EWS tests
https://bugs.webkit.org/show_bug.cgi?id=220953

Reviewed by Jonathan Bedard.

  • CISupport/ews-build/steps.py:

(CheckPatchRelevance): Added commit-log-editor to list of relevant files for webkitpy ews.

  • CISupport/ews-build/steps_unittest.py: Improved unit-test to check for various file-names.
4:36 PM Changeset in webkit [271868] by Devin Rousso
  • 3 edits in trunk/Source/WebKit

[iOS] improve support for sequential scribble interactions that involving different inputs
https://bugs.webkit.org/show_bug.cgi?id=220933
<rdar:/problem/71911346>

Reviewed by Tim Horton.

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

(-[WKContentView cleanUpInteraction]):
(-[WKContentView becomeFirstResponderForWebView]):
(-[WKContentView _zoomToRevealFocusedElement]):
(-[WKContentView _didCommitLoadForMainFrame]):
(-[WKContentView _willBeginTextInteractionInTextInputContext:]):
(-[WKContentView _didFinishTextInteractionInTextInputContext:]):
Rather than have a simple "yes/no" _textInteractionIsHappening we should keep a count of
scribble interactions (increment in willBegin* and decrement in didFinish*) so that we
don't send unnecessary/incorrect IPC to the WebProcess after the first scribble commits if
there's a second scribble in progress for another element.

4:33 PM Changeset in webkit [271867] by Jonathan Bedard
  • 18 edits
    3 moves in trunk

[run-webkit-tests] Support python layout tests
https://bugs.webkit.org/show_bug.cgi?id=220749
Tools:

<rdar://problem/73375271>

Reviewed by Alexey Proskuryakov.

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

(LayoutTestFinder._real_tests): Exclude "tools" directories.
(LayoutTestFinder._is_test_file): Special case for web socket's *_wsh.py files.
(LayoutTestFinder._is_w3c_resource_file): Exclude w3c Python files.

LayoutTests:

Reviewed by Alexey Proskuryakov.

  • html5lib/generate-test-wrappers: Copied from LayoutTests/html5lib/generate-test-wrappers.py.
  • html5lib/generate-test-wrappers.py: Removed.
  • http/conf/apache2.2-httpd.conf: Allow .py files to be run as CGI binaries.
  • http/conf/apache2.4-httpd.conf: Ditto.
  • http/conf/apache2.4-php7-httpd.conf: Ditto.
  • http/conf/archlinux-httpd.conf: Ditto.
  • http/conf/debian-httpd-2.4-php7.0.conf: Ditto.
  • http/conf/debian-httpd-2.4-php7.1.conf: Ditto.
  • http/conf/debian-httpd-2.4-php7.2.conf: Ditto.
  • http/conf/debian-httpd-2.4-php7.3.conf: Ditto.
  • http/conf/debian-httpd-2.4-php7.4.conf: Ditto.
  • http/conf/fedora-httpd-2.2.conf: Ditto.
  • http/conf/fedora-httpd-2.4-php7.conf: Ditto.
  • http/conf/fedora-httpd-2.4.conf: Ditto.
  • http/conf/flatpak-httpd.conf: Ditto.
  • http/conf/win-httpd-2.4-php5.conf: Ditto.
  • http/conf/win-httpd-2.4-php7.conf: Ditto.
  • media/track/opera/track/webvtt/parsing-cue-data/buildtests: Copied from LayoutTests/media/track/opera/track/webvtt/parsing-cue-data/buildtests.py.
  • media/track/opera/track/webvtt/parsing-cue-data/buildtests.py: Removed.
  • webgl/generate-webgl-tests: Copied from LayoutTests/webgl/generate-webgl-tests.py.
  • webgl/generate-webgl-tests.py: Removed.
3:32 PM Changeset in webkit [271866] by weinig@apple.com
  • 6 edits in trunk

Support percentages when parsing color(srgb ...) and color(display-p3 ...) per-spec
https://bugs.webkit.org/show_bug.cgi?id=220940

Reviewed by Simon Fraser.

Add support for using percentages when using the color(srgb ) and color(display-p3 ) syntax. Also
fix color(lab ) to allow elliding parameters and defaulting them to 0 as per-spec.

Source/WebCore:

Unfails some WPT tests and adds additional parsing tests for lab to fast/css/parsing-lab-colors.html

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::parseColorFunctionForSRGBOrDisplayP3Parameters):
(WebCore::CSSPropertyParserHelpers::parseColorFunctionForLabParameters):

LayoutTests:

  • TestExpectations:
  • fast/css/parsing-lab-colors-expected.txt:
  • fast/css/parsing-lab-colors.html:
3:14 PM Changeset in webkit [271865] by Ryan Haddad
  • 2 edits in trunk/Tools

Unreviewed, reverting r271805.

Appears to have broken generation of changed files/functions
in commit logs

Reverted changeset:

"The generated commit message have a directory label at the
first line rather than the bug's title if ChangeLogs have
different bug titles"
https://bugs.webkit.org/show_bug.cgi?id=220822
https://trac.webkit.org/changeset/271805

2:59 PM Changeset in webkit [271864] by achristensen@apple.com
  • 2 edits in trunk/Tools

ASSERTION FAILED: This HTTPServer does not know how to respond to a request for /Ahem.svg
https://bugs.webkit.org/show_bug.cgi?id=220949

  • TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm:

(TEST):
A path in the test I added in r271770 was missing a / at the beginning of a path.
It passes before and after this change, but it doesn't assert after it.

2:57 PM Changeset in webkit [271863] by Alan Coon
  • 2 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r271753. rdar://problem/73586655

[WebAuthn] Should only check default browsers for the Modern WebAuthn
https://bugs.webkit.org/show_bug.cgi?id=220840
<rdar://problem/73375937>

Reviewed by Brent Fulgham.

  • WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp: (WebKit::WebAuthenticatorCoordinator::makeCredential): (WebKit::WebAuthenticatorCoordinator::getAssertion): (WebKit::WebAuthenticatorCoordinator::isUserVerifyingPlatformAuthenticatorAvailable):

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

2:57 PM Changeset in webkit [271862] by Alan Coon
  • 3 edits
    2 adds in branches/safari-611-branch

Cherry-pick r271531. rdar://problem/73586664

Playback fails at marketwatch.com
https://bugs.webkit.org/show_bug.cgi?id=220646
<rdar://72950166>

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Test: media/media-play-promise-reject-play-notallowed-audio.html

When audio playback is blocked by settings, the HTMLMediaElement must load its source
media's metadata in order to determine whether the media should be allowed to play without a
user gesture. If a play promise is pending, the expectation is that those promises will
reject with a NotAllowedError to indicate that a user gesture is needed. However, by calling
pauseInternal() to block (possibly) existing playback, this causes those promises to be
rejected with an AbortError, as if the pause() method had been called. Call
scheduleRejectPendingPlayPromises() with NotAllowedError to ensure the correct error is used
to reject.

Drive-by fix: no reason to dispatch and call rejectPendingPlayPromises() or
resolvePendingPlayPromises() if there are no promises to reject or resolve, and not calling
these methods makes the logs less noisy.

  • html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::scheduleResolvePendingPlayPromises): (WebCore::HTMLMediaElement::scheduleRejectPendingPlayPromises): (WebCore::HTMLMediaElement::setVolume): (WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack): (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): (WebCore::HTMLMediaElement::updateShouldPlay):

LayoutTests:

  • media/media-play-promise-reject-play-notallowed-audio-expected.txt: Added.
  • media/media-play-promise-reject-play-notallowed-audio.html: Added.

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

2:51 PM Changeset in webkit [271861] by Aditya Keerthi
  • 5 edits
    2 adds in trunk

[iOS] Obscured elements should not be focusable using the accessory bar
https://bugs.webkit.org/show_bug.cgi?id=220929
<rdar://problem/73239409>

Reviewed by Tim Horton.

Source/WebCore:

  • rendering/HitTestResult.h:

Export function so it can be called from WebKit layer.

Source/WebKit:
Currently, assistable elements hidden behind unassistable elements can
be focused using the next/previous buttons on the accessory bar. This
behavior is undesirable since users cannot see the focused element, but
are still presented UI to enter information into the element.

While the current behavior has been longstanding, its undesirability was
exposed after r269059, which made it possible to use the accessory bar
to focus elements across focusable scopes. As a result, it became possible
to focus a hidden input field on appleid.apple.com using the accessory bar.
Note that the hidden field is inside a subframe, which was previously
excluded from accessory bar next/previous operations. However, the same
bug would still exist even if the field was not inside a subframe, which
means that r269059 is not the root cause of the issue, but simply exposed
a larger underlying problem.

To prevent obscured elements from being focusable using the accessory bar,
we now use hit testing to determine whether or not an element is obscured,
before considering the element "assistable".

Test: fast/forms/ios/accessory-bar-navigation-obscured-input.html

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::isObscuredElement):

An element is considered obscured if a hit test at its center position
relative to the main document targets a different element.

(WebKit::nextAssistableElement):

Obscured elements should not be assistable.

LayoutTests:

  • fast/forms/ios/accessory-bar-navigation-obscured-input-expected.txt: Added.
  • fast/forms/ios/accessory-bar-navigation-obscured-input.html: Added.
2:39 PM Changeset in webkit [271860] by pvollan@apple.com
  • 7 edits in trunk/Source/WebKit

[macOS] Create extension to Metal compiler service based on GPUP flags
https://bugs.webkit.org/show_bug.cgi?id=220931
<rdar://problem/73574476>

Reviewed by Brent Fulgham.

Depending on which GPUP settings are enabled, an extension to the Metal compiler service should be created.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • Shared/WebPageCreationParameters.cpp:

(WebKit::WebPageCreationParameters::encode const):
(WebKit::WebPageCreationParameters::decode):

  • Shared/WebPageCreationParameters.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::gpuMachServices):
(WebKit::WebPageProxy::creationParameters):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_limitsNavigationsToAppBoundDomains):

  • WebProcess/com.apple.WebProcess.sb.in:
2:24 PM Changeset in webkit [271859] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

[iOS] imported/w3c/web-platform-tests/css/css-color/system-color-compute.html is failing
https://bugs.webkit.org/show_bug.cgi?id=220947

Unreviewed test gardening.

  • platform/ios/TestExpectations: Mark test as failing.
2:13 PM Changeset in webkit [271858] by Alan Coon
  • 8 edits in branches/safari-611-branch

Cherry-pick r271799. rdar://problem/73581832

PCM: Use different well-known locations for triggering and reporting attribution
https://bugs.webkit.org/show_bug.cgi?id=220902
<rdar://problem/73550632>

Reviewed by Brent Fulgham.

The discussion in W3C Privacy CG concluded that we should use distinct
well-known URL paths for websites triggering attribution and for the
browser reporting attribution
(https://github.com/privacycg/private-click-measurement/issues/59).

This patch changes the one location to these two:
/.well-known/private-click-measurement/trigger-attribution
/.well-known/private-click-measurement/report-attribution

Source/WebCore:

Existing tests updated.

  • loader/PrivateClickMeasurement.cpp: (WebCore::PrivateClickMeasurement::parseAttributionRequest): (WebCore::PrivateClickMeasurement::reportURL const):

Tools:

  • TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp: (TestWebKitAPI::TEST):
  • TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm: (TestWebKitAPI::TEST):

LayoutTests:

  • http/tests/privateClickMeasurement/resources/redirectToConversion.php:
  • http/tests/privateClickMeasurement/resources/redirectToConversionOnIPAddress.php:

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

2:13 PM Changeset in webkit [271857] by Alan Coon
  • 3 edits
    2 adds in branches/safari-611-branch

Cherry-pick r271618. rdar://problem/73477509

REGRESSION(r266695) Range control with custom track width sized incorrectly
https://bugs.webkit.org/show_bug.cgi?id=220608

Reviewed by Zalan Bujtas.

Source/WebCore:

Test: fast/forms/range/input-range-sizing-fixed-size.html

In r266695 we modified the way min-{width|height}: auto was computed for flexbox elements. That broke the sizing
of input range controls that were working under the assumption that min-{width|height} was 0. We have to force it
in the UA CSS in order to keep the same behaviour.

  • css/html.css: (input[type="range"]::-webkit-slider-container, input[type="range"]::-webkit-media-slider-container): force min-width: 0.

LayoutTests:

New test case to verify that input range controls are sized correctly with specified widths.

  • fast/forms/range/input-range-sizing-fixed-size-expected.html: Added.
  • fast/forms/range/input-range-sizing-fixed-size.html: Added.

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

2:13 PM Changeset in webkit [271856] by Alan Coon
  • 5 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r271613. rdar://problem/73477407

[WebAuthn] Polish the new WebAuthn UI
https://bugs.webkit.org/show_bug.cgi?id=220617
<rdar://problem/73185470>

Reviewed by Brent Fulgham.

This patch does the following few things:

  1. It updates the way how the PIN error for security keys is handled.
  2. It uses the credential name to identify a credential that passed to the UI instead of the login choice object as it turns out that the UI won't return the same object at all.
  3. It delays to show the UI if the platform authenticator is involved given the platform authenticator might not contain the requested credentials. If not, we should either show an error or just requesting the security key ones.

Covered by manual tests.

  • Platform/spi/Cocoa/AuthenticationServicesCoreSPI.h: (NS_ERROR_ENUM):
  • UIProcess/WebAuthentication/Cocoa/AuthenticatorPresenterCoordinator.h:
  • UIProcess/WebAuthentication/Cocoa/AuthenticatorPresenterCoordinator.mm: (WebKit::AuthenticatorPresenterCoordinator::AuthenticatorPresenterCoordinator): (WebKit::AuthenticatorPresenterCoordinator::updatePresenter): (WebKit::AuthenticatorPresenterCoordinator::selectAssertionResponse): (WebKit::AuthenticatorPresenterCoordinator::didSelectAssertionResponse):
  • UIProcess/WebAuthentication/Cocoa/WKASCAuthorizationPresenterDelegate.mm: (-[WKASCAuthorizationPresenterDelegate authorizationPresenter:credentialRequestedForLoginChoice:authenticatedContext:completionHandler:]):

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

2:13 PM Changeset in webkit [271855] by Alan Coon
  • 3 edits in branches/safari-611-branch/Source/WebInspectorUI

Cherry-pick r271612. rdar://problem/73478355

Web Inspector: Historical Figures string should be Alternate Glyphs
https://bugs.webkit.org/show_bug.cgi?id=220731

Reviewed by BJ Burg.

Changed title for CSS property font-variant-alternates to be Alternate Glyphs.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Views/FontDetailsPanel.js: (WI.FontDetailsPanel.prototype.initialLayout):

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

2:13 PM Changeset in webkit [271854] by Alan Coon
  • 2 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r271589. rdar://problem/73477370

Apple Mail AX, VoiceOver: When composing a new email message, moving VO focus to the message body field does not bring keyboard focus along.
https://bugs.webkit.org/show_bug.cgi?id=220672
<rdar://problem/73045466>

Reviewed by Darin Adler.

The call to AccessibilityObject::setFocused to set the focus to the
scroll view needs to happen before the check for canSetFocusAttribute.

  • accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::setFocused):

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

2:13 PM Changeset in webkit [271853] by Alan Coon
  • 9 edits
    1 delete in branches/safari-611-branch

Cherry-pick r271587. rdar://problem/73477379

Fix for LayoutTests/accessibility/canvas-fallback-content.html in isolated tree mode.
https://bugs.webkit.org/show_bug.cgi?id=220644

Reviewed by Chris Fleizach.

Source/WebCore:

Tests:
accessibility/canvas-fallback-content.html
accessibility/canvas-fallback-content-2.html

  • Updates the accessibility isolated tree when the ARIA role attribute changes for a DOM element.
  • Modified tests to use Promises and retrieve accessible elements by IDs so that they work in both isolated tree mode on and off.
  • accessibility/AXLogger.cpp: (WebCore::operator<<): Added new value to the AXNotification enum.
  • accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::handleAriaRoleChanged): Updates the isolated tree when an ARIA role attribute changes. (WebCore::AXObjectCache::updateIsolatedTree): Handles the AXAriaRoleChanged notification.
  • accessibility/AXObjectCache.h:

LayoutTests:

  • accessibility/canvas-fallback-content-2-expected.txt: Removed the checks for the document.activeElement since the goal here is not to test this method.
  • accessibility/canvas-fallback-content-2.html: Retrieved the accessibility Objects by ID directly from the accessibilityController. This simplifies the code since it is not necessary to set focus to the object via the document, to then retrieve the focused accessibility element. This works for isolated tree mode on and off.
  • accessibility/canvas-fallback-content.html: Kept the focus manipulations but used Promises to make it work in both isolated mode on and off.
  • platform/win/accessibility/canvas-fallback-content-expected.txt: Deleted.
  • platform/win/TestExpectations: Skip since this test was already failing in win.

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

2:13 PM Changeset in webkit [271852] by Alan Coon
  • 2 edits in branches/safari-611-branch/Source/JavaScriptCore

Cherry-pick r271586. rdar://problem/73477459

[AppleWin 32bit] LLInt C Loop: LowLevelInterpreter.cpp(90,7): error C2653: 'WebConfig': is not a class or namespace name
https://bugs.webkit.org/show_bug.cgi?id=220405

Reviewed by Fujii Hironori.

Add a missing #if ENABLE(UNIFIED_AND_FREEZABLE_CONFIG_RECORD).

  • llint/LowLevelInterpreter.cpp:

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

2:13 PM Changeset in webkit [271851] by Alan Coon
  • 12 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r271584. rdar://problem/73473616

Optimize :hover/:active style invalidation for deep trees and descendant selectors
https://bugs.webkit.org/show_bug.cgi?id=220711

Reviewed by Zalan Bujtas.

Hover and active states are flipped for the entire ancestor chain. We compute invalidation for each flipped
element separately. If the selectors are of form ':active .descendant' then each of these invalidations needs
to traverse the whole subtree, leading to O(n2) behavior.

We really only need to traverse the descendants once, starting from the element closest to the root that changes state.

  • dom/Document.cpp: (WebCore::Document::updateHoverActiveState):

Compute the change root and pass the information to setActive/Hover.
Reorganize the function a bit to allow this, and for general readability.

  • dom/Element.cpp: (WebCore::Element::setActive): (WebCore::Element::setHovered):
  • dom/Element.h:
  • html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::setActive):
  • html/HTMLAnchorElement.h:
  • html/HTMLLabelElement.cpp: (WebCore::HTMLLabelElement::setActive): (WebCore::HTMLLabelElement::setHovered):
  • html/HTMLLabelElement.h:
  • html/shadow/SpinButtonElement.cpp: (WebCore::SpinButtonElement::setHovered):
  • html/shadow/SpinButtonElement.h:
  • style/PseudoClassChangeInvalidation.cpp: (WebCore::Style::PseudoClassChangeInvalidation::computeInvalidation):

Only include descendant traversing rulesets for the change root.

  • style/PseudoClassChangeInvalidation.h: (WebCore::Style::PseudoClassChangeInvalidation::PseudoClassChangeInvalidation):

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

2:13 PM Changeset in webkit [271850] by Alan Coon
  • 4 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r271542. rdar://problem/73477309

(REGRESSION) Playback pauses upon entering PiP via media controls on trailers.apple.com
https://bugs.webkit.org/show_bug.cgi?id=220669

Reviewed by Jer Noble.

Add a quirk to disable the "webkitendfullscreen" event when a video enters picture-in-picture
from fullscreen for the sites which cannot handle the event properly.

  • html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::enterFullscreen):
  • page/Quirks.cpp: (WebCore::Quirks::shouldDisableEndFullscreenEventWhenEnteringPictureInPictureFromFullscreenQuirk const):
  • page/Quirks.h:

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

2:13 PM Changeset in webkit [271849] by Alan Coon
  • 5 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r271537. rdar://problem/73478698

REGRESSION(r267763) Uploading zipped directories does not work on iOS
https://bugs.webkit.org/show_bug.cgi?id=220666
<rdar://problem/72940505>

Patch by Alex Christensen <achristensen@webkit.org> on 2021-01-15
Reviewed by Geoffrey Garen.

r267763 removed indexedDatabaseTempBlobDirectoryExtensionHandle with no replacement, which used to give the network process
read/write access to /tmp inside the parent process's container. This seems to have been unused for IndexedDB, but it was used
by createTemporaryZipArchive when uploading directories, such as Pages, Numbers, and Keynote documents.

Unfortunately the unit test added by r248139 is macOS-only because WKOpenPanelParameters is only available on macOS and it would
require a large and risky amount of refactoring to add SPI on iOS to test this because iOS uses WKFileUploadPanel instead.
I did manually verify that the bug is fixed using my phone, though.

  • NetworkProcess/NetworkProcessCreationParameters.cpp: (WebKit::NetworkProcessCreationParameters::encode const): (WebKit::NetworkProcessCreationParameters::decode):
  • NetworkProcess/NetworkProcessCreationParameters.h:
  • NetworkProcess/cocoa/NetworkProcessCocoa.mm: (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
  • UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::sendCreationParametersToNewProcess):

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

2:13 PM Changeset in webkit [271848] by Alan Coon
  • 5 edits in branches/safari-611-branch

Cherry-pick r271536. rdar://problem/73477501

AX: increment/decrement synthetic arrow events don't work in ARIA slider examples
https://bugs.webkit.org/show_bug.cgi?id=220626
<rdar://problem/73228924>

Reviewed by Zalan Bujtas.

Source/WebCore:

keyCode is still expected to be filled in with standard codes for arrow keys.

Updated test: accessibility/keyevents-posted-for-increment-actions.html

  • accessibility/AccessibilityNodeObject.cpp: (WebCore::AccessibilityNodeObject::postKeyboardKeysForValueChange):

LayoutTests:

  • accessibility/keyevents-posted-for-increment-actions-expected.txt:
  • accessibility/keyevents-posted-for-increment-actions.html:

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

2:12 PM Changeset in webkit [271847] by Alan Coon
  • 4 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r271530. rdar://problem/73478410

CRASH in MediaSourcePrivateAVFObjC::removeSourceBuffer()
https://bugs.webkit.org/show_bug.cgi?id=220647
<rdar://73173684>

Reviewed by Darin Adler.

In exceptional circumstances, the MediaPlayerPrivateMediaSourceAVFObjC can be destroyed before
MediaSourcePrivateAVFObjC, which leaves behind a null WeakPtr. Null check m_player before
using everywhere in MediaSourcePrivateAVFObjC.

Drive-by fix: it would be invalid to pass in a null player to MediaSourcePrivateAVFObjC::create(),
so modify that method to take a reference rather than a pointer.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load):
  • platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm: (WebCore::MediaSourcePrivateAVFObjC::create): (WebCore::MediaSourcePrivateAVFObjC::MediaSourcePrivateAVFObjC): (WebCore::MediaSourcePrivateAVFObjC::removeSourceBuffer): (WebCore::MediaSourcePrivateAVFObjC::durationChanged): (WebCore::MediaSourcePrivateAVFObjC::markEndOfStream): (WebCore::MediaSourcePrivateAVFObjC::readyState const): (WebCore::MediaSourcePrivateAVFObjC::setReadyState): (WebCore::MediaSourcePrivateAVFObjC::waitForSeekCompleted): (WebCore::MediaSourcePrivateAVFObjC::seekCompleted): (WebCore::MediaSourcePrivateAVFObjC::currentMediaTime const): (WebCore::MediaSourcePrivateAVFObjC::sourceBufferPrivateDidChangeActiveState): (WebCore::MediaSourcePrivateAVFObjC::sourceBufferKeyNeeded): (WebCore::MediaSourcePrivateAVFObjC::setSourceBufferWithSelectedVideo):

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

2:12 PM Changeset in webkit [271846] by Alan Coon
  • 2 edits in branches/safari-611-branch/Source/WebInspectorUI

Cherry-pick r271528. rdar://problem/73477082

Web Inspector: Font Details sidebar - Improve line wrapping of table row titles when space is available
https://bugs.webkit.org/show_bug.cgi?id=219997

Reviewed by Devin Rousso.

Adjust the width of the title in each row to 105px, which provides space for both Historical Figures which is
an always-present row and Optical Size (opsz) which is a registed variation axis and is used in numerous
fonts including San Francisco. This overrides the normal fixed width of these titles of 85px, which causes these
and numerous other unregistered axis names and tags to wrap their title more aggresively than is stricly
necessary.

  • UserInterface/Views/FontDetailsPanel.css: (.sidebar > .panel.details.style-font > .content .details-section > .content > .group > .row.simple > .label):

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

2:12 PM Changeset in webkit [271845] by Alan Coon
  • 3 edits
    2 adds in branches/safari-611-branch

Cherry-pick r271516. rdar://problem/73477422

[LFC][Integration] REGRESSION (r270123) facebook.com birthday dropdown do not work when creating new account
https://bugs.webkit.org/show_bug.cgi?id=220638
<rdar://problem/73175259>

Reviewed by Simon Fraser.

Source/WebCore:

This patch fixes incorrect hittest results when the hittest target

  1. participates in the modern line layout and
  2. prior to the hittesting its style changes in a way that it does not trigger layout. e.g. <div><div id=inner style="display: inline-block; visibility: hidden"><div></div> <script>inner.style.visibility = "visible"</script>

Any subsequent hittest will miss the inner <div> as the loop in LineLayout::hitTest() early returns due to stale style information.
The reason why we end up with stale style is because we only update the layout box's style when the style diff >= StyleDifference::Layout () in RenderBox::styleDidChange.

Test: fast/inline-block/hittest-fails-on-inline-block-with-visibility-change.html

  • rendering/RenderBox.cpp: (WebCore::RenderBox::styleDidChange):

LayoutTests:

  • fast/inline-block/hittest-fails-on-inline-block-with-visibility-change-expected.txt: Added.
  • fast/inline-block/hittest-fails-on-inline-block-with-visibility-change.html: Added.

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

2:12 PM Changeset in webkit [271844] by Alan Coon
  • 2 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r271486. rdar://problem/73478688

Use callOnMainRunLoop in MediaPermissionUtilities
https://bugs.webkit.org/show_bug.cgi?id=220616
<rdar://problem/73002655>

Reviewed by Chris Dumez.

This ensures that we are in main thread and not in web thread.

  • UIProcess/Cocoa/MediaPermissionUtilities.mm: (WebKit::requestAVCaptureAccessForType): (WebKit::requestSpeechRecognitionAccess):

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

2:12 PM Changeset in webkit [271843] by Alan Coon
  • 2 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r271476. rdar://problem/73478439

Crash ASSERT in AccessibilityRenderObject::textUnderElement during AXIsolatedObject initialization.
https://bugs.webkit.org/show_bug.cgi?id=220446

Reviewed by Chris Fleizach.

AXIsolatedObject methods that need to forward the call to the associated
AXObject on the main thread, should call the updateBackingStore method
on the AXObject.
This fixes the issue with AccessibilityRenderObject::textUnderElement
shown in the stack trace.

  • accessibility/isolatedtree/AXIsolatedObject.cpp: (WebCore::AXIsolatedObject::associatedAXObject const):

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

2:12 PM Changeset in webkit [271842] by Alan Coon
  • 5 edits in branches/safari-611-branch/Source

Cherry-pick r271473. rdar://problem/73478401

PCM: Output logs by default, including to Web Inspector
https://bugs.webkit.org/show_bug.cgi?id=220596
<rdar://problem/73159180>

Reviewed by Brent Fulgham.

This change turns on PCM output to Web Inspector and logs
Source/WebCore:

by default. In the case of WebCore::PrivateClickMeasurement,
this means we no longer need the debugModeEnabled()
convenience function.

  • loader/PrivateClickMeasurement.cpp: (WebCore::PrivateClickMeasurement::parseAttributionRequest): (WebCore::PrivateClickMeasurement::debugModeEnabled): Deleted.
  • loader/PrivateClickMeasurement.h:

Source/WebKit:

by default. In some of the cases, the syslog output was
deleted since it doesn't make sense to log those messages
now that we have output in Web Inspector.

  • NetworkProcess/PrivateClickMeasurementManager.cpp: (WebKit::PrivateClickMeasurementManager::storeUnattributed): (WebKit::PrivateClickMeasurementManager::handleAttribution): (WebKit::PrivateClickMeasurementManager::attribute): (WebKit::PrivateClickMeasurementManager::fireConversionRequest):

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

2:12 PM Changeset in webkit [271841] by Alan Coon
  • 14 edits in branches/safari-611-branch

Cherry-pick r271471. rdar://problem/73477068

Source/WebCore:
[HANG] 496ms to 1360ms in WebCore::AVAudioSessionCaptureDeviceManager::refreshAudioCaptureDevices()
https://bugs.webkit.org/show_bug.cgi?id=220471

Reviewed by Youenn Fablet.

Refactor RealtimeMediaSourceCenter::getMediaStreamDevices() to take a completion handler, rather than
synchronously return a Vector of CaptureDevices. This also requires all CaptureDeviceManager subclasses
to support taking a completion handler themselves. By default, all CaptureDeviceManagers will support
the CompletionHandler path by just synchronously calling the completion handler with the existing
synchronous method. But for AVAudioSessionCaptureDeviceManager, override that default implementation by
activating the AVAudioSession on a background thread, and querying that session's inputs on a background
thread as well.

  • platform/mediastream/CaptureDeviceManager.h:
  • platform/mediastream/RealtimeMediaSourceCenter.cpp: (WebCore::RealtimeMediaSourceCenter::getMediaStreamDevices):
  • platform/mediastream/RealtimeMediaSourceCenter.h:
  • platform/mediastream/RealtimeMediaSourceFactory.h: (WebCore::AudioCaptureFactory::getSpeakerDevices const):
  • platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.h:
  • platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm: (WebCore::AVAudioSessionCaptureDeviceManager::audioSessionDeviceWithUID): (WebCore::AVAudioSessionCaptureDeviceManager::scheduleUpdateCaptureDevices): (WebCore::AVAudioSessionCaptureDeviceManager::refreshAudioCaptureDevices): (WebCore::AVAudioSessionCaptureDeviceManager::getCaptureDevices): (WebCore::AVAudioSessionCaptureDeviceManager::activateAudioSession): (WebCore::AVAudioSessionCaptureDeviceManager::retrieveAudioSessionCaptureDevices const): (WebCore::AVAudioSessionCaptureDeviceManager::setAudioCaptureDevices): (WebCore::AVAudioSessionCaptureDeviceManager::audioSessionCaptureDevices): Deleted.

Source/WebKit:
[HANG] 496ms to 1360ms in WebCore::AVAudioSessionCaptureDeviceManager::refreshAudioCaptureDevices()
https://bugs.webkit.org/show_bug.cgi?id=220471

Reviewed by Youenn Fablet.

Use the completion-handler version of RealtimeMediaSourceCenter::getMediaStreamDevices().

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp: (WebKit::UserMediaPermissionRequestManagerProxy::computeFilteredDeviceList): (WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
  • UIProcess/UserMediaPermissionRequestManagerProxy.h:
  • UIProcess/UserMediaProcessManager.cpp: (WebKit::UserMediaProcessManager::updateCaptureDevices): (WebKit::UserMediaProcessManager::beginMonitoringCaptureDevices):
  • UIProcess/UserMediaProcessManager.h:

LayoutTests:
[Cocoa] Support key rotation with HLS-backed encrypted media streams
https://bugs.webkit.org/show_bug.cgi?id=220493
<rdar://68227709>

Reviewed by Youenn Fablet.

Fix a broken layout test; the test enumerates devices, then uses the deviceIds returned to generate
constraints for a call to getUserMedia(). However, it assumes all devices will either be of kind
'audioinput' or 'videoinput'. If an 'audiooutput' device is returned (as the MockRealtimeMediaSourceCenter
does), then the test turns that into a video capture constraint, which fails.

  • fast/mediastream/get-user-media-device-id.html:

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

2:12 PM Changeset in webkit [271840] by Alan Coon
  • 2 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r271467. rdar://problem/73477045

Crash at SOAuthorizationSession::dismissViewController
https://bugs.webkit.org/show_bug.cgi?id=220482
<rdar://problem/72375494>

Reviewed by Darin Adler.

A crash report suggests that SOAuthorizationSession::dismissViewController could crash at evaluating m_page.
This could only happen if the SOAuthorizationSession object is freed. The stack trace starts with callbacks
from NSNotificationCenter, which capture a RefPtr of the SOAuthorizationSession object and should guarantee
the lifetime of the object. So it contradicts the crash report.

One of the possible explanations is that the RefPtr is somehow over-released within NSNotificationCenter since
it's not thread-safe. To fix that, the RefPtr can be made thread-safe.

No tests.

  • UIProcess/Cocoa/SOAuthorization/SOAuthorizationSession.mm: (WebKit::SOAuthorizationSession::dismissViewController):

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

2:12 PM Changeset in webkit [271839] by Alan Coon
  • 3 edits in branches/safari-611-branch/LayoutTests

Cherry-pick r271453. rdar://problem/73477471

Fix for LayoutTests/accessibility/mac/details-summary.html in isolated tree mode.
https://bugs.webkit.org/show_bug.cgi?id=220597

Reviewed by Chris Fleizach.

  • Use Promises to wait for the expanded state change.
  • Added a comment to clarify why it is necessary to fetch a new accessible object by ID every time after setting the AXExpanded attribute for <details> elements.
  • accessibility/mac/details-summary-expected.txt: The order in which the notifications come through changed.
  • accessibility/mac/details-summary.html:

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

2:12 PM Changeset in webkit [271838] by Alan Coon
  • 4 edits in branches/safari-611-branch

Cherry-pick r271436. rdar://problem/73477448

REGRESSION(r268666) Incorrect vertical position inside grid items with padding
https://bugs.webkit.org/show_bug.cgi?id=220524

Reviewed by Manuel Rego Casasnovas.

Source/WebCore:

In r268666 we sanitized and renamed the old overrideLogicalXXX sizes so that they store what they say.
There was a mistake in one of those renames, in availableLogicalHeightForPercentageComputation() we were
returning the border box size for the case of grid items. That's clearly wrong as we should return the
content box size. That's why adding a padding to a grid item was causing their children to wrongly
evaluate the available logical height.

This fixes a WPT that was marked as failure.

  • rendering/RenderBlock.cpp: (WebCore::RenderBlock::availableLogicalHeightForPercentageComputation const): Return the overridingContentLogicalHeight instead of the overridingLogicalHeight.

LayoutTests:

  • TestExpectations: remove web-platform-tests/css/css-grid/grid-items/percentage-size-subitems-001.html from the list of image failures.

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

2:12 PM Changeset in webkit [271837] by Alan Coon
  • 7 edits
    2 adds in branches/safari-611-branch

Cherry-pick r271435. rdar://problem/73477090

REGRESSION (r267571): black line appears upon navigating back from apple.com shopping bag
https://bugs.webkit.org/show_bug.cgi?id=220550
<rdar://problem/72459816>

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Mark two additional PASS results for ::marker tests.

  • web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-in-animation-expected.txt:

Source/WebCore:

Test: webanimations/no-transition-on-after-pseudo-element-upon-creation.html

In r267571, we refactored the code to use Styleable instead of Element in pseudo-element resolution code. While there
should have been no behavior change, there was a change in Style::TreeResolver::createAnimatedElementUpdate() that
mistakenly introduced one.

In order to get the "before" style to be used to consider CSS Transitions, we used to simply call Element::renderOrDisplayContentsStyle()
on the element provided to createAnimatedElementUpdate(), which would be either an Element or a PseudoElement in the
case of ::before and ::after. When we switched to using Styleable, we made a change where we'd call renderOrDisplayContentsStyle()
on the Styleable's element, if it didn't a pseudo-element, or try to get the matching PseudoElement in the case of
::before and ::after. However, if we got a nullptr RenderStyle in the PseudoElement case, we'd fall back to using the
style from the host element.

This yielded this regression on apple.com where a transition is started on an ::after pseudo-element which has an
"opacity: 0" style and a "transition" style set for "opacity". The host element is created first, and later the
::after pseudo-element added. While it should not consider starting a transition in this case since upon creation
there is no existing style to work with, it did start a transition since it would use the host element's style
and see "opacity: 1" to start a transition.

In this patch, we address the FIXME we'd left behind in TreeResolver::createAnimatedElementUpdate() and make
Element::renderOrDisplayContentsStyle() take in a PseudoId, defaulting to PseudoId::None. In case we have a
pseudo-element, we first try to call renderOrDisplayContentsStyle() on the matching PseudoElement if it exists,
or we return the existing computed style for this pseudo-element.

If there is no existing computed style, we return nullptr, which means that in the apple.com scenario, no transition
is started because we correctly don't have a "before" style to work within upon creation of the ::after pseudo-element.

  • dom/Element.cpp: (WebCore::beforeOrAfterPseudoElement): (WebCore::Element::renderOrDisplayContentsStyle const):
  • dom/Element.h:
  • style/StyleTreeResolver.cpp: (WebCore::Style::TreeResolver::createAnimatedElementUpdate):

LayoutTests:

Add a test that checks that adding a pseudo-element for an existing host element does not use
the host element's style to consider starting a transition.

  • webanimations/no-transition-on-after-pseudo-element-upon-creation-expected.html: Added.
  • webanimations/no-transition-on-after-pseudo-element-upon-creation.html: Added.

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

2:12 PM Changeset in webkit [271836] by Alan Coon
  • 2 edits in branches/safari-611-branch/LayoutTests/imported/w3c

Cherry-pick r271434. rdar://problem/73478450

Use promise_test in WPT beacon/beacon-common.sub.js instead of async_test
https://bugs.webkit.org/show_bug.cgi?id=220541
<rdar://problem/72940308>

Reviewed by Geoffrey Garen.

Use promise_test to limit the number of requests sent in parallel.
This helps the server responds properly.

  • web-platform-tests/beacon/beacon-common.sub.js: (runTests):

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

2:12 PM Changeset in webkit [271835] by Alan Coon
  • 8 edits
    1 add in branches/safari-611-branch

Cherry-pick r271422. rdar://problem/73477541

[JSC] Bypass OperationPtrTagging for JITCage verification for CallDOMGetter
https://bugs.webkit.org/show_bug.cgi?id=220564

Reviewed by Saam Barati.

JSTests:

  • stress/domjit-getter2.js: Added. (shouldBe): (access):

Source/JavaScriptCore:

CustomAccessorPtrTag functions are not registered ones for JITCage since we are using C++ trampoline to invoke them.
However, we do not want to use this trampoline in x64 due to performance issue. So we would like to call these
functions directly from JIT while they are not registered (And this is OK in JITCage since they are called from trampoline).
In this patch we bypass OperationPtrTagging by using WTF::tagNativeCodePtrImpl directly for non JITCage case.

  • dfg/DFGJITCompiler.h: (JSC::DFG::JITCompiler::appendOperationCall):
  • dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::compileCallDOMGetter):
  • dfg/DFGSpeculativeJIT.h: (JSC::DFG::SpeculativeJIT::appendOperationCall):
  • ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileCallDOMGetter): (JSC::FTL::DFG::LowerDFGToB3::vmCall):
  • ftl/FTLOutput.h: (JSC::FTL::Output::operation):
  • tools/JSDollarVM.cpp:

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

2:11 PM Changeset in webkit [271834] by Alan Coon
  • 12 edits
    2 adds in branches/safari-611-branch

Cherry-pick r271416. rdar://problem/73478416

AX: Implement aria-braillelabel and aria-brailleroledescription
https://bugs.webkit.org/show_bug.cgi?id=220516
<rdar://problem/73004715>

Reviewed by Zalan Bujtas.

Source/WebCore:

Add support for new ARIA attributes.

Test: accessibility/mac/braille-label-role.html

  • accessibility/AccessibilityObject.h:
  • accessibility/AccessibilityObjectInterface.h:
  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: (-[WebAccessibilityObjectWrapper accessibilityBrailleLabel]): (-[WebAccessibilityObjectWrapper accessibilityBrailleRoleDescription]):
  • accessibility/isolatedtree/AXIsolatedObject.cpp: (WebCore::AXIsolatedObject::initializeAttributeData):
  • accessibility/isolatedtree/AXIsolatedObject.h:
  • accessibility/isolatedtree/AXIsolatedTree.h:
  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm: (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
  • html/HTMLAttributeNames.in:

LayoutTests:

  • accessibility/braille-label-role-expected.txt: Added.
  • accessibility/braille-label-role.html: Added.

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

2:11 PM Changeset in webkit [271833] by Alan Coon
  • 5 edits in branches/safari-611-branch/Source/WebInspectorUI

Cherry-pick r271410. rdar://problem/73478423

Web Inspector: Remove experimental setting and enable Font details sidebar
https://bugs.webkit.org/show_bug.cgi?id=220438

Reviewed by Devin Rousso.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Base/Setting.js:
  • UserInterface/Views/ElementsTabContentView.js: (WI.ElementsTabContentView):
  • UserInterface/Views/SettingsTabContentView.js: (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):

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

2:11 PM Changeset in webkit [271832] by Alan Coon
  • 4 edits in branches/safari-611-branch/LayoutTests

Cherry-pick r271407. rdar://problem/73477392

REGRESSION (r271341): media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=220530

Reviewed by Eric Carlson.

Similar to r271377, this patch fixes a layout test failure/timeout by enabling "MockVideoPresentationMode"
and sending a request to enter/exit fullscreen after the current mode change is completed.

  • media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline-expected.txt:
  • media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline.html:
  • platform/mac/TestExpectations:

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

2:11 PM Changeset in webkit [271831] by Alan Coon
  • 2 edits in branches/safari-611-branch/Tools

Cherry-pick r271380. rdar://problem/73477386

ASSERTION FAILED: !event
event.type == NSEventTypeLeftMouseDown event.type == NSEventTypeRightMouseDown event.type == NSEventTypeOtherMouseDown

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

Reviewed by Tim Horton.

Fix the assertion by synthesizing a "mouse down" event instead of "mouse entered".

  • TestWebKitAPI/Tests/mac/AcceptsFirstMouse.mm: (TestWebKitAPI::TEST):

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

2:11 PM Changeset in webkit [271830] by Alan Coon
  • 4 edits in branches/safari-611-branch/Source

Cherry-pick r271417. rdar://problem/73376369

[macOS] Reset user directory suffix before getting sandbox directory
https://bugs.webkit.org/show_bug.cgi?id=220358
<rdar://problem/57616019>

Reviewed by Alexey Proskuryakov.

Source/WebCore/PAL:

Declare functions to get and set user directory suffix.

  • pal/spi/cocoa/CoreServicesSPI.h:

Source/WebKit:

Reset the user directory suffix before getting the sandbox data vault directory with confstr. We do not want to include the user
directory suffix, since the sandbox data vault will then end up inside the host process' cache folder, which is undesirable.
Also, creating the data vault directory with confstr can fail under some circumstances if the user directory suffix is not empty.
This patch also changes how we next set the user directory suffix for the process. Instead of setting the environment variable
DIRHELPER_USER_DIR_SUFFIX, we can use the SPI _set_user_dir_suffix. The behavior should be identical, but I believe it is better
to use SPI for this.

  • Shared/mac/AuxiliaryProcessMac.mm: (WebKit::initializeSandboxParameters): (WebKit::AuxiliaryProcess::initializeSandbox):

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

2:11 PM Changeset in webkit [271829] by Alan Coon
  • 2 edits in branches/safari-611-branch/Source/JavaScriptCore

Cherry-pick r271544. rdar://problem/73471591

[JSC] Clean up DFGPreciseLocalClobberize to avoid duplicate code
https://bugs.webkit.org/show_bug.cgi?id=220670

Reviewed by Filip Pizlo.

This patch cleans up DFGPreciseLocalClobberize by extracting code to lambda to remove duplicate code.

  • dfg/DFGPreciseLocalClobberize.h: (JSC::DFG::PreciseLocalClobberizeAdaptor::readTop):

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

2:11 PM Changeset in webkit [271828] by Alan Coon
  • 9 edits
    2 adds in branches/safari-611-branch

Cherry-pick r271543. rdar://problem/73469576

[iOS] Emoji keyboard covers text field on twitter.com/messages
https://bugs.webkit.org/show_bug.cgi?id=220664
<rdar://problem/68400471>

Reviewed by Devin Rousso.

Source/WebKit:

After iOS 14, the emoji software keyboard layout now includes a search field that can be used to filter for
specific emojis. This slightly increases the overall height of the software keyboard when the emoji keyplane is
active; in turn, this means that if the selection or caret is positioned right above the top of the software
keyboard when the normal (alphabetic) keyplane is active, switching to the emoji keyplane will cause the
keyboard to overlap the selection, making it difficult to see inserted text.

To address this, add a mechanism to detect when a change in the bounds of the software keyboard causes a visible
selection or caret rect to become overlapped, and react by scrolling to keep the selection visible. This has the
effect of fixing this bug by scrolling to reveal the text field after switching to the emoji keyboard, but it
also has the effect of scrolling to keep the selection visible after detaching a connected hardware keyboard,
in the case where it would've otherwise been overlapped by the (much taller) software keyboard that appears.

Test: editing/selection/ios/scroll-to-reveal-selection-when-showing-software-keyboard.html

  • UIProcess/API/ios/WKWebViewIOS.h:
  • UIProcess/API/ios/WKWebViewIOS.mm: (-[WKWebView _selectionRectIsFullyVisibleAndNonEmpty]):

Add an internal helper to check whether the selection bounds are fully visible.

(-[WKWebView _scrollToRevealSelectionIfNeeded]):
(-[WKWebView _zoomToFocusRect:selectionRect:fontSize:minimumScale:maximumScale:allowScaling:forceScroll:]):
(-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):

In the case where changing input view bounds causes a previously visible selection to become overlapped, call
-_scrollToRevealSelectionIfNeeded to make the selection visible again.

(-[WKWebView _zoomToFocusRect:selectionRect:insideFixed:fontSize:minimumScale:maximumScale:allowScaling:forceScroll:]): Deleted.

  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/WKContentView.h:
  • UIProcess/ios/WKContentView.mm: (-[WKContentView _zoomToFocusRect:selectionRect:fontSize:minimumScale:maximumScale:allowScaling:forceScroll:]): (-[WKContentView _zoomToFocusRect:selectionRect:insideFixed:fontSize:minimumScale:maximumScale:allowScaling:forceScroll:]): Deleted.

Drive-by fix: remove the unused insideFixed: parameter from this adjacent method.

  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView rectToRevealWhenZoomingToFocusedElement]): (-[WKContentView _zoomToRevealFocusedElement]): (rectToRevealWhenZoomingToFocusedElement): Deleted.

Pull this into the -rectToRevealWhenZoomingToFocusedElement internal helper method instead, and use the new
selectionBoundingRectInRootViewCoordinates method below.

  • UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::selectionBoundingRectInRootViewCoordinates const):

Pull out code to compute the selection bounding rect (for both ranged and caret selections) into a method on
WebPageProxy, so that it can be used in WKContentView and WKWebView.

LayoutTests:

Add a test to verify that after disconnecting a hardware keyboard and showing the software keyboard, we scroll
up to reveal the caret in a focused text field.

  • editing/selection/ios/scroll-to-reveal-selection-when-showing-software-keyboard-expected.txt: Added.
  • editing/selection/ios/scroll-to-reveal-selection-when-showing-software-keyboard.html: Added.

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

2:11 PM Changeset in webkit [271827] by Alan Coon
  • 11 edits
    6 adds in branches/safari-611-branch

Cherry-pick r271524. rdar://problem/73473371

Reversed transform animation not applied alongside other transform animations
https://bugs.webkit.org/show_bug.cgi?id=218655
<rdar://problem/71116284>

Reviewed by Simon Fraser.

Source/WebCore:

Tests: webanimations/combining-transform-animations-with-different-acceleration-capabilities-2.html

webanimations/combining-transform-animations-with-different-acceleration-capabilities-3.html
webanimations/combining-transform-animations-with-different-acceleration-capabilities.html

While, in theory, animations for a transform-related CSS property (translate, rotate, scale and transform)
can be accelerated, there are various reasons why it might not, in fact, run accelerated.

One example is that the timing function is not something we can translate in terms Core Animation can
understand, such as the steps() timing function. In this case, the KeyframeEffect itself is aware of
the limitation and the method KeyframeEffect::canBeAccelerated() returns false.

Another example is that the playback rate of the animation is not 1, which we currently don't support for
Core Animation animations (see bug 211839). In this case, GraphicsLayerCA is where the impossibility to
run an animation accelerated is determined.

While we support running transform-related animations with or without acceleration, one thing we cannot
support is, for the same element, running some transform-related animations with acceleration, and some
without.

Thus, regardless of where we determine that a transform-related animation cannot be accelerated, we need
to send this information up to the KeyframeEffectStack in which this animation's effect belongs to make
sure that any other transform-related animation that may already be running accelerated no longer does
and continues running without acceleration.

There are two locations where we determine that a transform-related animation cannot be accelerated:

  1. in DocumentTimeline::applyPendingAcceleratedAnimations() under which we start, update or stop accelerated animations that have been invalidated since the last page rendering,
  2. in KeyframeEffect::updateAcceleratedActions() which is called for each page rendering, including animations that cannot be accelerated.

In the first case, we catch situations where an animation that could have been accelerated but failed
to be started due to the internal logic of GraphicsLayerCA. We use the new KeyframeEffect method
applyPendingAcceleratedActions() return value to determine this, and for each effect where the result
indicates that a transform-related animation could not be accelerated, we add the KeyframeEffectStack
to which it belongs and, once we're done with updating all effects, call the new
stopAcceleratingTransformRelatedProperties() method on the keyframe effect stack.

In the second case, we catch situations where an animation is known to not be able to run accelerated
even without involving GraphicsLayerCA. We check whether the animation targets a transform-related
property and if it is active, and if so call stopAcceleratingTransformRelatedProperties()
on the keyframe effect stack there as well.

When KeyframeEffectStack::stopAcceleratingTransformRelatedProperties() is called, we go
through all the registered effects and call stopAcceleratingTransformRelatedProperties(). This new
KeyframeEffect method will either add a pending accelerated action to stop the accelerated animation,
or if we're currently apply accelerated actions (ie. during DocumentTimeline::applyPendingAcceleratedAnimations()),
we stop the accelerated animation right away.

In both cases we know not to try running this animation again with acceleration by setting m_runningAccelerated
to RunningAccelerated::No.

  • animation/DocumentTimeline.cpp: (WebCore::DocumentTimeline::applyPendingAcceleratedAnimations):
  • animation/KeyframeEffect.cpp: (WebCore::KeyframeEffect::isTargetingTransformRelatedProperty const): (WebCore::KeyframeEffect::isRunningAcceleratedTransformRelatedAnimation const): (WebCore::KeyframeEffect::updateAcceleratedActions): (WebCore::KeyframeEffect::applyPendingAcceleratedActions): (WebCore::KeyframeEffect::stopAcceleratingTransformRelatedProperties):
  • animation/KeyframeEffect.h:
  • animation/KeyframeEffectStack.cpp: (WebCore::KeyframeEffectStack::stopAcceleratingTransformRelatedProperties):
  • animation/KeyframeEffectStack.h:
  • animation/WebAnimation.cpp: (WebCore::WebAnimation::applyPendingAcceleratedActions): Deleted.
  • animation/WebAnimation.h:
  • animation/WebAnimationTypes.h:

LayoutTests:

Add new tests that start a transform-related animation that runs accelerated, then add another
transform-related animation that either initially or eventually is not accelerated. In all cases,
we check that once the second animation is no longer accelerated that the first animation is also
no longer accelerated.

  • platform/win/TestExpectations:
  • webanimations/combining-transform-animations-with-different-acceleration-capabilities-2-expected.txt: Added.
  • webanimations/combining-transform-animations-with-different-acceleration-capabilities-2.html: Added.
  • webanimations/combining-transform-animations-with-different-acceleration-capabilities-3-expected.txt: Added.
  • webanimations/combining-transform-animations-with-different-acceleration-capabilities-3.html: Added.
  • webanimations/combining-transform-animations-with-different-acceleration-capabilities-expected.txt: Added.
  • webanimations/combining-transform-animations-with-different-acceleration-capabilities.html: Added.

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

2:11 PM Changeset in webkit [271826] by Alan Coon
  • 4 edits in branches/safari-611-branch/Source

Cherry-pick r271497. rdar://problem/73469623

Exceptions thrown when invoking a <select> on an iPhone-idiom app running on macOS
https://bugs.webkit.org/show_bug.cgi?id=220628
<rdar://problem/70546547>

Reviewed by Wenson Hsieh.
Source/WebCore/PAL:

  • pal/spi/ios/MobileGestaltSPI.h:

Source/WebKit:

iPhone-idiom apps running on macOS need to behave exactly like iPhone apps,
even in ways that might not totally make sense on the platform (e.g.
using input accessory views for <select> instead of popover) for two reasons:

  • we want to maximize compatibility, so they should behave exactly as they do on the only platform they're tested on
  • other frameworks (mostly UIKit) enforce the use of iPhone UI in iPhone-idiom apps, even on macOS
  • Shared/UserInterfaceIdiom.mm: (WebKit::currentUserInterfaceIdiomIsPadOrMac): (WebKit::setCurrentUserInterfaceIdiomIsPadOrMac): (WebKit::updateCurrentUserInterfaceIdiom): (WebKit::userInterfaceIdiomIsPad): Deleted. Simplify our UIUserInterfaceIdiom-caching code.

currentUserInterfaceIdiomIsPadOrMac now does what it says on the tin, globally;
previously on macOS it said YES for iPhone-idiom apps, but now it says NO,
like you would expect.

Use UIDevice everywhere instead of the soft-deprecated UICurrentUserInterfaceIdiomIsPad,
both because it is soft-deprecated, and because it lets us elide the static helper.

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

2:11 PM Changeset in webkit [271825] by Alan Coon
  • 5 edits in branches/safari-611-branch

Cherry-pick r271479. rdar://problem/73469631

REGRESSION (r266634): Messages crashes sometimes while scrolling around and playing YouTube videos
https://bugs.webkit.org/show_bug.cgi?id=220602
<rdar://problem/70402593>

Reviewed by Wenson Hsieh.

Source/WebKit:

No new tests; we are unable to API test video full-screen because of the lack of UIApp;
I have written a stand-alone test app that can reliably reproduce before this patch
and not afterwards.

  • UIProcess/Cocoa/WebPageProxyCocoa.mm: (WebKit::WebPageProxy::scheduleActivityStateUpdate): We can't call dispatchActivityStateChange directly underneath a post-commit callback, because it has side-effects (like un-parenting the full-screen window) that may result in other frameworks (e.g. UIKit) trying to install commit handlers for the same phase, which is not allowed.

To fix this, add a dispatch_async; we _only_ care that the activity state change
doesn't apply until after the active commit is complete.

Tools:

  • TestWebKitAPI/PlatformWebView.h: Mark PlatformWebView noncopyable, since it is effectively noncopyable (at least, the macOS implementation will overrelease the view if you copy it, whoops).
  • TestWebKitAPI/Tests/WebKit/DeferredViewInWindowStateChange.mm: (TestWebKitAPI::TEST): Add a matching dispatch_async, or this test fails.

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

2:11 PM Changeset in webkit [271824] by Alan Coon
  • 10 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r271469. rdar://problem/73468174

[Cocoa] Network extension sandbox extensions are sometimes issued too late
https://bugs.webkit.org/show_bug.cgi?id=220525
<rdar://problem/68443565>

Reviewed by Brent Fulgham.

Currently, Network extension sandbox extensions are sent to the WebContent process as part of the load parameters, but this is too late in some cases.
In these cases, the extensions can be sent along with the DidReceivePolicyDecision message.

  • Shared/Cocoa/LoadParametersCocoa.mm: (WebKit::LoadParameters::platformEncode const): (WebKit::LoadParameters::platformDecode):
  • Shared/LoadParameters.h:
  • UIProcess/Cocoa/WebPageProxyCocoa.mm: (WebKit::WebPageProxy::addPlatformLoadParameters):
  • UIProcess/WebPageProxy.cpp: (WebKit::createNetworkExtensionsSandboxExtensions): (WebKit::WebPageProxy::decidePolicyForNavigationActionAsyncShared): (WebKit::WebPageProxy::decidePolicyForNewWindowAction): (WebKit::WebPageProxy::decidePolicyForResponseShared):
  • WebProcess/WebPage/Cocoa/WebPageCocoa.mm: (WebKit::WebPage::platformDidReceiveLoadParameters):
  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didReceivePolicyDecision):
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:

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

2:11 PM Changeset in webkit [271823] by Alan Coon
  • 5 edits
    2 adds in branches/safari-611-branch

Cherry-pick r271446. rdar://problem/73469344

REGRESSION (r257839): Broken focus when 'display' changes in an attribute selector
https://bugs.webkit.org/show_bug.cgi?id=217240
<rdar://problem/69891684>

Reviewed by Wenson Hsieh.

Source/WebCore:

Focus optimization that avoids full style resolution when setting focus in unrendered subtrees
misbehaves when the style is invalidated via an attribute change.

Test case by Ali Juma.

Test: fast/dom/focus-style-resolution-attribute-change.html

  • dom/Element.cpp: (WebCore::Element::invalidateStyle):
  • dom/Node.cpp: (WebCore::Node::invalidateStyle):

We need to set the computed style invalidity bit on all style invalidation code paths.

  • html/InputType.cpp: (WebCore::InputType::setValue):

Don't invalidate style when nothing changes.

LayoutTests:

  • fast/dom/focus-style-resolution-attribute-change-expected.html: Added.
  • fast/dom/focus-style-resolution-attribute-change.html: Added.

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

2:11 PM Changeset in webkit [271822] by Alan Coon
  • 4 edits
    2 adds in branches/safari-611-branch

Cherry-pick r271425. rdar://problem/73469655

Multi-codepoint CJK grapheme clusters are not oriented correctly in vertical writing mode
https://bugs.webkit.org/show_bug.cgi?id=220536
<rdar://problem/70633887>

Reviewed by Zalan Bujtas.

Source/WebCore:

We have two codeblocks in this section that are meant to be used
for non-CJK text, but the compound "if" statement was causing us to hit
one of them even for CJK text.

Test: fast/text/cjk-multi-codepoint-cluster-vertical.html

  • platform/graphics/coretext/FontCascadeCoreText.cpp: (WebCore::FontCascade::fontForCombiningCharacterSequence const):

LayoutTests:

  • fast/text/cjk-multi-codepoint-cluster-vertical-expected.html: Added.
  • fast/text/cjk-multi-codepoint-cluster-vertical.html: Added.
  • platform/win/TestExpectations:

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

2:10 PM Changeset in webkit [271821] by Alan Coon
  • 4 edits
    1 add
    10 deletes in branches/safari-611-branch/LayoutTests

Cherry-pick r271419. rdar://problem/73469613

Make fast/text/international/complex-character-based-fallback.html more robust by migrating it to be a reftest instead of a DRT test
https://bugs.webkit.org/show_bug.cgi?id=220488
<rdar://problem/70556068>

Reviewed by Darin Adler.

Reference tests are more robust than render-tree dump tests.

  • fast/text/international/complex-character-based-fallback-expected.html: Added.
  • fast/text/international/complex-character-based-fallback.html:
  • platform/gtk/fast/text/international/complex-character-based-fallback-expected.png: Removed.
  • platform/gtk/fast/text/international/complex-character-based-fallback-expected.txt: Removed.
  • platform/ios/TestExpectations:
  • platform/ios/fast/text/international/complex-character-based-fallback-expected.png: Removed.
  • platform/ios/fast/text/international/complex-character-based-fallback-expected.txt: Removed.
  • platform/mac/TestExpectations:
  • platform/mac/fast/text/international/complex-character-based-fallback-expected.png: Removed.
  • platform/mac/fast/text/international/complex-character-based-fallback-expected.txt: Removed.
  • platform/win/fast/text/international/complex-character-based-fallback-expected.png: Removed.
  • platform/win/fast/text/international/complex-character-based-fallback-expected.txt: Removed.
  • platform/wincairo/fast/text/international/complex-character-based-fallback-expected.txt: Removed.
  • platform/wpe/fast/text/international/complex-character-based-fallback-expected.txt: Removed.

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

2:10 PM Changeset in webkit [271820] by Alan Coon
  • 17 edits
    1 add in branches/safari-611-branch/Source

Cherry-pick r271405. rdar://problem/73466993

[Cocoa] Support key rotation with HLS-backed encrypted media streams
https://bugs.webkit.org/show_bug.cgi?id=220493
<rdar://68227709>

Reviewed by Eric Carlson.

Source/WebCore:

Support key rotation through AVContentKeySession by explicitly handling unexpected key requests
submitted through the new -contentKeySession:didProvideContentKeyRequests:forInitializationData:.
Rotation was previously handled in the delegate method -contentKeySession:didProvideContentKeyRequest,
but that method is no longer called after the replacement delegate method was implemented, and
that method never handled "skd://" style initialization data.

Update the helper method, initTypeForRequest(), to detect "skd://" identifiers and correctly identify
those sessions as "skd".

Add a new helper method, initializationDataForRequest(), which will package the AVContentKeySession's
identifier as initialization data.

Drive-by Fix: Fixing this bug causes the default key group to update it's identifier, which causes an assert
when the group in question isn't any of those associated with an existing MediaKeySession, so handle that case
explicitly.

Drive-by Fix 2: Sometimes, when GPUP is enabled for media, we will get spurious mediaPlayerEngineUpdated()
calls which cause cdmInstanceAttached() to be called multiple times for the same player, triggering an ASSERT.
If called twice with the same CDM, just return early rather than ASSERTing.

  • platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h:
  • platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm: (WebCore::initTypeForRequest): (WebCore::initializationDataForRequest): (WebCore::CDMInstanceFairPlayStreamingAVFObjC::takeUnexpectedKeyRequestForInitializationData): (WebCore::CDMInstanceFairPlayStreamingAVFObjC::didProvideRequest): (WebCore::CDMInstanceFairPlayStreamingAVFObjC::didProvideRequests): (WebCore::CDMInstanceFairPlayStreamingAVFObjC::handleUnexpectedRequests): (WebCore::CDMInstanceFairPlayStreamingAVFObjC::groupSessionIdentifierChanged):
  • platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm: (WebCore::MediaSourcePrivateAVFObjC::cdmInstanceAttached):

Source/WebCore/PAL:

  • pal/spi/cocoa/AVFoundationSPI.h:

Source/WebKit:

Support handling the "unexpectedInitializationDataReceived()" client callback from within the GPUP.

  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • GPUProcess/media/RemoteCDMInstanceProxy.cpp: (WebKit::RemoteCDMInstanceProxy::create): (WebKit::RemoteCDMInstanceProxy::RemoteCDMInstanceProxy): (WebKit::RemoteCDMInstanceProxy::~RemoteCDMInstanceProxy): (WebKit::RemoteCDMInstanceProxy::unrequestedInitializationDataReceived):
  • GPUProcess/media/RemoteCDMInstanceProxy.h:
  • GPUProcess/media/RemoteCDMProxy.cpp: (WebKit::RemoteCDMProxy::createInstance):
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/media/RemoteCDMInstance.cpp: (WebKit::RemoteCDMInstance::RemoteCDMInstance): (WebKit::RemoteCDMInstance::~RemoteCDMInstance): (WebKit::RemoteCDMInstance::unrequestedInitializationDataReceived):
  • WebProcess/GPU/media/RemoteCDMInstance.h:
  • WebProcess/GPU/media/RemoteCDMInstance.messages.in: Added.

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

2:10 PM Changeset in webkit [271819] by Alan Coon
  • 2 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r271394. rdar://problem/73425595

[Multicol] set the childrenInline flag on the RenderBlockFlow properly
https://bugs.webkit.org/show_bug.cgi?id=218555

Reviewed by Zalan Bujtas.

  • rendering/updating/RenderTreeBuilderMultiColumn.cpp: (WebCore::RenderTreeBuilder::MultiColumn::destroyFragmentedFlow):

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

2:10 PM Changeset in webkit [271818] by Alan Coon
  • 5 edits in branches/safari-611-branch/Source

Cherry-pick r271387. rdar://problem/73469606

Receiving two enter/exit fullscreen delegate callbacks on iPad when presenting fullscreen elements
https://bugs.webkit.org/show_bug.cgi?id=218688

Reviewed by Darin Adler.

Source/WebCore:

On iPads, when a video enters/exits fullscreen standby, we should not call the
video fullscreen delegate callbacks.

  • platform/ios/VideoFullscreenInterfaceAVKit.h:
  • platform/ios/VideoFullscreenInterfaceAVKit.mm: (VideoFullscreenInterfaceAVKit::setupFullscreen): (VideoFullscreenInterfaceAVKit::exitFullscreen):

Source/WebKit:

  • UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: (WebKit::VideoFullscreenManagerProxy::didExitFullscreen): (WebKit::VideoFullscreenManagerProxy::didEnterFullscreen):

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

2:10 PM Changeset in webkit [271817] by Alan Coon
  • 4 edits
    2 adds in branches/safari-611-branch

Cherry-pick r271386. rdar://problem/73426229

Double tap to select does not work if the page clears selections on tap, like grammarly.com does
https://bugs.webkit.org/show_bug.cgi?id=220454
Source/WebKit:

rdar://67757411

Reviewed by Wenson Hsieh.

Double tap to select content did not work on grammerly.com on iPad because this is a desktop website run on a touch-based device,
and there was a script running that would clear the selection on a mouseDown event. When we would send synthetic click events to the page
we would first update the selection and then on completion of the tap, we would dispatch a mouseDown and mouseUp event on iOS. On Mac, we
update the selection between the mouseDown and the mouseUp, so in order to bring us more in line with mac/mouse behaviors, we are now saving
the information needed to update the selection when we believe we are in the middle of a potential tap, and then setting the selection between
these two events. This makes for a more expected change of events, and does not let grammerly.com clear a valid selection based off of synthetic
clicks.

Test: fast/events/touch/ios/double-tap-on-editable-content-for-selection-with-clear-on-touch.html

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::completeSyntheticClick): (WebKit::WebPage::setSelectionRange): (WebKit::WebPage::selectTextWithGranularityAtPoint):

LayoutTests:

Reviewed by Wenson Hsieh.

  • fast/events/touch/ios/double-tap-on-editable-content-for-selection-with-clear-on-touch-expected.txt: Added.
  • fast/events/touch/ios/double-tap-on-editable-content-for-selection-with-clear-on-touch.html: Added.

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

2:10 PM Changeset in webkit [271816] by Alan Coon
  • 3 edits
    2 adds in branches/safari-611-branch

Cherry-pick r271367. rdar://problem/73469641

REGRESSION (r258321): CSS rules using :first-of-type are applied to any/all siblings in a group under certain circumstances
https://bugs.webkit.org/show_bug.cgi?id=218256
<rdar://problem/70749584>

Reviewed by Simon Fraser.

Source/WebCore:

More accurate invalidation for :hover resulted in smaller style updates that revealed a bug in the way we
mark style non-shareable. We reset style relation bits when resolving the parent but may fail to set them again if we
don't re-resolve all children.

Test case by Eben Packwood.

Test: fast/css/positional-selector-style-sharing.html

  • style/StyleRelations.cpp: (WebCore::Style::commitRelationsToRenderStyle):

Just mark all styles affected by relations non-shareable. This is achieved via various bit tests but there
is no reason not to set the simplest no-sharing bit. Since this forces real style resolution the parent
bits will also get properly reset.

LayoutTests:

  • fast/css/positional-selector-style-sharing-expected.html: Added.
  • fast/css/positional-selector-style-sharing.html: Added.

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

2:09 PM Changeset in webkit [271815] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

[macOS] Restrict access to dtracehelper
https://bugs.webkit.org/show_bug.cgi?id=220927
<rdar://70350947>

Reviewed by Brent Fulgham.

Only allow access to dtracehelper for internal installs.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • WebProcess/com.apple.WebProcess.sb.in:
1:37 PM Changeset in webkit [271814] by Nikolas Zimmermann
  • 28 edits in trunk/Source

Finish introduction of RenderLayerScrollableArea: remove remaining glue code from RenderLayer
https://bugs.webkit.org/show_bug.cgi?id=220851

Reviewed by Simon Fraser.

Remove the last remaining glue code from RenderLayer, that was added
in r271559 to minimize the patch size. After this patch all call sites
use RenderLayerScrollableArea directly, removing the need for proxy
methods in RenderLayer that forward to RenderLayerScrollableArea.

The decade old bug 60305 (Separate scrolling code out of RenderLayer)
is finally closed.

Covered by existing tests.

Source/WebCore:

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::scrollTo const):

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::revealSelection):

  • html/HTMLMarqueeElement.cpp:

(WebCore::HTMLMarqueeElement::renderMarquee const):

  • page/EventHandler.cpp:

(WebCore::EventHandler::selectCursor):

  • page/FrameView.cpp:

(WebCore::FrameView::updateLayerPositionsAfterScrolling):

  • page/SpatialNavigation.cpp:

(WebCore::scrollInDirection):

  • page/ios/FrameIOS.mm:

(WebCore::Frame::overflowScrollPositionChangedForNode):

  • page/mac/EventHandlerMac.mm:

(WebCore::scrollableAreaForBox):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::isPointInOverflowControl):
(WebCore::RenderBlock::baselinePosition const):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::computeIntrinsicLogicalWidths const):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::styleDidChange):
(WebCore::RenderBox::scrollLeft const):
(WebCore::RenderBox::scrollTop const):
(WebCore::setupWheelEventMonitor):
(WebCore::RenderBox::setScrollLeft):
(WebCore::RenderBox::setScrollTop):
(WebCore::RenderBox::setScrollPosition):
(WebCore::RenderBox::verticalScrollbarWidth const):
(WebCore::RenderBox::horizontalScrollbarHeight const):
(WebCore::RenderBox::scrollLayer):
(WebCore::RenderBox::logicalScroll):
(WebCore::RenderBox::panScroll):
(WebCore::RenderBox::scrollPosition const):
(WebCore::RenderBox::computeBackgroundIsKnownToBeObscured):
(WebCore::RenderBox::overflowClipRect const):

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::computeStickyPositionConstraints const):
(WebCore::RenderBoxModelObject::constrainingRectForStickyPosition const):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::scrollRectToVisible):

  • rendering/RenderLayer.h:
  • rendering/RenderLayerBacking.cpp:

(WebCore::computeOverflowTiledBackingCoverage):
(WebCore::RenderLayerBacking::computeParentGraphicsLayerRect const):
(WebCore::RenderLayerBacking::updateGeometry):
(WebCore::RenderLayerBacking::updateScrollOffset):
(WebCore::RenderLayerBacking::updateClippingStackLayerGeometry):
(WebCore::RenderLayerBacking::requiresHorizontalScrollbarLayer const):
(WebCore::RenderLayerBacking::requiresVerticalScrollbarLayer const):
(WebCore::RenderLayerBacking::requiresScrollCornerLayer const):
(WebCore::RenderLayerBacking::positionOverflowControlsLayers):
(WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
(WebCore::RenderLayerBacking::paintIntoLayer):
(WebCore::RenderLayerBacking::paintContents):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateScrollingNodeLayers):
(WebCore::RenderLayerCompositor::updateScrollingNodeForScrollingRole):
(WebCore::LegacyWebKitScrollingLayerCoordinator::updateScrollingLayer):

  • rendering/RenderLayerModelObject.cpp:

(WebCore::RenderLayerModelObject::styleDidChange):

  • rendering/RenderLayerScrollableArea.cpp:

(WebCore::RenderLayerScrollableArea::paintOverflowControls):
(WebCore::RenderLayerScrollableArea::scrollByRecursively):

  • rendering/RenderListBox.cpp:

(WebCore::RenderListBox::hasScrollableOrRubberbandableAncestor):

  • rendering/RenderMarquee.cpp:

(WebCore::RenderMarquee::start):
(WebCore::RenderMarquee::timerFired):

  • rendering/RenderTextControlSingleLine.cpp:

(WebCore::RenderTextControlSingleLine::scroll):
(WebCore::RenderTextControlSingleLine::logicalScroll):

  • rendering/RenderTreeAsText.cpp:

Source/WebKitLegacy/mac:

  • DOM/DOMHTML.mm:

(-[DOMHTMLElement scrollXOffset]):
(-[DOMHTMLElement scrollYOffset]):
(-[DOMHTMLElement setScrollXOffset:scrollYOffset:adjustForIOSCaret:]):

  • WebView/WebFrame.mm:

(-[WebFrame _scrollDOMRangeToVisible:]):
(-[WebFrame _scrollDOMRangeToVisible:withInset:]):

Source/WebKitLegacy/win:

  • WebView.cpp:

(WebView::gesture):

1:36 PM Changeset in webkit [271813] by Chris Dumez
  • 52 edits in trunk/Source

Update availability annotations to match the macOS 11.0 and iOS 14.0 GM SDKs
https://bugs.webkit.org/show_bug.cgi?id=220874
<rdar://73474368>

Reviewed by Darin Adler.

Source/JavaScriptCore:

  • API/JSContextPrivate.h:
  • API/JSContextRefPrivate.h:

Source/WebKit:

  • UIProcess/API/Cocoa/WKContentWorld.h:
  • UIProcess/API/Cocoa/WKError.h:
  • UIProcess/API/Cocoa/WKFindConfiguration.h:
  • UIProcess/API/Cocoa/WKFindResult.h:
  • UIProcess/API/Cocoa/WKFrameInfoPrivate.h:
  • UIProcess/API/Cocoa/WKHTTPCookieStorePrivate.h:
  • UIProcess/API/Cocoa/WKNavigationDelegate.h:
  • UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
  • UIProcess/API/Cocoa/WKOpenPanelParametersPrivate.h:
  • UIProcess/API/Cocoa/WKPDFConfiguration.h:
  • UIProcess/API/Cocoa/WKPreferences.h:
  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:
  • UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
  • UIProcess/API/Cocoa/WKScriptMessage.h:
  • UIProcess/API/Cocoa/WKScriptMessageHandlerWithReply.h:
  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/API/Cocoa/WKURLSchemeTaskPrivate.h:
  • UIProcess/API/Cocoa/WKUserContentController.h:
  • UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
  • UIProcess/API/Cocoa/WKUserScript.h:
  • UIProcess/API/Cocoa/WKUserScriptPrivate.h:
  • UIProcess/API/Cocoa/WKWebView.h:
  • UIProcess/API/Cocoa/WKWebViewConfiguration.h:
  • UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/Cocoa/WKWebpagePreferences.h:
  • UIProcess/API/Cocoa/WKWebpagePreferencesPrivate.h:
  • UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h:
  • UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
  • UIProcess/API/Cocoa/_WKDownload.h:
  • UIProcess/API/Cocoa/_WKFrameTreeNode.h:
  • UIProcess/API/Cocoa/_WKInputDelegate.h:
  • UIProcess/API/Cocoa/_WKInspectorDebuggableInfo.h:
  • UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
  • UIProcess/API/Cocoa/_WKResourceLoadDelegate.h:
  • UIProcess/API/Cocoa/_WKResourceLoadInfo.h:
  • UIProcess/API/Cocoa/_WKResourceLoadStatisticsFirstParty.h:
  • UIProcess/API/Cocoa/_WKResourceLoadStatisticsThirdParty.h:
  • UIProcess/API/Cocoa/_WKTextManipulationConfiguration.h:
  • UIProcess/API/Cocoa/_WKTextManipulationExclusionRule.h:
  • UIProcess/API/Cocoa/_WKTextManipulationItem.h:
  • UIProcess/API/Cocoa/_WKTextManipulationToken.h:
  • UIProcess/API/Cocoa/_WKUserContentWorld.h:
  • UIProcess/API/Cocoa/_WKUserStyleSheet.h:
  • UIProcess/API/Cocoa/_WKWebAuthenticationAssertionResponse.h:
  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.h:
  • UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
  • UIProcess/API/Cocoa/_WKWebsitePolicies.h:
1:29 PM Changeset in webkit [271812] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[ews] Commit Queue should retry the build when update-working-directory step fails
https://bugs.webkit.org/show_bug.cgi?id=220836

Reviewed by Jonathan Bedard.

  • CISupport/ews-build/steps.py:

(UpdateWorkingDirectory):
(UpdateWorkingDirectory.getResultSummary): Provide better failure message.
(UpdateWorkingDirectory.evaluateCommand): Retry the build when this step fails.

  • CISupport/ews-build/steps_unittest.py:
1:26 PM Changeset in webkit [271811] by Chris Dumez
  • 5 edits in trunk/Source/WebKit

[iOS] Stop leaking an XPC boost message to XPC services
https://bugs.webkit.org/show_bug.cgi?id=220883
<rdar://47402853>

Reviewed by Geoffrey Garen.

Turn on RB_full_manage_WK_jetsam feature flag so that we stop leaking an XPC boost
message to XPC services on IOS_FAMILY. Instead, RunningBoard will now be setting
the priority of our XPC services based on the RunningBoard assertions we're holding
for them. The feature flag is checked both by RunningBoard and WebKit.

I have verified that our bots have upgraded to a build that supports this.

  • FeatureFlags/WebKit-appletvos.plist:
  • FeatureFlags/WebKit-ios.plist:
  • FeatureFlags/WebKit-watchos.plist:
1:25 PM Changeset in webkit [271810] by commit-queue@webkit.org
  • 3 edits
    3 deletes in trunk/LayoutTests

REGRESSION (Big Sur): Some tests in http/tests/security/http-0.9 flakily fail
https://bugs.webkit.org/show_bug.cgi?id=220188
<rdar://problem/72709565>

Patch by Alex Christensen <achristensen@webkit.org> on 2021-01-25
Reviewed by Alexey Proskuryakov.

rdar://69534004 caused two tests to become flaky on Big Sur.
That change was correct, but caused issues with our test infrastructure.
r271652 successfully made default-port-script-blocked.html no longer flaky, but made default-port-plugin-blocked.html a flaky timeout.
Now that all plugins are blocked, let's just remove this test, which is no longer needed.

  • http/tests/security/http-0.9/default-port-plugin-blocked-expected.txt: Removed.
  • http/tests/security/http-0.9/default-port-plugin-blocked.html: Removed.
  • http/tests/security/http-0.9/resources/nph-load-plugin-fail.pl: Removed.
  • platform/mac-wk1/TestExpectations:
  • platform/wk2/TestExpectations:
1:24 PM Changeset in webkit [271809] by pvollan@apple.com
  • 5 edits in trunk/Source/WebKit

[macOS] Restrict access to mds data
https://bugs.webkit.org/show_bug.cgi?id=220920
<rdar://70355552>

Reviewed by Brent Fulgham.

Only root show have write access.

  • GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
  • WebAuthnProcess/mac/com.apple.WebKit.WebAuthnProcess.sb.in:
  • WebProcess/com.apple.WebProcess.sb.in:
12:52 PM Changeset in webkit [271808] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

[Cocoa] Adjust logic for creating sandbox extensions based on GPUP flags
https://bugs.webkit.org/show_bug.cgi?id=220917

Reviewed by Brent Fulgham.

Update which GPUP flag should be used in this logic. This patch also includes many IOKit classes on macOS in the set of
classes that should be extended when the appropriate GPU flags are set. In the case they are not being extended, logging
rules have been added in the sandbox, to determine if they are being used in that case.

  • UIProcess/WebPageProxy.cpp:

(WebKit::gpuIOKitClasses):
(WebKit::WebPageProxy::creationParameters):

  • WebProcess/com.apple.WebProcess.sb.in:
12:27 PM Changeset in webkit [271807] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Many WPT tests in css/css-color/predefined-*.html failing
https://bugs.webkit.org/show_bug.cgi?id=220928

Unreviewed test gardening.

12:06 PM Changeset in webkit [271806] by Chris Dumez
  • 57 edits
    4 copies
    5 adds in trunk

Support AbortSignal in addEventListenerOptions to unsubscribe from events
https://bugs.webkit.org/show_bug.cgi?id=218753
<rdar://problem/71258012>

Reviewed by Darin Adler.

LayoutTests/imported/w3c:
Import test coverage from WPT.

  • web-platform-tests/dom/events/AddEventListenerOptions-signal.any-expected.txt: Added.
  • web-platform-tests/dom/events/AddEventListenerOptions-signal.any.html: Added.
  • web-platform-tests/dom/events/AddEventListenerOptions-signal.any.js: Added.
  • web-platform-tests/dom/events/AddEventListenerOptions-signal.any.worker-expected.txt: Added.
  • web-platform-tests/dom/events/AddEventListenerOptions-signal.any.worker.html: Added.
  • web-platform-tests/dom/events/w3c-import.log:

Source/WebCore:
Support AbortSignal in addEventListenerOptions to unsubscribe from events:

Blink already added support for this.

Tests: imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-signal.any.html

imported/w3c/web-platform-tests/dom/events/AddEventListenerOptions-signal.any.worker.html

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Headers.cmake:
  • Modules/async-clipboard/Clipboard.h:
  • Modules/encryptedmedia/MediaKeySession.h:
  • Modules/indexeddb/IDBRequest.h:
  • Modules/mediastream/MediaDevices.h:
  • Modules/mediastream/RTCPeerConnection.h:
  • Modules/paymentrequest/PaymentRequest.h:
  • Modules/speech/SpeechRecognition.h:
  • Modules/webaudio/BaseAudioContext.h:
  • Modules/webgpu/WebGPUDevice.h:
  • Modules/webxr/WebXRSystem.h:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • animation/WebAnimation.h:
  • css/MediaQueryList.cpp:

(WebCore::MediaQueryList::addListener):
(WebCore::MediaQueryList::removeListener):

  • css/MediaQueryList.h:
  • dom/AbortSignal.h:
  • dom/AddEventListenerOptions.h: Copied from Source/WebCore/loader/appcache/DOMApplicationCache.h.

(WebCore::AddEventListenerOptions::AddEventListenerOptions):

  • dom/AddEventListenerOptions.idl: Copied from Source/WebCore/loader/appcache/DOMApplicationCache.h.
  • dom/EventListener.h:
  • dom/EventListenerMap.cpp:
  • dom/EventListenerOptions.h: Copied from Source/WebCore/loader/appcache/DOMApplicationCache.h.

(WebCore::EventListenerOptions::EventListenerOptions):

  • dom/EventListenerOptions.idl: Copied from Source/WebCore/loader/appcache/DOMApplicationCache.h.
  • dom/EventTarget.cpp:

(WebCore::EventTarget::addEventListener):
(WebCore::EventTarget::removeEventListenerForBindings):
(WebCore::EventTarget::removeEventListener):
(WebCore::EventTarget::setAttributeEventListener):
(WebCore::EventTarget::innerInvokeEventListeners):

  • dom/EventTarget.h:

(WebCore::EventTarget::removeEventListener):

  • dom/EventTarget.idl:
  • dom/MessagePort.cpp:

(WebCore::MessagePort::MessagePort):
(WebCore::MessagePort::removeEventListener):

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

(WebCore::tryAddEventListener):
(WebCore::tryRemoveEventListener):
(WebCore::Node::removeEventListener):

  • dom/Node.h:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::removeEventListener):

  • html/HTMLMediaElement.h:
  • html/ImageDocument.cpp:
  • html/track/TextTrackCue.h:
  • inspector/agents/InspectorDOMAgent.cpp:
  • loader/appcache/DOMApplicationCache.h:
  • page/DOMWindow.cpp:

(WebCore::DOMWindow::removeEventListener):

  • page/DOMWindow.h:
  • platform/cocoa/PlaybackSessionModelMediaElement.mm:
  • platform/cocoa/VideoFullscreenModelVideoElement.mm:
  • svg/SVGElement.cpp:

(WebCore::SVGElement::removeEventListener):

  • svg/SVGElement.h:
  • svg/SVGTRefElement.cpp:
  • svg/animation/SVGSMILElement.cpp:
  • testing/Internals.cpp:
  • workers/service/ServiceWorkerContainer.h:

Source/WebKit:
Minor build fixes.

  • WebProcess/Plugins/PDF/PDFPluginAnnotation.mm:

Source/WebKitLegacy/mac:
Minor build fixes.

  • DOM/DOMNode.mm:

Source/WTF:
Add initializeWeakPtrFactory() protection function to CanMakeWeakPtr so that a subclass
can eagerly initialize the WeakPtrFactory even if it does not subclass
WeakPtrFactory<T, WeakPtrFactoryInitialization::Eager>. MessagePort used to subclass
WeakPtrFactory<T, WeakPtrFactoryInitialization::Eager> for thread-safety reason but it
now subclasses WeakPtrFactory<T, WeakPtrFactoryInitialization::Lazy> via EventTarget.

  • wtf/WeakPtr.h:

(WTF::CanMakeWeakPtr::initializeWeakPtrFactory):

11:58 AM Changeset in webkit [271805] by Fujii Hironori
  • 2 edits in trunk/Tools

The generated commit message have a directory label at the first line rather than the bug's title if ChangeLogs have different bug titles
https://bugs.webkit.org/show_bug.cgi?id=220822

Reviewed by Darin Adler.

commit-log-editor generates the default commit message by
collecting all ChangeLog entries and merging them with prepending
directory lables. If it finds out a common prefix for all entries,
it removes the prefix from entries and hoists the prefix as the
beginning of the commit message. This step removes duplicated
lines of the bug title, the bug URL, the reviewed-by line, and the
descriptions.

If such prefix is not found, i.e. ChangeLog entries has different
bug titles, it simply merges all entries with directory labels. As
the result, the generated commit message has the directory label
at the first line. This is not desirable. The first line of the
commit message should be the bug title.

This patch yanks the first line of the first entry as the common
prefix in the case.

  • Scripts/commit-log-editor:

(createCommitMessage):
(removeLongestCommonPrefixEndingInNewline):

11:57 AM Changeset in webkit [271804] by pvollan@apple.com
  • 2 edits in trunk/Source/WTF

[macOS] Fix OS version check for ENABLE_SET_WEBCONTENT_PROCESS_INFORMATION_IN_NETWORK_PROCESS
https://bugs.webkit.org/show_bug.cgi?id=219534
<rdar://problem/71973149>

Reviewed by Brent Fulgham.

The OS version check for ENABLE_SET_WEBCONTENT_PROCESS_INFORMATION_IN_NETWORK_PROCESS is incorrect.

  • wtf/PlatformEnableCocoa.h:
11:05 AM Changeset in webkit [271803] by Lauro Moura
  • 2 edits in trunk/Tools

[GLIB] Gardening API failures after r271794

Unreviewed test gardening.

Looks like these failures flew under the radar by not actually being
run by run-gtk/wpe-tests, and were uncovered by r271794.

Marking them as failure to allow the EWS to run normally while they're
fixed.

  • TestWebKitAPI/glib/TestExpectations.json:
11:04 AM Changeset in webkit [271802] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[build.webkit.org] Download the build archive from master when download from S3 fails
https://bugs.webkit.org/show_bug.cgi?id=220932

Reviewed by Jonathan Bedard.

  • CISupport/build-webkit-org/steps.py:

(DownloadBuiltProduct):
(DownloadBuiltProduct.evaluateCommand): If this fails, run DownloadBuiltProductFromMaster.
(DownloadBuiltProductFromMaster): Build step to download archive from master using buildbot FileDownload class.
(DownloadBuiltProductFromMaster.init):
(DownloadBuiltProductFromMaster.getResultSummary): Custom failure message.

10:52 AM Changeset in webkit [271801] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

layout-test results shouldn't be hosted on build.webkit.org server
https://bugs.webkit.org/show_bug.cgi?id=220864

Reviewed by Jonathan Bedard.

  • CISupport/build-webkit-org/steps.py:

(ExtractTestResults.resultDirectoryURL):

10:33 AM Changeset in webkit [271800] by Wenson Hsieh
  • 6 edits in trunk/Source/WebKit

[GPU Process] Web process should be terminated if DisplayListReaderHandle advances past 0
https://bugs.webkit.org/show_bug.cgi?id=220926

Reviewed by Simon Fraser.

Address another FIXME in the GPU Process by replacing a release assertion with a MESSAGE_CHECK. See below for
more details.

  • GPUProcess/graphics/DisplayListReaderHandle.cpp:

(WebKit::DisplayListReaderHandle::advance):

Return WTF::nullopt instead of just crashing in the case where the number of bytes to advance exceeds the
number of unread bytes. This can (and should) only happen in the case where a compromised web content process
attempts to overwrite the number of unread bytes in the shared display list header.

  • GPUProcess/graphics/DisplayListReaderHandle.h:
  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::nextDestinationImageBufferAfterApplyingDisplayLists):

  • Shared/SharedDisplayListHandle.h:

Remove this virtual method from the base class, since the reader handle now returns an Optional<size_t>
instead of just a size_t.

  • WebProcess/GPU/graphics/DisplayListWriterHandle.h:
10:28 AM Changeset in webkit [271799] by wilander@apple.com
  • 8 edits in trunk

PCM: Use different well-known locations for triggering and reporting attribution
https://bugs.webkit.org/show_bug.cgi?id=220902
<rdar://problem/73550632>

Reviewed by Brent Fulgham.

The discussion in W3C Privacy CG concluded that we should use distinct
well-known URL paths for websites triggering attribution and for the
browser reporting attribution
(https://github.com/privacycg/private-click-measurement/issues/59).

This patch changes the one location to these two:
/.well-known/private-click-measurement/trigger-attribution
/.well-known/private-click-measurement/report-attribution

Source/WebCore:

Existing tests updated.

  • loader/PrivateClickMeasurement.cpp:

(WebCore::PrivateClickMeasurement::parseAttributionRequest):
(WebCore::PrivateClickMeasurement::reportURL const):

Tools:

  • TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:

(TestWebKitAPI::TEST):

LayoutTests:

  • http/tests/privateClickMeasurement/resources/redirectToConversion.php:
  • http/tests/privateClickMeasurement/resources/redirectToConversionOnIPAddress.php:
10:19 AM Changeset in webkit [271798] by weinig@apple.com
  • 14 edits
    17 copies
    24 adds in trunk/LayoutTests

Import css/css-color tests from WPT
https://bugs.webkit.org/show_bug.cgi?id=220247
<rdar://problem/73002231>

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Update WPT css/css-color tests.

  • web-platform-tests/css/css-color/lab-002-expected.html:
  • web-platform-tests/css/css-color/lab-003-expected.html:
  • web-platform-tests/css/css-color/lch-001-expected.html:
  • web-platform-tests/css/css-color/lch-002-expected.html:
  • web-platform-tests/css/css-color/lch-003-expected.html:
  • web-platform-tests/css/css-color/predefined-001-expected.html: Added.
  • web-platform-tests/css/css-color/predefined-001.html: Added.
  • web-platform-tests/css/css-color/predefined-002-expected.html: Added.
  • web-platform-tests/css/css-color/predefined-002.html: Added.
  • web-platform-tests/css/css-color/predefined-003-expected.html: Added.
  • web-platform-tests/css/css-color/predefined-003.html: Added.
  • web-platform-tests/css/css-color/predefined-004-expected.html: Added.
  • web-platform-tests/css/css-color/predefined-004.html: Added.
  • web-platform-tests/css/css-color/predefined-005-expected.html: Added.
  • web-platform-tests/css/css-color/predefined-005.html: Added.
  • web-platform-tests/css/css-color/predefined-006-expected.html: Added.
  • web-platform-tests/css/css-color/predefined-006.html: Added.
  • web-platform-tests/css/css-color/predefined-007-expected.html: Added.
  • web-platform-tests/css/css-color/predefined-007.html: Added.
  • web-platform-tests/css/css-color/predefined-008-expected.html: Added.
  • web-platform-tests/css/css-color/predefined-008.html: Added.
  • web-platform-tests/css/css-color/predefined-009-expected.html: Added.
  • web-platform-tests/css/css-color/predefined-009.html: Added.
  • web-platform-tests/css/css-color/predefined-010-expected.html: Added.
  • web-platform-tests/css/css-color/predefined-010.html: Added.
  • web-platform-tests/css/css-color/predefined-011-expected.html: Added.
  • web-platform-tests/css/css-color/predefined-011.html: Added.
  • web-platform-tests/css/css-color/predefined-012-expected.html: Added.
  • web-platform-tests/css/css-color/predefined-012.html: Added.
  • web-platform-tests/css/css-color/predefined-013-expected.html: Added.
  • web-platform-tests/css/css-color/predefined-013.html: Added.
  • web-platform-tests/css/css-color/predefined-014-expected.html: Added.
  • web-platform-tests/css/css-color/predefined-014.html: Added.
  • web-platform-tests/css/css-color/predefined-015-expected.html: Added.
  • web-platform-tests/css/css-color/predefined-015.html: Added.
  • web-platform-tests/css/css-color/predefined-016-expected.html: Added.
  • web-platform-tests/css/css-color/predefined-016.html: Added.
  • web-platform-tests/css/css-color/predefined-017-expected.html: Added.
  • web-platform-tests/css/css-color/predefined-017.html: Added.
  • web-platform-tests/css/css-color/system-color-compute-expected.txt: Added.
  • web-platform-tests/css/css-color/system-color-compute.html: Added.
  • web-platform-tests/css/css-color/t32-opacity-basic-0.6-a-expected.html: Added.
  • web-platform-tests/css/css-color/t32-opacity-basic-0.6-a.xht:
  • web-platform-tests/css/css-color/t32-opacity-zorder-c-expected.html: Added.
  • web-platform-tests/css/css-color/t32-opacity-zorder-c.xht:
  • web-platform-tests/css/css-color/t421-rgb-hex3-expand-b-expected.html: Added.
  • web-platform-tests/css/css-color/t421-rgb-hex3-expand-b.xht:
  • web-platform-tests/css/css-color/t422-rgba-a0.6-a-expected.html: Added.
  • web-platform-tests/css/css-color/t422-rgba-a0.6-a.xht:
  • web-platform-tests/css/css-color/t425-hsla-basic-a-expected.html: Added.
  • web-platform-tests/css/css-color/t425-hsla-basic-a.xht:
  • web-platform-tests/css/css-color/w3c-import.log:

LayoutTests:

Add failing expectations for newly imported reftests that fail. Fixing them is
tracked in https://bugs.webkit.org/show_bug.cgi?id=220928.

9:12 AM Changeset in webkit [271797] by youenn@apple.com
  • 13 edits in trunk

Activate simulcast through addTransceiver
https://bugs.webkit.org/show_bug.cgi?id=173262
<rdar://problem/32713416>

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

  • web-platform-tests/webrtc/RTCPeerConnection-addTransceiver.https-expected.txt:
  • web-platform-tests/webrtc/RTCPeerConnection-transceivers.https-expected.txt:
  • web-platform-tests/webrtc/protocol/simulcast-offer-expected.txt:

Source/WebCore:

Update WebIDL according latest version of the spec.
Add binding code to go from WebIDL to webrtc backend for sendEncodings parameters.
Minor refactoring to bring to web pages information on addTransceiver failures.

Covered by rebased tests.

  • Modules/mediastream/RTCPeerConnection.h:
  • Modules/mediastream/RTCPeerConnection.idl:
  • Modules/mediastream/RTCRtpEncodingParameters.idl:
  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::LibWebRTCMediaEndpoint::OnStatsDelivered):
(WebCore::LibWebRTCMediaEndpoint::createTransceiverBackends):
(WebCore::LibWebRTCMediaEndpoint::addTransceiver):

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

(WebCore::LibWebRTCPeerConnectionBackend::addTransceiverFromTrackOrKind):

  • Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:

(WebCore::fromRTCEncodingParameters):
(WebCore::fromRtpTransceiverInit):

8:52 AM Changeset in webkit [271796] by Andres Gonzalez
  • 7 edits
    4 adds in trunk

AX: @alt and bounds ignored when using img[src] points to an inaccessible SVG
https://bugs.webkit.org/show_bug.cgi?id=160705
<rdar://problem/27771579>

Reviewed by Chris Fleizach and Darin Adler.

Source/WebCore:

Tests: accessibility/img-with-svg-source.html

accessibility/ios-simulator/img-with-svg-source.html

The problem was caused by AccessibilityRenderObject::determineAccessibilityRole
that was returning AccessibilityRole::SVGRoot for all images with a remote
SVG source, regardless whether the SVG hierarchy contained some accessibility
data or not. This resulted in VoiceOver reading the image like an empty
group on Mac, or completely ignoring the image on iOS.
The solution in this patch is to only return AccessibilityRole::SVGRoot
if the SVG has some accessibility conveyable data. Added the method
AccessibilitySVGRoot::hasAccessibleContent for this purpose.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
(WebCore::AccessibilityRenderObject::remoteSVGRootElement const):
Comment was missplaced, moved it to the right place.
(WebCore::AccessibilityRenderObject::addRemoteSVGChildren):

  • accessibility/AccessibilitySVGRoot.cpp:

(WebCore::AccessibilitySVGRoot::hasAccessibleContent const):

  • accessibility/AccessibilitySVGRoot.h:

LayoutTests:

  • accessibility/img-with-svg-source-expected.txt: Added.
  • accessibility/img-with-svg-source.html: Added.
  • accessibility/ios-simulator/img-with-svg-source-expected.txt: Added.
  • accessibility/ios-simulator/img-with-svg-source.html: Added.
  • accessibility/svg-shape-labelled-expected.txt:
  • accessibility/svg-shape-labelled.html:

Removed the <img> test cases since they are covered correctly in the new
test img-with-svg-source.html.

8:31 AM Changeset in webkit [271795] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Add Razvan Caliman to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=220921

Patch by Razvan Caliman <Razvan Caliman> on 2021-01-25
Reviewed by Timothy Hatcher.

  • Scripts/webkitpy/common/config/contributors.json:
7:08 AM Changeset in webkit [271794] by commit-queue@webkit.org
  • 4 edits in trunk/Tools

Unreviewed, reverting r270074 and r270170.
https://bugs.webkit.org/show_bug.cgi?id=220922

Broke all GLib unit tests using a SoupServer

Reverted changesets:

"[GTK] Migrate WebKitTestServer to libsoup 2.48 API"
https://bugs.webkit.org/show_bug.cgi?id=219160
https://trac.webkit.org/changeset/270074

"[GTK] Allow WebKitTestServer to run non-loopback addresses
for API tests"
https://bugs.webkit.org/show_bug.cgi?id=219257
https://trac.webkit.org/changeset/270170

5:40 AM Changeset in webkit [271793] by youenn@apple.com
  • 8 edits in trunk/Source/ThirdParty/libwebrtc

Resync libwebrtc with M87 latest branch
https://bugs.webkit.org/show_bug.cgi?id=220913

Reviewed by Eric Carlson.

Cherry-picking two changes that have been cherry-picked in upstream M87 after our latest resync.
This includes: https://webrtc-review.googlesource.com/c/src/+/187349 and https://webrtc-review.googlesource.com/c/src/+/191485.

  • Source/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc:
  • Source/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h:
  • Source/webrtc/modules/audio_coding/codecs/opus/opus_interface.cc:
  • Source/webrtc/modules/audio_coding/codecs/opus/opus_unittest.cc:
  • Source/webrtc/modules/audio_coding/test/TestVADDTX.cc:
  • Source/webrtc/pc/peer_connection_rtp_unittest.cc:
  • Source/webrtc/pc/sdp_offer_answer.cc:
4:34 AM Changeset in webkit [271792] by commit-queue@webkit.org
  • 2 edits
    1 add in trunk/Tools

DumpRenderTree behaves differently to WebKitTestRunner wrt integrated/discrete GPU behavior
https://bugs.webkit.org/show_bug.cgi?id=220852

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-01-25
Reviewed by Alexey Proskuryakov.

Mark DumpRenderTree as supporting graphics switching. This lets
--prefer-integrated-gpu work as intended and compatible with WebKitTestRunner.

  • DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
  • DumpRenderTree/mac/Info.plist: Added.
4:30 AM Changeset in webkit [271791] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Nullptr dereference in SpeechRecognition::stop()
https://bugs.webkit.org/show_bug.cgi?id=220869
<rdar://problem/73507085>

Patch by Sihui Liu <sihui_liu@appe.com> on 2021-01-25
Reviewed by Ryosuke Niwa.

Source/WebCore:

It is possible that SpeechRecognition is created with a Document having no frame and ActiveDOMObjects of the
Document are stopped. In this case, SpeechRecognition::stop() will be invoked after a SpeechRecognition, of
which m_connection is nullptr, is constructed.

Test: fast/speechrecognition/detached-iframe.html

  • Modules/speech/SpeechRecognition.cpp:

(WebCore::SpeechRecognition::stop):

LayoutTests:

  • fast/speechrecognition/detached-iframe-expected.txt: Added.
  • fast/speechrecognition/detached-iframe.html: Added.
4:28 AM Changeset in webkit [271790] by Chris Fleizach
  • 10 edits
    2 adds in trunk

AX: iOS: VO: Web: Column Names Not Announced
https://bugs.webkit.org/show_bug.cgi?id=220829
<rdar://problem/73469037>

Reviewed by Zalan Bujtas.

Source/WebCore:

We no longer use containedInTraits, but mean to override the tableAncestor methods.
Those need to account for the three types of tables.

Test: accessibility/ios-simulator/table-ancestory.html

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper _accessibilityTableAncestor]):
(-[WebAccessibilityObjectWrapper _accessibilityTraitsFromAncestors]):

Tools:

  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:

(WTR::AccessibilityUIElement::isInTable const):
(WTR::AccessibilityUIElement::isInLandmark const):
(WTR::AccessibilityUIElement::isInList const):

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

(WTR::AccessibilityUIElement::isInTable const):
(WTR::AccessibilityUIElement::isInLandmark const):
(WTR::AccessibilityUIElement::isInList const):

LayoutTests:

  • accessibility/ios-simulator/table-ancestory.html: Added.
  • accessibility/ios-simulator/table-ancestory-expected.txt: Added.
  • accessibility/ios-simulator/tables-lists.html: Updated.
2:23 AM Changeset in webkit [271789] by aboya@igalia.com
  • 2 edits in trunk/Tools

[GTK] run-gtk-tests: Use sys.exit(1) instead of return 1
https://bugs.webkit.org/show_bug.cgi?id=220860

Reviewed by Philippe Normand.

Several parts of the code in api_test_runner.py returned 1 on failure.
While common for main() functions, this is bad in functions that are
expected to return something else than an exit code, and lets the
program run after the error. sys.exit(1) should be used in those cases
instead.

  • glib/api_test_runner.py:

(TestRunner._get_tests_from_google_test_suite):
(TestRunner.run_tests):

1:45 AM Changeset in webkit [271788] by commit-queue@webkit.org
  • 15 edits
    4 adds in trunk

scroll-padding should affect paging operations
https://bugs.webkit.org/show_bug.cgi?id=219074
<rdar://problem/71747786>

Patch by Martin Robinson <mrobinson@igalia.com> on 2021-01-25
Reviewed by Simon Fraser.

Source/WebCore:

Have scroll-padding affect the amount of the scrollable area that moves during
paging operations. This is the behavior specified in the scroll snap specification
and allows scrollable areas with partially obscured areas to properly page through
their content.

See https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-padding.

Tests: css3/scroll-snap/scroll-padding-mainframe-paging.html

css3/scroll-snap/scroll-padding-overflow-paging.html

  • page/FrameView.cpp:

(WebCore::FrameView::updateScrollbarSteps): Added this override method which
properly sets page steps. Only FrameView has access to the document.

  • page/FrameView.h:
  • platform/ScrollView.cpp:

(WebCore::ScrollView::updateScrollbars): Added this helper method, which is
virtual so that FrameView can override it.
(WebCore::ScrollView::updateScrollbarSteps): Use the helper method to actually
set the scrollbar steps.

  • platform/ScrollView.h: Add new method declarations.
  • rendering/RenderBox.cpp:

(WebCore::RenderBox::scrollPaddingForViewportRect): Add this new helper which
gets the scroll-padding for a box.

  • rendering/RenderBox.h: Add new helper.
  • rendering/RenderLayer.cpp:

(WebCore::expandScrollRectToVisibleTargetRectToIncludeScrollPadding): Use the new
RenderBox helper.
(WebCore::RenderLayer::updateScrollbarsAfterLayout): Use the new updateScrollbarSteps helper.
(WebCore::RenderLayer::updateScrollbarSteps): Added this helper so that RenderLayerModelObject
can update steps when necessary.

  • rendering/RenderLayer.h: Added new declarations.
  • rendering/RenderLayerModelObject.cpp:

(WebCore::RenderLayerModelObject::styleDidChange): Update steps on FrameViews and RenderLayers
when the style change dictates it.

LayoutTests:

  • css3/scroll-snap/scroll-padding-mainframe-paging-expected.txt: Added.
  • css3/scroll-snap/scroll-padding-mainframe-paging.html: Added.
  • css3/scroll-snap/scroll-padding-overflow-paging-expected.txt: Added.
  • css3/scroll-snap/scroll-padding-overflow-paging.html: Added.
  • platform/ios-wk2/TestExpectations: Skip failing tests.
  • platform/mac-wk1/TestExpectations: Skip failing tests.
12:33 AM Changeset in webkit [271787] by Carlos Garcia Campos
  • 3 edits
    2 adds in trunk

Null Ptr Deref @ WebCore::ReplaceSelectionCommand::doApply
https://bugs.webkit.org/show_bug.cgi?id=218493

Reviewed by Youenn Fablet.

Source/WebCore:

Test: editing/execCommand/insert-image-replace-selection-crash.html

  • editing/ReplaceSelectionCommand.cpp:

(WebCore::fragmentNeedsColorTransformed): Remove invalid assert.
(WebCore::ReplaceSelectionCommand::doApply): Null check insert position container node before using it.

LayoutTests:

  • editing/execCommand/insert-image-replace-selection-crash-expected.txt: Added.
  • editing/execCommand/insert-image-replace-selection-crash.html: Added.

Jan 24, 2021:

4:47 PM Changeset in webkit [271786] by Simon Fraser
  • 19 edits
    2 adds in trunk

[iOS WK2] theverge.com - rubber band scrolling at the top of the page causes an abrupt jump
https://bugs.webkit.org/show_bug.cgi?id=220886
<rdar://71177566>

Reviewed by Sam Weinig.
Source/WebCore:

theverge.com on iOS is a page that has long main thread stalls with forced layouts on a timer
that alter the page height; this caused the post-layout updateScrollbars() called from
FrameView::adjustViewSize() to call scrollToPosition() after adjusting the scroll position
to the allowed range.

If the page laid out while rubberbanding was happening, the current scroll position would
be negative, then clamped to 0, then sent to the UI process as a requested scroll to 0,
triggering the jump to top in the UI process.

There's existing code to prevent this from happening if we know that rubberbanding is
happening; this patch makes isRubberBandInProgress() work for iOS WK2. It does so
by having updateVisibleContentRects() push information about rubberbanding nodes onto
RemoteScrollingCoordinator.

We remove an unnecessary shouldUpdateScrollLayerPositionSynchronously() check in
FrameView::isRubberBandInProgress() - if it's true, then the scrolling coordinator
won't see any rubberbanding nodes anyway.

Test: fast/scrolling/ios/content-size-change-during-rubberband.html

  • page/FrameView.cpp:

(WebCore::FrameView::isRubberBandInProgress const):

  • page/FrameView.h:
  • platform/ScrollView.cpp:

(WebCore::ScrollView::updateScrollbars):

Source/WebKit:

theverge.com on iOS is a page that has long main thread stalls with forced layouts on a timer
that alter the page height; this caused the post-layout updateScrollbars() called from
FrameView::adjustViewSize() to call scrollToPosition() after adjusting the scroll position
to the allowed range.

If the page laid out while rubberbanding was happening, the current scroll position would
be negative, then clamped to 0, then sent to the UI process as a requested scroll to 0,
triggering the jump to top in the UI process.

There's existing code to prevent this from happening if we know that rubberbanding is
happening; this patch makes isRubberBandInProgress() work for iOS WK2. It does so
by having updateVisibleContentRects() push information about rubberbanding nodes onto
RemoteScrollingCoordinator.

We remove an unnecessary shouldUpdateScrollLayerPositionSynchronously() check in
FrameView::isRubberBandInProgress() - if it's true, then the scrolling coordinator
won't see any rubberbanding nodes anyway.

  • UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
  • WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.h:
  • WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.mm:

(WebKit::RemoteScrollingCoordinator::addNodeWithActiveRubberBanding):
(WebKit::RemoteScrollingCoordinator::removeNodeWithActiveRubberBanding):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::updateVisibleContentRects):

Tools:

Add test infrastructure to allow UIScriptController::scrollToOffset() and
UIScriptController::immediateScrollToOffset() to take an options argument with
a 'unconstrained' property, which allows scrolling to unstable offset to simulate
rubberbanding.

  • DumpRenderTree/ios/UIScriptControllerIOS.h:
  • DumpRenderTree/ios/UIScriptControllerIOS.mm:

(WTR::contentOffsetBoundedIfNecessary):
(WTR::UIScriptControllerIOS::scrollToOffset):
(WTR::UIScriptControllerIOS::immediateScrollToOffset):
(WTR::contentOffsetBoundedInValidRange): Deleted.

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

(WTR::UIScriptController::scrollToOffset):
(WTR::UIScriptController::immediateScrollToOffset):

  • TestRunnerShared/UIScriptContext/UIScriptControllerShared.cpp:

(WTR::toScrollToOptions):

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

(WTR::contentOffsetBoundedIfNecessary):
(WTR::UIScriptControllerIOS::scrollToOffset):
(WTR::UIScriptControllerIOS::immediateScrollToOffset):
(WTR::contentOffsetBoundedInValidRange): Deleted.

LayoutTests:

Add test infrastructure to allow UIScriptController::scrollToOffset() and
UIScriptController::immediateScrollToOffset() to take an options argument with
a 'unconstrained' property, which allows scrolling to unstable offset to simulate
rubberbanding.

  • fast/scrolling/ios/content-size-change-during-rubberband-expected.txt: Added.
  • fast/scrolling/ios/content-size-change-during-rubberband.html: Added.
  • resources/ui-helper.js:

(window.UIHelper.scrollTo.return.new.Promise.):
(window.UIHelper.scrollTo.return.new.Promise):
(window.UIHelper.scrollTo):
(window.UIHelper.immediateScrollTo):
(window.UIHelper.immediateUnstableScrollTo):

4:28 PM Changeset in webkit [271785] by Simon Fraser
  • 3 edits
    4 adds in trunk

SVG reference filter chain with errors applies only some of the filters, producing incorrect output
https://bugs.webkit.org/show_bug.cgi?id=220893

Reviewed by Sam Weinig.

Source/WebCore:

If the CSS filter property refers to an invalid reference filter, ensure that
the entire reference filter is skipped. Previously, we'd add elements of the reference
filter up to the invalid one.

This behavior matches Gecko and Blink.

Tests: css3/filters/invalid-reference-filter-in-chain.html

css3/filters/invalid-reference-filter.html

  • rendering/CSSFilter.cpp:

(WebCore::CSSFilter::buildReferenceFilter):

LayoutTests:

  • css3/filters/invalid-reference-filter-expected.html: Added.
  • css3/filters/invalid-reference-filter-in-chain-expected.html: Added.
  • css3/filters/invalid-reference-filter-in-chain.html: Added.
  • css3/filters/invalid-reference-filter.html: Added.
1:58 PM Changeset in webkit [271784] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Make FontCascade::CodePath an enum class
https://bugs.webkit.org/show_bug.cgi?id=219947

Patch by Rob Buis <rbuis@igalia.com> on 2021-01-24
Reviewed by Darin Adler.

Revert part of r270932 change, Complex from X.h
will clash with the enum class too.

  • platform/graphics/FontCascade.h:
11:04 AM Changeset in webkit [271783] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Remove unused function Line::isRunConsideredEmpty
https://bugs.webkit.org/show_bug.cgi?id=220900

Reviewed by Antti Koivisto.

We don't track "is considered empty" line state anymore.

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::isRunConsideredEmpty const): Deleted.

  • layout/inlineformatting/InlineLine.h:
9:59 AM Changeset in webkit [271782] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Ceil inline level box's width and height values when converting from float to LayoutUnit
https://bugs.webkit.org/show_bug.cgi?id=220898

Reviewed by Antti Koivisto.

It ensures that the inline level box always encloses the content.

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):

Jan 23, 2021:

2:11 PM Changeset in webkit [271781] by ysuzuki@apple.com
  • 7 edits in trunk/Source/JavaScriptCore

[JSC] DeferredWorkTimer should clear pending task after running
https://bugs.webkit.org/show_bug.cgi?id=220888

Reviewed by Mark Lam.

Wasm code assumes that scheduleWorkSoon clears pending dependencies. But DeferredWorkTimer is not clearing it, and instead, FinalizationRegistry etc. is clearing
it explicitly. This semantics is problematic. We are putting cancelPendingWork in JSPromise::resolve / JSPromise::reject. But they do not work since this is C++
version of them, and JSPromise has JS version of them. And if JS version is called, cancelPendingWork is not called. And we do not want to complicate JSPromise's
reject / resolve path since this is super hot, and we should keep them in JS.
Instead, we should always clear pending task if it is called.

  • jsc.cpp:

(JSC_DEFINE_HOST_FUNCTION):

  • runtime/DeferredWorkTimer.cpp:

(JSC::DeferredWorkTimer::doWork):

  • runtime/DeferredWorkTimer.h:
  • runtime/JSFinalizationRegistry.cpp:

(JSC::JSFinalizationRegistry::finalizeUnconditionally):

  • runtime/JSPromise.cpp:

(JSC::JSPromise::resolve): Remove this work-around, and instead, we must call scheduleWorkSoon if addPendingWork is called.
(JSC::JSPromise::reject): Ditto.

  • wasm/js/JSWebAssembly.cpp:

(JSC::JSWebAssembly::webAssemblyModuleValidateAsync):
(JSC::instantiate): Use instance for Ticket instead of promise to disambiguate the ticket scheduling from compileAndInstantiate's one easily.
(JSC::compileAndInstantiate): There are path that we do not call scheduleWorkSoon while we call addPendingWork, this is wrong, and JSPromise's workaround is added to
alleviate this situation. We should not do that: we must call scheduleWorkSoon at some point if addPendingWork is called.
(JSC::JSWebAssembly::webAssemblyModuleInstantinateAsync):

2:08 PM Changeset in webkit [271780] by pvollan@apple.com
  • 7 edits in trunk

[macOS] Deny mach lookup access to "com.apple.iconservices" in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=220013
<rdar://problem/60649036>

Reviewed by Brent Fulgham.

Source/WebKit:

Deny mach lookup access to "com.apple.iconservices" in the WebContent process on macOS,
since there are no longer any reports of this being used.

Test: fast/sandbox/mac/sandbox-mach-lookup.html

  • WebProcess/com.apple.WebProcess.sb.in:

LayoutTests:

  • fast/sandbox/mac/sandbox-mach-lookup-expected.txt:
  • fast/sandbox/mac/sandbox-mach-lookup.html:
  • platform/mac-catalina/fast/sandbox/mac/sandbox-mach-lookup-expected.txt:
  • platform/mac-mojave/fast/sandbox/mac/sandbox-mach-lookup-expected.txt:
12:31 PM Changeset in webkit [271779] by eric.carlson@apple.com
  • 4 edits
    2 adds in trunk

[iOS] Set background playback restriction for WebAudio
https://bugs.webkit.org/show_bug.cgi?id=220879
<rdar://72949281>

Reviewed by Jer Noble.
Source/WebCore:

WebAudio does not play in the background on iOS both because audio doesn't play
when the category is set to AVAudioSessionCategoryAmbient, and because the
AudioContext is paused when the web process is forwarded the
UIApplicationWillResignActiveNotification notification.

This notification isn't forwarded when the WebView is hosted in SafariViewController
so the AudioContext is not paused, so it resumes playing when the application is
foregrounded even if the view controller is not in the foreground.

Fix this by setting the BackgroundProcessPlaybackRestricted restriction for
WebAudio sessions so the context is always paused in the background.

Test: media/webaudio-background-playback.html

  • platform/audio/ios/MediaSessionManagerIOS.mm:

(WebCore::MediaSessionManageriOS::resetRestrictions):

LayoutTests:

  • media/media-session-restrictions-expected.txt: Update expectations.
  • media/webaudio-background-playback-expected.txt: Added.
  • media/webaudio-background-playback.html: Added.
7:35 AM Changeset in webkit [271778] by pvollan@apple.com
  • 7 edits in trunk

Source/WebKit:
[macOS] Deny mach lookup access to "com.apple.iconservices.store" in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=220014
<rdar://problem/68923110>

Reviewed by Brent Fulgham.

Deny mach lookup access to "com.apple.iconservices.store" in the WebContent process on macOS,
since there are no longer any reports of this being used.

Test: fast/sandbox/mac/sandbox-mach-lookup.html

  • WebProcess/com.apple.WebProcess.sb.in:

LayoutTests:
[macOS] Deny mach-lookup to the service 'com.apple.iconservices.store' in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=220014
<rdar://problem/68923110>

Reviewed by Brent Fulgham.

  • fast/sandbox/mac/sandbox-mach-lookup-expected.txt:
  • fast/sandbox/mac/sandbox-mach-lookup.html:
  • platform/mac-catalina/fast/sandbox/mac/sandbox-mach-lookup-expected.txt:
  • platform/mac-mojave/fast/sandbox/mac/sandbox-mach-lookup-expected.txt:
7:30 AM Changeset in webkit [271777] by pvollan@apple.com
  • 7 edits in trunk

[macOS] Deny mach-lookup to the service 'com.apple.hiservices-xpcservice' in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=220321
<rdar://problem/68878470>

Reviewed by Darin Adler.

Source/WebKit:

Deny mach-lookup to the service 'com.apple.hiservices-xpcservice' in the WebContent process on macOS,
since there are no longer any reports of this service being used.

Test: fast/sandbox/mac/sandbox-mach-lookup.html

  • WebProcess/com.apple.WebProcess.sb.in:

LayoutTests:

  • fast/sandbox/mac/sandbox-mach-lookup-expected.txt:
  • fast/sandbox/mac/sandbox-mach-lookup.html:
  • platform/mac-catalina/fast/sandbox/mac/sandbox-mach-lookup-expected.txt:
  • platform/mac-mojave/fast/sandbox/mac/sandbox-mach-lookup-expected.txt:
6:16 AM Changeset in webkit [271776] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][Integration] Disable inline boxes with layers
https://bugs.webkit.org/show_bug.cgi?id=220891

Reviewed by Antti Koivisto.

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::canUseForChild):

  • rendering/RenderInline.h:
4:32 AM Changeset in webkit [271775] by commit-queue@webkit.org
  • 37 edits in trunk

[JSC] Allow to build WebAssembly without B3
https://bugs.webkit.org/show_bug.cgi?id=220365

Patch by Xan Lopez <Xan Lopez> on 2021-01-23
Reviewed by Yusuke Suzuki.

.:

Make the WebAssembly feature depend on Baseline JIT, not B3
JIT. Also add a WEBASSEMBLY_B3JIT feature to enable or disable the
B3 tier in WebAssembly.

  • Source/cmake/WebKitFeatures.cmake: disable on 32bit.

Source/JavaScriptCore:

Make all the B3 related code in WebAssembly a compile-time
option. When disabled WebAssembly will only use its LLInt tier.

  • llint/LLIntOfflineAsmConfig.h: define WEBASSEMBLY_B3JIT for the

offline assembler.

  • llint/WebAssembly.asm: guard B3 code inside WEBASSEMBLY_B3JTI ifdefs.
  • wasm/WasmAirIRGenerator.cpp: ditto.
  • wasm/WasmAirIRGenerator.h: ditto.
  • wasm/WasmB3IRGenerator.cpp: ditto.
  • wasm/WasmB3IRGenerator.h: ditto.
  • wasm/WasmBBQPlan.cpp: ditto.
  • wasm/WasmBBQPlan.h: ditto.
  • wasm/WasmCallee.h: ditto.
  • wasm/WasmCodeBlock.cpp:

(JSC::Wasm::CodeBlock::CodeBlock): ditto.

  • wasm/WasmCodeBlock.h:

(JSC::Wasm::CodeBlock::wasmEntrypointCalleeFromFunctionIndexSpace): ditto.

  • wasm/WasmLLIntGenerator.h: ditto.
  • wasm/WasmLLIntPlan.cpp: ditto.
  • wasm/WasmOMGForOSREntryPlan.cpp: ditto.
  • wasm/WasmOMGForOSREntryPlan.h: ditto.
  • wasm/WasmOMGPlan.cpp: ditto.
  • wasm/WasmOMGPlan.h: ditto.
  • wasm/WasmOSREntryData.h: ditto.
  • wasm/WasmOperations.cpp: ditto.
  • wasm/WasmOperations.h: ditto.
  • wasm/WasmPlan.cpp: ditto.
  • wasm/WasmPlan.h: ditto.
  • wasm/WasmSlowPaths.cpp: ditto.
  • wasm/WasmSlowPaths.h: ditto.
  • wasm/WasmThunks.cpp: ditto.
  • wasm/WasmThunks.h: ditto.
  • wasm/WasmTierUpCount.cpp: ditto.
  • wasm/WasmTierUpCount.h: ditto.
  • wasm/generateWasmOpsHeader.py: ditto.

Source/WTF:

  • wtf/PlatformEnable.h: Disable WebAssembly on 32bit platforms,

enable WebAssembly B3JIT on PLATFORM(COCOA).

Tools:

  • Scripts/webkitperl/FeatureList.pm: add WebAssembly B3 JIT option.

Jan 22, 2021:

8:58 PM Changeset in webkit [271774] by ysuzuki@apple.com
  • 25 edits
    27 adds in trunk

Should SharedArrayBuffer/WebAssembly.Memory really throw?
https://bugs.webkit.org/show_bug.cgi?id=220364

Reviewed by Mark Lam.

LayoutTests/imported/w3c:

Update common/sab.js and wasm/.

  • web-platform-tests/common/sab.js:

(const.createBuffer):

  • web-platform-tests/wasm/jsapi/META.yml: Added.
  • web-platform-tests/wasm/jsapi/constructor/instantiate.any-expected.txt:
  • web-platform-tests/wasm/jsapi/constructor/instantiate.any.worker-expected.txt:
  • web-platform-tests/wasm/jsapi/global/type.tentative.any-expected.txt: Added.
  • web-platform-tests/wasm/jsapi/global/type.tentative.any.html: Added.
  • web-platform-tests/wasm/jsapi/global/type.tentative.any.js: Added.

(assert_type):
(test):
(string_appeared_here.test):

  • web-platform-tests/wasm/jsapi/global/type.tentative.any.worker-expected.txt: Added.
  • web-platform-tests/wasm/jsapi/global/type.tentative.any.worker.html: Added.
  • web-platform-tests/wasm/jsapi/global/w3c-import.log:
  • web-platform-tests/wasm/jsapi/instance/constructor.any-expected.txt:
  • web-platform-tests/wasm/jsapi/instance/constructor.any.worker-expected.txt:
  • web-platform-tests/wasm/jsapi/instanceTestFactory.js:

(const.imports.string_appeared_here.string_appeared_here):
(return.verify):

  • web-platform-tests/wasm/jsapi/memory/type.tentative.any-expected.txt: Added.
  • web-platform-tests/wasm/jsapi/memory/type.tentative.any.html: Added.
  • web-platform-tests/wasm/jsapi/memory/type.tentative.any.js: Added.

(assert_type):
(test):

  • web-platform-tests/wasm/jsapi/memory/type.tentative.any.worker-expected.txt: Added.
  • web-platform-tests/wasm/jsapi/memory/type.tentative.any.worker.html: Added.
  • web-platform-tests/wasm/jsapi/memory/w3c-import.log:
  • web-platform-tests/wasm/jsapi/module/exports.any-expected.txt:
  • web-platform-tests/wasm/jsapi/module/exports.any.js:

(test):

  • web-platform-tests/wasm/jsapi/module/exports.any.worker-expected.txt:
  • web-platform-tests/wasm/jsapi/module/imports.any-expected.txt:
  • web-platform-tests/wasm/jsapi/module/imports.any.js:

(test):

  • web-platform-tests/wasm/jsapi/module/imports.any.worker-expected.txt:
  • web-platform-tests/wasm/jsapi/table/constructor-reftypes.tentative.any-expected.txt: Added.
  • web-platform-tests/wasm/jsapi/table/constructor-reftypes.tentative.any.html: Added.
  • web-platform-tests/wasm/jsapi/table/constructor-reftypes.tentative.any.js: Added.

(test):

  • web-platform-tests/wasm/jsapi/table/constructor-reftypes.tentative.any.worker-expected.txt: Added.
  • web-platform-tests/wasm/jsapi/table/constructor-reftypes.tentative.any.worker.html: Added.
  • web-platform-tests/wasm/jsapi/table/set-reftypes.tentative.any-expected.txt: Added.
  • web-platform-tests/wasm/jsapi/table/set-reftypes.tentative.any.html: Added.
  • web-platform-tests/wasm/jsapi/table/set-reftypes.tentative.any.js: Added.

(test):

  • web-platform-tests/wasm/jsapi/table/set-reftypes.tentative.any.worker-expected.txt: Added.
  • web-platform-tests/wasm/jsapi/table/set-reftypes.tentative.any.worker.html: Added.
  • web-platform-tests/wasm/jsapi/table/w3c-import.log:
  • web-platform-tests/wasm/jsapi/w3c-import.log:
  • web-platform-tests/wasm/webapi/META.yml: Added.
  • web-platform-tests/wasm/webapi/instantiateStreaming.any-expected.txt:
  • web-platform-tests/wasm/webapi/instantiateStreaming.any.worker-expected.txt:
  • web-platform-tests/wasm/webapi/invalid-code.any-expected.txt:
  • web-platform-tests/wasm/webapi/invalid-code.any.js:

(string_appeared_here.Invalid.code):

  • web-platform-tests/wasm/webapi/invalid-code.any.worker-expected.txt:
  • web-platform-tests/wasm/webapi/modified-contenttype.any-expected.txt: Added.
  • web-platform-tests/wasm/webapi/modified-contenttype.any.html: Added.
  • web-platform-tests/wasm/webapi/modified-contenttype.any.js: Added.

(string_appeared_here.forEach.method.promise_test.async t):
(string_appeared_here.forEach.method.with.Content.Type.set late):

  • web-platform-tests/wasm/webapi/modified-contenttype.any.worker-expected.txt: Added.
  • web-platform-tests/wasm/webapi/modified-contenttype.any.worker.html: Added.
  • web-platform-tests/wasm/webapi/w3c-import.log:

Source/JavaScriptCore:

Not accessing "shared" field if Options::useSharedArrayBuffer() is false.

  • wasm/js/WebAssemblyMemoryConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

7:55 PM Changeset in webkit [271773] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][RenderTreeDump] Expand RenderInline 0 height quirk logic to previous/next siblings
https://bugs.webkit.org/show_bug.cgi?id=220884

Reviewed by Simon Fraser.

Check the previous/next siblings to see whether we should apply the zero-height quirk on the current RenderInline.
Note that this does not change the RenderInlines' reported height values on trunk.
However it greatly helps to reduce the required rebaseline when LFC's inline box support is enabled (see webkit.org/b/220148).

  • rendering/RenderInline.cpp:

(WebCore::RenderInline::shouldCreateLineBoxes const):
(WebCore::RenderInline::updateAlwaysCreateLineBoxes):

  • rendering/RenderInline.h:
  • rendering/RenderTreeAsText.cpp:

(WebCore::isRenderInlineEmpty):
(WebCore::hasNonEmptySibling):
(WebCore::RenderTreeAsText::writeRenderObject):

6:13 PM Changeset in webkit [271772] by Wenson Hsieh
  • 4 edits in trunk/Source/WebKit

The web process should be killed after failing to decode display list items in the GPU process
https://bugs.webkit.org/show_bug.cgi?id=219097
<rdar://problem/71546526>

Reviewed by Chris Dumez.

Handle StopReplayReason::InvalidItem by terminating the web process via MESSAGE_CHECK. See below for more
details.

  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::didReceiveInvalidMessage):
(WebKit::GPUConnectionToWebProcess::terminateWebProcess):

  • GPUProcess/GPUConnectionToWebProcess.h:

Pull logic for terminating the web process out into a separate helper method on GPUConnectionToWebProcess, and
use this helper in GPUConnectionToWebProcess::didReceiveInvalidMessage, as well as in RemoteRenderingBackend
below.

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

Add macro definitions for MESSAGE_CHECK and MESSAGE_CHECK_WITH_RETURN_VALUE. Since the methods on
RemoteRenderingBackend that trigger message checks all run on a background queue, the normal (main-thread) way
of defining these macros (MESSAGE_CHECK_WITH_RETURN_VALUE_BASE and MESSAGE_CHECK_BASE) don't work. We
instead call into the GPU to web process connection object directly to send a TerminateWebProcess message to
the parent (UI) process, and additionally log a given failure message.

(WebKit::RemoteRenderingBackend::nextDestinationImageBufferAfterApplyingDisplayLists):

Replace a number FIXMEs throughout these IPC message handlers with MESSAGE_CHECKs. Additionally, add a new
MESSAGE_CHECK for the case where we stopped replay early due to a corrupted or invalid display list item.

(WebKit::RemoteRenderingBackend::wakeUpAndApplyDisplayList):
(WebKit::RemoteRenderingBackend::setNextItemBufferToRead):

Simply remove the FIXME and early return here; this can only happen in the case where a compromised web content
process attempts to append redundant item buffer change items. However, doing so will either be (1) harmless,
since the pending item buffer information will just be overwritten, or (2) result in hitting a MESSAGE_CHECK
when decoding items if we try to execute the contents of another item buffer that has not been written to.

(WebKit::RemoteRenderingBackend::didCreateSharedDisplayListHandle):

  • GPUProcess/graphics/RemoteRenderingBackend.h:
5:28 PM Changeset in webkit [271771] by Simon Fraser
  • 8 edits in trunk/Source/WebKit

[iOS WK2] Make the "in stable state" bit in visible content rect updates more fine-grained
https://bugs.webkit.org/show_bug.cgi?id=220875

Reviewed by Tim Horton.

VisibleContentRectUpdateInfo contains a single "in stable state" bit, but in a future
patch the web process will need to know if the UI process is rubberbanding. In addition,
we can fold "isChangingObscuredInsetsInteractively" into the same state bits.

So give VisibleContentRectUpdateInfo a OptionSet<ViewStabilityFlag>.

To give the correct state for non-main UIScrollViews, have _scrollViewIsRubberBanding
take the UIScrollView in question, and only include isChangingObscuredInsetsInteractively
if the question is being asked of the main UIScrollView.

  • Shared/VisibleContentRectUpdateInfo.cpp:

(WebKit::VisibleContentRectUpdateInfo::encode const):
(WebKit::VisibleContentRectUpdateInfo::decode):
(WebKit::operator<<):

  • Shared/VisibleContentRectUpdateInfo.h:

(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::VisibleContentRectUpdateInfo::inStableState const):
(WebKit::VisibleContentRectUpdateInfo::viewStability const):
(WebKit::VisibleContentRectUpdateInfo::isFirstUpdateForNewViewSize const):
(WebKit::operator==):
(WebKit::VisibleContentRectUpdateInfo::isChangingObscuredInsetsInteractively const): Deleted.

  • UIProcess/API/Cocoa/WKWebViewInternal.h:
  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView _didRelaunchProcess]):
(-[WKWebView _scrollViewIsRubberBanding:]):
(-[WKWebView _viewStabilityState:]):
(-[WKWebView _scheduleVisibleContentRectUpdateAfterScrollInView:]):
(-[WKWebView _updateVisibleContentRects]):
(-[WKWebView _scrollViewIsRubberBanding]): Deleted.
(-[WKWebView _scrollViewIsInStableState:]): Deleted.

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

(-[WKContentView didUpdateVisibleRect:unobscuredRect:contentInsets:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:viewStability:enclosedInScrollableAncestorView:sendEvenIfUnchanged:]):
(-[WKContentView didUpdateVisibleRect:unobscuredRect:contentInsets:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:sendEvenIfUnchanged:]): Deleted.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::updateVisibleContentRects):

5:25 PM Changeset in webkit [271770] by commit-queue@webkit.org
  • 4 edits in trunk

REGRESSION(r266148) Cancelling a navigation in decidePolicyForNavigationAction should not suspend the previous document's font loading timer
https://bugs.webkit.org/show_bug.cgi?id=220882
<rdar://problem/71634501>

Patch by Alex Christensen <achristensen@webkit.org> on 2021-01-22
Reviewed by Brady Eidson.

Source/WebCore:

Things like the load event and didFinishNavigation wait until loading of things like fonts and iframes has completed.

If we navigate to a document that immediately tries to navigate to a different document after starting the loads of fonts,
then we momentarily have two DocumentLoaders with m_frame pointing to the same main frame.

If we cancel that second navigation using WKNavigationActionPolicyCancel, then it calls DocumentLoader::stopLoading on the second DocumentLoader.
This is fine. This is the way things have worked for a very long time.

r266148 introduced a call to the document's font loader's suspendFontLoadingTimer inside of DocumentLoader::stopLoading which is also fine.
What is not fine is the way we get that document. Using m_frame->document() in this case gets us the first document, which may still be loading fonts that we do still want.
Using this->document() only returns non-null if this DocumentLoader is the DocumentLoader that was used to load the Frame's Document,
and in this case the DocumentLoader should only stop the font loading timer if that is true.

I added an API test that reproduces the issue before but not after this fix.
For further verification, you can replace server.request() in my API test with a request to the URL in the radar ending in "Authentication.htm"
and verify it times out before the fix but not after.

This is close to the largest amount of time spent per character changed I've ever written to change "m_frame" to "this".

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::stopLoading):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm:

(TEST):

5:24 PM Changeset in webkit [271769] by Jonathan Bedard
  • 4 edits
    3 moves in trunk/LayoutTests

[LayoutTests] Move service-worker python files to resources
https://bugs.webkit.org/show_bug.cgi?id=220881
<rdar://problem/73518780>

Reviewed by Alexey Proskuryakov.

  • http/wpt/service-workers/check-service-worker-header.https.html:
  • http/wpt/service-workers/check-service-worker-header.py: Moved.
  • http/wpt/service-workers/file-upload-check.py: Moved.
  • http/wpt/service-workers/file-upload.html:
  • http/wpt/service-workers/resources/check-service-worker-header.py: Copied from LayoutTests/http/wpt/service-workers/check-service-worker-header.py.
  • http/wpt/service-workers/resources/file-upload-check.py: Copied from LayoutTests/http/wpt/service-workers/file-upload-check.py.
  • http/wpt/service-workers/resources/update-worker.py: Copied from LayoutTests/http/wpt/service-workers/update-worker.py.
  • http/wpt/service-workers/update-service-worker.https.html:
  • http/wpt/service-workers/update-worker.py: Moved.
5:22 PM Changeset in webkit [271768] by Jonathan Bedard
  • 2 edits in trunk/Tools

[webkitscmpy] Add GitHub credentials (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=220562
<rdar://problem/73063457>

Reviewed by Aakash Jain.

  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Change xmldict version.
4:23 PM Changeset in webkit [271767] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Obj-C API should do correct type checks when using a 32-bit address space
https://bugs.webkit.org/show_bug.cgi?id=220880
<rdar://72370334>

Reviewed by Tadeu Zagallo.

  • API/JSValue.mm:

(-[JSValue isNull]):
(-[JSValue isBoolean]):
(-[JSValue isNumber]):
(-[JSValue isString]):

4:07 PM Changeset in webkit [271766] by ysuzuki@apple.com
  • 12 edits in trunk/Source/JavaScriptCore

REGRESSION (r271731): Unchecked JS exception under GlobalObject::moduleLoaderFetch
https://bugs.webkit.org/show_bug.cgi?id=220868

Reviewed by Mark Lam.

Because TerminatedExecutionError needs to be uncaught, CatchScope's semantics does not work well.
So, we extend ThrowScope to implement CatchScope's feature, and use ThrowScope etc.
We also add JSPromise::rejectWithCaughtException since this pattern is common enough.

  • API/JSAPIGlobalObject.mm:

(JSC::JSAPIGlobalObject::moduleLoaderImportModule):
(JSC::JSAPIGlobalObject::moduleLoaderFetch):

  • jsc.cpp:

(GlobalObject::moduleLoaderImportModule):
(GlobalObject::moduleLoaderFetch):

  • runtime/Completion.cpp:

(JSC::rejectPromise):
(JSC::loadAndEvaluateModule):
(JSC::loadModule):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/JSInternalPromise.cpp:

(JSC::JSInternalPromise::rejectWithCaughtException):

  • runtime/JSInternalPromise.h:
  • runtime/JSModuleLoader.cpp:

(JSC::JSModuleLoader::importModule):
(JSC::JSModuleLoader::resolve):
(JSC::JSModuleLoader::fetch):
(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::reject): Deleted.

  • runtime/JSPromise.cpp:

(JSC::JSPromise::rejectWithCaughtException):

  • runtime/JSPromise.h:
  • runtime/ThrowScope.h:

(JSC::ThrowScope::clearException):

  • wasm/js/JSWebAssembly.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::resolve):
(JSC::JSWebAssembly::webAssemblyModuleValidateAsync):
(JSC::instantiate):
(JSC::compileAndInstantiate):
(JSC::JSWebAssembly::webAssemblyModuleInstantinateAsync):
(JSC::reject): Deleted.
(JSC::webAssemblyModuleValidateAsyncInternal): Deleted.
(JSC::webAssemblyModuleInstantinateAsyncInternal): Deleted.

4:04 PM Changeset in webkit [271765] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Update run-benchmark to work with Python3
https://bugs.webkit.org/show_bug.cgi?id=220878

Patch by W.D. Xiong <w_xiong@apple.com> on 2021-01-22
Reviewed by Jonathan Bedard.

  • Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py:

(SimpleHTTPServerDriver._find_http_server_port): Convert byte output to string before parsing regex

3:59 PM Changeset in webkit [271764] by Lauro Moura
  • 2 edits in trunk/Tools

[webkitpy][GTK] Xvfb driver fails to start with python3
https://bugs.webkit.org/show_bug.cgi?id=220870

Reviewed by Jonathan Bedard.

Python2 and Python3 differ in how they handle file descriptor inheritance
and Popen's close_fds default value.

In Python2, os.pipe creates the fds with the inheritable flag set, and
Popen's close_fds defaults to True.

In Python3, os.pipe creates the fds non-inheritable, requiring a call
to os.set_inheritable to enable it. Also, Popen's close_fds defaults
to False, closing all file descriptors except stdin, stdout and stderr.

With this commit, Python3 is able to launch the Xvfb driver for
run-webdriver-tests, but is still failing later with some pytest issue
to be tracked in another bug.

  • Scripts/webkitpy/port/xvfbdriver.py:

(XvfbDriver._xvfb_pipe): Make the write_fd inheritable if in py3.
(XvfbDriver._xvfb_read_display_id): Encode for py3 bytes compatibility.
(XvfbDriver._xvfb_run): Tell popen to keep the file descriptors open.

3:56 PM Changeset in webkit [271763] by Russell Epstein
  • 1 copy in tags/Safari-611.1.10.1.2

Tag Safari-611.1.10.1.2.

3:53 PM Changeset in webkit [271762] by Jonathan Bedard
  • 2 edits
    1 move
    1 add in trunk/LayoutTests

[LayoutTests] Move redirect.py in resources folder
https://bugs.webkit.org/show_bug.cgi?id=220876
<rdar://problem/73516627>

Reviewed by Alexey Proskuryakov.

  • http/wpt/html/dom/elements/images/bypass-cache-redirection-revalidation.html:
  • http/wpt/html/dom/elements/images/redirect.py: Moved to images/resources /redirect.py
  • http/wpt/html/dom/elements/images/resources: Added.
  • http/wpt/html/dom/elements/images/resources/redirect.py: Moved from images/redirect.py.
2:35 PM Changeset in webkit [271761] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Crash under FFTFrame::fftSetupForSize()
https://bugs.webkit.org/show_bug.cgi?id=220866
<rdar://73199504>

Reviewed by Darin Adler.

Follow-up to r271751 to address comment from Darin Adler. Stop using the double-checked
locking pattern as it is likely not safe [1].

[1] http://erdani.org/publications/DDJ_Jul_Aug_2004_revised.pdf

  • platform/audio/mac/FFTFrameMac.cpp:

(WebCore::fftSetups):
(WebCore::FFTFrame::fftSetupForSize):

1:55 PM Changeset in webkit [271760] by Chris Fleizach
  • 11 edits
    2 adds in trunk

AX: AT-synthesized key events for common user actions (increment/decrement) are detectably different in many ways, potentially causing both web app breakage and AT identification
https://bugs.webkit.org/show_bug.cgi?id=220675
<rdar://problem/73263977>

Reviewed by Zalan Bujtas.

Source/WebCore:

Test: accessibility/keyevents-for-actions-mimic-real-key-events.html

When accessibility posts keyboard events in response to ax actions, they should mimic
real key events so as to be indistinguishable.

https://github.com/WICG/aom/blob/gh-pages/explainer.md#deprecated-keyboardevent-object-properties-optional

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::dispatchSimulatedKeyboardUpDownEvent):
(WebCore::InitializeLegacyKeyInitProperties):
(WebCore::AccessibilityNodeObject::performDismissAction):
(WebCore::AccessibilityNodeObject::postKeyboardKeysForValueChange):

  • dom/KeyboardEvent.cpp:

(WebCore::KeyboardEvent::KeyboardEvent):
(WebCore::KeyboardEvent::create):

  • dom/KeyboardEvent.h:
  • dom/UIEvent.cpp:

(WebCore::UIEvent::UIEvent):

  • dom/UIEvent.h:

(WebCore::UIEvent::create):

  • dom/UIEventWithKeyState.h:

(WebCore::UIEventWithKeyState::UIEventWithKeyState):

LayoutTests:

  • accessibility/keyevents-for-actions-mimic-real-key-events-expected.txt: Added.
  • accessibility/keyevents-for-actions-mimic-real-key-events.html: Added.
1:49 PM Changeset in webkit [271759] by Devin Rousso
  • 3 edits in trunk/LayoutTests/imported/w3c

[WPT] [Payment Request] slight adjustment to payment-request/payment-request-constructor-thcrash.https.html
https://bugs.webkit.org/show_bug.cgi?id=220872

Reviewed by Andy Estes.

The first test in payment-request/payment-request-constructor-thcrash.https.html is
incorrect because duplicate items in methodData provided to PaymentRequest should throw
a RangeError according to step 4.3.3 of <https://www.w3.org/TR/payment-request/#constructor>.

The spec does mention in <https://www.w3.org/TR/payment-request/#conformance>

User agents _MAY_ impose implementation-specific limits on otherwise unconstrained inputs,
e.g., to prevent denial of service attacks, to guard against running out of memory, or to
work around platform-specific limitations. When an input exceeds implementation-specific
limit, the user agent _MUST_ throw, or, in the context of a promise, reject with, a
TypeError optionally informing the developer of how a particular input exceeded an
implementation-specific limit.

but does not specify whether this should happen before or after the above.

In WebKit's case, there is no "implementation-specific limit", so a TypeError should not
be thrown in either case.

  • web-platform-tests/payment-request/payment-request-constructor-thcrash.https.html:
  • web-platform-tests/payment-request/payment-request-constructor-thcrash.https-expected.txt:
12:49 PM Changeset in webkit [271758] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Avoid duplicate calculations in RenderBlock::computePreferredLogicalWidths
https://bugs.webkit.org/show_bug.cgi?id=220873

Patch by Rob Buis <rbuis@igalia.com> on 2021-01-22
Reviewed by Darin Adler.

Avoid duplicate calculations in RenderBlock::computePreferredLogicalWidths.

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::computePreferredLogicalWidths):

12:40 PM Changeset in webkit [271757] by Wenson Hsieh
  • 8 edits in trunk

DisplayList::Replayer should stop replay and inform clients after encountering an invalid item
https://bugs.webkit.org/show_bug.cgi?id=220867

Reviewed by Chris Dumez.

Source/WebCore:

Make the DisplayList item iterator emit Optional<ItemHandle> instead of just ItemHandle; in the case of
client decoding or item validation failures (see #220710), this item handle will be WTF::nullopt. The display
list replayer will then handle this by halting replay with StopReplayReason::InvalidItem.

This refactoring will eventually enable RemoteRenderingBackend (in the GPU process) to terminate the web
content process when we fail to decode a display list item during playback (or encounter an invalid inline
item).

Test: DisplayListTests.InlineItemValidationFailure

DisplayListTests.OutOfLineItemDecodingFailure

  • platform/graphics/displaylists/DisplayList.cpp:

(WebCore::DisplayList::DisplayList::asText const):
(WebCore::DisplayList::DisplayList::dump const):
(WebCore::DisplayList::DisplayList::iterator::atEnd const):
(WebCore::DisplayList::DisplayList::iterator::updateCurrentItem):

Add an m_isValid flag. This flag is set to true initially, and is only set to false when we encounter an
item that is either invalid or unable to be decoded. Additionally, remove release assertions and the FIXMEs
regarding handling item decoding failures.

  • platform/graphics/displaylists/DisplayList.h:

(WebCore::DisplayList::DisplayList::iterator::operator* const):

If the m_isValid flag above is set, return WTF::nullopt for the item handle.

  • platform/graphics/displaylists/DisplayListReplayer.cpp:

(WebCore::DisplayList::Replayer::replay):

  • platform/graphics/displaylists/DisplayListReplayer.h:

Rename DecodingFailure to InvalidItem, since it now applies to both items that are invalid (e.g. contain
identifier values of 0 when they shouldn't) as well as items that fail decoding (which, in the case of the GPU
process, corresponds to IPC decoding failures).

Tools:

  • TestWebKitAPI/Tests/WebCore/DisplayListTests.cpp:

Adjust a few API tests, since the item handle in the DisplayList iterator is now optional.

  • TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp:

Add a couple of new API tests to exercise display list item decoding and validation failures.

12:10 PM Changeset in webkit [271756] by weinig@apple.com
  • 2 edits in trunk/Source/WebKitLegacy

Remove generate-preferences.sh from the WebKitLegacy target so it doesn't get included in the framework
https://bugs.webkit.org/show_bug.cgi?id=220871
<rdar://problem/73503409>

Reviewed by Simon Fraser.

  • WebKitLegacy.xcodeproj/project.pbxproj:

Remove generate-preferences.sh from the WebKitLegacy target so it doesn't get included in the framework.

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

Retried tests are run without --prefer-integrated-gpu
https://bugs.webkit.org/show_bug.cgi?id=220845

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-01-22
Reviewed by Jonathan Bedard.

Run the test helper with --prefer-integrated-gpu also for retried tests, if
user originally passed --prefer-integrated-gpu to run-webkit-tests.

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

(Manager._set_up_run):
(Manager._force_pixel_tests_if_needed):

12:04 PM Changeset in webkit [271754] by jiewen_tan@apple.com
  • 3 edits in trunk/Source/WebKit

[WebAuthn] No error is visible after user enters the incorrect PIN
https://bugs.webkit.org/show_bug.cgi?id=220839
<rdar://problem/73378319>

Reviewed by Brent Fulgham.

To fix that, let's have a boolean to indicate the PIN entry UI has already been presented within this session.
And then rely on the error UI to let users retry the PIN.

Covered by manual tests.

  • UIProcess/WebAuthentication/Cocoa/AuthenticatorPresenterCoordinator.h:
  • UIProcess/WebAuthentication/Cocoa/AuthenticatorPresenterCoordinator.mm:

(WebKit::AuthenticatorPresenterCoordinator::requestPin):
(WebKit::AuthenticatorPresenterCoordinator::selectAssertionResponse):
Besides above, this patch also fixes some crashes.

11:53 AM Changeset in webkit [271753] by jiewen_tan@apple.com
  • 2 edits in trunk/Source/WebKit

[WebAuthn] Should only check default browsers for the Modern WebAuthn
https://bugs.webkit.org/show_bug.cgi?id=220840
<rdar://problem/73375937>

Reviewed by Brent Fulgham.

  • WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp:

(WebKit::WebAuthenticatorCoordinator::makeCredential):
(WebKit::WebAuthenticatorCoordinator::getAssertion):
(WebKit::WebAuthenticatorCoordinator::isUserVerifyingPlatformAuthenticatorAvailable):

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

Unreviewed, fix crashing test
https://bugs.webkit.org/show_bug.cgi?id=220566

  • http/tests/paymentrequest/updateWith-modifiers.https.html:
10:42 AM Changeset in webkit [271751] by Chris Dumez
  • 3 edits
    2 adds in trunk

Crash under FFTFrame::fftSetupForSize()
https://bugs.webkit.org/show_bug.cgi?id=220866
<rdar://73199504>

Reviewed by Eric Carlson.

Source/WebCore:

The crash was caused by FFTFrame::fftSetupForSize() but being called concurrently
from "HRTF database loader" threads. This patch makes FFTFrame::fftSetupForSize()
thread safe to address the issue.

Test: webaudio/Panner/PannerNode-crash.html

  • platform/audio/mac/FFTFrameMac.cpp:

(WebCore::fftSetups):
(WebCore::FFTFrame::fftSetupForSize):

LayoutTests:

Add layout test coverage.

  • webaudio/Panner/PannerNode-crash-expected.txt: Added.
  • webaudio/Panner/PannerNode-crash.html: Added.
10:33 AM Changeset in webkit [271750] by youenn@apple.com
  • 13 edits in trunk

Add more descriptive messages to setLocalDescription/setRemoteDescription error cases
https://bugs.webkit.org/show_bug.cgi?id=220857

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

  • web-platform-tests/webrtc/RTCPeerConnection-SLD-SRD-timing.https-expected.txt:
  • web-platform-tests/webrtc/RTCPeerConnection-operations.https-expected.txt:
  • web-platform-tests/webrtc/RTCPeerConnection-perfect-negotiation-stress-glare-linear.https-expected.txt:
  • web-platform-tests/webrtc/RTCPeerConnection-perfect-negotiation-stress-glare.https-expected.txt:
  • web-platform-tests/webrtc/RTCPeerConnection-setDescription-transceiver-expected.txt:
  • web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-rollback-expected.txt:
  • web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-offer-expected.txt:
  • web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-rollback-expected.txt:

Source/WebCore:

No change of behavior, covered by rebased tests.

  • Modules/mediastream/PeerConnectionBackend.cpp:

(WebCore::PeerConnectionBackend::setLocalDescription):
(WebCore::PeerConnectionBackend::setRemoteDescription):

LayoutTests:

  • fast/mediastream/RTCPeerConnection-setRemoteDescription-offer-expected.txt:
10:11 AM Changeset in webkit [271749] by youenn@apple.com
  • 3 edits in trunk/Source/WebCore

Disable verification timer in case of capture suspension
https://bugs.webkit.org/show_bug.cgi?id=220859

Reviewed by Eric Carlson.

In case of suspension/unsuspension, make it as if the capture was interrupted.
Update updateVerifyCapturingTimer to stop timer it capture is interrupted.

Remove RealtimeMediaSource::m_interrupted which is unused and potentially confusing.
Manually tested.

  • platform/mediastream/RealtimeMediaSource.h:
  • platform/mediastream/mac/AVVideoCaptureSource.mm:

(WebCore::AVVideoCaptureSource::updateVerifyCapturingTimer):
(WebCore::AVVideoCaptureSource::captureDeviceSuspendedDidChange):

9:53 AM Changeset in webkit [271748] by Jonathan Bedard
  • 8 edits in trunk/Tools

[webkitscmpy] Map alternative default branch names
https://bugs.webkit.org/show_bug.cgi?id=220865
<rdar://problem/73502370>

Reviewed by Aakash Jain.

As WebKit transitions from Subversion to Git, our default branch is changing from
trunk to main. This change allow identifiers with 'main' in them to work in Subversion checkouts.

  • Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:

(Git.find): Map set of common default branches to this repository's default branch.

  • Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:

(GitHub.find): Map set of common default branches to this repository's default branch.

  • Scripts/libraries/webkitscmpy/webkitscmpy/scm_base.py:

(ScmBase.find): Map set of common default branches to this repository's default branch.

  • Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:

(TestGit.test_alternative_default_branch):
(TestGitHub.test_alternative_default_branch):

  • Scripts/libraries/webkitscmpy/webkitscmpy/test/svn_unittest.py:

(TestLocalSvn.test_alternative_default_branch):
(TestRemoteSvn.test_alternative_default_branch):

9:36 AM Changeset in webkit [271747] by Chris Dumez
  • 2 edits in trunk/LayoutTests

[ Big Sur ] imported/w3c/web-platform-tests/beacon/beacon-cors.sub.window.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=220554
<rdar://problem/73048771>

Unreviewed, unskip test as it no longer appears to be flaky.

  • platform/mac/TestExpectations:
9:27 AM Changeset in webkit [271746] by mark.lam@apple.com
  • 7 edits in trunk

Disable Options:useAtMethod because of compatibility issue.
https://bugs.webkit.org/show_bug.cgi?id=220788
rdar://72933608

Reviewed by Saam Barati and Yusuke Suzuki.

Source/JavaScriptCore:

See https://github.com/tc39/proposal-relative-indexing-method/issues/41.

  • jsc.cpp:

(CommandLine::parseArguments):

  • enable Options::useAtMethod by default for the jsc shell for testing.
  • runtime/OptionsList.h:

LayoutTests:

Enable Options::useAtMethod for these tests.

  • inspector/model/remote-object-get-properties.html:
  • js/Object-getOwnPropertyNames.html:
  • js/array-unscopables-properties.html:
8:29 AM Changeset in webkit [271745] by commit-queue@webkit.org
  • 7 edits
    4 adds in trunk

[css-grid] Relayout grid items when definiteness changes.
https://bugs.webkit.org/show_bug.cgi?id=220657

LayoutTests/imported/w3c:

Tests percentage-size-subitems-002.html and relative-grandchild.html are
imported from WPT.

Patch by Ziran Sun <Ziran Sun> on 2021-01-22
Reviewed by Manuel Rego Casasnovas.

  • web-platform-tests/css/css-grid/grid-items/percentage-size-subitems-002-expected.html: Added.
  • web-platform-tests/css/css-grid/grid-items/percentage-size-subitems-002.html: Added.
  • LayoutTests/imported/w3c/web-platform-tests/css/css-grid/relative-grandchild.html: Added.
  • LayoutTests/imported/w3c/web-platform-tests/css/css-grid/relative-grandchild-expected.xht: Added.
  • web-platform-tests/css/css-grid/grid-items/w3c-import.log:

Source/WebCore:

Patch by Ziran Sun <Ziran Sun> on 2021-01-22
Reviewed by Manuel Rego Casasnovas.

When setting an override logical-height the definiteness can change causing %-height
children to resolve differently. This change adds this check to determine if a grid-item
needs relayout. It is an import of Chromium changes at
https://chromium-review.googlesource.com/c/chromium/src/+/2474917
Instead of adding maybeHasPercentHeightDescendant() in WebKit, this change calls
hasPercentHeightDescendants(). In Chromium it wasn't possible to use
hasPercentHeightDescendants() because of this quirk:
https://quirks.spec.whatwg.org/#the-percentage-height-calculation-quirk
WebKit doesn't seem to use the quirk for grid according to the image in
https://github.com/w3c/csswg-drafts/issues/5545

This also fixes issues in test:
grid-child-percent-basis-resize-1.html

Tests have been ported in WPT at
https://github.com/web-platform-tests/wpt/pull/26136

Tests: imported/w3c/web-platform-tests/css/css-grid/grid-items/percentage-size-subitems-002.html

imported/w3c/web-platform-tests/css/css-grid/relative-grandchild.html

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):

LayoutTests:

Patch by Ziran Sun <Ziran Sun> on 2021-01-22
Reviewed by Manuel Rego Casasnovas.

7:09 AM Changeset in webkit [271744] by Kate Cheney
  • 2 edits in trunk/Source/WebCore

Denying storage access on playstation.com then clicking sign-in fails to show the prompt again
https://bugs.webkit.org/show_bug.cgi?id=220838
<rdar://problem/73477444>

Reviewed by Alex Christensen.

Temporary cross-page storage access in the Web Process for quirks
should only be granted if the user hits "Allow" on the prompt.
This was causing the prompt to fail to show if a user clicks "Don't
Allow" then tries to sign in, then sign-in would fail without
storage access in the Network Process.

  • page/Quirks.cpp:

(WebCore::Quirks::requestStorageAccessAndHandleClick const):

4:11 AM Changeset in webkit [271743] by Chris Lord
  • 4 edits in trunk/Source/WebCore

Remove individual settings accessors from WorkerGlobalScope and add Settings::Values accessor
https://bugs.webkit.org/show_bug.cgi?id=220854

Reviewed by Youenn Fablet.

Remove individual settings accessors from WorkerGlobalScope and make
Settings::Values accessor public.

No new tests, no behavior change.

  • html/OffscreenCanvas.cpp:

(WebCore::OffscreenCanvas::createContextWebGL):

  • workers/WorkerAnimationController.cpp:

(WebCore::WorkerAnimationController::scheduleAnimation):
(WebCore::WorkerAnimationController::serviceRequestAnimationFrameCallbacks):

  • workers/WorkerGlobalScope.h:
2:59 AM Changeset in webkit [271742] by Chris Lord
  • 11 edits in trunk/Source/WebCore

Move FontGenericFamilies storage from SettingsBase to Settings::Values
https://bugs.webkit.org/show_bug.cgi?id=220801

Reviewed by Myles C. Maxfield.

Move FontGenericFamilies member from SettingsBase to Settings::Values
so that it can potentially be used within Workers. This will aid with
font usage off the main thread.

No new tests, no behavior change.

  • Headers.cmake:
  • Scripts/SettingsTemplates/Settings.cpp.erb:
  • Scripts/SettingsTemplates/Settings.h.erb:
  • css/CSSFontSelector.cpp:

(WebCore::resolveGenericFamily):
(WebCore::CSSFontSelector::fallbackFontAt):

  • page/SettingsBase.cpp:

(WebCore::SettingsBase::SettingsBase):
(WebCore::SettingsBase::standardFontFamily const):
(WebCore::SettingsBase::setStandardFontFamily):
(WebCore::SettingsBase::fixedFontFamily const):
(WebCore::SettingsBase::setFixedFontFamily):
(WebCore::SettingsBase::serifFontFamily const):
(WebCore::SettingsBase::setSerifFontFamily):
(WebCore::SettingsBase::sansSerifFontFamily const):
(WebCore::SettingsBase::setSansSerifFontFamily):
(WebCore::SettingsBase::cursiveFontFamily const):
(WebCore::SettingsBase::setCursiveFontFamily):
(WebCore::SettingsBase::fantasyFontFamily const):
(WebCore::SettingsBase::setFantasyFontFamily):
(WebCore::SettingsBase::pictographFontFamily const):
(WebCore::SettingsBase::setPictographFontFamily):

  • page/SettingsBase.h:
  • platform/graphics/FontGenericFamilies.cpp:

(WebCore::setGenericFontFamilyForScript):
(WebCore::genericFontFamilyForScript):
(WebCore::FontGenericFamilies::FontGenericFamilies):
(WebCore::FontGenericFamilies::isolatedCopy const):
(WebCore::FontGenericFamilies::standardFontFamily const):
(WebCore::FontGenericFamilies::fixedFontFamily const):
(WebCore::FontGenericFamilies::serifFontFamily const):
(WebCore::FontGenericFamilies::sansSerifFontFamily const):
(WebCore::FontGenericFamilies::cursiveFontFamily const):
(WebCore::FontGenericFamilies::fantasyFontFamily const):
(WebCore::FontGenericFamilies::pictographFontFamily const):
(WebCore::FontGenericFamilies::setStandardFontFamily):
(WebCore::FontGenericFamilies::setFixedFontFamily):
(WebCore::FontGenericFamilies::setSerifFontFamily):
(WebCore::FontGenericFamilies::setSansSerifFontFamily):
(WebCore::FontGenericFamilies::setCursiveFontFamily):
(WebCore::FontGenericFamilies::setFantasyFontFamily):
(WebCore::FontGenericFamilies::setPictographFontFamily):

  • platform/graphics/FontGenericFamilies.h:
  • style/StyleResolveForFontRaw.cpp:

(WebCore::Style::resolveForFontRaw):

1:34 AM Changeset in webkit [271741] by youenn@apple.com
  • 5 edits in trunk/Source/WebCore

Validate ItemHandles when decoding them in GPUProcess
https://bugs.webkit.org/show_bug.cgi?id=220710

Reviewed by Wenson Hsieh.

ItemHandle may contain members that need to be validated if they are encoded/decoded through memory copy instead of IPC encode/decode routines.
This is particularly true of identifiers that can be null but cannot be encoded/decoded if the identifier is null.
For these inline ItemHandles, validate them before copying them.
No observable change of behavior, coveredd by existing tests.

  • platform/graphics/displaylists/DisplayList.cpp:

(WebCore::DisplayList::DisplayList::iterator::updateCurrentItem):

  • platform/graphics/displaylists/DisplayListItemBuffer.cpp:

(WebCore::DisplayList::ItemHandleInspector::test):
(WebCore::DisplayList::copyInto):
(WebCore::DisplayList::ItemHandle::safeCopyInto const):
(WebCore::DisplayList::ItemHandle::copyTo const): Deleted.

  • platform/graphics/displaylists/DisplayListItemBuffer.h:
  • platform/graphics/displaylists/DisplayListItems.h:

(WebCore::DisplayList::ClipToImageBuffer::isValid const):
(WebCore::DisplayList::DrawImageBuffer::isValid const):
(WebCore::DisplayList::DrawNativeImage::isValid const):
(WebCore::DisplayList::DrawPattern::isValid const):
(WebCore::DisplayList::PaintFrameForMedia::isValid const):
(WebCore::DisplayList::FlushContext::FlushContext):
(WebCore::DisplayList::FlushContext::isValid const):
(WebCore::DisplayList::MetaCommandChangeItemBuffer::MetaCommandChangeItemBuffer):
(WebCore::DisplayList::MetaCommandChangeItemBuffer::isValid const):
(WebCore::DisplayList::MetaCommandChangeDestinationImageBuffer::MetaCommandChangeDestinationImageBuffer):
(WebCore::DisplayList::MetaCommandChangeDestinationImageBuffer::isValid const):

1:07 AM Changeset in webkit [271740] by Nikolas Zimmermann
  • 10 edits in trunk/Source/WebCore

Continue removing glue code from RenderLayer that was recently added in r271559
https://bugs.webkit.org/show_bug.cgi?id=220729

Reviewed by Adrian Perez de Castro.

Follow-up on patch adressing the removal of the glue code that
forwards calls from RenderLayer to RenderLayerScrollableArea (see
webkit.org/b/60305).

Covered by existing tests.

  • page/FrameView.cpp:

(WebCore::FrameView::paintContents):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::paint):
(WebCore::RenderBlock::isPointInOverflowControl):
(WebCore::RenderBlock::baselinePosition const):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::intrinsicScrollbarLogicalWidth const):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::containsDirtyOverlayScrollbars const): Deleted.
(WebCore::RenderLayer::hitTestOverflowControls): Deleted.
(WebCore::RenderLayer::paintOverflowControls): Deleted.
(WebCore::RenderLayer::paintResizer): Deleted.
(WebCore::RenderLayer::paintScrollCorner): Deleted.
(WebCore::RenderLayer::paintOverlayScrollbars): Deleted.
(WebCore::RenderLayer::layerForHorizontalScrollbar const): Deleted.
(WebCore::RenderLayer::layerForVerticalScrollbar const): Deleted.
(WebCore::RenderLayer::horizontalScrollbar const): Deleted.
(WebCore::RenderLayer::verticalScrollbar const): Deleted.

  • rendering/RenderLayer.h:

(WebCore::RenderLayer::hasScrollbars const): Deleted.
(WebCore::RenderLayer::hasHorizontalScrollbar const): Deleted.
(WebCore::RenderLayer::hasVerticalScrollbar const): Deleted.

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::requiresHorizontalScrollbarLayer const):
(WebCore::RenderLayerBacking::requiresVerticalScrollbarLayer const):
(WebCore::RenderLayerBacking::requiresScrollCornerLayer const):
(WebCore::RenderLayerBacking::positionOverflowControlsLayers):
(WebCore::RenderLayerBacking::paintIntoLayer):
(WebCore::RenderLayerBacking::paintContents):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateScrollingNodeLayers):

  • rendering/RenderTreeAsText.cpp:
  • rendering/RenderWidget.cpp:

(WebCore::RenderWidget::paint):

12:52 AM Changeset in webkit [271739] by Lauro Moura
  • 3 edits
    1 add in trunk

[WebDriver] Add info about importing tests
https://bugs.webkit.org/show_bug.cgi?id=220786

Reviewed by Carlos Garcia Campos.

Tools:

  • Scripts/import-webdriver-tests: Replace optparse with argparse and

refer to the tests README.md
(Importer.import_tests):

WebDriverTests:

  • README.md: Added.

Jan 21, 2021:

10:22 PM Changeset in webkit [271738] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Handle shapeMargin becoming NaN
https://bugs.webkit.org/show_bug.cgi?id=220352

Patch by Rob Buis <rbuis@igalia.com> on 2021-01-21
Reviewed by Zalan Bujtas.

Source/WebCore:

For large zoom factors shapeMargin can become NaN, in that case treat
it as zero.

Test: fast/shapes/shape-outside-floats/shape-outside-large-zoom.html

  • rendering/shapes/ShapeOutsideInfo.cpp:

(WebCore::ShapeOutsideInfo::computedShape const):

LayoutTests:

Add test for this.

  • fast/shapes/shape-outside-floats/shape-outside-large-zoom-expected.txt: Added.
  • fast/shapes/shape-outside-floats/shape-outside-large-zoom.html: Added.
10:11 PM Changeset in webkit [271737] by Peng Liu
  • 4 edits in trunk/Source/WebKit

PiP video subtitles stop updating when Safari is backgrounded
https://bugs.webkit.org/show_bug.cgi?id=220660

Reviewed by Darin Adler.

Subtitles in the picture-in-picture window will stop updating when the browser is
in the background because we freeze the layer tree when a browser is in the background.
This patch fixes this issue by avoiding freezing the layer tree if a video is playing
in picture-in-picture when the browser is in the background.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updateDrawingAreaLayerTreeFreezeState):

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

(WebKit::VideoFullscreenManager::videoInPictureInPicture const):
(WebKit::VideoFullscreenManager::enterVideoFullscreenForVideoElement):
(WebKit::VideoFullscreenManager::exitVideoFullscreenForVideoElement):
(WebKit::VideoFullscreenManager::exitVideoFullscreenToModeWithoutAnimation):

10:08 PM Changeset in webkit [271736] by timothy_horton@apple.com
  • 2 edits in trunk/LayoutTests

REGRESSION (r271472): [ Mac WK2 ] intersection-observer/target-deleted.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=220637
<rdar://problem/73220571>

Reviewed by Simon Fraser.

  • intersection-observer/target-deleted.html:

For some reason, on some configurations, this test recently stopped seeing its
intersection observer get garbage collected when it expects. The regression
point is likely irrelevant, though multiple bots agree.

Doing a full rendering update by using rAF instead of just a setInterval
seems to be enough to get the object to actually be collected promptly.

7:50 PM Changeset in webkit [271735] by Devin Rousso
  • 23 edits in trunk

[Apple Pay] use the first item in shippingOptions even when it's not selected
https://bugs.webkit.org/show_bug.cgi?id=220810

Reviewed by Andy Estes.

LayoutTests/imported/w3c:

  • web-platform-tests/payment-request/payment-request-constructor.https.sub-expected.txt:
  • web-platform-tests/payment-request/payment-request-shippingOption-attribute.https-expected.txt:

Source/JavaScriptCore:

  • inspector/protocol/Console.json:
  • runtime/ConsoleTypes.h:
  • inspector/ConsoleMessage.cpp:

(Inspector::messageSourceValue):

  • runtime/ConsoleClient.cpp:

(JSC::appendMessagePrefix):
Add a new PaymentRequest value to the ChannelSource enum.

Source/WebCore:

The Payment Request API defines a selected property of PaymentShippingOption that is
used to control the initially selected shipping option when showing/updating a payment
request. Currently, PKShippingMethod does not have an equivalent concept and instead just
uses the first item in the -[PKPaymentRequest setShippingMethods:] such that there is
always a selected PKShippingMethod. This patch adjusts WebKit to follow those same
conventions, in that the first item in paymentDetailsBase.shippingOptions is used as the
selectedShippingOption so as to avoid situations where PassKit displays the first shipping
option while PaymentRequest.prototype.get shippingOption has a different value, which
could result in the user authorizing a payment with different shipping details than what
they were shown. Ideally in the future PassKit will add API/SPI to allow us to undo this.

Tests: http/tests/paymentrequest/payment-request-change-shipping-option.https.html

http/tests/paymentrequest/updateWith-shippingOptions.https.html
web-platform-tests/payment-request/payment-request-constructor.https.sub.html
web-platform-tests/payment-request/payment-request-shippingOption-attribute.https.html

  • Modules/paymentrequest/PaymentRequest.cpp:

(WebCore::checkAndCanonicalizeDetails):
(WebCore::PaymentRequest::create):
(WebCore::PaymentRequest::settleDetailsPromise):
Pass the ScriptExecutionContext instead of the JSGlobalObject so that it's possible to
call ScriptExecutionContext::addConsoleMessage. When creating a PaymentRequest, log if
subsequent PaymentShippingOption are marked as selected.

  • inspector/agents/page/PageConsoleAgent.cpp:

(WebCore::PageConsoleAgent::getLoggingChannels):
Add a new PaymentRequest value to the ChannelSource enum.

Source/WebInspectorUI:

  • UserInterface/Models/ConsoleMessage.js:
  • UserInterface/Models/IssueMessage.js:

(WI.IssueMessage):
Add a new PaymentRequest value to the ChannelSource enum.

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebChromeClient.mm:

(stringForMessageSource):
Add a new PaymentRequest value to the ChannelSource enum.

LayoutTests:

  • http/tests/paymentrequest/payment-address-attributes-and-toJSON-method.https-expected.txt:
  • http/tests/paymentrequest/payment-request-change-shipping-option.https.html:
  • http/tests/paymentrequest/payment-request-change-shipping-option.https-expected.txt:
  • http/tests/paymentrequest/payment-response-retry-method.https-expected.txt:
  • http/tests/paymentrequest/updateWith-shippingOptions.https.html:
  • http/tests/paymentrequest/updateWith-shippingOptions.https-expected.txt:
7:39 PM Changeset in webkit [271734] by Devin Rousso
  • 5 edits in trunk

[Payment Request] constructor should throw if a payment method is provided more than once
https://bugs.webkit.org/show_bug.cgi?id=220824

Reviewed by Andy Estes.

LayoutTests/imported/w3c:

  • web-platform-tests/payment-request/payment-request-constructor-thcrash.https-expected.txt:
  • web-platform-tests/payment-request/payment-request-constructor.https.sub-expected.txt:

Source/WebCore:

Test: web-platform-tests/payment-request/payment-request-constructor.https.sub.html

  • Modules/paymentrequest/PaymentRequest.cpp:

(WebCore::stringify): Added.
(WebCore::PaymentRequest::create):

7:22 PM Changeset in webkit [271733] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Protect against sampleRate being 0 in IIRFilter::tailTime()
https://bugs.webkit.org/show_bug.cgi?id=220837
<rdar://73395924>

Reviewed by Eric Carlson.

  • platform/audio/IIRFilter.cpp:

(WebCore::IIRFilter::tailTime):
Return early if sampleRate is 0 (invalid). Add a release assertion to make
sure that numberOfBlocks is greater than 0 since this is the size of the
|magnitude| array and we access magnitude[0] later on.

7:09 PM Changeset in webkit [271732] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

REGRESSION (r271559): [BigSur] fast/forms/password-scrolled-after-caps-lock-toggled.html is consistently failing
https://bugs.webkit.org/show_bug.cgi?id=220743

Patch by Nikolas Zimmermann <nzimmermann@igalia.com> on 2021-01-21
Reviewed by Simon Fraser.

Create RenderLayerScrollableArea objects for layers that establish
overflow clipping (overflow: hidden). It is unfortunate that this is
necessary and could be optimized in the future.

Covered by fast/forms/password-scrolled-after-caps-lock-toggled.html.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::requiresLayerWithScrollableArea const): Layers
that establish overflow clipping (overflow: hidden) need to create
RenderLayerScrollableArea.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::scroll): Avoid unnecessary creation of
RenderLayerScrollableArea. Calling scroll() should early return here
instead of returning false from RenderLayerScrollableArea::scroll().

6:51 PM Changeset in webkit [271731] by ysuzuki@apple.com
  • 9 edits
    1 add in trunk

[JSC] JSPromise should not propagate TerminatedExecutionError
https://bugs.webkit.org/show_bug.cgi?id=220820
<rdar://problem/72929399>

Reviewed by Mark Lam.

JSTests:

  • stress/terminated-execution-error-in-promise.js: Added.

(let.x.get toString):
(import.x.then):

Source/JavaScriptCore:

TerminatedExecutionError is uncatcheable exception to finish JS execution as soon as possible.
We should not propagate TerminatedExecutionError in JSPromise's rejection.
In this patch, we do not reject promise if exception is TerminatedExecutionError.

  • API/JSAPIGlobalObject.mm:

(JSC::JSAPIGlobalObject::moduleLoaderImportModule):
(JSC::JSAPIGlobalObject::moduleLoaderFetch):

  • API/JSContext.mm:

(-[JSContext evaluateJSScript:]):

  • jsc.cpp:

(GlobalObject::moduleLoaderImportModule):
(GlobalObject::moduleLoaderFetch):
(runWithOptions):

  • runtime/Completion.cpp:

(JSC::rejectPromise):
(JSC::loadAndEvaluateModule):
(JSC::loadModule):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/JSModuleLoader.cpp:

(JSC::reject):
(JSC::JSModuleLoader::importModule):
(JSC::JSModuleLoader::resolve):
(JSC::JSModuleLoader::fetch):
(JSC::JSC_DEFINE_HOST_FUNCTION):

  • wasm/js/JSWebAssembly.cpp:

(JSC::reject):

6:48 PM Changeset in webkit [271730] by Simon Fraser
  • 5 edits
    1 delete in trunk

Scroll-chaining not triggering before complete end of overscroll
https://bugs.webkit.org/show_bug.cgi?id=219960
<rdar://problem/72595521>

Reviewed by Tim Horton.

Source/WebCore:

Scroll latching for momentum scrolls was too sticky; it would keep latching to the same
scroller within a 100ms of the last event that was handled, which was exacerbated by the
fact that ScrollController can go into "ignoreMomentumScrolls" mode which results in
no visible scrolling but continued consumption of momentum wheel events.

Fix by releasing the latch as soon as we see the end of a momentum scroll,
so that we always re-evaluate latching at the start of the next gesture.

Tested by fast/scrolling/latching/nested-cross-axis-latch-expiration.html

  • page/scrolling/ScrollingTreeLatchingController.cpp:

(WebCore::ScrollingTreeLatchingController::nodeDidHandleEvent):

LayoutTests:

Adjusted test for new behavior. No longer need WK1 result.

  • fast/scrolling/latching/nested-cross-axis-latch-expiration-expected.txt:
  • fast/scrolling/latching/nested-cross-axis-latch-expiration.html:
  • platform/mac-wk1/fast/scrolling/latching/nested-cross-axis-latch-expiration-expected.txt: Removed.
5:40 PM Changeset in webkit [271729] by Chris Dumez
  • 2 edits in trunk/Source/WTF

Unreviewed attempt to fix WatchOS build after r271673.

This feature is not available in the simulator for any of the
IOS_FAMILY platforms.

  • wtf/PlatformHave.h:
5:37 PM Changeset in webkit [271728] by Chris Dumez
  • 2 edits in trunk/Source/WTF

Unreviewed, reverting r271727.

Fix is wrong

Reverted changeset:

"Unreviewed attempt to fix WatchOS build after r271673."
https://trac.webkit.org/changeset/271727

5:32 PM Changeset in webkit [271727] by Chris Dumez
  • 2 edits in trunk/Source/WTF

Unreviewed attempt to fix WatchOS build after r271673.

  • wtf/PlatformHave.h:
5:24 PM Changeset in webkit [271726] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Fix bidi confusion when evaluation result has RTL text
https://bugs.webkit.org/show_bug.cgi?id=220639

Patch by Ebrahim Byagowi <ebrahim@gnu.org> on 2021-01-21
Reviewed by BJ Burg.

Apply unicode-bidi: isolate to formatted string and regexp so that
when they contain RTL text the bidi algorithm won't mix
saved variable name ($1, $2, ...) with the content.

  • UserInterface/Views/FormattedValue.css:

(.formatted-string, .formatted-regexp):

5:10 PM Changeset in webkit [271725] by Peng Liu
  • 2 edits in trunk/Source/WebCore

Videos on Facebook Stories do not play
https://bugs.webkit.org/show_bug.cgi?id=220834

Reviewed by Jer Noble.

Add a quirk (for the iOS port) to allow videos (with audio) on Facebook stories to play.

  • page/Quirks.cpp:

(WebCore::Quirks::shouldAutoplayForArbitraryUserGesture const):

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

[ews] Use github instead of svn.webkit.org to fetch contributors.json
https://bugs.webkit.org/show_bug.cgi?id=220808

Reviewed by Jonathan Bedard.

  • CISupport/ews-build/steps.py:

(ValidateCommiterAndReviewer): Changed url to github.
(ValidateCommiterAndReviewer.load_contributors_from_github): Renamed.
(ValidateCommiterAndReviewer.load_contributors):

4:55 PM Changeset in webkit [271723] by weinig@apple.com
  • 4 edits in trunk/Source/WebCore

Remove support for now unused CMYKA<> color type
https://bugs.webkit.org/show_bug.cgi?id=220828

Reviewed by Wenson Hsieh.

We no longer have any users of the CMYKA<> type, so it, and it's conversion functions
can be removed.

  • platform/graphics/ColorConversion.cpp:

(WebCore::toCMYKA): Deleted.

  • platform/graphics/ColorConversion.h:

(WebCore::toCMYKA): Deleted.

  • platform/graphics/ColorTypes.h:

(WebCore::CMYKA::CMYKA): Deleted.

4:15 PM Changeset in webkit [271722] by Ryan Haddad
  • 2 edits in trunk/Source/WTF

Add experimental support for separated layers
https://bugs.webkit.org/show_bug.cgi?id=220734

Unreviewed build fix.

  • wtf/PlatformHave.h: Remove watchOS and tvOS.
4:12 PM Changeset in webkit [271721] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebCore

Add WebXR to features.json
https://bugs.webkit.org/show_bug.cgi?id=220811

Reviewed by Simon Fraser.

We are clearly working on WebXR. See:

No new tests because there is no behavior change.

  • features.json:
3:43 PM Changeset in webkit [271720] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Null dereference in CompositeEditCommand::cloneParagraphUnderNewElement(): needs to check lastNode parent
https://bugs.webkit.org/show_bug.cgi?id=220813

Patch by Julian Gonzalez <julian_a_gonzalez@apple.com> on 2021-01-21
Reviewed by Ryosuke Niwa.

Source/WebCore:

When iterating through parent nodes, cloneParagraphUnderNewElement()
has to be careful to check for the top of the DOM tree for *both*
startNode and lastNode.
Since we're explicitly checking for this now, remove the assertion
that lastNode's parent is never nullptr.

Test: editing/inserting/insert-ul-select-all.html

  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):

LayoutTests:

Add a test to verify that we don't iterate outside the DOM tree when
inserting an unordered list on top of existing content.

  • editing/inserting/insert-ul-select-all-expected.txt: Added.
  • editing/inserting/insert-ul-select-all.html: Added.
3:36 PM Changeset in webkit [271719] by don.olmstead@sony.com
  • 2 edits in trunk/Source/WebCore

[Curl] Replace CURLOPT_ENCODING with CURLOPT_ACCEPT_ENCODING
https://bugs.webkit.org/show_bug.cgi?id=220825

Reviewed by Fujii Hironori.

Use CURLOPT_ACCEPT_ENCODING which replaced CURLOPT_ENCODING in cURL v7.21.6.

  • platform/network/curl/CurlContext.cpp:

(WebCore::CurlHandle::enableAcceptEncoding):

3:35 PM Changeset in webkit [271718] by don.olmstead@sony.com
  • 2 edits in trunk/Source/WebCore

[Curl] Remove redundant certificate error check
https://bugs.webkit.org/show_bug.cgi?id=220816

Reviewed by Fujii Hironori.

Within isSSLCertVerificationError the error code is checked against CURLE_SSL_CACERT and
CURLE_PEER_FAILED_VERIFICATION. Since cURL v7.62.0 CURLE_SSL_CACERT was deprecated and is
currently defined as CURLE_PEER_FAILED_VERIFICATION. Remove the check against
CURLE_SSL_CACERT since its redundant and deprecated.

  • platform/network/curl/ResourceErrorCurl.cpp:

(WebCore::ResourceError::isSSLCertVerificationError const):

3:28 PM Changeset in webkit [271717] by don.olmstead@sony.com
  • 2 edits in trunk/Source/WebCore

[Curl] Remove invalid HTTP version checks
https://bugs.webkit.org/show_bug.cgi?id=220817

Reviewed by Fujii Hironori.

The CurlResponse.httpVersion value comes from a call to CURLINFO_HTTP_VERSION which returns
CURL_HTTP_VERSION_1_0, CURL_HTTP_VERSION_1_1, CURL_HTTP_VERSION_2_0, CURL_HTTP_VERSION_3 or
0 if the version can't be determined. The case statement in ResourceResponse constructor is
checking for CURL_HTTP_VERSION_2TLS and CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE which aren't
valid returns so they can be removed.

  • platform/network/curl/ResourceResponseCurl.cpp:

(WebCore::ResourceResponse::ResourceResponse):

3:26 PM Changeset in webkit [271716] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

Update setup-commit-queue.sh for github repo
https://bugs.webkit.org/show_bug.cgi?id=220750

Reviewed by Jonathan Bedard.

  • EWSTools/setup-commit-queue.sh:
2:56 PM Changeset in webkit [271715] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

zero and rename boundingRect pointer in Font::platformBoundsForGlyph() to CTFontGetBoundingRectsForGlyphs()
https://bugs.webkit.org/show_bug.cgi?id=219177

Patch by Julian Gonzalez <julian_a_gonzalez@apple.com> on 2021-01-21
Reviewed by Darin Adler.

Zero and rename a CGRect struct in two places where the count argument
to CTFontGetBoundingRectsForGlyphs() is already 1.
Thanks to Darin Adler for pointing out this issue.

No new tests, no behavior changes.

  • platform/graphics/coretext/FontCoreText.cpp:

(WebCore::Font::platformBoundsForGlyph const):
(WebCore::Font::isProbablyOnlyUsedToRenderIcons const):

2:55 PM Changeset in webkit [271714] by commit-queue@webkit.org
  • 12 edits in trunk/Source

Add experimental feature to use network loader
https://bugs.webkit.org/show_bug.cgi?id=220521
<rdar://problem/69394713>

Patch by Alex Christensen <achristensen@webkit.org> on 2021-01-21
Reviewed by Geoff Garen.

Source/WebCore/PAL:

  • pal/spi/cf/CFNetworkSPI.h:

Source/WebKit:

Manually verified that the setting is correctly appearing in Safari and being given to CFNetwork.

  • NetworkProcess/NetworkSessionCreationParameters.cpp:

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

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

(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::experimentalFeatureEnabled):
(WebKit::WebsiteDataStore::http3Enabled):
(WebKit::WebsiteDataStore::useNetworkLoader):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::parameters):

  • UIProcess/WebsiteData/WebsiteDataStore.h:

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
  • wtf/PlatformHave.h:
2:54 PM Changeset in webkit [271713] by Aditya Keerthi
  • 18 edits
    1 delete in trunk

Unreviewed, reverting r271691.
https://bugs.webkit.org/show_bug.cgi?id=220812

Introduced crash, and failing API tests.

Reverted changeset:

"[macOS] Titlebar separator doesn't show when WKWebView is scrolled"
https://bugs.webkit.org/show_bug.cgi?id=220633
https://trac.webkit.org/changeset/271691

1:45 PM Changeset in webkit [271712] by weinig@apple.com
  • 28 edits
    4 copies in trunk

Remove explicit clamp to SRGB for Lab colors on CG platforms that support wide color
https://bugs.webkit.org/show_bug.cgi?id=220684

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Update existing lab/lch tests to match new more precise values from https://github.com/web-platform-tests/wpt/pull/27202
and add two new tests for colors outside the sRGB gamut that will be upstreamed to WPT after landing.

  • web-platform-tests/css/css-color/lab-001.html:
  • web-platform-tests/css/css-color/lab-002.html:
  • web-platform-tests/css/css-color/lab-003.html:
  • web-platform-tests/css/css-color/lab-004-expected.html:
  • web-platform-tests/css/css-color/lab-004.html:
  • web-platform-tests/css/css-color/lab-005-expected.html:
  • web-platform-tests/css/css-color/lab-005.html:
  • web-platform-tests/css/css-color/lab-006-expected.html:
  • web-platform-tests/css/css-color/lab-006.html:
  • web-platform-tests/css/css-color/lab-007-expected.html:
  • web-platform-tests/css/css-color/lab-007.html:
  • web-platform-tests/css/css-color/lab-008-expected.html: Added.
  • web-platform-tests/css/css-color/lab-008.html: Added.
  • web-platform-tests/css/css-color/lch-001.html:
  • web-platform-tests/css/css-color/lch-002.html:
  • web-platform-tests/css/css-color/lch-003.html:
  • web-platform-tests/css/css-color/lch-004-expected.html:
  • web-platform-tests/css/css-color/lch-004.html:
  • web-platform-tests/css/css-color/lch-005-expected.html:
  • web-platform-tests/css/css-color/lch-005.html:
  • web-platform-tests/css/css-color/lch-006-expected.html:
  • web-platform-tests/css/css-color/lch-006.html:
  • web-platform-tests/css/css-color/lch-007-expected.html:
  • web-platform-tests/css/css-color/lch-007.html:
  • web-platform-tests/css/css-color/lch-008-expected.html: Added.
  • web-platform-tests/css/css-color/lch-008.html: Added.

Source/WebCore:

To avoid clamping device independent colors to sRGB we convert colors without a direct
CoreGraphics representation to ExtendedSRGB to ensure the full gamut is preserved.

While CoreGraphics does support the Lab colorspace on some systems (Big Sur and later),
to ensure all versions of WebKit can support wide color Lab this approach provides the
most coverage.

  • platform/graphics/ColorConversion.cpp:
  • platform/graphics/ColorConversion.h:
  • platform/graphics/ColorTypes.h:

Add support for ExtendedSRGBA and LinearExtendedSRGBA color types.

  • platform/graphics/cg/ColorCG.cpp:

(WebCore::leakCGColor):
Update fallback conversion to convert to an extended color space to avoid premature
clamping.

1:39 PM Changeset in webkit [271711] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

[GPUProcess][iOS] https://foobar404.github.io/Wave.js/#/ does not output any audio
https://bugs.webkit.org/show_bug.cgi?id=220802
<rdar://problem/73455820>

Reviewed by Per Arne Vollan.

Allow in the sandbox a few things that were needed to use AudioSourceProvider in the GPUProcess.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
12:35 PM Changeset in webkit [271710] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

[macOS] The development WebContent XPC service crashes under WebKit::AuxiliaryProcess::initializeSandbox
https://bugs.webkit.org/show_bug.cgi?id=220777
<rdar://problem/73382584>

Reviewed by Brent Fulgham.

This happens because the development XPC service does not have the required private entitlement to enable message filtering in the sandbox,
and therefore fails to apply the sandbox. The existing runtime switching to enable message filtering based on the presence of the entitlement
is not working correctly. The 'if' clause checking the sandbox parameter in the sandbox cannot be nested inside an 'allow' clause, it appears.

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::initializeSandbox):

  • WebProcess/com.apple.WebProcess.sb.in:
12:25 PM Changeset in webkit [271709] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

Ignore Webex Audio Device for capture
https://bugs.webkit.org/show_bug.cgi?id=220763
<rdar://problem/73219877>

Reviewed by Eric Carlson.

Manually tested.

  • platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:

(WebCore::isValidCaptureDevice):

12:13 PM Changeset in webkit [271708] by Alan Coon
  • 5 edits in branches/safari-611.1.10.1-branch/Source

Cherry-pick r271619. rdar://problem/73461359

REGRESSION(r269865) Mail's context menu when right clicking on a link does not contain correct entries
https://bugs.webkit.org/show_bug.cgi?id=220745

Patch by Alex Christensen <achristensen@webkit.org> on 2021-01-19
Reviewed by Tim Horton.

Source/WebCore:

r269865 broke binary compatibility by changing the values of many WebCore::ContextMenuAction values and many WKContextMenuItemTag values,
and not in the same way. In WebContextMenuProxyMac::getContextMenuItem we call NSMenuItem setTag: with the value from WebCore::ContextMenuAction
and mail compares those values with values from WKContextMenuItemTag in our C API. This isn't ideal, but we need to retain binary compatibility.

  • platform/ContextMenuItem.h:

Source/WebKit:

  • Shared/API/c/WKContextMenuItem.cpp: Add a bunch of static_asserts to verify that our binary values correspond to each other and don't change.
  • Shared/API/c/WKContextMenuItemTypes.h:

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

12:11 PM Changeset in webkit [271707] by Alan Coon
  • 8 edits in branches/safari-611.1.10.1-branch/Source

Versioning.

WebKit-7611.1.10.1.2

11:50 AM Changeset in webkit [271706] by commit-queue@webkit.org
  • 2 edits
    104 adds in trunk/LayoutTests/imported/w3c

Import css-variables WPTs
https://bugs.webkit.org/show_bug.cgi?id=220787

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-01-21
Reviewed by Darin Adler.

Import WPTs for CSS variables via Tools/Scripts/import-w3c-tests and add expectations.

https://wpt.fyi/results/css/css-variables?label=master&label=experimental&aligned

  • resources/import-expectations.json:
  • web-platform-tests/css/css-variables/META.yml: Added.
  • web-platform-tests/css/css-variables/css-vars-custom-property-case-sensitive-001-expected.html: Added.
  • web-platform-tests/css/css-variables/css-vars-custom-property-case-sensitive-001.html: Added.
  • web-platform-tests/css/css-variables/css-vars-custom-property-inheritance-expected.html: Added.
  • web-platform-tests/css/css-variables/css-vars-custom-property-inheritance.html: Added.
  • web-platform-tests/css/css-variables/resources/variable-reference-refresh-iframe.css: Added.

(#testElement):

  • web-platform-tests/css/css-variables/resources/w3c-import.log: Added.
  • web-platform-tests/css/css-variables/test_variable_legal_values-expected.txt: Added.
  • web-platform-tests/css/css-variables/test_variable_legal_values.html: Added.
  • web-platform-tests/css/css-variables/variable-animation-from-to-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-animation-from-to.html: Added.
  • web-platform-tests/css/css-variables/variable-animation-over-transition-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-animation-over-transition.html: Added.
  • web-platform-tests/css/css-variables/variable-animation-substitute-into-keyframe-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-animation-substitute-into-keyframe-shorthand-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-animation-substitute-into-keyframe-shorthand.html: Added.
  • web-platform-tests/css/css-variables/variable-animation-substitute-into-keyframe-transform-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-animation-substitute-into-keyframe-transform.html: Added.
  • web-platform-tests/css/css-variables/variable-animation-substitute-into-keyframe.html: Added.
  • web-platform-tests/css/css-variables/variable-animation-substitute-within-keyframe-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-animation-substitute-within-keyframe-fallback-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-animation-substitute-within-keyframe-fallback.html: Added.
  • web-platform-tests/css/css-variables/variable-animation-substitute-within-keyframe-multiple-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-animation-substitute-within-keyframe-multiple.html: Added.
  • web-platform-tests/css/css-variables/variable-animation-substitute-within-keyframe.html: Added.
  • web-platform-tests/css/css-variables/variable-animation-to-only-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-animation-to-only.html: Added.
  • web-platform-tests/css/css-variables/variable-created-document-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-created-document.html: Added.
  • web-platform-tests/css/css-variables/variable-created-element-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-created-element.html: Added.
  • web-platform-tests/css/css-variables/variable-cssText-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-cssText.html: Added.
  • web-platform-tests/css/css-variables/variable-definition-border-shorthand-serialize-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-definition-border-shorthand-serialize.html: Added.
  • web-platform-tests/css/css-variables/variable-definition-cascading-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-definition-cascading.html: Added.
  • web-platform-tests/css/css-variables/variable-definition-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-definition-keywords-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-definition-keywords.html: Added.
  • web-platform-tests/css/css-variables/variable-definition.html: Added.
  • web-platform-tests/css/css-variables/variable-first-letter-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-first-letter.html: Added.
  • web-platform-tests/css/css-variables/variable-first-line-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-first-line.html: Added.
  • web-platform-tests/css/css-variables/variable-generated-content-dynamic-001-expected.html: Added.
  • web-platform-tests/css/css-variables/variable-generated-content-dynamic-001.html: Added.
  • web-platform-tests/css/css-variables/variable-invalidation-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-invalidation.html: Added.
  • web-platform-tests/css/css-variables/variable-presentation-attribute-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-presentation-attribute.html: Added.
  • web-platform-tests/css/css-variables/variable-pseudo-element-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-pseudo-element.html: Added.
  • web-platform-tests/css/css-variables/variable-reference-cssom-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-reference-cssom.html: Added.
  • web-platform-tests/css/css-variables/variable-reference-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-reference-refresh-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-reference-refresh.html: Added.
  • web-platform-tests/css/css-variables/variable-reference-shorthands-cssom-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-reference-shorthands-cssom.html: Added.
  • web-platform-tests/css/css-variables/variable-reference-shorthands-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-reference-shorthands.html: Added.
  • web-platform-tests/css/css-variables/variable-reference-variable-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-reference-variable.html: Added.
  • web-platform-tests/css/css-variables/variable-reference-without-whitespace-expected.html: Added.
  • web-platform-tests/css/css-variables/variable-reference-without-whitespace.html: Added.
  • web-platform-tests/css/css-variables/variable-reference.html: Added.
  • web-platform-tests/css/css-variables/variable-substitution-background-properties-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-substitution-background-properties.html: Added.
  • web-platform-tests/css/css-variables/variable-substitution-basic-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-substitution-basic.html: Added.
  • web-platform-tests/css/css-variables/variable-substitution-filters-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-substitution-filters.html: Added.
  • web-platform-tests/css/css-variables/variable-substitution-plus-box-shadow-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-substitution-plus-box-shadow.html: Added.
  • web-platform-tests/css/css-variables/variable-substitution-replaced-size-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-substitution-replaced-size.html: Added.
  • web-platform-tests/css/css-variables/variable-substitution-shadow-properties-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-substitution-shadow-properties.html: Added.
  • web-platform-tests/css/css-variables/variable-substitution-shorthands-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-substitution-shorthands.html: Added.
  • web-platform-tests/css/css-variables/variable-substitution-variable-declaration-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-substitution-variable-declaration.html: Added.
  • web-platform-tests/css/css-variables/variable-transitions-from-no-value-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-transitions-from-no-value.html: Added.
  • web-platform-tests/css/css-variables/variable-transitions-to-no-value-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-transitions-to-no-value.html: Added.
  • web-platform-tests/css/css-variables/variable-transitions-transition-property-all-before-value-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-transitions-transition-property-all-before-value.html: Added.
  • web-platform-tests/css/css-variables/variable-transitions-transition-property-variable-before-value-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-transitions-transition-property-variable-before-value.html: Added.
  • web-platform-tests/css/css-variables/variable-transitions-value-before-transition-property-all-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-transitions-value-before-transition-property-all.html: Added.
  • web-platform-tests/css/css-variables/variable-transitions-value-before-transition-property-variable-expected.txt: Added.
  • web-platform-tests/css/css-variables/variable-transitions-value-before-transition-property-variable.html: Added.
  • web-platform-tests/css/css-variables/vars-background-shorthand-001-expected.html: Added.
  • web-platform-tests/css/css-variables/vars-background-shorthand-001.html: Added.
  • web-platform-tests/css/css-variables/vars-border-shorthand-serialize-expected.txt: Added.
  • web-platform-tests/css/css-variables/vars-border-shorthand-serialize.html: Added.
  • web-platform-tests/css/css-variables/vars-font-shorthand-001-expected.html: Added.
  • web-platform-tests/css/css-variables/vars-font-shorthand-001.html: Added.
  • web-platform-tests/css/css-variables/w3c-import.log: Added.
11:50 AM Changeset in webkit [271705] by Fujii Hironori
  • 14 edits in trunk

Remove ENABLE_USERSELECT_ALL macro which is enabled for all ports
https://bugs.webkit.org/show_bug.cgi?id=100424

Reviewed by Don Olmstead.

.:

  • Source/cmake/OptionsMac.cmake:
  • Source/cmake/WebKitFeatures.cmake:

Source/WebCore:

  • dom/Node.cpp:

(WebCore::computeEditabilityFromComputedStyle):

  • dom/Position.cpp:

(WebCore::Position::rootUserSelectAllForNode):

  • dom/Position.h:

(WebCore::Position::nodeIsUserSelectAll): Deleted.
(WebCore::Position::rootUserSelectAllForNode): Deleted.

  • editing/FrameSelection.cpp:

(WebCore::adjustPositionForUserSelectAll):
(WebCore::FrameSelection::modifyExtendingRight):
(WebCore::FrameSelection::modifyExtendingForward):
(WebCore::FrameSelection::modifyExtendingLeft):
(WebCore::FrameSelection::modifyExtendingBackward):

  • editing/VisibleUnits.cpp:

(WebCore::findStartOfParagraph):
(WebCore::findEndOfParagraph):

  • page/EventHandler.cpp:

(WebCore::nodeToSelectOnMouseDownForNode):
(WebCore::EventHandler::updateSelectionForMouseDrag):

Source/WTF:

  • wtf/PlatformEnableCocoa.h:

Tools:

  • Scripts/webkitperl/FeatureList.pm:
11:40 AM Changeset in webkit [271704] by Devin Rousso
  • 2 edits in trunk/Source/WebCore

[Payment Request] increment the current version
https://bugs.webkit.org/show_bug.cgi?id=220807
<rdar://problem/68622300>

Reviewed by Andy Estes.

  • Modules/applepay/cocoa/PaymentAPIVersionCocoa.mm:

(WebCore::PaymentAPIVersion::current):

11:37 AM Changeset in webkit [271703] by Devin Rousso
  • 7 edits
    8 adds in trunk

Payment Request API - response.shippingOption is always null
https://bugs.webkit.org/show_bug.cgi?id=220566
<rdar://problem/73204387>

Reviewed by Andy Estes.

Source/WebCore:

The Payment Request API spec indicates that when updating a PaymentRequest's details [1]
we should be checking for the existence of displayItems, shippingOptions (but only if
requestShipping was specified), and modifiers before overriding any corresponding data
on the PaymentRequest itself. This means that calls to updateWith only need to provide
the data that needs to be changed (e.g. the total) rather than data for the whole payment.

[1]: https://www.w3.org/TR/payment-request/#dfn-update-a-paymentrequest-s-details-algorithm

Tests: http/tests/inspector/paymentrequest/payment-request-internal-properties.https.html

http/tests/paymentrequest/updateWith-displayItems.https.html
http/tests/paymentrequest/updateWith-modifiers.https.html
http/tests/paymentrequest/updateWith-shippingOptions.https.html
http/tests/paymentrequest/updateWith-total.https.html

  • Modules/paymentrequest/PaymentDetailsBase.h:

Make every member Optional so we can distinguish between "provided an empty array" and
"did not provide the property at all".

  • Modules/paymentrequest/PaymentRequest.cpp:

(WebCore::checkAndCanonicalizeDetails):
(WebCore::PaymentRequest::create):
(WebCore::PaymentRequest::settleDetailsPromise):

  • Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:

(WebCore::ApplePayPaymentHandler::show):
(WebCore::ApplePayPaymentHandler::computeShippingMethods):
(WebCore::ApplePayPaymentHandler::computeTotalAndLineItems const):
(WebCore::ApplePayPaymentHandler::computeErrors const):
Add checks before accessing displayItems, shippingOptions, and modifiers.
Match the described behavior of the spec where shippingOptions (but only if
requestShipping was specified) and modifiers are set to an empty array if not provided
when constructing the PaymentRequest.

  • inspector/WebInjectedScriptHost.cpp:

(WebCore::objectForPaymentDetails):
Don't create internal properties for displayItems, shippingOptions, and modifiers
unless they are actually provided for the same reason as above.

LayoutTests:

  • http/tests/inspector/paymentrequest/payment-request-internal-properties.https-expected.txt:
  • http/tests/paymentrequest/updateWith-displayItems.https.html: Added.
  • http/tests/paymentrequest/updateWith-displayItems.https-expected.txt: Added.
  • http/tests/paymentrequest/updateWith-modifiers.https.html: Added.
  • http/tests/paymentrequest/updateWith-modifiers.https-expected.txt: Added.
  • http/tests/paymentrequest/updateWith-shippingOptions.https.html: Added.
  • http/tests/paymentrequest/updateWith-shippingOptions.https-expected.txt: Added.
  • http/tests/paymentrequest/updateWith-total.https.html: Added.
  • http/tests/paymentrequest/updateWith-total.https-expected.txt: Added.
11:15 AM Changeset in webkit [271702] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[GPU Process] Add Layout tests timeouts and failures to TestExpectations
https://bugs.webkit.org/show_bug.cgi?id=220803

Patch by Rini Patel <rini_patel@apple.com> on 2021-01-21
Reviewed by Simon Fraser.

  • gpu-process/TestExpectations:
10:46 AM Changeset in webkit [271701] by Simon Fraser
  • 5 edits
    5 adds in trunk

Source/WebCore:
REGRESSION (Async overflow): Scroll stutters/blocked with nested scrolling
https://bugs.webkit.org/show_bug.cgi?id=219923
<rdar://72390196>

Reviewed by Sam Weinig.

When handling wheel events in overflow:scroll areas which are only scrollable on
one axis, particularly when nested, we need to account for the different
scrollability on each axis in a couple of places.

First, address the FIXME in ScrollingTreeScrollingNodeDelegateMac::shouldRubberBandInDirection()
by consulting node scrollability; this prevents attempts to rubberband on a non-scrollable
axis.

Second, ScrollController should only allow stretching on a scrollable axis.

The effects of these changes are that we no longer keep sending events to a node which
ends up not handling them; this resulted in latching "timing out", re-hit-testing
in the middle of a gesture and causing stuttery position changes on a different
scroller.

Tests: fast/scrolling/latching/nested-cross-axis-latch-expiration.html

fast/scrolling/latching/overflow-hidden-on-one-axis.html

  • page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:

(WebCore::ScrollingTreeScrollingNodeDelegateMac::shouldRubberBandInDirection const):

  • platform/cocoa/ScrollController.mm:

(WebCore::ScrollController::handleWheelEvent):

  • rendering/RenderLayerScrollableArea.cpp:

(WebCore::RenderLayerScrollableArea::scrollTo): Add the scrollingNodeID to the logging.

LayoutTests:
REGRESSION (?): Scroll stutters/blocked with nested scrolling
https://bugs.webkit.org/show_bug.cgi?id=219923
<rdar://72390196>

Reviewed by Sam Weinig.

  • fast/scrolling/latching/nested-cross-axis-latch-expiration-expected.txt: Added.
  • fast/scrolling/latching/nested-cross-axis-latch-expiration.html: Added.
  • fast/scrolling/latching/overflow-hidden-on-one-axis-expected.txt: Added.
  • fast/scrolling/latching/overflow-hidden-on-one-axis.html: Added.
10:40 AM Changeset in webkit [271700] by achristensen@apple.com
  • 3 edits in trunk/LayoutTests

Add logs to HTTP/0.9 test
https://bugs.webkit.org/show_bug.cgi?id=220776

r271652 fixed default-port-script-blocked.html but caused default-port-plugin-blocked.html to time out.
Add logs to determine what is happening when it times out.

  • http/tests/security/http-0.9/default-port-plugin-blocked-expected.txt:
  • http/tests/security/http-0.9/default-port-plugin-blocked.html:
10:39 AM Changeset in webkit [271699] by weinig@apple.com
  • 18 edits in trunk/Source

Add experimental support for separated layers
https://bugs.webkit.org/show_bug.cgi?id=220734

Reviewed by Simon Fraser.

Source/WebCore:

Plumb a "separated" bit through the graphics layer infrastructure. Currently unused
but will be used for optimization experimentation.

  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::GraphicsLayer):

  • platform/graphics/GraphicsLayer.h:

(WebCore::GraphicsLayer::separated const):
(WebCore::GraphicsLayer::setSeparated):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::setSeparated):
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::updateSeparated):

  • platform/graphics/ca/GraphicsLayerCA.h:
  • platform/graphics/ca/PlatformCALayer.h:
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:

(WebCore::PlatformCALayerCocoa::separated const):
(WebCore::PlatformCALayerCocoa::setSeparated):

Source/WebCore/PAL:

  • pal/spi/cocoa/QuartzCoreSPI.h:

Add forward declaration for CALayer's separated property.

Source/WebKit:

Plumb a "separated" bit through the graphics layer infrastructure. Currently unused
but will be used for optimization experimentation.

  • Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:

(WebKit::RemoteLayerTreePropertyApplier::applyPropertiesToLayer):

  • Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h:
  • Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:

(WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::encode const):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
(WebKit::dumpChangedLayers):

  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp:

(WebKit::PlatformCALayerRemote::isSeparated const):
(WebKit::PlatformCALayerRemote::setSeparated):

  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.h:

Source/WTF:

  • wtf/PlatformHave.h:

Define HAVE_CORE_ANIMATION_SEPARATED_LAYERS for supported configurations.

10:08 AM Changeset in webkit [271698] by youenn@apple.com
  • 5 edits
    1 copy
    1 add in trunk

Allow MediaStream and non MediaStream backed videos to play together
https://bugs.webkit.org/show_bug.cgi?id=199661
<rdar://problem/68622411>

Reviewed by Eric Carlson.

Source/WebCore:

Changing heuristic to always allow MediaStream backed videos to play concurrently with other videos.
To not break existing websites, we keep the existing behavior for non MediaStream backed videos.

Test: webrtc/concurrentVideoPlayback2.html

  • platform/audio/PlatformMediaSession.cpp:

(WebCore::PlatformMediaSession::canPlayConcurrently const):

LayoutTests:

  • webrtc/concurrentVideoPlayback-expected.txt:
  • webrtc/concurrentVideoPlayback.html:
  • webrtc/concurrentVideoPlayback2-expected.txt: Added.
  • webrtc/concurrentVideoPlayback2.html: Added.
9:54 AM Changeset in webkit [271697] by Jonathan Bedard
  • 4 edits in trunk/Tools

[webkitscmpy] Handle machines that cannot import keyring
https://bugs.webkit.org/show_bug.cgi?id=220800
<rdar://problem/73454666>

Reviewed by Aakash Jain.

  • Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:

(GitHub.credentials): Make keyring optional.

9:46 AM Changeset in webkit [271696] by youenn@apple.com
  • 5 edits in trunk

Check for TURN username/credentials sizes in RTCPeerConnection constructor
https://bugs.webkit.org/show_bug.cgi?id=220789

Reviewed by Eric Carlson.

Source/WebCore:

Covered by updated test.

  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::iceServersFromConfiguration):

LayoutTests:

  • webrtc/stun-server-filtering-expected.txt:
  • webrtc/stun-server-filtering.html:
9:40 AM Changeset in webkit [271695] by weinig@apple.com
  • 46 edits in trunk

Source/WebCore:
Rework color clamping logic to be consistent and clear
https://bugs.webkit.org/show_bug.cgi?id=220716

Reviewed by Simon Fraser.

In preparation of adding support for Extended-sRGB to color types,
this adds constexpr metadata and helper functions to create color
types with the correct clamped (or unclamped) values and adopts them
throughout the code base.

  • Removes "component bytes" and "component floats" concepts replacing with functions that take color types as template parameters:

convertToComponentBytes/convertToComponentFloats -> convertTo<ColorType<T>>
clampToComponentBytes/clampToComponentFloats -> makeFromComponentsClamping<ColorType<T>>

  • Adds Model type aliases to each color type which can specify traits for that type of color. These traits currently only include the valid component ranges and whether the color can be inverted. More will be added (like white point and base color space) to help simplify utility and conversion code.
  • Adds assertions to each color type constructor that the values passed are within the valid ranges (as specified by the Model).
  • Removed asFoo(const ColorComponents<T>&) functions, which were a little to similarly named to the toFoo() functions. Instead, the generic makeFromComponents<ColorType<T>> (or it's clamping variants) can be used to convert from ColorComponents to color types.
  • Adds AlphaTraits to model alpha values as these are consistent between color types and only change based on component type.
  • accessibility/atk/WebKitAccessibleInterfaceText.cpp:
  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
  • css/DeprecatedCSSOMRGBColor.h:
  • css/parser/CSSParserFastPaths.cpp:
  • css/parser/CSSPropertyParserHelpers.cpp:
  • editing/cocoa/DataDetection.mm:
  • html/canvas/CanvasRenderingContext2DBase.cpp:
  • html/canvas/CanvasStyle.cpp:
  • inspector/agents/InspectorDOMAgent.cpp:
  • platform/graphics/Color.cpp:
  • platform/graphics/Color.h:
  • platform/graphics/ColorBlending.cpp:
  • platform/graphics/ColorConversion.cpp:
  • platform/graphics/ColorConversion.h:
  • platform/graphics/ColorTypes.h:
  • platform/graphics/ColorUtilities.cpp:
  • platform/graphics/ColorUtilities.h:
  • platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
  • platform/graphics/cairo/ImageBufferCairoBackend.cpp:
  • platform/graphics/cg/ColorCG.cpp:
  • platform/graphics/cg/NativeImageCG.cpp:
  • platform/graphics/filters/FilterOperation.cpp:
  • platform/graphics/filters/FilterOperations.cpp:
  • platform/graphics/gtk/ColorGtk.cpp:
  • platform/graphics/mac/ColorMac.mm:
  • platform/graphics/win/ColorDirect2D.cpp:
  • platform/graphics/win/PlatformContextDirect2D.cpp:
  • platform/ios/ColorIOS.mm:
  • rendering/RenderThemeMac.mm:
  • svg/properties/SVGAnimationAdditiveValueFunctionImpl.h:

Source/WebKit:
Rework color clamping logic to be more consistent and clear
https://bugs.webkit.org/show_bug.cgi?id=220716

Reviewed by Simon Fraser.

  • UIProcess/API/wpe/WebKitColor.cpp:

(webkitColorToWebCoreColor):
Update to use new convertTo<> functions.

Tools:
Rework color clamping logic to be more consistent and clear
https://bugs.webkit.org/show_bug.cgi?id=220716

Reviewed by Simon Fraser.

  • TestWebKitAPI/Tests/WebCore/ColorTests.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebCore/ExtendedColorTests.cpp:

(TestWebKitAPI::TEST):
Update tests to use new convertTo<> functions.

LayoutTests:
Rework color clamping logic to be more consistent and clear
https://bugs.webkit.org/show_bug.cgi?id=220716

Reviewed by Simon Fraser.

  • fast/canvas/canvas-overloads-setFillColor-expected.txt:
  • fast/canvas/canvas-overloads-setFillColor.html:
  • fast/canvas/canvas-overloads-setShadow-expected.txt:
  • fast/canvas/canvas-overloads-setShadow.html:
  • fast/canvas/canvas-overloads-setStrokeColor-expected.txt:
  • fast/canvas/canvas-overloads-setStrokeColor.html:

Extend tests to cover testing various values including NaN, including testing what
color actually gets set as the current style.

9:17 AM Changeset in webkit [271694] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Null check in WebTextIndicatorView::initWithFrame
https://bugs.webkit.org/show_bug.cgi?id=220491

Patch by Rob Buis <rbuis@igalia.com> on 2021-01-21
Reviewed by Youenn Fablet.

Source/WebCore:

Null check contentImage/contentImageScaleFactor in initWithFrame
since these are not guaranteed to be non-null.

Test: ipc/set-text-indicator.html

  • page/mac/TextIndicatorWindow.mm:

(-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]):

LayoutTests:

Add test for this.

  • ipc/set-text-indicator-expected.txt: Added.
  • ipc/set-text-indicator.html: Added.
9:12 AM Changeset in webkit [271693] by commit-queue@webkit.org
  • 4 edits in trunk/Tools

autoinstall python-secretstorage
https://bugs.webkit.org/show_bug.cgi?id=220796

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-01-21
Reviewed by Jonathan Bedard.

  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py:
  • gtk/install-dependencies:
  • wpe/install-dependencies:
8:52 AM Changeset in webkit [271692] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[webkitcorepy] Don't import six at the top level
https://bugs.webkit.org/show_bug.cgi?id=220795

Patch by Angelos Oikonomopoulos <Angelos Oikonomopoulos> on 2021-01-21
Reviewed by Aakash Jain.

Instead, do the import after the module has been loaded, when
AutoInstall has been set up properly. Fixes a regression after
1d342a5067e22ac8069ff3ff337b2d58e1d06517, where task_pool.py uses
the six module without it being installed.

  • Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py:

(ChildException.call):
(TaskPool.exit):

7:47 AM Changeset in webkit [271691] by Aditya Keerthi
  • 18 edits
    1 add in trunk

[macOS] Titlebar separator doesn't show when WKWebView is scrolled
https://bugs.webkit.org/show_bug.cgi?id=220633
<rdar://problem/71094055>

Reviewed by Tim Horton.

Source/WebKit:

Starting in Big Sur, NSWindows with a titlebar display a separator if
there is a scrolled NSScrollView adjacent to the titlebar. Since
WKWebViews are scrollable views, but not backed by NSScrollView, we
need to adopt SPI to support this functionality.

This patch updates WKWebView to conform to the NSScrollViewSeparatorTrackingAdapter
protocol, ensuring the titlebar separator is displayed when
necessary. Note that since WKWebViews are not actually NSScrollView's we
don't already have the scroll position of the view in the UIProcess. To
determine whether or not the view is scrolled, this patch adds plumbing
so that the WebProcess can tell the UIProcess the new scroll position
when a page is scrolled.

Tests: WKWebViewTitlebarSeparatorTests.BackForwardCache

WKWebViewTitlebarSeparatorTests.ChangeTitlebarAdjacency
WKWebViewTitlebarSeparatorTests.ChangeViewVisibility
WKWebViewTitlebarSeparatorTests.NavigationResetsTitlebarAppearance
WKWebViewTitlebarSeparatorTests.ScrollWithTitlebarAdjacency
WKWebViewTitlebarSeparatorTests.ScrollWithoutTitlebarAdjacency

  • Platform/spi/mac/AppKitSPI.h:
  • UIProcess/API/mac/WKView.mm:

(-[WKView scrollViewFrame]):
(-[WKView hasScrolledContentsUnderTitlebar]):
(-[WKView _web_registerScrollViewSeparatorTrackingAdapter]):
(-[WKView _web_unregisterScrollViewSeparatorTrackingAdapter]):

  • UIProcess/API/mac/WKWebViewMac.mm:

(-[WKWebView scrollViewFrame]):
(-[WKWebView hasScrolledContentsUnderTitlebar]):
(-[WKWebView _web_registerScrollViewSeparatorTrackingAdapter]):
(-[WKWebView _web_unregisterScrollViewSeparatorTrackingAdapter]):

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

(WebKit::WebViewImpl::updateWindowAndViewFrames):

If the WKWebView's frame changes, update the titlebar adjacency
state and notify observers of the change.

(WebKit::WebViewImpl::viewWillMoveToWindowImpl):

Unregister the WKWebView as an NSScrollViewSeparatorTrackingAdapter if
it is removed from the window.

(WebKit::WebViewImpl::viewDidHide):

Hidden views are not adjacent to the titlebar.

(WebKit::WebViewImpl::viewDidUnhide):

An unhidden view may be adjacent to the titlebar.

(WebKit::WebViewImpl::pageDidScroll):

Use the scroll position of the page to determine whether or not the
WKWebView is scrolled.

(WebKit::WebViewImpl::scrollViewFrame):

Needed to conform to NSScrollViewSeparatorTrackingAdapter.

(WebKit::WebViewImpl::hasScrolledContentsUnderTitlebar):

Needed to conform to NSScrollViewSeparatorTrackingAdapter. Returns true
if the view is registered as an NSScrollViewSeparatorTrackingAdapter
and is scrolled.

(WebKit::WebViewImpl::updateTitlebarAdjacencyState):

The WKWebView needs to be registered as an NSScrollViewSeparatorTrackingAdapter
if it's adjacent to the titlebar and unregistered otherwise.

  • UIProcess/PageClient.h:

(WebKit::PageClient::pageDidScroll):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::pageDidScroll):

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

(WebKit::PageClientImpl::didCommitLoadForMainFrame):

Reset the scroll position upon navigation, as pageDidScroll does not get
called when navigating.

(WebKit::PageClientImpl::pageDidScroll):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::pageDidScroll):

Pass the current scroll position when the page is scrolled, so that the
UIProcess knows whether or not the page has a non-zero scroll position.

Source/WTF:

  • wtf/PlatformHave.h: Defined HAVE_NSSCROLLVIEW_SEPARATOR_TRACKING_ADAPTER.

Tools:

Added API tests to verify that the delegate implementation returns the
correct value for hasScrolledContentsUnderTitlebar depending on
the view's scroll position, visibility, and frame.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/TestWebKitAPI/mac/AppKitSPI.h:
  • TestWebKitAPI/Tests/mac/WKWebViewTitlebarSeparatorTests.mm: Added.

(-[TitlebarSeparatorTestWKWebView initWithFrame:configuration:]):
(-[TitlebarSeparatorTestWKWebView separatorTrackingAdapter]):
(BackForwardCache):
(ChangeTitlebarAdjacency):
(ChangeViewVisibility):
(NavigationResetsTitlebarAppearance):
(ScrollWithTitlebarAdjacency):
(ScrollWithoutTitlebarAdjacency):

6:25 AM Changeset in webkit [271690] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk

Source/WebCore:
Ensure createStreams gets valid JSGlobalObject
https://bugs.webkit.org/show_bug.cgi?id=220396

Patch by Rob Buis <rbuis@igalia.com> on 2021-01-21
Reviewed by Youenn Fablet.

Ensure RTCRtpSFrameTransform::createStreams gets a
valid JSGlobalObject object, throw exception at
call site if there is no valid JSGlobalObject object.

Test: http/wpt/webrtc/sframe-transform-readable-crash.html

  • Modules/mediastream/RTCRtpSFrameTransform.cpp:

(WebCore::RTCRtpSFrameTransform::createStreams):
(WebCore::RTCRtpSFrameTransform::readable):
(WebCore::RTCRtpSFrameTransform::writable):

  • Modules/mediastream/RTCRtpSFrameTransform.h:

LayoutTests:
Null check in RTCRtpSFrameTransform::createStreams
https://bugs.webkit.org/show_bug.cgi?id=220396

Patch by Rob Buis <rbuis@igalia.com> on 2021-01-21
Reviewed by Youenn Fablet.

Add test for this.

  • http/wpt/webrtc/sframe-transform-readable-crash-expected.txt: Added.
  • http/wpt/webrtc/sframe-transform-readable-crash.html: Added.
4:34 AM Changeset in webkit [271689] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

Missing header gtk/gtk.h in PointerLockManagerX11.cpp
https://bugs.webkit.org/show_bug.cgi?id=220152

Patch by Dave Blanchard <dave@grow.game> on 2021-01-21
Reviewed by Carlos Garcia Campos.

  • UIProcess/gtk/PointerLockManagerX11.cpp:
1:51 AM Changeset in webkit [271688] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Update font when resolving letter-spacing: calc(...) values
https://bugs.webkit.org/show_bug.cgi?id=216659

Patch by Frederic Wang <fwang@igalia.com> on 2021-01-21
Reviewed by Ryosuke Niwa.

Source/WebCore:

In bug 176215, maybeUpdateFontForLetterSpacing was added to ensure a font is available for
resolution of letter-spacing values that rely on relative font lengths. However, this does
not take into account the case when these lengths are part of a calc expression. In order to
keep things simple, this patch unconditionally updates the font when letter-spacing is a
calc expression.

Test: fast/css/letter-spacing-calc-with-font-relative-lengths-crash.html

  • style/StyleBuilderCustom.h:

(WebCore::Style::maybeUpdateFontForLetterSpacing):

LayoutTests:

  • fast/css/letter-spacing-calc-with-font-relative-lengths-crash-expected.txt: Added.
  • fast/css/letter-spacing-calc-with-font-relative-lengths-crash.html: Added.
Note: See TracTimeline for information about the timeline view.