⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

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):

Note: See TracTimeline for information about the timeline view.