Timeline



Jun 16, 2021: Today

8:45 PM Changeset in webkit [278973] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Passkeys don't work in Simulator
https://bugs.webkit.org/show_bug.cgi?id=227076
<rdar://79366832>

Patch by Garrett Davidson <garrett_davidson@apple.com> on 2021-06-16
Reviewed by Brent Fulgham.

Simulator does not support LAAccessControlOperationUseKeySign, so
-evaluateAccessControl:... returns an error. However, this check isn't actually necessary in
the simulator when using passkeys, so just skip it.

Tested registration and assertion in an app in Simulator.

  • UIProcess/WebAuthentication/Cocoa/LocalConnection.mm:

(WebKit::LocalConnection::verifyUser):

8:26 PM Changeset in webkit [278972] by ysuzuki@apple.com
  • 2 edits in trunk/Source/WTF

[JSC] Disable JITCage on macOS until we evaluate performance throughly
https://bugs.webkit.org/show_bug.cgi?id=227104

Reviewed by Mark Lam.

This patch disables JITCage on macOS until we evaluate performance throughly.

  • wtf/PlatformEnable.h:
8:09 PM Changeset in webkit [278971] by ysuzuki@apple.com
  • 6 edits
    1 add in trunk

[JSC] Optimize JSON.parse with small data by changing Identifier pool mechanism
https://bugs.webkit.org/show_bug.cgi?id=227101

Reviewed by Mark Lam.

Found that std::array<Identifier, 128> pool in LiteralParser is too costly for construction and destruction
if JSON.parse is invoked for small data. This patch changes this pool mechanism so that we do not waste effort
allocating null Identifiers to pre-populate the recent identifiers pool. Instead, we now use a m_recentIdentifiersIndex
uint8_t array to indicate whether there's a cached recent identifier for each given first character.

We also use KeywordLookup.h's COMPARE_XCHARS to perform "true" / "false" / "null" lexing in JSON parser.
Roughly 20% improvement in microbenchmark. And roughly 2-3% improvement in Speedometer2/Flight-TodoMVC.

ToT Patched

flight-todomvc-json 67.8755+-1.1202 56.7114+-0.5048 definitely 1.1969x faster

  • runtime/Identifier.cpp:

(JSC::Identifier::add):
(JSC::Identifier::add8):

  • runtime/Identifier.h:

(JSC::Identifier::Identifier):
(JSC::Identifier::add):

  • runtime/IdentifierInlines.h:

(JSC::Identifier::add):
(JSC::Identifier::fromString):

  • runtime/LiteralParser.cpp:

(JSC::compare3Chars):
(JSC::compare4Chars):
(JSC::LiteralParser<CharType>::makeIdentifier):
(JSC::LiteralParser<CharType>::Lexer::lex):

  • runtime/LiteralParser.h:
5:46 PM Changeset in webkit [278970] by Said Abou-Hallawa
  • 4 edits in trunk/Source

takeSnapshotWithConfiguration() should wait for the next flush before it does callSnapshotRect()
https://bugs.webkit.org/show_bug.cgi?id=226257
<rdar://76411685>

Reviewed by Simon Fraser and Tim Horton.

Source/WebCore/PAL:

  • pal/spi/cocoa/QuartzCoreSPI.h:

Source/WebKit:

This will ensure the latest IOSurfaces are pushed to backboardd before
taking the snapshot. Also we need create an implicit transaction to ensure
a commit will happen.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView takeSnapshotWithConfiguration:completionHandler:]):

5:27 PM Changeset in webkit [278969] by Cameron McCormack
  • 3 edits
    2 adds in trunk

Make RenderLayer::hitTestLayer not assume its renderer is a RenderBox
https://bugs.webkit.org/show_bug.cgi?id=227004
<rdar://79265788>

Reviewed by Simon Fraser.

Source/WebCore:

An inline box might have a clip-path on it, so we can't assume that
the layer's renderer is a RenderBox. Avoid the assertion by hit testing
incorrectly for now.

Test: css3/masking/clip-path-hit-test-on-inline-iframe-parent.html

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::hitTestLayer):

LayoutTests:

  • css3/masking/clip-path-hit-test-on-inline-iframe-parent-expected.txt: Added.
  • css3/masking/clip-path-hit-test-on-inline-iframe-parent.html: Added.
5:15 PM Changeset in webkit [278968] by Russell Epstein
  • 1 copy in tags/Safari-612.1.18.1.3

Tag Safari-612.1.18.1.3.

4:39 PM Changeset in webkit [278967] by Jonathan Bedard
  • 2 edits
    19 moves
    40 deletes in trunk/Tools

Clean up how platform images are handled in the bot watchers' dashboard
https://bugs.webkit.org/show_bug.cgi?id=226989

Patch by W.D. Xiong.

Renamed the _@2x.png files to _.png and removed old platforms that don't have queues anymore. Also renamed WatchOSSimulator7 to WatchOS7Simulator

  • CISupport/build-webkit-org/public_html/dashboard/Images/BigSur.png: Replaced with Tools/CISupport/build-webkit-org/public_html/dashboard/Images/BigSur@2x.png.
  • CISupport/build-webkit-org/public_html/dashboard/Images/BigSur@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/Catalina.png: Replaced with Tools/CISupport/build-webkit-org/public_html/dashboard/Images/Catalina@2x.png.
  • CISupport/build-webkit-org/public_html/dashboard/Images/Catalina@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/ElCapitan.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/ElCapitan@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/GTK.png: Replaced with Tools/CISupport/build-webkit-org/public_html/dashboard/Images/GTK@2x.png.
  • CISupport/build-webkit-org/public_html/dashboard/Images/GTK@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/HighSierra.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/HighSierra@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/IOS10.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/IOS10@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/IOS10Simulator.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/IOS10Simulator@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/IOS11.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/IOS11@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/IOS11Simulator.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/IOS11Simulator@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/IOS12.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/IOS12@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/IOS12Simulator.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/IOS12Simulator@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/IOS13.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/IOS13@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/IOS13Simulator.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/IOS13Simulator@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/IOS14.png: Replaced with Tools/CISupport/build-webkit-org/public_html/dashboard/Images/IOS14@2x.png.
  • CISupport/build-webkit-org/public_html/dashboard/Images/IOS14@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/IOS14Simulator.png: Replaced with Tools/CISupport/build-webkit-org/public_html/dashboard/Images/IOS14Simulator@2x.png.
  • CISupport/build-webkit-org/public_html/dashboard/Images/IOS14Simulator@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/IOS9.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/IOS9@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/IOS9Simulator.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/IOS9Simulator@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/IOSDevice.png: Replaced with Tools/CISupport/build-webkit-org/public_html/dashboard/Images/IOSDevice@2x.png.
  • CISupport/build-webkit-org/public_html/dashboard/Images/IOSDevice@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/IOSSimulator.png: Replaced with Tools/CISupport/build-webkit-org/public_html/dashboard/Images/IOSSimulator@2x.png.
  • CISupport/build-webkit-org/public_html/dashboard/Images/IOSSimulator@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/Mavericks.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/Mavericks@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/Mojave.png: Replaced with Tools/CISupport/build-webkit-org/public_html/dashboard/Images/Mojave@2x.png.
  • CISupport/build-webkit-org/public_html/dashboard/Images/Mojave@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/MountainLion.png: Replaced with Tools/CISupport/build-webkit-org/public_html/dashboard/Images/MountainLion@2x.png.
  • CISupport/build-webkit-org/public_html/dashboard/Images/MountainLion@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/PlatformRing.png: Replaced with Tools/CISupport/build-webkit-org/public_html/dashboard/Images/PlatformRing@2x.png.
  • CISupport/build-webkit-org/public_html/dashboard/Images/PlatformRing@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/Sierra.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/Sierra@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/SquirrelFish.png: Replaced with Tools/CISupport/build-webkit-org/public_html/dashboard/Images/SquirrelFish@2x.png.
  • CISupport/build-webkit-org/public_html/dashboard/Images/SquirrelFish@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/TvOS13.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/TvOS13@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/TvOS13Simulator.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/TvOS13Simulator@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/TvOS14.png: Replaced with Tools/CISupport/build-webkit-org/public_html/dashboard/Images/TvOS14@2x.png.
  • CISupport/build-webkit-org/public_html/dashboard/Images/TvOS14@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/TvOS14Simulator.png: Replaced with Tools/CISupport/build-webkit-org/public_html/dashboard/Images/TvOS14Simulator@2x.png.
  • CISupport/build-webkit-org/public_html/dashboard/Images/TvOS14Simulator@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/WPE.png: Replaced with Tools/CISupport/build-webkit-org/public_html/dashboard/Images/WPE@2x.png.
  • CISupport/build-webkit-org/public_html/dashboard/Images/WPE@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/WatchOS6.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/WatchOS6@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/WatchOS7.png: Replaced with Tools/CISupport/build-webkit-org/public_html/dashboard/Images/WatchOS7@2x.png.
  • CISupport/build-webkit-org/public_html/dashboard/Images/WatchOS7@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/WatchOS7Simulator.png: Copied from Tools/CISupport/build-webkit-org/public_html/dashboard/Images/WatchOSSimulator7@2x.png.
  • CISupport/build-webkit-org/public_html/dashboard/Images/WatchOSSimulator6.png: Replaced with Tools/CISupport/build-webkit-org/public_html/dashboard/Images/WatchOSSimulator6@2x.png.
  • CISupport/build-webkit-org/public_html/dashboard/Images/WatchOSSimulator6@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/WatchOSSimulator7.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/WatchOSSimulator7@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/Windows10.png: Replaced with Tools/CISupport/build-webkit-org/public_html/dashboard/Images/Windows10@2x.png.
  • CISupport/build-webkit-org/public_html/dashboard/Images/Windows10@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/Windows7.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/Windows7@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/Windows8.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/Windows8@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/WindowsXP.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/WindowsXP@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/Yosemite.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Images/Yosemite@2x.png: Removed.
  • CISupport/build-webkit-org/public_html/dashboard/Styles/Main.css: Applied above changes

(table.queue-grid td.logo img.ring):
(table.queue-grid tr.platform.ios-simulator-14 img.logo):
(table.queue-grid tr.platform.ios-14 img.logo):
(table.queue-grid tr.platform.tvos-simulator-14 img.logo):
(table.queue-grid tr.platform.tvos-14 img.logo):
(table.queue-grid tr.platform.watchos-simulator-7 img.logo):
(table.queue-grid tr.platform.watchos-7 img.logo):
(table.queue-grid tr.platform.macos-catalina img.logo):
(table.queue-grid tr.platform.macos-bigsur img.logo):
(table.queue-grid tr.platform.wincairo-windows-10 img.logo):
(table.queue-grid tr.platform.windows-10 img.logo):
(table.queue-grid tr.platform.windows-7 img.logo):
(table.queue-grid tr.platform.linux-gtk img.logo):
(table.queue-grid tr.platform.linux-wpe img.logo):
(table.queue-grid tr.platform.linux-jsconly img.logo):

4:37 PM Changeset in webkit [278966] by mark.lam@apple.com
  • 4 edits in trunk/Source

Adopt com.apple.security.cs.jit-write-allowlist on internal builds.
https://bugs.webkit.org/show_bug.cgi?id=222148
rdar://74284026

Reviewed by Per Arne Vollan.

Source/JavaScriptCore:

This will prevent various pthread permissions switching APIs from working.
We only want to adopt this for internal builds where we use the fast permission
switching macro instead. We can't adopt it for open source builds, where we
still rely on the pthread API.

  • Scripts/process-entitlements.sh:

Source/WebKit:

  • Scripts/process-entitlements.sh:
4:26 PM Changeset in webkit [278965] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[GLIB] Unreviewed test gardening. Skip another WebGL 2 test.
https://bugs.webkit.org/show_bug.cgi?id=227093

Patch by Arcady Goldmints-Orlov <agoldmints@igalia.com> on 2021-06-16

  • platform/glib/TestExpectations:
4:09 PM Changeset in webkit [278964] by Chris Dumez
  • 5 edits in trunk/Source/WebCore

Protect Element before calling dispatchMouseEvent() on it
https://bugs.webkit.org/show_bug.cgi?id=226767
<rdar://problem/79009112>

Reviewed by Ryosuke Niwa.

  • page/EventHandler.cpp:

(WebCore::EventHandler::updateMouseEventTargetNode):
(WebCore::EventHandler::dispatchMouseEvent):

  • page/PointerLockController.cpp:

(WebCore::PointerLockController::dispatchLockedMouseEvent):

  • page/Quirks.cpp:

(WebCore::Quirks::triggerOptionalStorageAccessQuirk const):

3:41 PM Changeset in webkit [278963] by Jonathan Bedard
  • 5 edits in trunk/Tools

[webkitscmpy] Support branch queries in mock git log
https://bugs.webkit.org/show_bug.cgi?id=225889
<rdar://problem/78122705>

Reviewed by Stephanie Lewis.

  • Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py: Add support for branches in

git log commands.

  • Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:

(TestGit.test_log):
(TestGit.test_branch_log):

3:39 PM Changeset in webkit [278962] by Chris Dumez
  • 12 edits
    1 copy
    21 moves
    81 adds
    17 deletes in trunk/LayoutTests

Resync FileAPI tests from upstream WPT
https://bugs.webkit.org/show_bug.cgi?id=227089

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Resync FileAPI tests from upstream WPT b5949c67c948bc452e3.

  • web-platform-tests/FileAPI/*: Updated.

LayoutTests:

  • tests-options.json:
3:37 PM Changeset in webkit [278961] by Chris Dumez
  • 18 edits
    8 adds in trunk/LayoutTests/imported/w3c

Resync webaudio tests from upstream WPT
https://bugs.webkit.org/show_bug.cgi?id=227091

Reviewed by Geoffrey Garen.

Resync webaudio tests from upstream WPT b5949c67c948bc452e3.

  • web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-duration-loop.html:
  • web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-cancel-and-hold-expected.txt: Added.
  • web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-cancel-and-hold.html: Added.
  • web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-nominal-range-expected.txt: Added.
  • web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-nominal-range.html: Added.
  • web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-setValueCurve-exceptions-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-setValueCurve-exceptions.html:
  • web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/cancel-scheduled-values-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/cancel-scheduled-values.html:
  • web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/event-insertion-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/event-insertion.html:
  • web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/w3c-import.log:
  • web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-throw-onmessage.https-expected.txt: Added.
  • web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-throw-onmessage.https.html: Added.
  • web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/processors/w3c-import.log:
  • web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/w3c-import.log:
  • web-platform-tests/webaudio/the-audio-api/the-biquadfilternode-interface/biquad-automation-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-biquadfilternode-interface/biquad-automation.html:
  • web-platform-tests/webaudio/the-audio-api/the-constantsourcenode-interface/test-constantsourcenode.html:
  • web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/realtime-conv-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/realtime-conv.html:
  • web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/pannernode-setposition-throws-expected.txt: Added.
  • web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/pannernode-setposition-throws.html: Added.
  • web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/w3c-import.log:
  • web-platform-tests/webaudio/the-audio-api/the-periodicwave-interface/periodicWave.html:
3:27 PM Changeset in webkit [278960] by Ruben Turcios
  • 1 copy in tags/Safari-611.3.8

Tag Safari-611.3.8.

3:26 PM Changeset in webkit [278959] by rmorisset@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Don't look at the (non-existent) child2 of DelById
https://bugs.webkit.org/show_bug.cgi?id=227095

Reviewed by Mark Lam.

Trivial fix to a broken rebase: while it is ok to share most code between DelById and DelByVal, only the latter has a child2(), so it should not be accessed if we are compiling the former.
No new test, as it was caught by one of our existing tests.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileDelBy):

3:22 PM Changeset in webkit [278958] by Peng Liu
  • 2 edits in trunk/Source/WebCore
Some http/tests/ are crashing with ASSERTION FAILED: isInRoutingArbitrationForToken(token)
m_setupArbitrationOngoing

https://bugs.webkit.org/show_bug.cgi?id=226896

Reviewed by Darin Adler.

A follow-up patch to fix an issue in r278922. Remove the call to contains()
before remove() on a WeakHashSet.

  • platform/audio/mac/SharedRoutingArbitrator.mm:

(WebCore::SharedRoutingArbitrator::endRoutingArbitrationForToken):

3:18 PM Changeset in webkit [278957] by Wenson Hsieh
  • 15 edits
    1 move
    1 delete in trunk

[watchOS] Reenable modern text input UI for non-numeric text input types
https://bugs.webkit.org/show_bug.cgi?id=226988
rdar://78102953

Reviewed by Tim Horton.

Source/WebKit:

Refactor text input logic on watchOS such that we're able to present the new ("modern") UI for scribble text
input on watchOS 8, rather than legacy (in-process) scribble UI. Overall, this patch removes
WKQuickboardListViewController altogether. This had two subclasses: WKSelectMenuListViewController (used for
focused single and multiple select elements) and WKTextInputListViewController (used for text input types).
WKSelectMenuListViewController now inherits directly from PUICQuickboardListViewController, and
WKTextInputListViewController now inherits from PUICQuickboardMessageViewController; this inheritance from
PUICQuickboardMessageViewController instead of PUICQuickboardListViewController allows the
WKTextInputListViewController to show text suggestions using -setMessages: on
PUICQuickboardMessageViewController, instead of relying on custom WebKit code to insert text suggestions.

This means that we move the following pieces of functionality out of WKQuickboardListViewController, and into
either WKSelectMenuListViewController or WKTextInputListViewController:

  1. Support for inserting and updating context views (i.e. the domain name header view in Quickboard) =>

WKTextInputListViewController.

  1. Logic for determining whether or not we should show language selection UI => WKTextInputListViewController.
  1. Support for laying out custom collection view cells in Quickboard => WKSelectMenuListViewController.
  • Platform/spi/watchos/PepperUICoreSPI.h:
  • SourcesCocoa.txt:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView createQuickboardTextInputContext]):
(-[WKContentView _createQuickboardController:]):

Refactor logic to create a PUICTextInputContext from the current focused element information out into a separate
helper method, -createQuickboardTextInputContext, and use it when both directly launching into
PUICQuickboardController and WKTextInputListViewController.

(canUseQuickboardControllerFor):

Remove a comment, now that we intend to continue using WKTextInputListViewController for non-keychain-AutoFill-
compatible text fields moving forward.

(-[WKContentView focusedFormControllerDidUpdateSuggestions:]):
(-[WKContentView allowsLanguageSelectionForListViewController:]):
(-[WKContentView textInputContextForListViewController:]):
(-[WKContentView textContentTypeForTesting]):
(-[WKContentView viewController:inputContextViewHeightForSize:]): Deleted.

Remove this delegate method, which was (effectively) unused since we just ask for
-inputContextViewForViewController: from the input delegate anyways.

(-[WKContentView allowsLanguageSelectionMenuForListViewController:]): Deleted.

Rename this to -allowsLanguageSelectionForListViewController:.

(-[WKContentView textContentTypeForListViewController:]): Deleted.

Replace this with -textInputContextForListViewController:, which returns a whole PUICTextInputContext instead
of just a text content type.

(-[WKContentView textSuggestionsForListViewController:]): Deleted.
(-[WKContentView listViewController:didSelectTextSuggestion:]): Deleted.

Remove several delegate methods that are no longer needed.

  • UIProcess/ios/forms/WKDatePickerViewController.h:
  • UIProcess/ios/forms/WKDatePickerViewController.mm:

(-[WKDatePickerViewController viewWillAppear:]):

Remove some (defunct) logic for overriding the status bar when showing Quickboard input view controllers. This
status bar mechanism (which was previously used to show label text for form controls) hasn't worked since
watchOS 6, and we need to implement this in a way that doesn't use PUICStatusBarGlobalContextViewAssertion.

  • UIProcess/ios/forms/WKQuickboardListViewController.mm: Removed.
  • UIProcess/ios/forms/WKQuickboardViewControllerDelegate.h: Renamed from Source/WebKit/UIProcess/ios/forms/WKQuickboardListViewController.h.
  • UIProcess/ios/forms/WKSelectMenuListViewController.h:
  • UIProcess/ios/forms/WKSelectMenuListViewController.mm:

(-[WKSelectMenuItemCell topToLabelBaselineSpecValue]):
(-[WKSelectMenuItemCell baselineToBottomSpecValue]):
(-[WKSelectMenuCollectionViewItemCell topToLabelBaselineSpecValue]):
(-[WKSelectMenuCollectionViewItemCell baselineToBottomSpecValue]):
(-[WKSelectMenuListViewController initWithDelegate:]):

See above comment for more details.

  • UIProcess/ios/forms/WKTextInputListViewController.h:
  • UIProcess/ios/forms/WKTextInputListViewController.mm:

(-[WKTextInputListViewController initWithDelegate:]):
(-[WKTextInputListViewController reloadContextView]):
(-[WKTextInputListViewController updateContextViewIfNeeded]):

Move logic for showing and updating the context view out of WKQuickboardListViewController, and into
WKTextInputListViewController. See comments above.

(-[WKTextInputListViewController requiresNumericInput]):
(-[WKTextInputListViewController additionalTrayButtons]):
(-[WKTextInputListViewController updateTextSuggestions:]):
(-[WKTextInputListViewController headerContentViewHeight]):
(-[WKTextInputListViewController headerContentView]):
(-[WKTextInputListViewController shouldShowLanguageButton]):
(-[WKTextInputListViewController supportsDictationInput]):
(-[WKTextInputListViewController shouldShowTrayView]):
(-[WKTextInputListViewController shouldShowTextField]):

Override this and return YES for text input types that don't require an additional numeric input tray button.
This allows PUICQuickboardMessageViewController to show a native text field containing the input text inside
quickboard, which (when tapped) presents modern text input UI.

Since showing the text field is apparently mutually exclusive to showing a tray view, we additionally override
-shouldShowTrayView and return NO for non-numeric text inputs.

(-[WKTextInputListViewController supportsArouetInput]):
(-[WKTextInputListViewController viewDidLoad]): Deleted.
(-[WKTextInputListViewController willPresentArouetViewController:]): Deleted.

There's no need to override this delegate method anymore, since the PUICTextInputContext's -initialText is
sufficient to ensure that the scribble text input UI is prepopulated with the focused text field's initial text
content.

(-[WKTextInputListViewController reloadTextSuggestions]): Deleted.

Rename this to -updateTextSuggestions:, and make it take a list of UITextSuggestions. This makes the code a
bit easier to follow and allows us to remove the -textSuggestionsForListViewController: delegate method.

(-[WKTextInputListViewController didSelectListItemAtIndexPath:]): Deleted.
(-[WKTextInputListViewController didSelectListItem:]): Deleted.
(-[WKTextInputListViewController _didSelectListItem:]): Deleted.
(-[WKTextInputListViewController numberOfListItems]): Deleted.
(-[WKTextInputListViewController heightForListItem:width:]): Deleted.
(-[WKTextInputListViewController cellForListItem:]): Deleted.
(-[WKTextInputListViewController listItemCellReuseIdentifier]): Deleted.
(-[WKTextInputListViewController listItemCellClass]): Deleted.
(-[WKTextInputListViewController itemCellForListItem:forIndexPath:]): Deleted.

Remove all this code for showing text suggestions in Quickboard UI. Since WKTextInputListViewController is now a
subclass of PUICQuickboardMessageViewController, we can now simply use the -messages property of to populate
quickboard with text suggestions.

  • UIProcess/ios/forms/WKTimePickerViewController.h:
  • WebKit.xcodeproj/project.pbxproj:

WebKitLibraries:

  • WebKitPrivateFrameworkStubs/watchos/7/PepperUICore.framework/PepperUICore.tbd:
  • WebKitPrivateFrameworkStubs/watchos/8/PepperUICore.framework/PepperUICore.tbd:
3:04 PM Changeset in webkit [278956] by Ruben Turcios
  • 8 edits in branches/safari-612.1.18.1-branch/Source

Versioning.

WebKit-7612.1.18.1.3

2:34 PM Changeset in webkit [278955] by Jonathan Bedard
  • 4 edits in trunk/Tools

[webkitscmpy] Cache more Git commands
https://bugs.webkit.org/show_bug.cgi?id=227082
<rdar://problem/79405244>

Reviewed by Stephanie Lewis.

  • Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:

(Git.init): Reset branch cache.
(Git.default_branch): Memoize default_branch call.
(Git.branch): Prefer branch cache.
(Git.checkout): Reset branch cache.

1:51 PM Changeset in webkit [278954] by commit-queue@webkit.org
  • 61 edits
    58 copies
    21 adds in trunk/LayoutTests

Allow WebXR tests to be run on Mac
https://bugs.webkit.org/show_bug.cgi?id=227054

Patch by Ada Chan <ada.chan@apple.com> on 2021-06-16
Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Updated expected results.

  • web-platform-tests/webxr/events_input_source_recreation.https-expected.txt:
  • web-platform-tests/webxr/events_input_sources_change.https-expected.txt:
  • web-platform-tests/webxr/events_referenceSpace_reset_immersive.https-expected.txt: Added.
  • web-platform-tests/webxr/events_referenceSpace_reset_inline.https-expected.txt: Added.
  • web-platform-tests/webxr/events_session_select.https-expected.txt:
  • web-platform-tests/webxr/events_session_select_subframe.https-expected.txt:
  • web-platform-tests/webxr/events_session_squeeze.https-expected.txt:
  • web-platform-tests/webxr/exclusive_requestFrame_nolayer.https-expected.txt:
  • web-platform-tests/webxr/getInputPose_handedness.https-expected.txt:
  • web-platform-tests/webxr/getViewerPose_emulatedPosition.https-expected.txt:
  • web-platform-tests/webxr/navigator_xr_sameObject.https-expected.txt:
  • web-platform-tests/webxr/render_state_update.https-expected.txt:
  • web-platform-tests/webxr/render_state_vertical_fov_immersive.https-expected.txt:
  • web-platform-tests/webxr/render_state_vertical_fov_inline.https-expected.txt:
  • web-platform-tests/webxr/webGLCanvasContext_create_xrcompatible.https-expected.txt:
  • web-platform-tests/webxr/webGLCanvasContext_makecompatible_contextlost.https-expected.txt:
  • web-platform-tests/webxr/webGLCanvasContext_makecompatible_reentrant.https-expected.txt:
  • web-platform-tests/webxr/xrBoundedReferenceSpace_updates.https-expected.txt:
  • web-platform-tests/webxr/xrDevice_disconnect_ends.https-expected.txt: Added.
  • web-platform-tests/webxr/xrDevice_requestSession_immersive.https-expected.txt:
  • web-platform-tests/webxr/xrDevice_requestSession_optionalFeatures.https-expected.txt:
  • web-platform-tests/webxr/xrFrame_getPose.https-expected.txt:
  • web-platform-tests/webxr/xrFrame_getViewerPose_getPose.https-expected.txt:
  • web-platform-tests/webxr/xrFrame_getViewerPose_getPose_identities.https-expected.txt: Added.
  • web-platform-tests/webxr/xrFrame_lifetime.https-expected.txt:
  • web-platform-tests/webxr/xrFrame_session_sameObject.https-expected.txt:
  • web-platform-tests/webxr/xrInputSource_add_remove.https-expected.txt:
  • web-platform-tests/webxr/xrInputSource_emulatedPosition.https-expected.txt:
  • web-platform-tests/webxr/xrInputSource_profiles.https-expected.txt:
  • web-platform-tests/webxr/xrInputSource_sameObject.https-expected.txt:
  • web-platform-tests/webxr/xrPose_transform_sameObject.https-expected.txt:
  • web-platform-tests/webxr/xrReferenceSpace_originOffset.https-expected.txt:
  • web-platform-tests/webxr/xrReferenceSpace_originOffsetBounded.https-expected.txt:
  • web-platform-tests/webxr/xrReferenceSpace_originOffset_viewer.https-expected.txt:
  • web-platform-tests/webxr/xrReferenceSpace_relationships.https-expected.txt:
  • web-platform-tests/webxr/xrRigidTransform_constructor.https-expected.txt:
  • web-platform-tests/webxr/xrRigidTransform_inverse.https-expected.txt:
  • web-platform-tests/webxr/xrRigidTransform_sameObject.https-expected.txt:
  • web-platform-tests/webxr/xrSession_cancelAnimationFrame.https-expected.txt:
  • web-platform-tests/webxr/xrSession_cancelAnimationFrame_invalidhandle.https-expected.txt:
  • web-platform-tests/webxr/xrSession_end.https-expected.txt:
  • web-platform-tests/webxr/xrSession_input_events_end.https-expected.txt:
  • web-platform-tests/webxr/xrSession_requestAnimationFrame_callback_calls.https-expected.txt:
  • web-platform-tests/webxr/xrSession_requestAnimationFrame_data_valid.https-expected.txt:
  • web-platform-tests/webxr/xrSession_requestAnimationFrame_getViewerPose.https-expected.txt:
  • web-platform-tests/webxr/xrSession_requestAnimationFrame_timestamp.https-expected.txt:
  • web-platform-tests/webxr/xrSession_requestReferenceSpace.https-expected.txt:
  • web-platform-tests/webxr/xrSession_requestSessionDuringEnd.https-expected.txt: Added.
  • web-platform-tests/webxr/xrSession_sameObject.https-expected.txt:
  • web-platform-tests/webxr/xrSession_viewer_referenceSpace.https-expected.txt:
  • web-platform-tests/webxr/xrStationaryReferenceSpace_floorlevel_updates.https-expected.txt:
  • web-platform-tests/webxr/xrView_eyes.https-expected.txt:
  • web-platform-tests/webxr/xrView_match.https-expected.txt:
  • web-platform-tests/webxr/xrView_oneframeupdate.https-expected.txt:
  • web-platform-tests/webxr/xrView_sameObject.https-expected.txt:
  • web-platform-tests/webxr/xrViewerPose_views_sameObject.https-expected.txt:
  • web-platform-tests/webxr/xrViewport_valid.https-expected.txt:
  • web-platform-tests/webxr/xrWebGLLayer_constructor.https-expected.txt:
  • web-platform-tests/webxr/xrWebGLLayer_framebuffer_sameObject.https-expected.txt:
  • web-platform-tests/webxr/xrWebGLLayer_viewports.https-expected.txt:
  • web-platform-tests/webxr/xr_viewport_scale.https-expected.txt: Added.

LayoutTests:

Updated expected results and TestExpectations.
Copied old versions of expected results that were in imported/w3c/web-platform-tests/webxr
to platform/wpe/imported/w3c/web-platform-tests/webxr so test runs on wpe should not be
affected.

  • TestExpectations:
  • http/wpt/webxr/xrSession_end_device_reports_shutdown.https-expected.txt:
  • http/wpt/webxr/xrSession_ended_by_system.https-expected.txt:
  • http/wpt/webxr/xrSession_reject_multiple_end.https-expected.txt:
  • platform/mac/imported/w3c/web-platform-tests/webxr/getInputPose_pointer.https-expected.txt: Added.
  • platform/mac/imported/w3c/web-platform-tests/webxr/webxr_feature_policy.https-expected.txt: Added.
  • platform/mac/imported/w3c/web-platform-tests/webxr/xrSession_requestReferenceSpace_features.https-expected.txt: Added.
  • platform/mac/imported/w3c/web-platform-tests/webxr/xrSession_visibilityState.https-expected.txt: Added.
  • platform/mac/imported/w3c/web-platform-tests/webxr/xrWebGLLayer_framebuffer_draw.https-expected.txt: Added.
  • platform/mac/imported/w3c/web-platform-tests/webxr/xrWebGLLayer_framebuffer_scale.https-expected.txt: Added.
  • platform/mac/imported/w3c/web-platform-tests/webxr/xrWebGLLayer_opaque_framebuffer.https-expected.txt: Added.
  • platform/mac/imported/w3c/web-platform-tests/webxr/xrWebGLLayer_opaque_framebuffer_stencil.https-expected.txt: Added.
  • platform/mac/imported/w3c/web-platform-tests/webxr/xr_viewport_scale.https-expected.txt: Added.
  • platform/wpe/http/wpt/webxr/xrSession_end_device_reports_shutdown.https-expected.txt: Copied from LayoutTests/http/wpt/webxr/xrSession_end_device_reports_shutdown.https-expected.txt.
  • platform/wpe/http/wpt/webxr/xrSession_ended_by_system.https-expected.txt: Copied from LayoutTests/http/wpt/webxr/xrSession_ended_by_system.https-expected.txt.
  • platform/wpe/http/wpt/webxr/xrSession_reject_multiple_end.https-expected.txt: Copied from LayoutTests/http/wpt/webxr/xrSession_reject_multiple_end.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/events_input_source_recreation.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/events_input_source_recreation.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/events_input_sources_change.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/events_input_sources_change.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/events_referenceSpace_reset_immersive.https-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/events_referenceSpace_reset_inline.https-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/events_session_select.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/events_session_select.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/events_session_select_subframe.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/events_session_select_subframe.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/events_session_squeeze.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/events_session_squeeze.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/exclusive_requestFrame_nolayer.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/exclusive_requestFrame_nolayer.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/getInputPose_handedness.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/getInputPose_handedness.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/getViewerPose_emulatedPosition.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/getViewerPose_emulatedPosition.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/navigator_xr_sameObject.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/navigator_xr_sameObject.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/render_state_update.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/render_state_update.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/render_state_vertical_fov_immersive.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/render_state_vertical_fov_immersive.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/render_state_vertical_fov_inline.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/render_state_vertical_fov_inline.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/webGLCanvasContext_create_xrcompatible.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/webGLCanvasContext_create_xrcompatible.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/webGLCanvasContext_makecompatible_contextlost.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/webGLCanvasContext_makecompatible_contextlost.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/webGLCanvasContext_makecompatible_reentrant.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/webGLCanvasContext_makecompatible_reentrant.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrBoundedReferenceSpace_updates.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrBoundedReferenceSpace_updates.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrDevice_disconnect_ends.https-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrDevice_requestSession_immersive.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrDevice_requestSession_immersive.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrDevice_requestSession_optionalFeatures.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrDevice_requestSession_optionalFeatures.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrFrame_getPose.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrFrame_getPose.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrFrame_getViewerPose_getPose.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrFrame_getViewerPose_getPose.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrFrame_lifetime.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrFrame_lifetime.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrFrame_session_sameObject.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrFrame_session_sameObject.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrInputSource_add_remove.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrInputSource_add_remove.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrInputSource_emulatedPosition.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrInputSource_emulatedPosition.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrInputSource_profiles.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrInputSource_profiles.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrInputSource_sameObject.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrInputSource_sameObject.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrPose_transform_sameObject.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrPose_transform_sameObject.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrReferenceSpace_originOffset.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrReferenceSpace_originOffset.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrReferenceSpace_originOffsetBounded.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrReferenceSpace_originOffsetBounded.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrReferenceSpace_originOffset_viewer.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrReferenceSpace_originOffset_viewer.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrReferenceSpace_relationships.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrReferenceSpace_relationships.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrRigidTransform_constructor.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrRigidTransform_constructor.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrRigidTransform_inverse.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrRigidTransform_inverse.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrRigidTransform_sameObject.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrRigidTransform_sameObject.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrSession_cancelAnimationFrame.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrSession_cancelAnimationFrame.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrSession_cancelAnimationFrame_invalidhandle.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrSession_cancelAnimationFrame_invalidhandle.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrSession_end.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrSession_end.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrSession_input_events_end.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrSession_input_events_end.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrSession_requestAnimationFrame_callback_calls.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrSession_requestAnimationFrame_callback_calls.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrSession_requestAnimationFrame_data_valid.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrSession_requestAnimationFrame_data_valid.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrSession_requestAnimationFrame_getViewerPose.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrSession_requestAnimationFrame_getViewerPose.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrSession_requestAnimationFrame_timestamp.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrSession_requestAnimationFrame_timestamp.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrSession_requestReferenceSpace.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrSession_requestReferenceSpace.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrSession_sameObject.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrSession_sameObject.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrSession_viewer_referenceSpace.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrSession_viewer_referenceSpace.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrStationaryReferenceSpace_floorlevel_updates.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrStationaryReferenceSpace_floorlevel_updates.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrView_eyes.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrView_eyes.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrView_match.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrView_match.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrView_oneframeupdate.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrView_oneframeupdate.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrView_sameObject.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrView_sameObject.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrViewerPose_views_sameObject.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrViewerPose_views_sameObject.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrViewport_valid.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrViewport_valid.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrWebGLLayer_constructor.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrWebGLLayer_constructor.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrWebGLLayer_framebuffer_sameObject.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrWebGLLayer_framebuffer_sameObject.https-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/webxr/xrWebGLLayer_viewports.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/webxr/xrWebGLLayer_viewports.https-expected.txt.
1:44 PM Changeset in webkit [278953] by Chris Dumez
  • 17 edits in trunk/Source/WebKit

Enable release logging in the network process for ephemeral sessions
https://bugs.webkit.org/show_bug.cgi?id=227087

Reviewed by Geoffrey Garen.

Enable release logging in the network process for ephemeral sessions, to facilitate debugging. No domains
or other sensitive information is logged by WebKit.

  • NetworkProcess/Downloads/Download.cpp:

(WebKit::Download::cancel):
(WebKit::Download::didReceiveData):
(WebKit::Download::didFinish):
(WebKit::Download::didFail):

  • NetworkProcess/Downloads/Download.h:
  • NetworkProcess/Downloads/DownloadMonitor.cpp:

(WebKit::DownloadMonitor::applicationWillEnterForeground):
(WebKit::DownloadMonitor::applicationDidEnterBackground):
(WebKit::DownloadMonitor::timerFired):

  • NetworkProcess/NetworkCORSPreflightChecker.cpp:

(WebKit::NetworkCORSPreflightChecker::startPreflight):
(WebKit::NetworkCORSPreflightChecker::willPerformHTTPRedirection):
(WebKit::NetworkCORSPreflightChecker::didReceiveChallenge):
(WebKit::NetworkCORSPreflightChecker::didReceiveResponse):
(WebKit::NetworkCORSPreflightChecker::didReceiveData):
(WebKit::NetworkCORSPreflightChecker::didCompleteWithError):
(WebKit::NetworkCORSPreflightChecker::wasBlocked):
(WebKit::NetworkCORSPreflightChecker::cannotShowURL):
(WebKit::NetworkCORSPreflightChecker::wasBlockedByRestrictions):

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::hasUploadStateChanged):
(WebKit::NetworkConnectionToWebProcess::didClose):
(WebKit::NetworkConnectionToWebProcess::resolveBlobReferences):
(WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad):
(WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
(WebKit::NetworkConnectionToWebProcess::loadPing):
(WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier):
(WebKit::NetworkConnectionToWebProcess::preconnectTo):
(WebKit::NetworkConnectionToWebProcess::serverToContextConnectionNoLongerNeeded):

  • NetworkProcess/NetworkLoadChecker.cpp:

(WebKit::NetworkLoadChecker::continueCheckingRequest):
(WebKit::NetworkLoadChecker::checkCORSRequestWithPreflight):

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::start):
(WebKit::NetworkResourceLoader::retrieveCacheEntry):
(WebKit::NetworkResourceLoader::retrieveCacheEntryInternal):
(WebKit::NetworkResourceLoader::startNetworkLoad):
(WebKit::NetworkResourceLoader::cleanup):
(WebKit::NetworkResourceLoader::convertToDownload):
(WebKit::NetworkResourceLoader::abort):
(WebKit::NetworkResourceLoader::didReceiveResponse):
(WebKit::NetworkResourceLoader::didReceiveBuffer):
(WebKit::NetworkResourceLoader::didFinishLoading):
(WebKit::NetworkResourceLoader::didFailLoading):
(WebKit::NetworkResourceLoader::didBlockAuthenticationChallenge):
(WebKit::NetworkResourceLoader::willSendRedirectedRequest):
(WebKit::NetworkResourceLoader::continueWillSendRedirectedRequest):
(WebKit::NetworkResourceLoader::didFinishWithRedirectResponse):
(WebKit::NetworkResourceLoader::restartNetworkLoad):
(WebKit::NetworkResourceLoader::continueWillSendRequest):
(WebKit::NetworkResourceLoader::continueDidReceiveResponse):
(WebKit::NetworkResourceLoader::tryStoreAsCacheEntry):
(WebKit::NetworkResourceLoader::didReceiveMainResourceResponse):
(WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
(WebKit::NetworkResourceLoader::sendResultForCacheEntry):
(WebKit::NetworkResourceLoader::validateCacheEntry):
(WebKit::NetworkResourceLoader::dispatchWillSendRequestForCacheEntry):
(WebKit::NetworkResourceLoader::logSlowCacheRetrieveIfNeeded):
(WebKit::NetworkResourceLoader::startWithServiceWorker):
(WebKit::NetworkResourceLoader::serviceWorkerDidNotHandle):

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

(WebKit::PingLoad::loadRequest):
(WebKit::PingLoad::didReceiveChallenge):
(WebKit::PingLoad::didReceiveResponse):
(WebKit::PingLoad::didReceiveData):
(WebKit::PingLoad::didCompleteWithError):
(WebKit::PingLoad::wasBlocked):
(WebKit::PingLoad::cannotShowURL):
(WebKit::PingLoad::wasBlockedByRestrictions):
(WebKit::PingLoad::timeoutTimerFired):

  • NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:

(WebKit::ServiceWorkerFetchTask::ServiceWorkerFetchTask):
(WebKit::ServiceWorkerFetchTask::~ServiceWorkerFetchTask):
(WebKit::ServiceWorkerFetchTask::start):
(WebKit::ServiceWorkerFetchTask::contextClosed):
(WebKit::ServiceWorkerFetchTask::startFetch):
(WebKit::ServiceWorkerFetchTask::didReceiveRedirectResponse):
(WebKit::ServiceWorkerFetchTask::didReceiveResponse):
(WebKit::ServiceWorkerFetchTask::didFinish):
(WebKit::ServiceWorkerFetchTask::didFail):
(WebKit::ServiceWorkerFetchTask::didNotHandle):
(WebKit::ServiceWorkerFetchTask::cannotHandle):
(WebKit::ServiceWorkerFetchTask::cancelFromClient):
(WebKit::ServiceWorkerFetchTask::continueDidReceiveFetchResponse):
(WebKit::ServiceWorkerFetchTask::continueFetchTaskWith):
(WebKit::ServiceWorkerFetchTask::timeoutTimerFired):
(WebKit::ServiceWorkerFetchTask::softUpdateIfNeeded):

  • NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:

(WebKit::WebSWServerConnection::createFetchTask):
(WebKit::WebSWServerConnection::startFetch):
(WebKit::WebSWServerConnection::scheduleJobInServer):
(WebKit::WebSWServerConnection::scheduleUnregisterJobInServer):

  • NetworkProcess/cache/CacheStorageEngineConnection.cpp:

(WebKit::CacheStorageEngineConnection::open):
(WebKit::CacheStorageEngineConnection::remove):
(WebKit::CacheStorageEngineConnection::caches):
(WebKit::CacheStorageEngineConnection::retrieveRecords):
(WebKit::CacheStorageEngineConnection::deleteMatchingRecords):
(WebKit::CacheStorageEngineConnection::putRecords):
(WebKit::CacheStorageEngineConnection::reference):
(WebKit::CacheStorageEngineConnection::dereference):

  • NetworkProcess/webrtc/NetworkMDNSRegister.cpp:

(WebKit::registerMDNSNameCallback):
(WebKit::NetworkMDNSRegister::registerMDNSName):

  • NetworkProcess/webrtc/NetworkRTCMonitor.cpp:

(WebKit::NetworkRTCMonitor::startUpdatingIfNeeded):
(WebKit::NetworkRTCMonitor::stopUpdating):
(WebKit::NetworkRTCMonitor::onNetworksChanged):

  • NetworkProcess/webrtc/NetworkRTCProvider.cpp:

(WebKit::NetworkRTCProvider::NetworkRTCProvider):
(WebKit::NetworkRTCProvider::close):
(WebKit::NetworkRTCProvider::createSocket):

  • NetworkProcess/webrtc/NetworkRTCProvider.h:
1:12 PM Changeset in webkit [278952] by Brent Fulgham
  • 9 edits in trunk/Source/WebKit

Sandbox profiles need to allow loading from /usr/appleinternal/lib on internal builds
https://bugs.webkit.org/show_bug.cgi?id=227079
<rdar://problem/79390957>

Reviewed by Per Arne Vollan.

We allow the specific directory "/usr/appleinternal/lib/sanitizers", but we actually need
access to "/usr/appleinternal/lib" in certain development environments.

  • GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebAuthn.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
  • WebAuthnProcess/mac/com.apple.WebKit.WebAuthnProcess.sb.in:
  • WebProcess/com.apple.WebProcess.sb.in:
12:58 PM Changeset in webkit [278951] by Chris Dumez
  • 5 edits
    2 adds in trunk

FileReader.readAsArrayBuffer misses checking for the type of blob param
https://bugs.webkit.org/show_bug.cgi?id=226640
<rdar://problem/79193198>

Reviewed by Youenn Fablet.

Source/WebCore:

The Blob parameter to FileReader.readAsArrayBuffer / readAsBinaryString / readAsText / readAsDataURL
should not be nullable as per the specification:

This patch aligns us with the specification and with the behavior of both Blink and Gecko.

Test: fast/files/filereader-invalid-blob.html

  • fileapi/FileReader.cpp:

(WebCore::FileReader::readAsArrayBuffer):
(WebCore::FileReader::readAsBinaryString):
(WebCore::FileReader::readAsText):
(WebCore::FileReader::readAsDataURL):

  • fileapi/FileReader.h:
  • fileapi/FileReader.idl:

LayoutTests:

Add layout test coverage. I have verified that this test is passing in Firefox and Chrome as well.

  • fast/files/filereader-invalid-blob-expected.txt: Added.
  • fast/files/filereader-invalid-blob.html: Added.
12:14 PM Changeset in webkit [278950] by commit-queue@webkit.org
  • 8 edits in trunk/Source/JavaScriptCore

Add Air opcode sub32/64(Reg, Imm, Reg) form for ARM64 and select this instruction in Air
https://bugs.webkit.org/show_bug.cgi?id=226937

Patch by Yijia Huang <yijia_huang@apple.com> on 2021-06-16
Reviewed by Yusuke Suzuki.

Previously, Air arm64 sub32/64 utilize sub(Imm, Tmp) at optlevel = 0 and
add(Tmp, -Imm) at optlevel > 0 to perform and optimize sub(Tmp, Imm, Tmp).
The issue with this is that we were not eliding redundant operations.

For example:
B3 IR
@0 = Trunc(ArgumentReg(0))
@1 = Const
@2 = Sub(@0, @1)
@3 = Return(@2)

Old optimized Air IR
OptLevel = 0
Move %x0, %tmp1, @0
Move $Const, %tmp2, @1
Move %tmp1, %tmp0, @2 Redundant
Sub $Const, %tmp0, @2
Move %tmp0, %x0, @3
Ret32 %x0, @3

To remove those redundant instructions, Air arm64 sub32/64 opcode should
indicate a new form sub(Tmp, Imm, Tmp).

New optimized Air IR
OptLevel = 0
Move %x0, %tmp1, @0
Move $Const, %tmp2, @1
Sub %tmp1, $Const, %tmp0, @2
Move %tmp0, %x0, @3
Ret32 %x0, @3

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::sub32):
(JSC::MacroAssemblerARM64::sub64):

  • assembler/testmasm.cpp:

(JSC::testSub32Args):
(JSC::testSub32Imm):
(JSC::testSub32ArgImm):
(JSC::testSub64Imm32):
(JSC::testSub64ArgImm32):
(JSC::testSub64Imm64):
(JSC::testSub64ArgImm64):

  • b3/B3ReduceStrength.cpp:
  • b3/air/AirOpcode.opcodes:
  • b3/testb3.h:
  • b3/testb3_2.cpp:

(testSubArgs32ZeroExtend):

  • b3/testb3_3.cpp:

(addArgTests):

12:12 PM Changeset in webkit [278949] by Amir Mark Jr.
  • 2 edits in trunk/LayoutTests

[EWS MacOS WK1] imported/w3c/web-platform-tests/css/css-scroll-snap/scroll-target-snap-003.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=227085

Unreviewed test gardening.

Updating test expectations to clear EWS warning.

  • platform/mac-wk1/TestExpectations:
12:12 PM Changeset in webkit [278948] by sihui_liu@apple.com
  • 2 edits in trunk/Source/WebCore

Add lock for static cursorMap in MemoryCursor
https://bugs.webkit.org/show_bug.cgi?id=226806

Reviewed by Chris Dumez.

As cursorMap can be accessed from multiple WorkQueues.

  • Modules/indexeddb/server/MemoryCursor.cpp:

(WebCore::IDBServer::MemoryCursor::MemoryCursor):
(WebCore::IDBServer::MemoryCursor::~MemoryCursor):
(WebCore::IDBServer::MemoryCursor::cursorForIdentifier):

12:01 PM Changeset in webkit [278947] by timothy@apple.com
  • 3 edits in trunk/Source/WebCore

REGRESSION (r273329): Logging of most errors like CSP and promise rejections fail logging to the system console
https://bugs.webkit.org/show_bug.cgi?id=227080

Unreviewed, reverting r273329.

  • dom/Document.cpp:

(WebCore::Document::didLogMessage):

  • page/PageConsoleClient.cpp:

(WebCore::PageConsoleClient::addMessage):

11:44 AM Changeset in webkit [278946] by Russell Epstein
  • 1 edit in branches/safari-611-branch/Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentSecurityPolicy.mm

Unreviewed API Test fix.

Fix API test breakage after changes in https://trac.webkit.org/changeset/275702/webkit

11:34 AM Changeset in webkit [278945] by rmorisset@apple.com
  • 7 edits in trunk/Source/JavaScriptCore

Drop the FTL(DFG) graph after lowering to B3
https://bugs.webkit.org/show_bug.cgi?id=226556

Reviewed by Phil Pizlo.

This patch originally landed as r278463, was reverted in r278463.
I believe that the bug for which it was reverted actually comes from r278371, which was also reverted at the same time. So I am now relanding this.

The challenge in this patch was dealing with all of the Patchpoints created by FTLLowerDFGToB3: they get a lambda at that time, which they execute at the end of Air, and many of these lambdas were capturing a pointer to some parts of the DFG graph and reading through it when being executed.
In all cases but one it was easily fixed: they were only reading a few bits from a given node, so I just read these bits in FTLLowerDFGToB3, and captured them (by value) instead of the pointer to the node.
The exception was compileCallOrConstructVarargsSpread(): its patchpoint generator was walking through the graph, flattening a tree of PhantomSpread/PhantomNewArrayWithSpread/PhantomNewArrayBuffer/PhantomCreateRest, emitting some code along the way.
We now do this flattening of the tree in FTLLowerDFGToB3, store just enough information to later emit the required code in a vector, and capture that vector in the lambda (through a move capture, which is allowed since C++14). See struct VarargsSpreadArgumentToEmit for the information that we need to store in that vector.

I tested this change by completing a full run of JetStream2 with ASAN.
I also ran the stress tests with "spread" in their name in Debug mode.

  • b3/B3SparseCollection.h:

(JSC::B3::SparseCollection::clearAll):

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::freeDFGIRAfterLowering):

  • dfg/DFGGraph.h:
  • ftl/FTLCompile.cpp:

(JSC::FTL::compile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileUnaryMathIC):
(JSC::FTL::DFG::LowerDFGToB3::compileBinaryMathIC):
(JSC::FTL::DFG::LowerDFGToB3::getPrivateName):
(JSC::FTL::DFG::LowerDFGToB3::compilePrivateBrandAccess):
(JSC::FTL::DFG::LowerDFGToB3::cachedPutById):
(JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):
(JSC::FTL::DFG::LowerDFGToB3::compileDelBy):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstruct):
(JSC::FTL::DFG::LowerDFGToB3::compileDirectCallOrConstruct):
(JSC::FTL::DFG::LowerDFGToB3::compileTailCall):
(JSC::FTL::DFG::LowerDFGToB3::VarargsSpreadArgumentToEmit::VarargsSpreadArgumentToEmit):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargsSpread):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargs):
(JSC::FTL::DFG::LowerDFGToB3::compileCallEval):
(JSC::FTL::DFG::LowerDFGToB3::compileInById):
(JSC::FTL::DFG::LowerDFGToB3::compileInstanceOf):
(JSC::FTL::DFG::LowerDFGToB3::getById):
(JSC::FTL::DFG::LowerDFGToB3::getByIdWithThis):
(JSC::FTL::DFG::LowerDFGToB3::emitBinarySnippet):
(JSC::FTL::DFG::LowerDFGToB3::emitBinaryBitOpSnippet):
(JSC::FTL::DFG::LowerDFGToB3::emitRightShiftSnippet):
(JSC::FTL::DFG::LowerDFGToB3::crash):

11:26 AM Changeset in webkit [278944] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

WebGL2 clientWaitSync does not flush when requested
https://bugs.webkit.org/show_bug.cgi?id=227064

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-06-16
Reviewed by Kenneth Russell.

Flush when clientWaitSync is called with SYNC_FLUSH_COMMANDS_BIT.
Theoretically the sync object might not be inserted to the command
buffer unless the wait flushes or client ensures flush by other
means.

No new tests, hard to observe externally.

  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::WebGL2RenderingContext::clientWaitSync):

11:10 AM Changeset in webkit [278943] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

[Hardening] Better protect against overflows in the WebAudioBufferList constructor
https://bugs.webkit.org/show_bug.cgi?id=227077
<rdar://problem/78222665>

Reviewed by Geoffrey Garen.

Make sure sizeof(AudioBuffer) * std::max(1U, bufferCount) doesn't overflow.

  • platform/audio/cocoa/WebAudioBufferList.cpp:

(WebCore::WebAudioBufferList::WebAudioBufferList):

11:08 AM Changeset in webkit [278942] by fpizlo@apple.com
  • 4 edits
    1 add in trunk/Source/JavaScriptCore

RegisterSet should be smaller
https://bugs.webkit.org/show_bug.cgi?id=227078

Reviewed by Geoff Garen.

Previously, every RegisterSet would have an extra 64-bit word in it just to hold state
relevant to hashtable keys.

But RegisterSet is almost never used as a hashtable key.

This patch moves the hashtable key support into a subclass, HashableRegisterSet. That class
ends up only being used in one place.

On ARM64, this makes RegisterSet use 64 bits instead of 128 bits.

On X86_64, this makes RegisterSet use 32 bits instead of 64 bits.

(JSC::FTL::SlowPathCallKey::SlowPathCallKey):

  • jit/HashableRegisterSet.h: Added.

(JSC::HashableRegisterSet::HashableRegisterSet):
(JSC::HashableRegisterSet::isEmptyValue const):
(JSC::HashableRegisterSet::isDeletedValue const):
(JSC::RegisterSetHash::hash):
(JSC::RegisterSetHash::equal):

  • jit/RegisterSet.h:

(): Deleted.
(JSC::RegisterSet::isEmptyValue const): Deleted.
(JSC::RegisterSet::isDeletedValue const): Deleted.
(JSC::RegisterSetHash::hash): Deleted.
(JSC::RegisterSetHash::equal): Deleted.

11:00 AM Changeset in webkit [278941] by achristensen@apple.com
  • 13 edits
    3 deletes in trunk/Source/WebKit

Clean up WebCookieManagerProxy
https://bugs.webkit.org/show_bug.cgi?id=227074

Reviewed by Brady Eidson.

Remove dead code. WKCookieManagerSetClient is deprecated and doesn't do anything, so we don't need a client here.
Use smart pointers instead of raw pointers to be on the safe side.

  • Shared/API/APIObject.h:
  • Sources.txt:
  • SourcesCocoa.txt:
  • UIProcess/API/APIHTTPCookieStore.h:
  • UIProcess/API/APIInspectorExtension.cpp:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::NetworkProcessProxy):

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

(WebKit::WebCookieManagerProxy::registerObserver):
(WebKit::WebCookieManagerProxy::unregisterObserver):
(WebKit::WebCookieManagerProxy::cookiesDidChange):
(WebKit::WebCookieManagerProxy::initializeClient): Deleted.
(WebKit::WebCookieManagerProxy::setCookieObserverCallback): Deleted.

  • UIProcess/WebCookieManagerProxy.h:

(WebKit::WebCookieManagerProxy::create): Deleted.

  • UIProcess/WebCookieManagerProxy.messages.in:
  • UIProcess/WebCookieManagerProxyClient.cpp: Removed.
  • UIProcess/WebCookieManagerProxyClient.h: Removed.
  • UIProcess/mac/WebCookieManagerProxyMac.mm: Removed.
  • WebKit.xcodeproj/project.pbxproj:
10:57 AM Changeset in webkit [278940] by Russell Epstein
  • 2 edits in branches/safari-612.1.19-branch/Source/ThirdParty/libwebrtc

Cherry-pick r278886. rdar://problem/79405770

REGRESSION: [ BigSur iOS wk1 Debug ] imported/w3c/web-platform-tests/html/dom/usvstring-reflection.https.html is flaky crashing
https://bugs.webkit.org/show_bug.cgi?id=226928
<rdar://problem/79205526>

Reviewed by Eric Carlson.

  • Source/webrtc/rtc_base/task_queue_stdlib.cc: thread_ is created in TaskQueueStdlib constructor before other members pending_queue_ or delayed_queue_. It might happen that thread_ will start executing its callback which will read delayed_queue_ before it is initialized by TaskQueueStdlib constructor. Update to create thread_ before all other members.

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

10:40 AM Changeset in webkit [278939] by Amir Mark Jr.
  • 2 edits in trunk/LayoutTests

Fix test expectations for plugin tests on arm64
https://bugs.webkit.org/show_bug.cgi?id=226783

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
10:16 AM Changeset in webkit [278938] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

REGRESSION (r274461): [macOS wk1] fast/repaint/canvas-object-fit.html is flakey text failing
https://bugs.webkit.org/show_bug.cgi?id=223283

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations: Re-add a flaky expectation.
9:09 AM Changeset in webkit [278937] by Tadeu Zagallo
  • 4 edits
    1 add in trunk

AssemblyHelpers should save/restore callee save FPRs
https://bugs.webkit.org/show_bug.cgi?id=227052
<rdar://77080162>

Reviewed by Mark Lam.

JSTests:

  • stress/callee-save-fpr.js: Added.

(_f):
(_g):
(_h):
(_i):
(assertEqual):

Source/JavaScriptCore:

We have 3 functions in AssemblyHelpers to save and restore callee save registers that were filtering
out any FPRs. This is an issue since we do have callee save FPRs in arm64 and these functions can be
called from the FTL, and FTL uses those callee saves. The test case shows how that's an issue with tail
calls on FTL: the callee saves are correctly stored in the prologue and restored in the epilogue, but
when emitting a tail call we use AssemblyHelpers::emitRestoreCalleeSaves to restore the callee saves,
which doesn't restore FPRs. This results in the callee save FPRs being trashed. To fix this we just need
to stop filtering out the FPRs, if they are listed as used by the code block they should be saved/restored
accordingly. I also changed DFGOSREntry to stop filtering out the callee save FPRs and instead assert
there aren't any, since they aren't currently used in the DFG, but it could help avoid the same issue in
the future.

  • dfg/DFGOSREntry.cpp:

(JSC::DFG::prepareOSREntry):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::emitSaveCalleeSavesFor):
(JSC::AssemblyHelpers::emitSaveOrCopyCalleeSavesFor):
(JSC::AssemblyHelpers::emitRestoreCalleeSavesFor):

8:41 AM Changeset in webkit [278936] by aboya@igalia.com
  • 4 edits in trunk

[WTF] DataMutex: Assert on double locking on the same thread
https://bugs.webkit.org/show_bug.cgi?id=227069

Reviewed by Xabier Rodriguez-Calvar.

Source/WTF:

DataMutex used to use OwnerAwareLock to track what thread is holding
the mutex and emit assertion errors if a thread is found attempting to
lock a mutex held by that same thread. This turns deadlocks into
runtime errors.

OwnerAwareLock was removed when DataMutex got clang thread safety
annotations. This patch reintroduces the same logic, while keeping
thread-safety annotations.

This fixes WTF_DataMutex.DoubleLockDeathTest, which tested this
functionality and was previously regressed.

  • wtf/DataMutex.h:

Tools:

Update expectations to include the fixed test.

  • TestWebKitAPI/glib/TestExpectations.json:
8:16 AM Changeset in webkit [278935] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[GStreamer] gst_element_get_request_pad deprecated in 1.20
https://bugs.webkit.org/show_bug.cgi?id=226974

Patch by Philippe Normand <pnormand@igalia.com> on 2021-06-16
Reviewed by Xabier Rodriguez-Calvar.

In GStreamer 1.20 gst_element_get_request_pad() was renamed to gst_element_request_pad_simple(),
so create an alias for older versions.

  • platform/graphics/gstreamer/GStreamerAudioMixer.cpp:

(WebCore::GStreamerAudioMixer::registerProducer):

  • platform/graphics/gstreamer/GStreamerCommon.h:
8:14 AM Changeset in webkit [278934] by achristensen@apple.com
  • 6 edits in trunk/Source/WebKit

Clean up API::HTTPCookieStore
https://bugs.webkit.org/show_bug.cgi?id=227058

Reviewed by Anders Carlsson.

This removes code that has been unused since r267763.
I also use smart pointers instead of raw pointers just to be on the safe side.

  • UIProcess/API/APIHTTPCookieStore.cpp:

(API::HTTPCookieStore::~HTTPCookieStore):
(API::HTTPCookieStore::registerObserver):
(API::HTTPCookieStore::unregisterObserver):
(API::HTTPCookieStore::cookiesDidChange):
(API::HTTPCookieStore::cookieManagerDestroyed): Deleted.

  • UIProcess/API/APIHTTPCookieStore.h:
  • UIProcess/WebCookieManagerProxy.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::generateListenerIdentifier): Deleted.
(WebKit::processPoolCreationListenerFunctionMap): Deleted.
(WebKit::WebProcessPool::registerProcessPoolCreationListener): Deleted.
(WebKit::WebProcessPool::unregisterProcessPoolCreationListener): Deleted.
(WebKit::WebProcessPool::notifyThisWebProcessPoolWasCreated): Deleted.

  • UIProcess/WebProcessPool.h:
7:37 AM Changeset in webkit [278933] by ntim@apple.com
  • 8 edits in trunk

Make CSS.supports() return false for internal CSS properties
https://bugs.webkit.org/show_bug.cgi?id=224930

Reviewed by Antti Koivisto.

Test: LayoutTests/fast/backgrounds/background-repeat-x-y-parse.html

Examples that are now rejected:

CSS.supports("background-repeat-x: inherit")
CSS.supports("background-repeat-x", "inherit")
CSS.supports("background-repeat-y: inherit")
CSS.supports("background-repeat-y", "inherit")

Source/WebCore:

  • css/DOMCSSNamespace.cpp:

(WebCore::DOMCSSNamespace::supports):

  • css/parser/CSSParserImpl.cpp:

(WebCore::CSSParserImpl::consumeDeclaration):

LayoutTests:

  • fast/backgrounds/background-repeat-x-y-parse-expected.txt:
  • fast/backgrounds/background-repeat-x-y-parse.html:
  • fast/css/webkit-mask-crash-implicit-expected.txt:
  • fast/css/webkit-mask-crash-implicit.html:
7:27 AM Changeset in webkit [278932] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

[MSE] Crash when getting audioTracks, videoTracks, textTracks of sourceBuffer after executing MediaSource::removeSourceBuffer()
https://bugs.webkit.org/show_bug.cgi?id=227018

Patch by Toshio Ogasawara <toshio.ogasawara@access-company.com> on 2021-06-16
Reviewed by Eric Carlson.

Source/WebCore:

Fixed not to refer to m_source when isRemoved() is true in SourceBuffer::videoTracks(),
SourceBuffer::audioTracks(), SourceBuffer::textTracks().

Test: media/media-source/media-source-get-tracks-crash.html

  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::videoTracks):
(WebCore::SourceBuffer::audioTracks):
(WebCore::SourceBuffer::textTracks):

LayoutTests:

  • media/media-source/media-source-get-tracks-crash-expected.txt: Added.
  • media/media-source/media-source-get-tracks-crash.html: Added.
6:44 AM Changeset in webkit [278931] by Alan Bujtas
  • 20 edits
    4 adds in trunk

Content moves up when hovering over a link on Hacker News
https://bugs.webkit.org/show_bug.cgi?id=226852
<rdar://78537231>

Reviewed by Antti Koivisto.

Source/WebCore:

Legacy line layout integral-rounds the root inline box's vertical position and this integral position
gets propagated down to the descendant inline boxes when descendantsHaveSameLineHeightAndBaseline() is true.
See LegacyInlineFlowBox::addToLine and LegacyInlineFlowBox::placeBoxesInBlockDirection for more details.
This patch attempts to mirror this behavior in IFC.

Test: fast/inline/hidpi-legacy-integral-rounding-on-inline-boxes.html

  • layout/integration/LayoutIntegrationInlineContentBuilder.cpp:

(WebCore::LayoutIntegration::InlineContentBuilder::computeLineLevelVisualAdjustmentsForRuns const):

LayoutTests:

  • fast/inline/hidpi-legacy-integral-rounding-on-inline-boxes-expected.html: Added.
  • fast/inline/hidpi-legacy-integral-rounding-on-inline-boxes.html: Added.
6:36 AM Changeset in webkit [278930] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Nullptr crash in positionInParentBeforeNode via InsertTextCommand::doApply
https://bugs.webkit.org/show_bug.cgi?id=226870

Patch by Frederic Wang <fwang@igalia.com> on 2021-06-16
Reviewed by Ryosuke Niwa.

Source/WebCore:

deleteSelection call In InsertTextCommand::doApply() can make the endingSelection() orphan.
If that happens, exit early to avoid dereferencing a nullptr pointer later.
Test: fast/editing/insert-text-orphaned-summary-crash.html

  • editing/InsertTextCommand.cpp:

(WebCore::InsertTextCommand::doApply):

LayoutTests:

Add regression test.

  • fast/editing/insert-text-orphaned-summary-crash-expected.txt: Added.
  • fast/editing/insert-text-orphaned-summary-crash.html: Added.
4:52 AM Changeset in webkit [278929] by commit-queue@webkit.org
  • 4 edits in trunk/Source

ANGLE Metal gl sync objects do not work in case of listener being needed
https://bugs.webkit.org/show_bug.cgi?id=227024

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-06-16
Reviewed by Per Arne Vollan.

Source/ThirdParty/ANGLE:

Add an assert to notice when MTLSharedEventListener instantiation
fails. Without this, the fence implementation would not signal
the completion until the timeout would pass.

  • src/libANGLE/renderer/metal/DisplayMtl.mm:

(rx::DisplayMtl::getOrCreateSharedEventListener):

Source/WebKit:

Make MTLSharedEventListener instantiatable by adding IOKit messages
39 and 40 to IOSurfaceRootUserClientMessageFilter.

The MTLSharedEventListener init would fail, and ANGLE would fail to
make the shared event signal the event listener. This would cause
all glClientWaitSync calls to wait the full timeout time.

No new tests, WebGL2 sync object implementation does not support
non-zero timeout values that would be needed to detect the failure.
Standalone test-cases would need the test runner being sandboxed,
which is not implemented currently.

  • WebProcess/com.apple.WebProcess.sb.in:
2:45 AM Changeset in webkit [278928] by commit-queue@webkit.org
  • 8 edits in trunk/Source/JavaScriptCore

Unreviewed, reverting r278846.
https://bugs.webkit.org/show_bug.cgi?id=227060

Speculative revert based on failure history of Speedometer2

Reverted changeset:

"Add Air opcode sub32/64(Reg, Imm, Reg) form for ARM64 and
select this instruction in Air"
https://bugs.webkit.org/show_bug.cgi?id=226937
https://trac.webkit.org/changeset/278846

1:56 AM Changeset in webkit [278927] by pvollan@apple.com
  • 10 edits in trunk/Source

Update Media Accessibility preferences in the WebContent process from the UI process
https://bugs.webkit.org/show_bug.cgi?id=227031
<rdar://78614882>

Reviewed by Eric Carlson.

Due to stricter sandboxing in the WebContent process, Media Accessibility preferences should be updated from the UI process.
Source/WebCore:

The preferences for caption display mode and preferred caption languages are being cached, and the cached value will be used
if it has been set.

  • WebCore.xcodeproj/project.pbxproj:
  • page/CaptionUserPreferences.h:
  • page/CaptionUserPreferencesMediaAF.cpp:

(WebCore::cachedCaptionDisplayMode):
(WebCore::cachedPreferredLanguages):
(WebCore::CaptionUserPreferencesMediaAF::captionDisplayMode const):
(WebCore::CaptionUserPreferencesMediaAF::platformCaptionDisplayMode):
(WebCore::CaptionUserPreferencesMediaAF::setCachedCaptionDisplayMode):
(WebCore::CaptionUserPreferencesMediaAF::preferredLanguages const):
(WebCore::CaptionUserPreferencesMediaAF::platformPreferredLanguages):
(WebCore::CaptionUserPreferencesMediaAF::setCachedPreferredLanguages):

  • page/CaptionUserPreferencesMediaAF.h:

Source/WebKit:

The preferences for caption display mode and preferred caption languages will be sent to the WebContent process on process
startup and when the preference has been changed.

  • Shared/AccessibilityPreferences.cpp:

(IPC::ArgumentCoder<WebKit::AccessibilityPreferences>::encode):
(IPC::ArgumentCoder<WebKit::AccessibilityPreferences>::decode):

  • Shared/AccessibilityPreferences.h:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::accessibilityPreferences):
(WebKit::WebProcessPool::registerNotificationObservers):
(WebKit::WebProcessPool::unregisterNotificationObservers):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::accessibilityPreferencesDidChange):

1:40 AM Changeset in webkit [278926] by commit-queue@webkit.org
  • 2 edits in trunk/Source/ThirdParty/ANGLE

ANGLE Metal AutoObjCPtr == nullptr comparison is inverted
https://bugs.webkit.org/show_bug.cgi?id=227026

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-06-16
Reviewed by Anders Carlsson.

Make it more correct and add != nullptr variant for
consistency.

Use std::nullptr_t instead of const std::nullptr_t &
in all functions for consistency.

  • src/libANGLE/renderer/metal/mtl_common.h:

(rx::mtl::AutoObjCPtr::operator== const):
(rx::mtl::AutoObjCPtr::operator!= const):

1:15 AM Changeset in webkit [278925] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[GStreamer] clang analysis: Unlocked access in ImageDecoderGStreamer.cpp
https://bugs.webkit.org/show_bug.cgi?id=226495

Patch by Philippe Normand <pnormand@igalia.com> on 2021-06-16
Reviewed by Adrian Perez de Castro.

Remove unlocked access to the the m_messageDispatched instance variable. Also there is no
need to wait on the condition if the dispatching happens synchronously in the current
thread. No need to notify the condition either before dispatching, the only call to wait()
is after the asynchronous dispatch has been scheduled.

  • platform/graphics/gstreamer/ImageDecoderGStreamer.cpp:

(WebCore::ImageDecoderGStreamer::InnerDecoder::preparePipeline):

1:11 AM Changeset in webkit [278924] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[GLIB] Unreviewed test gardening, add some new Timing-Allow-Origin failures
https://bugs.webkit.org/show_bug.cgi?id=227008

Patch by Arcady Goldmints-Orlov <agoldmints@igalia.com> on 2021-06-16

  • platform/glib/TestExpectations:
12:37 AM Changeset in webkit [278923] by Martin Robinson
  • 34 edits in trunk/Source

Replace invalidSnapOffsetIndex with std::optional<unsigned>
https://bugs.webkit.org/show_bug.cgi?id=226654

Reviewed by Simon Fraser.

Use std::optional<unsigned> in order to represent the situation
where we do not have a snap point selected rather than UINT_MAX.

Source/WebCore:

No new tests. This should not change behavior.

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::setActiveScrollSnapIndices):

  • page/scrolling/AsyncScrollingCoordinator.h:
  • page/scrolling/ScrollSnapOffsetsInfo.cpp:

(WebCore::indicesOfNearestSnapOffsets): Return a std::pair instead of splitting the
return values into the argument list.
(WebCore::closestSnapOffsetWithInfoAndAxis):
(WebCore::LayoutScrollSnapOffsetsInfo::closestSnapOffset const):
(WebCore::FloatScrollSnapOffsetsInfo::closestSnapOffset const):

  • page/scrolling/ScrollSnapOffsetsInfo.h:
  • page/scrolling/ScrollingStateScrollingNode.cpp:

(WebCore::ScrollingStateScrollingNode::setCurrentHorizontalSnapPointIndex):
(WebCore::ScrollingStateScrollingNode::setCurrentVerticalSnapPointIndex):
(WebCore::ScrollingStateScrollingNode::dumpProperties const):

  • page/scrolling/ScrollingStateScrollingNode.h:

(WebCore::ScrollingStateScrollingNode::currentHorizontalSnapPointIndex const):
(WebCore::ScrollingStateScrollingNode::currentVerticalSnapPointIndex const):

  • page/scrolling/ScrollingTree.h:

(WebCore::ScrollingTree::setActiveScrollSnapIndices):

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::dumpProperties const):

  • page/scrolling/ScrollingTreeScrollingNode.h: Move some methods into the

source file to satisfy the style checker. WEBCORE_EXPORT is applied to the
entire class declaration.

  • page/scrolling/ThreadedScrollingTree.cpp:

(WebCore::ThreadedScrollingTree::currentSnapPointIndicesDidChange):
(WebCore::ThreadedScrollingTree::setActiveScrollSnapIndices):

  • page/scrolling/ThreadedScrollingTree.h:
  • page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h:
  • page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:

(WebCore::ScrollingTreeScrollingNodeDelegateMac::activeScrollSnapIndexForAxis const):

  • platform/ScrollAnimator.cpp:

(WebCore::ScrollAnimator::activeScrollSnapIndexForAxis const):
(WebCore::ScrollAnimator::setActiveScrollSnapIndexForAxis):

  • platform/ScrollAnimator.h:
  • platform/ScrollController.cpp:

(WebCore::ScrollController::activeScrollSnapIndexForAxis const):
(WebCore::ScrollController::setActiveScrollSnapIndexForAxis): When there is no new
snap index, we need to actively change the value to std::nullopt. This wasn't
necessary because ScrollableArea was covering up this case in the past as a side-effect.
(WebCore::ScrollController::setNearestScrollSnapIndexForAxisAndOffset):
(WebCore::ScrollController::resnapAfterLayout): Also resnap if the snapped index is
greater than the current one. This case was being covered up by a side-effect in
ScrollableArea.

  • platform/ScrollController.h:
  • platform/ScrollSnapAnimatorState.cpp:

(WebCore::ScrollSnapAnimatorState::setupAnimationForState):
(WebCore::ScrollSnapAnimatorState::targetOffsetForStartOffset const): Return a std::pair
instead of splitting the output values into the argument list.

  • platform/ScrollSnapAnimatorState.h:

(WebCore::ScrollSnapAnimatorState::activeSnapIndexForAxis const):
(WebCore::ScrollSnapAnimatorState::setActiveSnapIndexForAxis):

  • platform/ScrollableArea.cpp:

(WebCore::ScrollableArea::currentHorizontalSnapPointIndex const):
(WebCore::ScrollableArea::currentVerticalSnapPointIndex const):
(WebCore::ScrollableArea::setCurrentHorizontalSnapPointIndex):
(WebCore::ScrollableArea::setCurrentVerticalSnapPointIndex):
(WebCore::ScrollableArea::resnapAfterLayout):

  • platform/ScrollableArea.h:

Source/WebKit:

  • Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:

(ArgumentCoder<ScrollingStateScrollingNode>::decode):

  • UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:

(WebKit::RemoteScrollingCoordinatorProxy::currentSnapPointIndicesDidChange):

  • UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
  • UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp:

(WebKit::RemoteScrollingTree::currentSnapPointIndicesDidChange):

  • UIProcess/RemoteLayerTree/RemoteScrollingTree.h:
  • UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:

(WebKit::RemoteScrollingCoordinatorProxy::adjustTargetContentOffsetForSnapping):
(WebKit::RemoteScrollingCoordinatorProxy::shouldSnapForMainFrameScrolling const):

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

(-[WKScrollingNodeScrollViewDelegate scrollViewWillEndDragging:withVelocity:targetContentOffset:]):
(WebKit::ScrollingTreeScrollingNodeDelegateIOS::currentSnapPointIndicesDidChange const):

  • WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.mm:

(WebKit::RemoteScrollingCoordinator::currentSnapPointIndicesChangedForNode):

Jun 15, 2021: Yesterday

10:40 PM Changeset in webkit [278922] by Peng Liu
  • 2 edits in trunk/Source/WebCore
some http/tests/ are crashing with ASSERTION FAILED: isInRoutingArbitrationForToken(token)
m_setupArbitrationOngoing

https://bugs.webkit.org/show_bug.cgi?id=226896

Reviewed by Eric Carlson.

When the RoutingArbiter fails to -[beginArbitrationWithCategory:completionHandler:],
a token won't be added to m_tokens. Therefore, we should remove the assertion
in SharedRoutingArbitrator::endRoutingArbitrationForToken().

  • platform/audio/mac/SharedRoutingArbitrator.mm:

(WebCore::SharedRoutingArbitrator::endRoutingArbitrationForToken):

9:55 PM Changeset in webkit [278921] by ysuzuki@apple.com
  • 7 edits
    1 add in trunk

[JSC] Optimize JSON.parse with small content by dropping single character Identifier pool
https://bugs.webkit.org/show_bug.cgi?id=227057

Reviewed by Sam Weinig.

JSTests:

  • microbenchmarks/flight-todomvc-json.js: Added.

(test):

Source/JavaScriptCore:

Profiler results and investigation suggest interesting things.

  1. Sampling profiler says Flight-TodoMVC is mostly JSON.parse benchmark.
  2. Each JSON data of Flight-TodoMVC is small. And JSON.parse is super frequently called.
  3. In the case of JSON.parse with small data, LiteralParser's construction / destruction costs much since it has large Identifier pool with std::array<>.

As a simple first step, this patch removes single character Identifier pool from LiteralParser since
the exact same Identifier data can be retrieved from VM's SmallStrings.

We created a microbenchmark from Flight-TodoMVC's data, and the result is roughly 20% better.
And we observed 0.6% improvement in Speedometer2.

ToT Patched

flight-todomvc-json 81.0552+-0.8403 67.5756+-0.6221 definitely 1.1995x faster

----------------------------------------------------------------------------------------------------------------------------------
| subtest | ms | ms | b / a | pValue (significance using False Discovery Rate) |
----------------------------------------------------------------------------------------------------------------------------------
| Elm-TodoMVC |128.991667 |128.450000 |0.995801 | 0.278228 |
| VueJS-TodoMVC |28.487500 |27.925000 |0.980254 | 0.139315 |
| EmberJS-TodoMVC |133.950000 |134.175000 |1.001680 | 0.685021 |
| BackboneJS-TodoMVC |51.670833 |51.537500 |0.997420 | 0.628993 |
| Preact-TodoMVC |21.783333 |21.754167 |0.998661 | 0.944237 |
| AngularJS-TodoMVC |143.820833 |143.770833 |0.999652 | 0.933953 |
| Vanilla-ES2015-TodoMVC |71.608333 |71.416667 |0.997323 | 0.500591 |
| Inferno-TodoMVC |69.179167 |69.525000 |1.004999 | 0.412406 |
| Flight-TodoMVC |81.354167 |79.020833 |0.971319 | 0.000053 (significant) |
| Angular2-TypeScript-TodoMVC |42.654167 |41.887500 |0.982026 | 0.086053 |
| VanillaJS-TodoMVC |57.054167 |56.633333 |0.992624 | 0.176804 |
| jQuery-TodoMVC |274.595833 |275.670833 |1.003915 | 0.148812 |
| EmberJS-Debug-TodoMVC |358.387500 |357.595833 |0.997791 | 0.323387 |
| React-TodoMVC |93.804167 |93.329167 |0.994936 | 0.113410 |
| React-Redux-TodoMVC |157.954167 |157.266667 |0.995647 | 0.131298 |
| Vanilla-ES2015-Babel-Webpack-TodoMVC |68.687500 |68.054167 |0.990779 | 0.002155 (significant) |
----------------------------------------------------------------------------------------------------------------------------------
a mean = 235.28964
b mean = 236.72163
pValue = 0.0121265559
(Bigger means are better.)
1.006 times better
Results ARE significant

  • runtime/Identifier.h:

(JSC::Identifier::canUseSingleCharacterString):

  • runtime/LiteralParser.cpp:

(JSC::LiteralParser<CharType>::makeIdentifier):

  • runtime/LiteralParser.h:
  • runtime/SmallStrings.cpp:

(JSC::SmallStrings::singleCharacterStringRep):

  • runtime/SmallStrings.h:
9:25 PM Changeset in webkit [278920] by achristensen@apple.com
  • 10 edits
    1 delete in trunk/Source/WebKit

Remove unused code on API::HTTPCookieStore
https://bugs.webkit.org/show_bug.cgi?id=227056

Reviewed by Brady Eidson.

The dust has settled a bit since r267763.
Let's clean up!

  • SourcesCocoa.txt:
  • UIProcess/API/APIHTTPCookieStore.cpp:

(API::HTTPCookieStore::unregisterObserver):
(API::HTTPCookieStore::cookieManagerDestroyed):
(API::HTTPCookieStore::flushDefaultUIProcessCookieStore): Deleted.
(API::HTTPCookieStore::getAllDefaultUIProcessCookieStoreCookies): Deleted.
(API::HTTPCookieStore::setCookieInDefaultUIProcessCookieStore): Deleted.
(API::HTTPCookieStore::deleteCookieFromDefaultUIProcessCookieStore): Deleted.
(API::HTTPCookieStore::startObservingChangesToDefaultUIProcessCookieStore): Deleted.
(API::HTTPCookieStore::stopObservingChangesToDefaultUIProcessCookieStore): Deleted.
(API::HTTPCookieStore::deleteCookiesInDefaultUIProcessCookieStore): Deleted.
(API::HTTPCookieStore::setHTTPCookieAcceptPolicyInDefaultUIProcessCookieStore): Deleted.

  • UIProcess/API/APIHTTPCookieStore.h:
  • UIProcess/API/Cocoa/APIHTTPCookieStoreCocoa.mm: Removed.
  • UIProcess/API/Cocoa/WKBrowsingContextController.mm:
  • UIProcess/API/Cocoa/WKDownloadInternal.h:
  • UIProcess/Cocoa/WebProcessProxyCocoa.mm:

(WebKit::WebProcessProxy::sendAudioComponentRegistrations):

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::handleClickForDataDetectionResult):

  • UIProcess/WebProcessPool.h:
  • WebKit.xcodeproj/project.pbxproj:
8:58 PM Changeset in webkit [278919] by Alan Bujtas
  • 6 edits in trunk/Source/WebCore

Cleanup RenderElement::RendererCreationType
https://bugs.webkit.org/show_bug.cgi?id=227033

Reviewed by Simon Fraser.

Let the caller define the preferred type of renderer for certain display type values.

  • html/HTMLFieldSetElement.cpp:

(WebCore::HTMLFieldSetElement::createElementRenderer):

  • html/HTMLSummaryElement.cpp:

(WebCore::HTMLSummaryElement::createElementRenderer):

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::createFor):

  • rendering/RenderElement.h:

(WebCore::RenderElement::createFor):

6:47 PM Changeset in webkit [278918] by Said Abou-Hallawa
  • 10 edits
    2 adds in trunk

[GPU Process] ConcreteImageBuffer::baseTransform() returns incorrect transform for unaccelerated ImageBuffer
https://bugs.webkit.org/show_bug.cgi?id=227044
<rdar://78642742>

Reviewed by Simon Fraser.

Source/WebCore:

The static constant ImageBufferBackend::isOriginAtUpperLeftCorner is used
to tell where the origin of the physical graphics context. For CG platforms,
it is at the bottom left corner. This requires the coordinates system to
be moved to the top-left corner and flipped.

The fix is:
1) Rename isOriginAtUpperLeftCorner to isOriginAtBottomLeftCorner since

it is a description for the physical graphics context. All the logical
graphics contexts have to have their coordinates system at the top-left
corner.

2) Set isOriginAtBottomLeftCorner to true in ImageBufferCGBackend only

so all the super classes inherit the 'true' value. This includes
ImageBufferShareableBitmapBackend for CG platforms.

Test: fast/canvas/canvas-large-dimensions-drawing.html

  • platform/graphics/ConcreteImageBuffer.h:
  • platform/graphics/ImageBufferBackend.h:
  • platform/graphics/cg/ImageBufferCGBackend.h:
  • platform/graphics/cg/ImageBufferCGBitmapBackend.h:
  • platform/graphics/cg/ImageBufferIOSurfaceBackend.h:

Source/WebKit:

  • Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.h:
  • WebProcess/GPU/graphics/cocoa/ImageBufferShareableIOSurfaceBackend.h:

LayoutTests:

The large size of the canvas in this layout test will force creating
unaccelerated ImageBufferBackend.

  • fast/canvas/canvas-large-dimensions-drawing-expected.html: Added.
  • fast/canvas/canvas-large-dimensions-drawing.html: Added.
6:01 PM Changeset in webkit [278917] by Jean-Yves Avenard
  • 7 edits
    2 adds in trunk

REGRESSION: MSE: Netflix playback sometimes fails when going to "next episode" in series
https://bugs.webkit.org/show_bug.cgi?id=226952
rdar://77583769

Reviewed by Eric Carlson.

Source/WebKit:

Following bug #225396, the remote/proxy MediaPlayer readyState became decoupled
from the currentTime. In the scenario where a time update was pushed from the
GPU to the WebContent process, followed by a change of readyState status; should
the HTMLMediaElement query the MediaPlayer's time in-between those two IPC calls,
it would be possible for the time to be incorrectly estimated as it assumed it
had progressed since it received the update.
Additionally, it was assumed that the only case where the time won't progress
was if the media element was explicitly paused. This was incorrect it could
have stalled due to the lack of data such as commonly happen with MSE.
We add in the time update IPC message a boolean indicating if the GPU's
MediaPlayer is either stalled or paused and that the time shouldn't advance.
While this new boolean appears redundant with the values of the cached
readyState/paused it differs in that timeIsProgressing is accurate at the
moment the time update is sent and received.

Test: media/media-source/media-source-seek-unbuffered.html

  • GPUProcess/media/RemoteMediaPlayerProxy.cpp:

(WebKit::RemoteMediaPlayerProxy::mediaPlayerPausedOrStalled const): Add utility method.
(WebKit::RemoteMediaPlayerProxy::currentTimeChanged):

  • GPUProcess/media/RemoteMediaPlayerProxy.h:
  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:

(WebKit::MediaPlayerPrivateRemote::currentMediaTime const):
(WebKit::MediaPlayerPrivateRemote::seek): Set the cached media time to the seek
value so that reading it back the time will provide accurate data.
(WebKit::MediaPlayerPrivateRemote::seekWithTolerance): same as with seek method.
(WebKit::MediaPlayerPrivateRemote::currentTimeChanged): Check if timeIsProgressing
is true and only estimate the time if we are certain playback has continued.

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
  • WebProcess/GPU/media/MediaPlayerPrivateRemote.messages.in: add timeIsProgressing

to method.

LayoutTests:

  • media/media-source/media-source-seek-unbuffered-expected.txt: Added.
  • media/media-source/media-source-seek-unbuffered.html: Added.
5:56 PM Changeset in webkit [278916] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

Use more SQL transactions in ResourceLoadStatisticsDatabaseStore
https://bugs.webkit.org/show_bug.cgi?id=227034

Reviewed by Kate Cheney.

Use more SQL transactions in ResourceLoadStatisticsDatabaseStore, for performance.

I updated the code so that we start a SQL transaction whenever we do more than one
consecutive "write" statement.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::ResourceLoadStatisticsDatabaseStore::addMissingColumnsToTable):
(WebKit::ResourceLoadStatisticsDatabaseStore::addMissingTablesIfNecessary):
(WebKit::ResourceLoadStatisticsDatabaseStore::populateFromMemoryStore):
(WebKit::ResourceLoadStatisticsDatabaseStore::mergeStatistics):
(WebKit::ResourceLoadStatisticsDatabaseStore::reclassifyResources):
(WebKit::ResourceLoadStatisticsDatabaseStore::grandfatherDataForDomains):
(WebKit::ResourceLoadStatisticsDatabaseStore::insertExpiredStatisticForTesting):

5:46 PM Changeset in webkit [278915] by Russell Epstein
  • 1 copy in tags/Safari-612.1.18.1.2

Tag Safari-612.1.18.1.2.

5:00 PM Changeset in webkit [278914] by Jonathan Bedard
  • 1 edit
    13 adds in trunk/WebKitLibraries

[tvOS 15] Support building WebKit
https://bugs.webkit.org/show_bug.cgi?id=227037
<rdar://problem/79354143>

Reviewed by Alex Christensen.

  • WebKitPrivateFrameworkStubs/appletvos/15/AppSupport.framework/AppSupport.tbd: Added.
  • WebKitPrivateFrameworkStubs/appletvos/15/CorePrediction.framework/CorePrediction.tbd: Added.
  • WebKitPrivateFrameworkStubs/appletvos/15/FileProvider.framework/FileProvider.tbd: Added.
  • WebKitPrivateFrameworkStubs/appletvos/15/GraphicsServices.framework/GraphicsServices.tbd: Added.
  • WebKitPrivateFrameworkStubs/appletvos/15/IOSurfaceAccelerator.framework/IOSurfaceAccelerator.tbd: Added.
  • WebKitPrivateFrameworkStubs/appletvos/15/RunningBoardServices.framework/RunningBoardServices.tbd: Added.
4:49 PM Changeset in webkit [278913] by Chris Dumez
  • 18 edits in trunk/Source/WebKit

Reloading the view should be able to recover if the GPUProcess or NetworkProcess are hung
https://bugs.webkit.org/show_bug.cgi?id=227051

Reviewed by Geoffrey Garen.

Reloading the view should be able to get us out of bad state if the GPUProcess or NetworkProcess are hung.
This is useful as the first instinct of the user may be to reload the page if the page appears hung.

Before the change, if the page is in a bad state due to a hung GPUProcess or NetworkProcess and you'd
reload, the reload would hang indefinitely. After the change, we'll make sure that both processes
are still responsive when triggering the reload. If they are unresponsive, we kill them and the reload
is able to proceed.

  • GPUProcess/GPUProcess.cpp:

(WebKit::GPUProcess::didReceiveMessage):

  • GPUProcess/GPUProcess.h:
  • GPUProcess/GPUProcess.messages.in:
  • Shared/AuxiliaryProcess.cpp:

(WebKit::AuxiliaryProcess::mainThreadPing):

  • Shared/AuxiliaryProcess.h:
  • Shared/AuxiliaryProcess.messages.in:
  • UIProcess/AuxiliaryProcessProxy.cpp:

(WebKit::AuxiliaryProcessProxy::checkForResponsiveness):

  • UIProcess/AuxiliaryProcessProxy.h:
  • UIProcess/GPU/GPUProcessProxy.messages.in:
  • UIProcess/Network/NetworkProcessProxy.messages.in:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::reload):

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::isResponsive):
(WebKit::WebProcessProxy::isResponsiveWithLazyStop):

  • UIProcess/WebProcessProxy.h:
  • UIProcess/WebProcessProxy.messages.in:
  • WebProcess/WebProcess.cpp:
  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:
4:31 PM Changeset in webkit [278912] by Diego Pino Garcia
  • 2 edits
    1 delete in trunk/LayoutTests

[GLIB] Unreviewed test gardening. Updated test expectations after r277896.

Two tests are now failing:

  • fast/canvas/canvas-imageSmoothingEnabled.html.
  • fast/canvas/canvas-imageSmoothingQuality.html.
  • platform/glib/TestExpectations:
  • platform/gtk/fast/canvas/canvas-imageSmoothingQuality-expected.txt: Removed.
4:28 PM Changeset in webkit [278911] by Jonathan Bedard
  • 1 edit
    2 adds in trunk/WebKitLibraries

[iOS 15] Support building WebKit (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=227002
<rdar://problem/79316598>

Reviewed by Alex Christensen.

  • WebKitPrivateFrameworkStubs/iOS/15/IOSurfaceAccelerator.framework/IOSurfaceAccelerator.tbd: Added.
4:12 PM Changeset in webkit [278910] by Jonathan Bedard
  • 3 edits
    19 adds in trunk

[watchOS 8] Support building WebKit
https://bugs.webkit.org/show_bug.cgi?id=227050
<rdar://problem/79365320>

Reviewed by Tim Horton.

Source/WebKit:

Covered by existing tests.

  • Platform/spi/watchos/PepperUICoreSPI.h: Add QuickboardController SPI.

WebKitLibraries:

  • WebKitPrivateFrameworkStubs/watchos/8/AppSupport.framework/AppSupport.tbd: Added.
  • WebKitPrivateFrameworkStubs/watchos/8/CorePrediction.framework/CorePrediction.tbd: Added.
  • WebKitPrivateFrameworkStubs/watchos/8/FileProvider.framework/FileProvider.tbd: Added.
  • WebKitPrivateFrameworkStubs/watchos/8/GraphicsServices.framework/GraphicsServices.tbd: Added.
  • WebKitPrivateFrameworkStubs/watchos/8/IOSurfaceAccelerator.framework/IOSurfaceAccelerator.tbd: Added.
  • WebKitPrivateFrameworkStubs/watchos/8/PepperUICore.framework/PepperUICore.tbd: Added.
  • WebKitPrivateFrameworkStubs/watchos/8/RunningBoardServices.framework/RunningBoardServices.tbd: Added.
  • WebKitPrivateFrameworkStubs/watchos/8/SafariSafeBrowsing.framework/SafariSafeBrowsing.tbd: Added.
  • WebKitPrivateFrameworkStubs/watchos/8/URLFormatting.framework/URLFormatting.tbd: Added.
3:50 PM Changeset in webkit [278909] by Alan Coon
  • 2 edits in branches/safari-611-branch/Source/WebKit

Apply patch. rdar://problem/78875336

3:50 PM Changeset in webkit [278908] by Alan Coon
  • 5 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r277536. rdar://problem/78875336

This reverts r278896.

3:06 PM Changeset in webkit [278907] by Andres Gonzalez
  • 9 edits in trunk/Source/WebCore

iOS - VoiceOver reads incorrectly in content editable element if role="document".
https://bugs.webkit.org/show_bug.cgi?id=227035
rdar://78776169

Reviewed by Chris Fleizach.

On iOS, VoiceOver was announcing <div contenteditable="true" role="document">
as a landmark and not as editable text. Furthermore, VoiceOver wasn't
echoing keyboard input once the element became interactive.
The solution is to return AccessibilityRole::TextArea for an element
with these attributes instead of Document.
Used shouldIgnoreRoleAttribute to special case this scenario.

  • accessibility/AccessibilityObject.h:

(WebCore::AccessibilityObject::shouldIgnoreAttributeRole const):

  • accessibility/AccessibilityObjectInterface.h:

Removed shouldIgnoreRoleAttribute from the AXObject interface since it
doesn't need to be exposed outside the AXObject class hierarchy.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::shouldIgnoreAttributeRole const):

  • accessibility/AccessibilityRenderObject.h:
  • accessibility/AccessibilityTreeItem.h:
  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper _accessibilityTextEntryTraits]): Code cleanup.

  • accessibility/isolatedtree/AXIsolatedObject.cpp:

(WebCore::AXIsolatedObject::shouldIgnoreAttributeRole const): Deleted.

  • accessibility/isolatedtree/AXIsolatedObject.h:
3:00 PM Changeset in webkit [278906] by youenn@apple.com
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

Enable kVTVideoEncoderSpecification_RequiredLowLatency in case of MacOS software encoder
https://bugs.webkit.org/show_bug.cgi?id=226873

Reviewed by Eric Carlson.

In case software encoder is being created for baseline, we can use kVTVideoEncoderSpecification_RequiredLowLatency
which provides better bitrate management than the regular SW encoder while still generating baseline content.
We check whether SW encoder is created based on kVTCompressionPropertyKey_UsingHardwareAcceleratedVideoEncoder.
If property is unsupported or if its value is false, it means the encoder is software.

  • Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm:

(-[RTCVideoEncoderH264 resetCompressionSessionWithPixelFormat:]):

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

Apply patch. rdar://problem/79355311

2:49 PM Changeset in webkit [278904] by Alan Coon
  • 3 edits
    1 add in branches/safari-611-branch

Cherry-pick r278819. rdar://problem/79355258

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

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/short-circuit-read-modify-write-cant-write-dst-before-tdz-check.js: Added. (let.result.eval.try.captureV): (catch):

Source/JavaScriptCore:

ShortCircuitReadModifyResolveNode can't emit a value into
its result until after it emits a TDZ check. We were temporarily
storing the result of the get_from_scope into the dst. Then
we'd emit the TDZ check. The TDZ check can throw, and it could
lead to us returning TDZ from the eval itself. Instead, we need
to use a temporary to emit a TDZ check on. Only after the TDZ check
passes can we move the temporary into the result.

  • bytecompiler/NodesCodegen.cpp: (JSC::ShortCircuitReadModifyResolveNode::emitBytecode):

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

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

Cherry-pick r278755. rdar://problem/79355266

CARingBuffer::frameOffset() makes incorrect assumptions about the frame count
https://bugs.webkit.org/show_bug.cgi?id=226253
<rdar://problem/78463453>

Reviewed by Eric Carlson.

CARingBuffer::frameOffset() was trying to avoid doing a frameNumber % m_frameCount
modulo operation by doing a frameNumber & (m_frameCount - 1). However, this bitwise
operation is only equivalent if m_frameCount is a power of 2. It isn't enforced
anywhere that the frameCount is a power of 2. As a matter of fact, we frequently use
2*sampleRate which is often 2*44100=88200, which is NOT a power of 2.

When adding logging, I saw frameOffset(512) returning 0 for a frameCount of 88200, which
made no sense. It was causing offset0 and offset1 in CARingBuffer::fetchInternal() to
be both 0 (even though startRead was 0 and endRead was 512) and it was leading the
function to make bad computations.

To address the issue, I updated CARingBuffer::frameOffset() to use a simple modulo
operation. It is safer as it makes no assumption on the frame count and it is more
readable. If we're worried about the performance, we could alternatively round up the
frameCount to the next power of 2 and keep using the bitwise operation, but I am
personally do not think it is worth it.

  • platform/audio/cocoa/CARingBuffer.cpp: (WebCore::CARingBuffer::initializeAfterAllocation):
  • platform/audio/cocoa/CARingBuffer.h: (WebCore::CARingBuffer::frameOffset):

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

2:49 PM Changeset in webkit [278902] by Alan Coon
  • 4 edits
    1 add in branches/safari-611-branch

Cherry-pick r278578. rdar://problem/79355258

Short circuit read modify write nodes emit byte code that uses the wrong locals
https://bugs.webkit.org/show_bug.cgi?id=226576
<rdar://problem/78810362>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/short-circuit-read-modify-should-use-the-write-virtual-registers.js: Added. (eval):

Source/JavaScriptCore:

It's never a good idea to use the wrong local :-)

This patch also adds support for dumping predecessors of basic blocks
in the bytecode dump.

  • bytecode/BytecodeDumper.cpp: (JSC::CodeBlockBytecodeDumper<Block>::dumpGraph):
  • bytecompiler/NodesCodegen.cpp: (JSC::ShortCircuitReadModifyResolveNode::emitBytecode): (JSC::ShortCircuitReadModifyDotNode::emitBytecode): (JSC::ShortCircuitReadModifyBracketNode::emitBytecode):

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

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

Cherry-pick r278410. rdar://problem/79355285

Cherry-pick webrtc fix to correctly handle audio track state in case of renegotiation
https://bugs.webkit.org/show_bug.cgi?id=226577

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

  • web-platform-tests/webrtc/receiver-track-live.https-expected.txt:

Source/ThirdParty/libwebrtc:

Cherry-pick https://webrtc.googlesource.com/src/+/c335b0e63bff56ca0fbfa617dee6a644c85df164%5E%21/.
We need to do small changes to peer_connection.cc given the upstream fix is based on a newer version
which has some code moved from peer_connection.cc to rtp_transmission_manager.cc.

  • Source/webrtc/pc/audio_rtp_receiver.cc:
  • Source/webrtc/pc/audio_rtp_receiver.h:
  • Source/webrtc/pc/peer_connection.cc:
  • Source/webrtc/pc/peer_connection_rtp_unittest.cc:
  • Source/webrtc/pc/remote_audio_source.cc:
  • Source/webrtc/pc/remote_audio_source.h:
  • Source/webrtc/pc/rtp_sender_receiver_unittest.cc:

LayoutTests:

Update test now that we have the correct behavior.

  • webrtc/receiver-track-should-stay-live-even-if-receiver-is-inactive.html:

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

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

Cherry-pick r278318. rdar://problem/79355222

REGRESSION (iOS 14.5): Can't go back and render previous page properly after "location.href"
https://bugs.webkit.org/show_bug.cgi?id=226323
<rdar://problem/78623536>

Reviewed by Alex Christensen.

Source/WebKit:

A while back, we did an optimization to allow several WebPage objects associated with the
same WebPageProxy to live in the same WebProcess. This allowed us to reuse a process from
a SuspendedPageProxy for a forward navigation, without destroying the SuspendedPageProxy.
However, this added quite a bit of complexity and this broke some same-process back/forward
navigations like in this bug. In particular, it is really hard to get do our history
management right (with the current model) if there is more than more WebPage in a process
for the same WebPageProxy.

To address issues, we go back to the older model with one WebPage per WebProcess for a
given WebPageProxy. To achieve this, we make sure to destroy of SuspendedPageProxy objects
for the current page and destination process before we process-swap (like we used to do).

  • UIProcess/WebBackForwardCache.cpp: (WebKit::WebBackForwardCache::removeEntriesForPageAndProcess):
  • UIProcess/WebBackForwardCache.h:
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::receivedNavigationPolicyDecision):

Tools:

New API test written by Alex Christensen to cover this case.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

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

2:49 PM Changeset in webkit [278899] by Alan Coon
  • 2 edits in branches/safari-611-branch/Source/ThirdParty/libwebrtc

Cherry-pick r278272. rdar://problem/79355341

Use tighter bitrate allocation rules for WebRTC H264 software encoder
https://bugs.webkit.org/show_bug.cgi?id=226319
<rdar://73150695>

Reviewed by Eric Carlson.

Software H264 encoder is sometimes overshooting target bitrate in which case WebRTC backend will start dropping frames.
The encoder might then think it is on target and will not try to increase compression.
This makes it possible to be locked in a very low frame rate but high quality image situation.
It is often better to preserve frame rate and lower quality, the application could always lower frame rate if desired.

To do so, we detect whether the encoder is using software code path or not.
If so, we compute the actual frame rate and compare it with the expected frame rate.
If the actual frame rate is twice smaller or even below, we enter in a low frame rate mode.
Otherwise, we are in a regular frame rate mode where we apply the normal bitrate rules.
In the low frame rate mode, we divide the target bitrate by 3 so as to quickly recover frame rate.

This works well in situations where motion increases from time to time.
It is still not perfect for instance in case the video is muted and gets unmuted or when the scene is completely still and suddenly large motion happens.
In those cases, frame rate is recovered after a minute or so according my testing.

  • Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm: (-[RTCVideoEncoderH264 initWithCodecInfo:]): (-[RTCVideoEncoderH264 encode:codecSpecificInfo:frameTypes:]): (-[RTCVideoEncoderH264 resetCompressionSessionWithPixelFormat:]): (-[RTCVideoEncoderH264 setEncoderBitrateBps:frameRate:]): (-[RTCVideoEncoderH264 updateBitRateAccordingActualFrameRate]):

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

2:02 PM Changeset in webkit [278898] by Kyle Piddington
  • 3 edits in trunk/Source/ThirdParty/ANGLE

Tensorflow.js Broken in Safari 15
https://bugs.webkit.org/show_bug.cgi?id=226953

Tensorflow shaders use a 'NAN' uniform. This is a reserved keyword
in metal. Add NAN to the reserved list.

'inf' constants need to be replaced with INFINITY, much like nan constants need to be replaced with NAN
Reviewed by Kenneth Russell.

  • src/compiler/translator/TranslatorMetalDirect.cpp:

(sh::GetMslKeywords):

1:57 PM Changeset in webkit [278897] by Fujii Hironori
  • 2 edits in trunk/LayoutTests

[WinCairo] Unreviewed test gardening

  • platform/wincairo/TestExpectations:
1:55 PM Changeset in webkit [278896] by Alan Coon
  • 5 edits in branches/safari-611-branch/Source/WebKit

Revert r277536. rdar://problem/78875336

This reverts r278882.

1:53 PM Changeset in webkit [278895] by Chris Dumez
  • 14 edits in trunk/Source/WebKit

Add basic detection of unresponsive Network / GPU Processes
https://bugs.webkit.org/show_bug.cgi?id=226994

Reviewed by Geoffrey Garen.

If a WebProcess A attempts to connect to the GPUProcess / NetworkProcess B and process B
fails to respond within 3 seconds, we consider process B as unresponsive and terminate
it. As a result, it will re-attempt to launch process B and connect to it again.

This helps in the following scenario:

  1. User is in a tab and something looks broken due to the GPUProcess or NetworkProcess becoming unresponsive
  2. The user tries to reload the page in a new tab

Before this patch, the tab would be similarly broken / hung because the GPUProcess or
NetworkProcess would be unresponsive. After this patch, we would detect the process is
hung and kill it. As a result, the page would load correctly in a new tab (with a delay).

In a follow-up, I think we should consider doing the same thing when the user requests
a reload, so that we don't require opening a new tab to recover. However, this keeps
the patch small and is a decent first step.

  • Shared/ProcessTerminationReason.h:
  • UIProcess/AuxiliaryProcessProxy.cpp:

(WebKit::AuxiliaryProcessProxy::AuxiliaryProcessProxy):
(WebKit::AuxiliaryProcessProxy::didFinishLaunching):
(WebKit::AuxiliaryProcessProxy::shutDownProcess):
(WebKit::AuxiliaryProcessProxy::platformIsBeingDebugged const):
(WebKit::AuxiliaryProcessProxy::stopResponsivenessTimer):
(WebKit::AuxiliaryProcessProxy::startResponsivenessTimer):
(WebKit::AuxiliaryProcessProxy::mayBecomeUnresponsive):
(WebKit::AuxiliaryProcessProxy::didBecomeUnresponsive):

  • UIProcess/AuxiliaryProcessProxy.h:

(WebKit::AuxiliaryProcessProxy::responsivenessTimer):
(WebKit::AuxiliaryProcessProxy::responsivenessTimer const):

  • UIProcess/Cocoa/WebProcessProxyCocoa.mm:

(WebKit::WebProcessProxy::platformIsBeingDebugged const): Deleted.

  • UIProcess/GPU/GPUProcessProxy.cpp:

(WebKit::GPUProcessProxy::getGPUProcessConnection):
(WebKit::GPUProcessProxy::gpuProcessExited):
(WebKit::GPUProcessProxy::didBecomeUnresponsive):

  • UIProcess/GPU/GPUProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::didBecomeUnresponsive):
(WebKit::NetworkProcessProxy::getNetworkProcessConnection):

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

(WebKit::ResponsivenessTimer::timerFired):
(WebKit::ResponsivenessTimer::mayBecomeUnresponsive const):

  • UIProcess/ResponsivenessTimer.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::gpuProcessExited):

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::WebProcessProxy):
(WebKit::WebProcessProxy::shutDown):
(WebKit::WebProcessProxy::didFinishLaunching):
(WebKit::WebProcessProxy::isResponsive const):
(WebKit::WebProcessProxy::processTerminated):
(WebKit::WebProcessProxy::platformIsBeingDebugged const): Deleted.
(WebKit::WebProcessProxy::mayBecomeUnresponsive): Deleted.
(WebKit::WebProcessProxy::stopResponsivenessTimer): Deleted.
(WebKit::WebProcessProxy::startResponsivenessTimer): Deleted.

  • UIProcess/WebProcessProxy.h:

(WebKit::WebProcessProxy::responsivenessTimer): Deleted.

1:19 PM Changeset in webkit [278894] by achristensen@apple.com
  • 4 edits in trunk

Allow legacy SecurityOrigin behavior for x-apple-ql-id2 scheme
https://bugs.webkit.org/show_bug.cgi?id=226993
Source/WebCore:

<rdar://76474042>

Reviewed by Tim Horton.

Why have one x-apple-ql-id scheme when you can have 2?

  • page/SecurityOrigin.cpp:

(WebCore::shouldTreatAsUniqueOrigin):
Also move the linked-on-or-before check to after the hasSpecialScheme check which will be true for most URLs (http, https, file, etc.)

Tools:

Reviewed by Tim Horton.

  • TestWebKitAPI/Tests/WebCore/SecurityOrigin.cpp:

(TestWebKitAPI::TEST_F):

1:12 PM Changeset in webkit [278893] by achristensen@apple.com
  • 2 edits in trunk/Source/ThirdParty/ANGLE

Fix typo in r276318
https://bugs.webkit.org/show_bug.cgi?id=227041
<rdar://76284889>

Reviewed by Chris Dumez.

@ uses the string @(DYLIB_INSTALL_NAME_BASE)
$ uses the value of the environment variable.
This turns out to be an important difference.

  • Configurations/ANGLE-dynamic.xcconfig:
1:11 PM Changeset in webkit [278892] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[GStreamer] Another crash under gst_element_add_pad
https://bugs.webkit.org/show_bug.cgi?id=225765

Patch by Philippe Normand <pnormand@igalia.com> on 2021-06-15
Reviewed by Adrian Perez de Castro.

Decodebin3 in GStreamer <= 1.16 does not respect user-supplied select-stream events. So we
need to relax the release assert for these versions. This bug was fixed in:
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/commit/b41b87522f59355bb21c001e9e2df96dc6956928

  • platform/graphics/gstreamer/ImageDecoderGStreamer.cpp:

(WebCore::ImageDecoderGStreamer::InnerDecoder::connectDecoderPad):

12:15 PM Changeset in webkit [278891] by Darin Adler
  • 6 edits
    4 deletes in trunk/Source

Delete some recently-obsoleted files
https://bugs.webkit.org/show_bug.cgi?id=226705

Reviewed by Chris Dumez.

Source/WebCore:

  • Sources.txt: Removed CSSCustomIdentValue.cpp.
  • WebCore.xcodeproj/project.pbxproj: Removed CSSCustomIdentValue.cpp/h.
  • css/CSSCustomIdentValue.cpp: Removed.
  • css/CSSCustomIdentValue.h: Removed.
  • css/calc/CSSCalcExpressionNodeParser.cpp: Added TextStream.h include.
  • dom/SuccessOr.h: Removed.

Source/WTF:

  • wtf/CMakeLists.txt: Removed Optional.h.
  • wtf/Optional.h: Removed.
12:05 PM Changeset in webkit [278890] by Jonathan Bedard
  • 7 edits in trunk/Tools

[git-webkit] Handle auth failures
https://bugs.webkit.org/show_bug.cgi?id=226999
<rdar://problem/79313850>

Reviewed by Dewei Zhu.

  • Scripts/libraries/webkitcorepy/setup.py: Bump version.
  • Scripts/libraries/webkitcorepy/webkitcorepy/init.py: Ditto.
  • Scripts/libraries/webkitcorepy/webkitcorepy/credentials.py:

(credentials): We should attempt to retrieve credentials, even if they
are not requested because retrieving credentials does not prompt the user.

  • Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:

(GitHub.request): In the event we get a 400 error from the GitHub API,
attempt forcing authentication before reporting an error.

12:04 PM Changeset in webkit [278889] by Jonathan Bedard
  • 2 edits in trunk/Source/WebKit

[Monterey] Support building WebKit (Follow-up)
https://bugs.webkit.org/show_bug.cgi?id=226846
<rdar://problem/79095148>

Unreviewed follow-up fix.

Covered by exisiting tests.

  • WebKit.xcodeproj/project.pbxproj: Reset objectVersion.
11:39 AM Changeset in webkit [278888] by keith_miller@apple.com
  • 6 edits in trunk/Source/JavaScriptCore

Shouldn't drain the micro task queue when calling out to ObjC
https://bugs.webkit.org/show_bug.cgi?id=161942

Unreviewed, relanding r278734.

  • API/tests/testapi.cpp:

(TestAPI::promiseDrainDoesNotEatExceptions):
(testCAPIViaCpp):

  • API/tests/testapi.mm:

(testMicrotaskWithFunction):
(testObjectiveCAPI):

  • runtime/JSLock.cpp:

(JSC::JSLock::willReleaseLock):

  • runtime/ObjectPrototype.cpp:

(JSC::isPokerBros):

  • runtime/VM.cpp:

(JSC::VM::didExhaustMicrotaskQueue):

11:25 AM Changeset in webkit [278887] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

[GPU Process] Add a bounds check before reading data length for out-of-line display list items
https://bugs.webkit.org/show_bug.cgi?id=227029
rdar://79343645

Reviewed by Chris Dumez.

Add some additional hardening when decoding out-of-line display list items.

  • platform/graphics/displaylists/DisplayListIterator.cpp:

(WebCore::DisplayList::DisplayList::Iterator::updateCurrentItem):

Currently, it's possible to perform an out-of-bounds read in the shared display list item buffer, since we only
perform a bounds check after grabbing the data length (8 bytes) from the buffer after reading and validating an
out-of-line display list item type.

Mitigate this by validating that there is enough buffer capacity for both the padded item type value and encoded
data length, before we attempt to read the encoded data length.

11:21 AM Changeset in webkit [278886] by youenn@apple.com
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

REGRESSION: [ BigSur iOS wk1 Debug ] imported/w3c/web-platform-tests/html/dom/usvstring-reflection.https.html is flaky crashing
https://bugs.webkit.org/show_bug.cgi?id=226928
<rdar://problem/79205526>

Reviewed by Eric Carlson.

  • Source/webrtc/rtc_base/task_queue_stdlib.cc:

thread_ is created in TaskQueueStdlib constructor before other members pending_queue_ or delayed_queue_.
It might happen that thread_ will start executing its callback which will read delayed_queue_ before it is initialized by TaskQueueStdlib constructor.
Update to create thread_ before all other members.

11:18 AM Changeset in webkit [278885] by mmaxfield@apple.com
  • 3 edits in trunk/Source/WebCore

GraphicsContext::apply{Fill,Stroke}Pattern needs to do nothing if there is no fill/stroke pattern set
https://bugs.webkit.org/show_bug.cgi?id=227015
<rdar://problem/79301173>

Reviewed by Simon Fraser.

Now that we have a GPU Process, we can't trust incoming IPC. So, this patch protects
against trying to apply the curretn fill/stroke pattern when there isn't one set.

  • platform/graphics/cg/GraphicsContextCG.cpp:

(WebCore::GraphicsContextCG::applyStrokePattern):
(WebCore::GraphicsContextCG::applyFillPattern):

  • platform/graphics/win/GraphicsContextDirect2D.cpp:

(WebCore::GraphicsContextDirect2D::applyStrokePattern):
(WebCore::GraphicsContextDirect2D::applyFillPattern):

11:15 AM Changeset in webkit [278884] by mmaxfield@apple.com
  • 6 edits in trunk/Source/WebCore

GraphicsContext restores need to do nothing if the state stack is empty
https://bugs.webkit.org/show_bug.cgi?id=227009
<rdar://problem/79301368>

Reviewed by Simon Fraser.

Now that we have a GPU Process, we can't trust incoming IPC. So, this patch protects
against unbalanced save/restore commands in GraphicsContexts.

  • platform/graphics/cairo/GraphicsContextCairo.cpp:

(WebCore::GraphicsContextCairo::restore):

  • platform/graphics/cairo/PlatformContextCairo.cpp:

(WebCore::PlatformContextCairo::restore):

  • platform/graphics/cg/GraphicsContextCG.cpp:

(WebCore::GraphicsContextCG::restore):

  • platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:

(Nicosia::CairoOperationRecorder::restore):

  • platform/graphics/win/GraphicsContextDirect2D.cpp:

(WebCore::GraphicsContextDirect2D::restore):

11:12 AM Changeset in webkit [278883] by Chris Lord
  • 25 edits
    2 adds in trunk

Scrollbars are not clipped to layer bounds in RenderLayerBacking
https://bugs.webkit.org/show_bug.cgi?id=226823

Reviewed by Simon Fraser.

Source/WebCore:

Mask contents to bounds of overflow controls containers in RenderLayerBacking.

Test: compositing/scrolling/async-overflow-scrolling/overflow-controls-container-clips-scrollbars.html

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateGeometry):
(WebCore::RenderLayerBacking::adjustOverflowControlsPositionRelativeToAncestor):

LayoutTests:

Adjust test expectations due to clipping on overflow controls container.

  • compositing/clipping/border-radius-async-overflow-clipping-layer-expected.txt:
  • compositing/layer-creation/clipping-scope/nested-scroller-overlap-expected.txt:
  • compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt:
  • compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-clipped-by-scroll-expected.txt:
  • compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-expected.txt:
  • compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-nested-expected.txt:
  • compositing/scrolling/async-overflow-scrolling/layer-for-negative-z-in-scroller-expected.txt:
  • compositing/scrolling/async-overflow-scrolling/layer-in-overflow-clip-to-hidden-expected.txt:
  • compositing/scrolling/async-overflow-scrolling/layer-in-overflow-clip-to-visible-expected.txt:
  • compositing/scrolling/async-overflow-scrolling/layer-in-overflow-expected.txt:
  • compositing/scrolling/async-overflow-scrolling/layer-in-overflow-gain-clipping-layer-expected.txt:
  • compositing/scrolling/async-overflow-scrolling/layer-in-overflow-in-clipped-expected.txt:
  • compositing/scrolling/async-overflow-scrolling/layer-in-overflow-lose-clipping-layer-expected.txt:
  • compositing/scrolling/async-overflow-scrolling/nested-scrollers-backing-attachment-expected.txt:
  • compositing/scrolling/async-overflow-scrolling/overflow-controls-container-clips-scrollbars-expected.html: Added.
  • compositing/scrolling/async-overflow-scrolling/overflow-controls-container-clips-scrollbars.html: Added.
  • compositing/scrolling/async-overflow-scrolling/transform-change-scrollbar-position-expected.txt:
  • compositing/scrolling/async-overflow-scrolling/visibility-hidden-scrollers-expected.txt:
  • compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness-expected.txt:
  • compositing/tiling/perspective-on-scroller-tile-coverage-expected.txt:
  • platform/mac-wk1/compositing/clipping/border-radius-async-overflow-clipping-layer-expected.txt:
  • tiled-drawing/scrolling/overflow/overflow-scrolled-down-tile-coverage-expected.txt:
  • tiled-drawing/scrolling/overflow/overflow-scrolled-up-tile-coverage-expected.txt:
  • tiled-drawing/scrolling/overflow/overflow-tile-coverage-expected.txt:
11:09 AM Changeset in webkit [278882] by Alan Coon
  • 5 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r277536. rdar://problem/78875336

This reverts r278529.

11:01 AM Changeset in webkit [278881] by Brent Fulgham
  • 3 edits in trunk/Source/WebKit

[iOS] Permit access to 'platform-name'
https://bugs.webkit.org/show_bug.cgi?id=227032
<rdar://problem/79334360>

Reviewed by Per Arne Vollan.

Telemetry shows that some media code needs access to 'platform-name'. We allow this in the
WebContent process, but didn't include it in the GPU Process.

Make the WebContent and GPU Process consistent in this access. Also adopt the standard rule
for this used in the system sandbox, which restricts the access to the IOKit class family that
has this property.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
10:20 AM Changeset in webkit [278880] by commit-queue@webkit.org
  • 25 edits in trunk/Source/WebKit

[GTK] Support transient zoom
https://bugs.webkit.org/show_bug.cgi?id=197002

Patch by Alexander Mikhaylenko <alexm@gnome.org> on 2021-06-15
Reviewed by Michael Catanzaro.

Speed up pinch zoom for AC mode. Reuse the same infrastructure as the
macOS implementation. Move the shared code to ViewGestureController.cpp
where possible.

Slightly adjust the shared code to support changing the gesture origin
during the gesture since we support it on both touchscreen and touchpad.

There's not much we can do for non-AC mode so just keep the current
behavior there, wrapping real-time zoom into transient zoom API so that
it's confined to the web process.

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseZoomChanged):
(webkitWebViewBaseZoomEnd):
(webkitWebViewBaseConstructed):
(webkitWebViewBaseZoomBegin): Deleted.

  • UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp:

(WebKit::DrawingAreaProxyCoordinatedGraphics::adjustTransientZoom):
(WebKit::DrawingAreaProxyCoordinatedGraphics::commitTransientZoom):

  • UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h:
  • UIProcess/ViewGestureController.cpp:

(WebKit::ViewGestureController::scaledMagnificationOrigin):

Support changing origin during the gesture, cache the page scale factor
to accommodate non-AC mode doing real-time zooming instead of transient
zooming.

(WebKit::ViewGestureController::didCollectGeometryForMagnificationGesture):
(WebKit::ViewGestureController::prepareMagnificationGesture):
(WebKit::ViewGestureController::applyMagnification):
(WebKit::ViewGestureController::endMagnificationGesture):
(WebKit::ViewGestureController::magnification const):

Moved from ViewGestureControllerMac.mm.

  • UIProcess/ViewGestureController.h:
  • UIProcess/ViewGestureController.messages.in:
  • UIProcess/WebPageProxy.h:
  • UIProcess/gtk/ViewGestureControllerGtk.cpp:

(WebKit::ViewGestureController::setMagnification):
(WebKit::ViewGestureController::endMagnification):

  • UIProcess/gtk/WebPageProxyGtk.cpp:

(WebKit::WebPageProxy::getCenterForZoomGesture): Deleted.

  • UIProcess/mac/ViewGestureControllerMac.mm:

(WebKit::ViewGestureController::resistanceForDelta):

Make it a static private method instead of a function so that we can
keep using minMagnification and maxMagnification in it.

(WebKit::ViewGestureController::handleMagnificationGestureEvent):
(WebKit::ViewGestureController::didCollectGeometryForSmartMagnificationGesture):

Set the initial scale and origin before calling scaledMagnificationOrigin().

(WebKit::resistanceForDelta): Deleted.
(WebKit::ViewGestureController::scaledMagnificationOrigin):
(WebKit::ViewGestureController::didCollectGeometryForMagnificationGesture):
(WebKit::ViewGestureController::endMagnificationGesture):
(WebKit::ViewGestureController::magnification const):

Moved to ViewGestureController.cpp.

  • WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:

(WebKit::CompositingCoordinator::flushPendingLayerChanges):

We only need to set the ApplyScrollingTreeLayerPositions flag when not
zooming, so add a parameter to do that.

  • WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
  • WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:

(WebKit::DrawingAreaCoordinatedGraphics::adjustTransientZoom):
(WebKit::DrawingAreaCoordinatedGraphics::commitTransientZoom):

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

(WebKit::LayerTreeHost::layerFlushTimerFired):
(WebKit::LayerTreeHost::forceRepaint):
Don't pass ApplyScrollingTreeLayerPositions when transient zoom is active.

(WebKit::LayerTreeHost::constrainTransientZoomOrigin const):
(WebKit::LayerTreeHost::layerForTransientZoom const):
(WebKit::LayerTreeHost::applyTransientZoomToLayers):
(WebKit::LayerTreeHost::adjustTransientZoom):
(WebKit::LayerTreeHost::commitTransientZoom):

  • WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h:
  • WebProcess/WebPage/DrawingArea.h:

(WebKit::DrawingArea::addTransactionCallbackID):
(WebKit::DrawingArea::commitTransientZoom):

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

(WebKit::ViewGestureGeometryCollector::collectGeometryForMagnificationGesture):

  • WebProcess/WebPage/ViewGestureGeometryCollector.h:
  • WebProcess/WebPage/ViewGestureGeometryCollector.messages.in:

Build CollectGeometryForMagnificationGesture for GTK as well.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/gtk/WebPageGtk.cpp:

(WebKit::WebPage::getCenterForZoomGesture): Deleted.

9:59 AM Changeset in webkit [278879] by achristensen@apple.com
  • 18 edits in trunk

Check for "xn--" in any subdomain when parsing URL hosts
https://bugs.webkit.org/show_bug.cgi?id=226912

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/url/a-element-expected.txt:
  • web-platform-tests/url/a-element-xhtml-expected.txt:
  • web-platform-tests/url/failure-expected.txt:
  • web-platform-tests/url/resources/urltestdata.json:
  • web-platform-tests/url/toascii.window-expected.txt:
  • web-platform-tests/url/url-constructor-expected.txt:

Source/WTF:

We have a fast path that doesn't call uidna_nameToASCII if the host is already ASCII.
We need to check if the host is properly-punycode-encoded if it starts with "xn--"
but we also need to check if any subdomain starts with "xn--" (not just the first one).

In order to not regress tests, I needed to also take the fix I did in r256629 and apply it to all use of uidna_nameToASCII.

  • wtf/URL.cpp:

(WTF::appendEncodedHostname):

  • wtf/URLHelpers.cpp:

(WTF::URLHelpers::mapHostName):

  • wtf/URLParser.cpp:

(WTF::URLParser::domainToASCII):
(WTF::URLParser::subdomainStartsWithXNDashDash):
(WTF::URLParser::parseHostAndPort):
(WTF::URLParser::startsWithXNDashDash): Deleted.

  • wtf/URLParser.h:

Tools:

  • TestWebKitAPI/Tests/WTF/URLParser.cpp:

(TestWebKitAPI::TEST_F):
These tests used to hit UIDNA_ERROR_LABEL_TOO_LONG which is allowed now.

  • TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm:

(TestWebKitAPI::TEST):
This test, from r262171, needs to verify that non-ASCII characters are not truncated to ASCII values when converting to NSURL.
It used to use an invalid URL that had a host that ended in U+FE63 (SMALL HYPHEN-MINUS) which would fail because of UIDNA_ERROR_TRAILING_HYPHEN.
Now that trailing hyphens are allowed, we end in U+0661 and U+06F1 which fail because of UIDNA_ERROR_BIDI which makes this test still verify
the non-truncated values of an invalid host converted to an NSURL.

LayoutTests:

  • fast/dom/DOMURL/parsing-expected.txt:
  • fast/dom/DOMURL/parsing.html:

Update the test I added in r236527 to reflect this relaxation.
This matches the behavior of Chrome Canary.

9:47 AM Changeset in webkit [278878] by commit-queue@webkit.org
  • 6 edits in trunk/Source

-Warray-bounds warning in Packed.h
https://bugs.webkit.org/show_bug.cgi?id=226557
<rdar://problem/79103658>

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-06-15
Reviewed by Darin Adler.

Source/JavaScriptCore:

  • b3/air/AirAllocateRegistersByGraphColoring.cpp:
  • jit/JITCall.cpp:

(JSC::JIT::compileOpCall):

Source/WTF:

  • wtf/Bitmap.h:

(WTF::WordType>::clear): Use the newly-introduced IGNORE_ARRAY_BOUNDS_WARNINGS macros
instead of vanilla IGNORE_WARNINGS.

  • wtf/Compiler.h: Add new IGNORE_ARRAY_BOUNDS_WARNINGS_[BEGIN,END] macros, since this

warning is now suppressed in several different places.

  • wtf/Packed.h: Suppress the warning. Also, add a static_assert for safety.
9:46 AM Changeset in webkit [278877] by Brent Fulgham
  • 15 edits in trunk/Source

[Cocoa] Harden WebAuthn process by restricting to browser-entitled processes
https://bugs.webkit.org/show_bug.cgi?id=226772
<rdar://problem/74721877>

Reviewed by Darin Adler.

Source/WebKit:

We should ensure that any process attempting to launch the WebAuthn XPC service is entitled as a full web browser. We
should also ensure that the process requesting WebAuthn operations over WebKit CoreIPC is the WebContent process.

Tested by existing WebAuthn tests.

  • Platform/Logging.h: Add WebAuthn category.
  • Shared/Cocoa/DefaultWebBrowserChecks.mm:

(WebKit::isInWebKitChildProcess): Recognize 'com.apple.WebKit.WebAuthn' as a WebKit sub-process.

  • UIProcess/Cocoa/WebProcessProxyCocoa.mm:

(WebKit::WebProcessProxy::hasCorrectPACEntitlement): Added.

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::getWebAuthnProcessConnection): Add a new MESSAGE_CHECK that the process requesting a WebAuthn
process connection is a WebContent process.

  • UIProcess/WebProcessProxy.h:
  • WebAuthnProcess/WebAuthnProcess.cpp:

(WebKit::WebAuthnProcess::platformInitializeWebAuthnProcess): Add some logging.

  • WebAuthnProcess/WebAuthnProcess.h:
  • WebAuthnProcess/ios/WebAuthnProcessIOS.mm:

(WebKit::WebAuthnProcess::platformInitializeWebAuthnProcess): Ensure that the application invoking the WebAuthn XPC service
is entitled as a default web browser.

  • WebAuthnProcess/mac/WebAuthnProcessMac.mm:

(WebKit::WebAuthnProcess::platformInitializeWebAuthnProcess): Stub.

  • WebProcess/WebProcess.cpp:

(WebKit::getWebAuthnProcessConnection):
(WebKit::WebProcess::ensureWebAuthnProcessConnection):

Source/WTF:

Add a new entitlement utility that returns the String value of a given entitlement for
the process with the provided audit token.

  • wtf/cocoa/Entitlements.h:
  • wtf/cocoa/Entitlements.mm:

(WTF::hasEntitlementValue):

  • wtf/PlatformHave.h: Add item for PAC shared region feature.
9:41 AM Changeset in webkit [278876] by Ruben Turcios
  • 8 edits in branches/safari-612.1.18.1-branch/Source

Versioning.

WebKit-7612.1.18.1.2

9:09 AM Changeset in webkit [278875] by mark.lam@apple.com
  • 14 edits in trunk/Source/JavaScriptCore

Move setting of scratch buffer active lengths to the runtime functions.
https://bugs.webkit.org/show_bug.cgi?id=227013
rdar://79325068

Reviewed by Keith Miller.

We previously emit JIT'ed code to set and unset the ScratchBuffer active length
around calls into C++ runtime functions. This was needed because the runtime
functions may allow GC to run, and GC needs to be able to scan the values stored
in the ScratchBuffer.

In this patch, we change it so that the runtime functions that need it will
declare an ActiveScratchBufferScope RAII object that will set the ScratchBuffer
active length, and unset it on exit. This allows us to:

  1. Emit less JIT code. The runtime function can take care of it.
  2. Elide setting the ScratchBuffer active length if not needed. The runtime functions know whether they can GC or not. They only need to set the active length if they can GC.

Note that scanning of the active ScratchBuffer is done synchronously on the
mutator thread via Heap::gatherScratchBufferRoots(), which is called as part of
the GC conservative root scan. This means there is no urgency / sequencing that
requires that the active length be set before calling into the runtime function.
Setting it in the runtime function itself is fine as long as it is done before
the function executes any operations that can GC.

This patch also made the following changes:

  1. Introduce ActiveScratchBufferScope RAII object used to set/unset the ScratchBuffer length in the runtime functions. ActiveScratchBufferScope takes the active length in units of number of stack slots / Registers / JSValues instead of bytes.
  1. Deleted ScratchRegisterAllocator::preserveUsedRegistersToScratchBufferForCall() and ScratchRegisterAllocator::restoreUsedRegistersFromScratchBufferForCall(). These functions are unused.

The reasoning behind what values to pass to ActiveScratchBufferScope, is any:

  1. AssemblyHelpers::debugCall() in AssemblyHelpers.cpp: The ScratchBuffer is only used for operationDebugPrintSpeculationFailure(), which now declares an ActiveScratchBufferScope.

The active length is GPRInfo::numberOfRegisters + FPRInfo::numberOfRegisters.
See scratchSize in AssemblyHelpers::debugCall().

  1. genericGenerationThunkGenerator() in FTLThunks.cpp: The scratch buffer size for determining the active length is requiredScratchMemorySizeInBytes().

However, genericGenerationThunkGenerator() generates code to call either
operationCompileFTLOSRExit() or operationCompileFTLLazySlowPath(). Both of
these functions will DeferGCForAWhile. Hence, GC cannot run, and we don't need
to set the active length here.

  1. compileArrayPush() in FTLLowerDFGToB3.cpp:

Cases Array::Int32, Array::Contiguous, or Array::Double calls
operationArrayPushMultiple() or operationArrayPushDoubleMultiple().

For operationArrayPushMultiple(), the active length is elementCount. See
computation of scratchSize.

For operationArrayPushDoubleMultiple(), we don't need to set the active length
because the ScratchBuffer only contains double values. The GC does not need
to scan those.

Case Array::ArrayStorage calls operationArrayPushMultiple().
The active length is elementCount. See computation of scratchSize.

compileNewArray() in FTLLowerDFGToB3.cpp:

Calls operationNewArray(). Active length is m_node->numChildren(), which is
passed to operationNewArray() as the size parameter. See computation of
scratchSize.

compileNewArrayWithSpread() in FTLLowerDFGToB3.cpp:

Calls operationNewArrayWithSpreadSlow(). Active length is m_node->numChildren(),
which is passes to operationNewArrayWithSpreadSlow() as the numItems parameter.
See computation of scratchSize.

  1. osrExitGenerationThunkGenerator() in DFGThunks.cpp:

Calls operationCompileOSRExit(). Active length is GPRInfo::numberOfRegisters +
FPRInfo::numberOfRegisters. See computation of scratchSize.

  1. compileNewArray() in DFGSpeculativeJIT.cpp:

Calls operationNewArray(). Active length is node->numChildren(), which is
passed in as the size parameter.

compileNewArrayWithSpread() in DFGSpeculativeJIT.cpp:

Calls operationNewArrayWithSpreadSlow(). Active length is node->numChildren(),
which is passed in as the numItems parameter.

compileArrayPush() in DFGSpeculativeJIT.cpp:

Calls operationArrayPushMultiple(). Active length is elementCount, which is
passed in as the elementCount parameter.

Calls operationArrayPushDoubleMultiple(). Active length is elementCount, but
we don't need to set it because the ScratchBuffer only contains double values.

  • dfg/DFGOSRExit.cpp:

(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

  • dfg/DFGOperations.cpp:

(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileNewArray):
(JSC::DFG::SpeculativeJIT::compileNewArrayWithSpread):
(JSC::DFG::SpeculativeJIT::compileArrayPush):

  • dfg/DFGThunks.cpp:

(JSC::DFG::osrExitGenerationThunkGenerator):

  • ftl/FTLLowerDFGToB3.cpp:

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

  • ftl/FTLOSRExitCompiler.cpp:

(JSC::FTL::JSC_DEFINE_JIT_OPERATION):

  • ftl/FTLOperations.cpp:

(JSC::FTL::JSC_DEFINE_JIT_OPERATION):

  • ftl/FTLThunks.cpp:

(JSC::FTL::genericGenerationThunkGenerator):

  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::debugCall):

  • jit/ScratchRegisterAllocator.cpp:

(JSC::ScratchRegisterAllocator::preserveUsedRegistersToScratchBufferForCall): Deleted.
(JSC::ScratchRegisterAllocator::restoreUsedRegistersFromScratchBufferForCall): Deleted.

  • jit/ScratchRegisterAllocator.h:
  • runtime/VM.h:
  • runtime/VMInlines.h:

(JSC::ActiveScratchBufferScope::ActiveScratchBufferScope):
(JSC::ActiveScratchBufferScope::~ActiveScratchBufferScope):

7:47 AM Changeset in webkit [278874] by youenn@apple.com
  • 2 edits in trunk/LayoutTests

(r278359) fast/mediastream/mediaElement-gc.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=226991
<rdar://problem/79309901>

Reviewed by Eric Carlson.

  • fast/mediastream/mediaElement-gc.html:

Call GC several times if needed to collect the media element.

7:47 AM Changeset in webkit [278873] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

Caches::removeCacheEntry should check for m_storage
https://bugs.webkit.org/show_bug.cgi?id=227022
<rdar://79225216>

Reviewed by Antti Koivisto.

removeCacheEntry can be called asynchronoulsy in Cache::open for badly formatted content.
In that case, given this is done asynchronously, m_storage might be nullified.
Add a nullptr check to cope with this.

  • NetworkProcess/cache/CacheStorageEngineCaches.cpp:

(WebKit::CacheStorage::Caches::removeCacheEntry):

7:14 AM Changeset in webkit [278872] by Jonathan Bedard
  • 7 edits
    17 adds in trunk

Source/WebCore/PAL:
[iOS 15] Support building WebKit
https://bugs.webkit.org/show_bug.cgi?id=227002
<rdar://problem/79316598>

Reviewed by Tim Horton.

  • pal/spi/ios/QuickLookSPI.h:

Source/WebKit:
[iOS 15] Support building WebKit
https://bugs.webkit.org/show_bug.cgi?id=227002
<rdar://problem/79316598>

Reviewed by Tim Horton.

Covered by existing tests.

  • Platform/spi/ios/UIKitSPI.h: Add _insertTextFromCamera.

Tools:
[iOS 15] Support building WebKit
https://bugs.webkit.org/show_bug.cgi?id=227002
<rdar://problem/79316598>

Reviewed by Tim Horton.

  • TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm: Remove unneeded import.

WebKitLibraries:

[iOS 15] Support building WebKit

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

Reviewed by Tim Horton.

  • WebKitPrivateFrameworkStubs/iOS/15/AppSupport.framework/AppSupport.tbd: Added.
  • WebKitPrivateFrameworkStubs/iOS/15/AuthKit.framework/AuthKit.tbd: Added.
  • WebKitPrivateFrameworkStubs/iOS/15/BackBoardServices.framework/BackBoardServices.tbd: Added.
  • WebKitPrivateFrameworkStubs/iOS/15/CorePrediction.framework/CorePrediction.tbd: Added.
  • WebKitPrivateFrameworkStubs/iOS/15/GraphicsServices.framework/GraphicsServices.tbd: Added.
  • WebKitPrivateFrameworkStubs/iOS/15/RunningBoardServices.framework/RunningBoardServices.tbd: Added.
  • WebKitPrivateFrameworkStubs/iOS/15/SafariSafeBrowsing.framework/SafariSafeBrowsing.tbd: Added.
  • WebKitPrivateFrameworkStubs/iOS/15/URLFormatting.framework/URLFormatting.tbd: Added.
7:12 AM Changeset in webkit [278871] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[GTK] Unreviewed test gardening: add expected failure

The fast/text/letter-spacing-produces-nan-width.html test crashes on debug.

Patch by Arcady Goldmints-Orlov <agoldmints@igalia.com> on 2021-06-15

  • platform/gtk/TestExpectations:
6:13 AM Changeset in webkit [278870] by eric.carlson@apple.com
  • 4 edits in trunk/Source

[Mac] CoreMedia WrapperClass does not need alignment fixup
https://bugs.webkit.org/show_bug.cgi?id=226978
rdar://78864290

Reviewed by Geoffrey Garen and Dan Bernstein.

Source/WebCore:

  • platform/graphics/cocoa/WebCoreDecompressionSession.mm:

(WebCore::WebCoreDecompressionSession::enqueueSample): static_assert CMBufferQueueRef
callback struct alignment and version size.

Source/WebKit:

  • Shared/mac/MediaFormatReader/CoreMediaWrapped.h:

(WebKit::CoreMediaWrapped<Wrapped>::vTable): Don't add padding to WrapperClass,
it isn't necessary. static_assert CMBaseClass and WrapperClass alignment and
.version sizes.

6:11 AM Changeset in webkit [278869] by Alan Bujtas
  • 3 edits
    2 adds in trunk

[LFC][TFC] Add support for preferred width computation when mixed width types are present
https://bugs.webkit.org/show_bug.cgi?id=227010

Reviewed by Antti Koivisto.

Source/WebCore:

This is in preparation for supporting available space distribution with mixed width types (e.g. percent and fixed).
While this patch only addresses the preferred width computation for the table, certain values already work with the existing distribution code.

Test: fast/layoutformattingcontext/table-space-distribution-mixed-width-type-simple.html

  • layout/formattingContexts/table/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::computedPreferredWidthForColumns):

LayoutTests:

  • fast/layoutformattingcontext/table-space-distribution-mixed-width-type-simple-expected.html: Added.
  • fast/layoutformattingcontext/table-space-distribution-mixed-width-type-simple.html: Added.
4:09 AM Changeset in webkit [278868] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk

[css-scroll-snap] Scroll snap offsets are interpreted as scroll positions in ScrollableArea
https://bugs.webkit.org/show_bug.cgi?id=226572

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

Source/WebCore:

Test: css3/scroll-snap/scroll-snap-right-to-left-initial-snapping.html

This is also covered by existing WPT tests, but these tests are composite reference
tests where there are still some failing elements.

  • platform/ScrollableArea.cpp:

(WebCore::ScrollableArea::nearestActiveSnapPoint): Use scroll offsets instead of positions.
(WebCore::ScrollableArea::updateScrollSnapState): Ditto.

LayoutTests:

  • TestExpectations: Mark test as newly passing.
  • css3/scroll-snap/scroll-snap-right-to-left-initial-snapping-expected.txt: Added.
  • css3/scroll-snap/scroll-snap-right-to-left-initial-snapping.html: Added.
3:15 AM Changeset in webkit [278867] by Diego Pino Garcia
  • 2 edits in trunk/Tools

[GTK] Unreviewed test gardening. Gardened three API GTK test failures.

These tests were constant failures in EWS and were slowing down the
bot. The tests are the following:

  • /WebKit2Gtk/TestContextMenu:/webkit/WebKitWebPage/context-menu.
  • /WebKit2Gtk/TestContextMenu:/webkit/WebKitWebPage/context-menu-node.
  • /TestWTF:WTF_DataMutex.DoubleLockDeathTest.
  • TestWebKitAPI/glib/TestExpectations.json:
2:58 AM Changeset in webkit [278866] by eocanha@igalia.com
  • 3 edits in trunk/LayoutTests

[GStreamer] media/video-seek-after-end.html is no longer flakey
https://bugs.webkit.org/show_bug.cgi?id=203079
<rdar://problem/56366173>

Reviewed by Philippe Normand.

Increased test timeout to something higher than 1300ms to prevent the test failure.

  • media/video-seek-after-end.html: Increased timeout.
  • platform/glib/TestExpectations: Unskipped the test.
2:19 AM Changeset in webkit [278865] by svillar@igalia.com
  • 5 edits in trunk/Source/WebCore

[css-flexbox] Do not compute the min-max sizes of flex items twice
https://bugs.webkit.org/show_bug.cgi?id=226463

Reviewed by Simon Fraser.

When determining the flex base size, the item’s min and max main sizes are ignored (no clamping occurs).
Those limits are used to compute the item's hypothetical main size and also later when the flexible
lengths are resolved. The thing is that we were running the code that clamps the flex item size twice instead
of computing those limits once and apply them twice.

From now one, we just compute them once and store the limits in a std::pair in the FlexItem class. This means
that the FlexItem is able to compute the hypothetical main size on its own and does not need it to be passed
as an argument.

No new tests as this is already being tested by dozens of tests.

  • rendering/FlexibleBoxAlgorithm.cpp:

(WebCore::FlexItem::FlexItem):
(WebCore::FlexItem::constrainSizeByMinMax const): Clamp the passed in size by the stored min & max sizes.

  • rendering/FlexibleBoxAlgorithm.h:
  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::computeFlexItemMinMaxSizes): Renamed from adjustChildSizeForMinAndMax and
without the childSize argument which is no longer needed.
(WebCore::RenderFlexibleBox::constructFlexItem): Use constrainSizeByMinMax.
(WebCore::RenderFlexibleBox::resolveFlexibleLengths): Ditto.
(WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax): Deleted.

  • rendering/RenderFlexibleBox.h:
1:32 AM Changeset in webkit [278864] by svillar@igalia.com
  • 4 edits
    2 moves
    2 adds in trunk

logged in GitHub issue pages have bad layout for "Notifications Customize" link
https://bugs.webkit.org/show_bug.cgi?id=226859

Reviewed by Alan Bujtas.

LayoutTests/imported/w3c:

  • web-platform-tests/html/rendering/the-details-element/summary-display-list-item-002-expected.html: Added.
  • web-platform-tests/html/rendering/the-details-element/summary-display-list-item-002.html: Added.

Source/WebCore:

Test: imported/w3c/web-platform-tests/html/rendering/the-details-element/summary-display-list-item-002.html

In r278280 we made display:list-item on <summary> elements to fallback to display:flexbox in order not to
show two markers. However there is no reason why it should be a flexible box instead of a block container,
actually is causing issues in some sites. We better fallback to block instead of flexbox renderer.

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::createFor): create a RenderBlockFlow when OnlyCreateBlockAndFlexboxRenderers is
specified (right now only by summary elements).

12:40 AM Changeset in webkit [278863] by Said Abou-Hallawa
  • 6 edits in trunk/Source/WebCore

[CG] Create a sub-image when drawing an image only if the destination image will be enlarged, rotated or sheared
https://bugs.webkit.org/show_bug.cgi?id=226916
<rdar://71712144>

Reviewed by Simon Fraser.

When drawing only part of the image, we may want to create a sub-image
first and draw this sub-image. But creating the sub-image is expensive.
So we use SubimageCacheWithTimer to avoid recreating them very often.
If the same part of the image is drawn multiple times, creating the sub-
image is a win. But if the part of the image is drawn only once, drawing
the whole image to a clipped context will be faster. In some cases, we
must to draw the part of the image through a sub-image. For example, if
the destination rectangle stretches only a part of an image, interpolating
the sub-image will give the correct display.

In this patch GraphicsContextCG::drawNativeImage() is re-factored to do
the following:
1) Normalize the srcRect and destRect
2) Simplify calculation of adjustDestRect and subimageRect using FloatRect

and FloatSize math

3) Move the heuristic which decides whether to use a sub-image or not to

a separate function.

A sub-image will be created if:
1) An interpolation will be performed when drawing the sub-image
2) and one of the following:

a) If the context is rotated or sheared
b) If destRect.size() / srcRect.size() is non-uniformly scaled
c) If destRect.size() / srcRect.size() is uniformly enlarging in

both direction

  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::normalizeRect): Deleted.

  • platform/graphics/FloatRect.cpp:

(WebCore::normalizeRect):

  • platform/graphics/FloatRect.h:
  • platform/graphics/cg/GraphicsContextCG.cpp:

(WebCore::shouldUseSubimage):
(WebCore::getSubimage):
(WebCore::imageLogicalSize):
(WebCore::GraphicsContextCG::drawNativeImage):

  • platform/graphics/transforms/AffineTransform.h:

(WebCore::AffineTransform::isRotateOrShear const):

12:08 AM Changeset in webkit [278862] by Martin Robinson
  • 17 edits in trunk

[css-scroll-snap] New snap containers always snap to the first scroll position
https://bugs.webkit.org/show_bug.cgi?id=226630

Reviewed by Simon Fraser.

Source/WebCore:

There are two situations where we should not immediately snap to the first snap position
of a scroller after initial layout:

  1. If that scroll is right-to-left. In this case the last snap position is closest to the origin.
  2. If the scroller uses proximity snapping and the first snap position is far enough away from the origin that it isn't yet active.

Previously, WebKit was always snapping to the first position. The change fixes that by
not snapping to the 0 index snap point immediately after initial layout and only snapping
to an eligible snap positions after running a snap point search.

No new tests. This change fixes two existing WPT tests:

  • imported/w3c/web-platform-tests/css/css-scroll-snap/scroll-target-snap-003.htm
  • imported/w3c/web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/scroll-snap-initial-layout-000.htm
  • page/scrolling/ScrollSnapOffsetsInfo.cpp:

(WebCore::closestSnapOffsetWithInfoAndAxis): Pull in isNearEnoughToOffsetForProximity as
an anonymous function and use it to avoid snapping to the first and last position if
they are too far for proximity snapping.

  • page/scrolling/ScrollingStateScrollingNode.cpp:

(WebCore::ScrollingStateScrollingNode::dumpProperties const): Use invalidSnapOffsetIndex as
the default for the snap index property. Interpret 0 as a valid snap position.

  • page/scrolling/ScrollingStateScrollingNode.h: Ditto.
  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::dumpProperties const): Ditto.

  • page/scrolling/ScrollingTreeScrollingNode.h: Ditto.
  • platform/ScrollAnimator.cpp:

(WebCore::ScrollAnimator::resnapAfterLayout): Added this method that passes through to ScrollController.
(WebCore::ScrollAnimator::updateActiveScrollSnapIndexForOffset): Simplified setActiveScrollSnapIndicesForOffset
into updateActiveScrollSnapIndexForClientOffset.

  • platform/ScrollAnimator.h: Added method definition.
  • platform/ScrollController.cpp:

(WebCore::ScrollController::setSnapOffsetsInfo): Use updateActiveScrollSnapIndexForClientOffset now.
(WebCore::ScrollController::activeScrollSnapIndexForAxis const): Return invalidSnapOffsetIndex
when snapping is disabled.
(WebCore::ScrollController::setNearestScrollSnapIndexForAxisAndOffset): No longer clamp the scroll
position to the first and last snap points. We might be scrolling to a position before or after
them that isn't subject to proximity snapping.
(WebCore::ScrollController::updateActiveScrollSnapIndexForClientOffset): Renamed from setActiveScrollSnapIndicesForOffset
because it always just took the client's current offset.
(WebCore::ScrollController::resnapAfterLayout): Added this helper which snaps in axes that aren't currently
snapped to a snap position after a layout.

  • platform/ScrollController.h: Removed unused method that used 0 incorrectly as an invalid snap position.

Update method definitions.

  • platform/ScrollSnapAnimatorState.h: Use invalidSnapOffsetIndex to signify no snapping.
  • platform/ScrollSnapAnimatorState.cpp:

(WebCore::ScrollSnapAnimatorState::targetOffsetForStartOffset const): No longer clamp offsets to first and
last scroll snap offsets.

  • platform/ScrollableArea.cpp:

(WebCore::ScrollableArea::currentHorizontalSnapPointIndex const): Ditto.
(WebCore::ScrollableArea::currentVerticalSnapPointIndex const): Ditto.
(WebCore::ScrollableArea::resnapAfterLayout): Call into ScrollController::resnapAfterLayout.

Source/WebKit:

  • UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h: Use invalidSnapOffsetIndex

instead of 0 to initialize the snap position.

LayoutTests:

Jun 14, 2021:

11:46 PM Changeset in webkit [278861] by youenn@apple.com
  • 4 edits
    17 adds in trunk/LayoutTests

Import WPT webrtc-extensions
https://bugs.webkit.org/show_bug.cgi?id=226961

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

  • resources/import-expectations.json:
  • web-platform-tests/webrtc-extensions/: Added.

LayoutTests:

  • tests-options.json:
10:26 PM Changeset in webkit [278860] by Diego Pino Garcia
  • 6 edits in trunk/LayoutTests

[GStreamer] media/track/audio/audio-track-mkv-vorbis-language.html and media/track/video/video-track-mkv-theora-language.html are failing
https://bugs.webkit.org/show_bug.cgi?id=226864

Reviewed by Eric Carlson.

These tests were failing due to an apparently incorrect order of
languages in audio and video tracks.

Examining the video container with tools like mediasource or VLC shows
that the order expected by GStreamer ports is correct. To make these
tests pass I changed the tests to make them language order independent
by fetching audio or video tracks by id.

  • media/in-band-tracks.js:

(canplaythrough):
(testAttribute): values' can be also an Object. In that case, fetch tracks by 'id'.

  • media/track/audio/audio-track-mkv-vorbis-language-expected.txt: Updated.
  • media/track/audio/audio-track-mkv-vorbis-language.html: Pass language expected results as a map indexed by track id.
  • media/track/video/video-track-mkv-theora-language-expected.txt: Updated.
  • media/track/video/video-track-mkv-theora-language.html: Pass language expected results as a map indexed by track id.
9:45 PM Changeset in webkit [278859] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] Workaround ICU uloc_addLikelySubtags / uloc_minimizeSubtags bugs
https://bugs.webkit.org/show_bug.cgi?id=226996
rdar://79250513

Reviewed by Ross Kirsling.

JSTests:

  • stress/intl-long-locale-id-maximize-minimize.js: Added.

(shouldBe):
(throw.new.Error):

Source/JavaScriptCore:

ICU has bugs that uloc_addLikelySubtags / uloc_minimizeSubtags cannot handle very long locale ID that exceeds ULOC_FULLNAME_CAPACITY,
while these functions can take arbitrary sized buffer for output. This can be achieved simply by (1) attaching many unicode extensions,
or (2) having many variants.

In this patch, we add a workaround: if uloc_addLikelySubtags / uloc_minimizeSubtags failed, we perform them without having locale ID
keywords part. After performing the operations, we append these keywords back.

This is workaround, and still this workaround is not complete since we could have many variants. In that case, uloc_addLikelySubtags / uloc_minimizeSubtags
still fails, and in that case, for now, we give up performing uloc_addLikelySubtags / uloc_minimizeSubtags. Fixing this needs to be
done in ICU side: https://unicode-org.atlassian.net/browse/ICU-21639

  • runtime/IntlLocale.cpp:

(JSC::IntlLocale::keywordValue const):
(JSC::IntlLocale::maximal):
(JSC::IntlLocale::minimal):
(JSC::IntlLocale::baseName):

8:34 PM Changeset in webkit [278858] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebCore

Font::applyTransforms() can redirect GlyphBuffer's internal pointers
https://bugs.webkit.org/show_bug.cgi?id=226997
<rdar://problem/78704666>

Reviewed by Ryosuke Niwa.

After calling Font::applyTransforms(), we need to update any pointers which point into the GlyphBuffer.

  • platform/graphics/WidthIterator.cpp:

(WebCore::WidthIterator::applyFontTransforms):

6:07 PM Changeset in webkit [278857] by Russell Epstein
  • 1 copy in tags/Safari-612.1.18.1.1

Tag Safari-612.1.18.1.1.

6:04 PM Changeset in webkit [278856] by mark.lam@apple.com
  • 7 edits in trunk/Source/JavaScriptCore

Add ldp and stp support for FP registers, plus some bug fixes.
https://bugs.webkit.org/show_bug.cgi?id=226998
rdar://79313717

Reviewed by Robin Morisset.

This patch does the following:

  1. Add ldp and stp support for FP registers. This simply entails providing wrappers that take FPRegisterID and passing true for the V bit to the underlying loadStoreRegisterPairXXX encoding function. V is for vector (aka floating point). This will cause bit 26 in the instruction to be set indicating that it's loading / storing floating point registers.
  1. Add ARM64 disassembler support ldp and stp for FP registers. This includes fixing A64DOpcodeLoadStoreRegisterPair::mask to not exclude the FP versions of the instructions.
  1. Add ARM64Assembler query methods for determining if an immediate is encodable as the signed 12 bit immediate of ldp and stp instructions.
  1. Fix ldp and stp offset form to take an int instead of an unsigned. The immediate it takes is a 12-bit signed int, not unsigned.
  1. In loadStoreRegisterPairXXX encoding functions used by the forms of ldp and stp, RELEASE_ASSERT that the passed in immediate is encodable. Unlike ldur / stur, there is no form of ldp / stp that takes the offset in a register that can be used as a fail over. Hence, if the immediate is not encodable, this is a non-recoverable event. The client is responsible for ensuring that the offset is encodable.
  1. Added some testmasm tests for testing the offset form (as opposed to PreIndex and PostIndex forms) of ldp and stp. We currently only use the offset form in our JITs.
  • assembler/ARM64Assembler.h:

(JSC::ARM64Assembler::isValidLDPImm):
(JSC::ARM64Assembler::isValidLDPFPImm):
(JSC::ARM64Assembler::ldp):
(JSC::ARM64Assembler::ldnp):
(JSC::ARM64Assembler::isValidSTPImm):
(JSC::ARM64Assembler::isValidSTPFPImm):
(JSC::ARM64Assembler::stp):
(JSC::ARM64Assembler::stnp):
(JSC::ARM64Assembler::loadStoreRegisterPairPostIndex):
(JSC::ARM64Assembler::loadStoreRegisterPairPreIndex):
(JSC::ARM64Assembler::loadStoreRegisterPairOffset):
(JSC::ARM64Assembler::loadStoreRegisterPairNonTemporal):

  • assembler/AssemblerCommon.h:

(JSC::isValidSignedImm7):

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::loadPair64):
(JSC::MacroAssemblerARM64::storePair64):

  • assembler/testmasm.cpp:

(JSC::testLoadStorePair64Int64):
(JSC::testLoadStorePair64Double):

  • disassembler/ARM64/A64DOpcode.cpp:

(JSC::ARM64Disassembler::A64DOpcodeLoadStoreRegisterPair::format):

  • disassembler/ARM64/A64DOpcode.h:
6:02 PM Changeset in webkit [278855] by Russell Epstein
  • 1 copy in tags/Safari-612.1.18.0.1

Tag Safari-612.1.18.0.1.

5:54 PM Changeset in webkit [278854] by keith_miller@apple.com
  • 2 edits in trunk/Tools

run-javascriptcore-tests should print output when a test binary fails by default
https://bugs.webkit.org/show_bug.cgi?id=226985

Reviewed by Mark Lam.

  • Scripts/run-javascriptcore-tests:

(runTest):

5:46 PM Changeset in webkit [278853] by Patrick Angle
  • 2 edits in trunk/Source/WebInspectorUI

[REGRESSION: r276616] Uncaught Exception: TypeError: undefined is not an object (evaluating 'this._setupCodeMirror.getValue')
https://bugs.webkit.org/show_bug.cgi?id=226995

Reviewed by Devin Rousso.

Audit test groups share a single setup editor for all their test cases, leaving individual test cases without
their own setup editor. In this case, we should not attempt to save the setup script for every test, and instead
allow the instance of AuditTestGroupContentView that does have a setup editor to save the script.

  • UserInterface/Views/AuditTestContentView.js:

(WI.AuditTestContentView.prototype.saveEditedData):

4:40 PM Changeset in webkit [278852] by Kate Cheney
  • 4 edits in trunk/Source/WebCore

Remove Storage Access API quirk on live.com
https://bugs.webkit.org/show_bug.cgi?id=226990
<rdar://problem/79218986>

Reviewed by Brent Fulgham.

The quirk on live.com is unnecessary, and we should remove it.

  • dom/DocumentStorageAccess.cpp:

(WebCore::DocumentStorageAccess::requestStorageAccessQuirk):

  • page/Quirks.cpp:

(WebCore::isStorageAccessQuirkDomainAndElement):
(WebCore::Quirks::requestStorageAccessAndHandleClick const):
(WebCore::Quirks::mapToTopDomain): Deleted.

  • page/Quirks.h:
4:39 PM Changeset in webkit [278851] by Truitt Savell
  • 5 edits
    3 deletes in trunk

Unreviewed, reverting r278842.

introduced a failing test

Reverted changeset:

"Fix RTCDataChannelInit::decode"
https://bugs.webkit.org/show_bug.cgi?id=226968
https://commits.webkit.org/r278842

3:04 PM Changeset in webkit [278850] by Devin Rousso
  • 2 edits in trunk/Source/WebCore

[macOS] TouchBar playback speed controls don't work
https://bugs.webkit.org/show_bug.cgi?id=226987
<rdar://problem/79216098>

Reviewed by Eric Carlson.

Override setRate: and setDefaultPlaybackRate: instead of just having an ivar so that
TouchBar playback speed controls actually affect the corresponding <video>.

  • platform/mac/WebPlaybackControlsManager.mm:

(-[WebPlaybackControlsManager defaultPlaybackRate]): Added.
(-[WebPlaybackControlsManager setDefaultPlaybackRate:]): Added.
(-[WebPlaybackControlsManager rate]): Added.
(-[WebPlaybackControlsManager setRate:]): Added.

2:36 PM Changeset in webkit [278849] by commit-queue@webkit.org
  • 55 edits in trunk/Source

Pass PAL::SessionID by value instead of reference
https://bugs.webkit.org/show_bug.cgi?id=226983

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

Source/WebCore:

It's a wrapper around an integer which will pass in a register.
There's no reason to pass a pointer to it.

  • loader/CrossOriginAccessControl.cpp:

(WebCore::validatePreflightResponse):

  • loader/CrossOriginAccessControl.h:
  • loader/CrossOriginPreflightResultCache.cpp:

(WebCore::CrossOriginPreflightResultCache::appendEntry):
(WebCore::CrossOriginPreflightResultCache::canSkipPreflight):

  • loader/CrossOriginPreflightResultCache.h:
  • loader/EmptyClients.cpp:
  • loader/cache/CachedApplicationManifest.cpp:

(WebCore::CachedApplicationManifest::CachedApplicationManifest):

  • loader/cache/CachedApplicationManifest.h:
  • loader/cache/CachedCSSStyleSheet.cpp:

(WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):

  • loader/cache/CachedCSSStyleSheet.h:
  • loader/cache/CachedFont.cpp:

(WebCore::CachedFont::CachedFont):

  • loader/cache/CachedFont.h:
  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::CachedImage):

  • loader/cache/CachedImage.h:
  • loader/cache/CachedRawResource.cpp:

(WebCore::CachedRawResource::CachedRawResource):

  • loader/cache/CachedRawResource.h:
  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::CachedResource):

  • loader/cache/CachedResource.h:
  • loader/cache/CachedResourceLoader.cpp:

(WebCore::createResource):
(WebCore::CachedResourceLoader::updateCachedResourceWithCurrentRequest):

  • loader/cache/CachedResourceLoader.h:
  • loader/cache/CachedSVGDocument.cpp:

(WebCore::CachedSVGDocument::CachedSVGDocument):

  • loader/cache/CachedSVGDocument.h:
  • loader/cache/CachedSVGFont.cpp:

(WebCore::CachedSVGFont::CachedSVGFont):

  • loader/cache/CachedSVGFont.h:
  • loader/cache/CachedScript.cpp:

(WebCore::CachedScript::CachedScript):

  • loader/cache/CachedScript.h:
  • loader/cache/CachedTextTrack.cpp:

(WebCore::CachedTextTrack::CachedTextTrack):

  • loader/cache/CachedTextTrack.h:
  • loader/cache/CachedXSLStyleSheet.cpp:

(WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):

  • loader/cache/CachedXSLStyleSheet.h:
  • page/DatabaseProvider.h:
  • platform/WebCoreCrossThreadCopier.cpp:

(WTF::PAL::SessionID>::copy):

  • platform/WebCoreCrossThreadCopier.h:
  • storage/StorageNamespaceProvider.cpp:

(WebCore::StorageNamespaceProvider::setSessionIDForTesting):

  • storage/StorageNamespaceProvider.h:

Source/WebKit:

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::newTestingSession):
(WebKit::NetworkProcess::ensureSession):
(WebKit::NetworkProcess::storageSession const):
(WebKit::NetworkProcess::findCacheEngine):
(WebKit::NetworkProcess::ensureCacheEngine):
(WebKit::NetworkProcess::removeCacheEngine):
(WebKit::NetworkProcess::flushCookies):
(WebKit::NetworkProcess::platformFlushCookies):
(WebKit::NetworkProcess::addWebPageNetworkParameters):
(WebKit::NetworkProcess::removeWebPageNetworkParameters):
(WebKit::NetworkProcess::countNonDefaultSessionSets):

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

(WebKit::NetworkResourceLoader::shouldLogCookieInformation):

  • NetworkProcess/NetworkResourceLoader.h:
  • NetworkProcess/NetworkStorageSessionProvider.h:
  • NetworkProcess/cache/NetworkCache.cpp:

(WebKit::NetworkCache::makeUseDecision):

  • NetworkProcess/cache/NetworkCache.h:

(WebKit::NetworkCache::Cache::sessionID const):

  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::flushCookies):
(WebKit::NetworkProcess::platformFlushCookies):

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::configurationForSessionID):

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::flushCookies):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/WebProcessPool.h:
  • WebProcess/Databases/WebDatabaseProvider.cpp:

(WebKit::WebDatabaseProvider::idbConnectionToServerForSession):

  • WebProcess/Databases/WebDatabaseProvider.h:

Source/WebKitLegacy:

  • Storage/WebDatabaseProvider.cpp:

(WebDatabaseProvider::idbConnectionToServerForSession):

  • Storage/WebDatabaseProvider.h:
  • WebCoreSupport/NetworkStorageSessionMap.cpp:

(NetworkStorageSessionMap::storageSession):
(NetworkStorageSessionMap::ensureSession):
(NetworkStorageSessionMap::destroySession):

  • WebCoreSupport/NetworkStorageSessionMap.h:
1:01 PM Changeset in webkit [278848] by Patrick Angle
  • 5 edits in trunk

Web Inspector: CSS variables not handled as case sensitive
https://bugs.webkit.org/show_bug.cgi?id=226875

Reviewed by Devin Rousso.

Source/WebCore:

Test: inspector/css/overridden-property.html

CSS variables support distinct declarations with only differences in cases. Previously, we naively converted all
property names to lowercase, instead of properly providing variable names in their original case.

  • inspector/InspectorStyleSheet.cpp:

(WebCore::InspectorStyle::styleWithProperties const):

LayoutTests:

Add a test to make sure that CSS variable declarations that vary only in case do not override each other.

  • inspector/css/overridden-property-expected.txt:
  • inspector/css/overridden-property.html:
12:54 PM Changeset in webkit [278847] by Ryan Haddad
  • 3 edits in trunk/Tools

Bring up an Apple-BigSur-AppleSilicon-Release-Test262-Tests queue
https://bugs.webkit.org/show_bug.cgi?id=226602

Reviewed by Aakash Jain.

  • CISupport/build-webkit-org/config.json:
  • CISupport/build-webkit-org/public_html/dashboard/Scripts/WebKitBuildbot.js:

(WebKitBuildbot):

12:44 PM Changeset in webkit [278846] by commit-queue@webkit.org
  • 8 edits in trunk/Source/JavaScriptCore

Add Air opcode sub32/64(Reg, Imm, Reg) form for ARM64 and select this instruction in Air
https://bugs.webkit.org/show_bug.cgi?id=226937

Patch by Yijia Huang <yijia_huang@apple.com> on 2021-06-14
Reviewed by Saam Barati.

Previously, Air arm64 sub32/64 utilize sub(Imm, Tmp) at optlevel = 0 and
add(Tmp, -Imm) at optlevel > 0 to perform and optimize sub(Tmp, Imm, Tmp).
The issue with this is that we were not eliding redundant operations.

For example:
B3 IR
@0 = Trunc(ArgumentReg(0))
@1 = Const
@2 = Sub(@0, @1)
@3 = Return(@2)

Old optimized Air IR
OptLevel = 0
Move %x0, %tmp1, @0
Move $Const, %tmp2, @1
Move %tmp1, %tmp0, @2 Redundant
Sub $Const, %tmp0, @2
Move %tmp0, %x0, @3
Ret32 %x0, @3

To remove those redundant instructions, Air arm64 sub32/64 opcode should
indicate a new form sub(Tmp, Imm, Tmp).

New optimized Air IR
OptLevel = 0
Move %x0, %tmp1, @0
Move $Const, %tmp2, @1
Sub %tmp1, $Const, %tmp0, @2
Move %tmp0, %x0, @3
Ret32 %x0, @3

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::sub32):
(JSC::MacroAssemblerARM64::sub64):

  • assembler/testmasm.cpp:

(JSC::testSub32Args):
(JSC::testSub32Imm):
(JSC::testSub32ArgImm):
(JSC::testSub64Imm32):
(JSC::testSub64ArgImm32):
(JSC::testSub64Imm64):
(JSC::testSub64ArgImm64):

  • b3/B3ReduceStrength.cpp:
  • b3/air/AirOpcode.opcodes:
  • b3/testb3.h:
  • b3/testb3_2.cpp:

(testSubArgs32ZeroExtend):

  • b3/testb3_3.cpp:

(addArgTests):

12:20 PM Changeset in webkit [278845] by Russell Epstein
  • 2 edits in branches/safari-611-branch/Source/WebKit

Apply patch. rdar://problem/77619702

11:44 AM Changeset in webkit [278844] by Ruben Turcios
  • 8 edits in trunk/Source

Versioning.

WebKit-7612.1.20

11:41 AM Changeset in webkit [278843] by Ruben Turcios
  • 8 edits in branches/safari-612.1.19-branch/Source

Versioning.

WebKit-7612.1.19

11:40 AM Changeset in webkit [278842] by youenn@apple.com
  • 5 edits
    3 adds in trunk

Fix RTCDataChannelInit::decode
https://bugs.webkit.org/show_bug.cgi?id=226968

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

  • web-platform-tests/webrtc-extensions/transfer-datachannel-service-worker.https-expected.txt: Added.
  • web-platform-tests/webrtc-extensions/transfer-datachannel-service-worker.https.html: Added.
  • web-platform-tests/webrtc-extensions/transfer-datachannel-service-worker.js: Added.

(onmessage):

Source/WebCore:

Test: imported/w3c/web-platform-tests/webrtc-extensions/transfer-datachannel-service-worker.https.html

  • platform/mediastream/RTCDataChannelHandler.h:

(WebCore::RTCDataChannelInit::decode):
Make sure to use optionals of optionals.

LayoutTests:

  • platform/mac-wk1/TestExpectations:
11:39 AM Changeset in webkit [278841] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

Accessing navigator.mediaDevices.enumerateDevices after granting permission
https://bugs.webkit.org/show_bug.cgi?id=226969
<rdar://problem/79286449>

Reviewed by Eric Carlson.

  • UIProcess/Cocoa/MediaPermissionUtilities.mm:

(WebKit::checkUsageDescriptionStringForType):
Check for NSCameraUsageDescription instead of NSMicrophoneUsageDescription for camera.

11:37 AM Changeset in webkit [278840] by youenn@apple.com
  • 1 edit
    3 moves
    1 add in trunk/LayoutTests/imported/w3c

Move Transferable RTCDataChannel tests to WPT
https://bugs.webkit.org/show_bug.cgi?id=226967

Reviewed by Eric Carlson.

  • web-platform-tests/webrtc-extensions/transfer-datachannel-expected.txt: Renamed from LayoutTests/http/wpt/webrtc/datachannel-worker-expected.txt.
  • web-platform-tests/webrtc-extensions/transfer-datachannel-worker.js: Renamed from LayoutTests/http/wpt/webrtc/datachannel-worker.js.
  • web-platform-tests/webrtc-extensions/transfer-datachannel.html: Renamed from LayoutTests/http/wpt/webrtc/datachannel-worker.html.
11:27 AM Changeset in webkit [278839] by Ruben Turcios
  • 1 copy in branches/safari-612.1.19-branch

New branch.

11:20 AM Changeset in webkit [278838] by pvollan@apple.com
  • 2 edits in trunk/Source/WebCore

[AppleWin] Fix build failure
https://bugs.webkit.org/show_bug.cgi?id=226966
<rdar://79228536>

Reviewed by Eric Carlson.

Disable warning causing the build failure.

  • platform/cf/MediaAccessibilitySoftLink.h:
10:47 AM Changeset in webkit [278837] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Avoid converting SecurityOrigins to Strings in SecurityPolicy
https://bugs.webkit.org/show_bug.cgi?id=226976

Reviewed by Geoffrey Garen.

Avoid converting SecurityOrigins to Strings in SecurityPolicy, by using a SecurityOriginData
as key in the originAccessMap instead of a String. Getting a SecurityOriginData from a
SecurityOrigin is very cheap.

  • page/SecurityPolicy.cpp:

(WebCore::SecurityPolicy::isAccessAllowed):
(WebCore::SecurityPolicy::addOriginAccessAllowlistEntry):
(WebCore::SecurityPolicy::removeOriginAccessAllowlistEntry):

10:41 AM Changeset in webkit [278836] by Russell Epstein
  • 8 edits in branches/safari-612.1.18.1-branch/Source

Versioning.

WebKit-7612.1.18.1.1

10:40 AM Changeset in webkit [278835] by Russell Epstein
  • 8 edits in branches/safari-612.1.18.0-branch/Source

Versioning.

WebKit-7612.1.18.0.1

10:34 AM Changeset in webkit [278834] by Jonathan Bedard
  • 5 edits in trunk/Source/WebCore

[Monterey] Support building WebKit (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=226846
<rdar://problem/79095148>

Reviewed by Chris Dumez.

Source/WebCore:

Covered by exisiting tests.

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::updateWithTextRecognitionResult): Explicitly define second arugment
to avoid 'missing field' compilation error.

Source/WebCore/PAL:

  • pal/spi/cf/CFNetworkSPI.h: Add nw_connection_privacy_stance_t.
  • pal/spi/cocoa/PassKitSPI.h: Add PKPaymentCoupon.
10:31 AM Changeset in webkit [278833] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Micro-optimize ResourceResponseBase::sanitizeHTTPHeaderFields()
https://bugs.webkit.org/show_bug.cgi?id=226977

Reviewed by Geoffrey Garen.

Micro-optimize ResourceResponseBase::sanitizeHTTPHeaderFields() as it is not as efficient as it could be and it
shows on profiles. In particular, rely on Vector::removeAllMatching() more instead of reconstructing HTTPHeaderMaps
& Vectors.

  • platform/network/ResourceResponseBase.cpp:

(WebCore::ResourceResponseBase::sanitizeHTTPHeaderFieldsAccordingToTainting):
(WebCore::ResourceResponseBase::sanitizeHTTPHeaderFields):

10:27 AM Changeset in webkit [278832] by commit-queue@webkit.org
  • 7 edits
    1 add in trunk

AcceleratedImageBuffer not instantiated but objects are punned to the type
https://bugs.webkit.org/show_bug.cgi?id=226917

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-06-14
Reviewed by Said Abou-Hallawa.

Source/WebCore:

AcceleratedImageBuffer::create would create instance
of ConcreteImageBuffer, not AcceleratedImageBuffer.

Fix by adding a correct create static function.

Tested by new test:
TestWebKitAPI.ImageBufferTests.ImageBufferSubTypeCreateCreatesSubtypes

  • platform/graphics/PlatformImageBuffer.h:

(WebCore::IOSurfaceImageBuffer::create):
(WebCore::IOSurfaceImageBuffer::IOSurfaceImageBuffer):
Add the correct factory functions and public constructors.

  • platform/graphics/cg/ImageBufferCGBitmapBackend.h:

Add export statements that are needed for the added test.

  • platform/graphics/coreimage/FilterEffectRendererCoreImage.mm:

(WebCore::FilterEffectRendererCoreImage::imageForSourceGraphic):
(WebCore::FilterEffectRendererCoreImage::renderToImageBuffer):
Change the image creation site to create the explicit IOSurfaceImageBuffer
since that's what it's trying to create.
Change the type-punning call sites to use explicit
IOSurfaceImageBuffer name, as that's what the call site
is intending to use.

Tools:

Add new test
TestWebKitAPI.ImageBufferTests.ImageBufferSubTypeCreateCreatesSubtypes
to test that the code compiles.
Before, it would fail with:

`error: cannot initialize a member subobject of type 'typename PtrTraits::StorageType' (aka 'WebCore::AcceleratedImageBuffer *') with an

rvalue of type 'WebCore::ConcreteImageBuffer<WebCore::ImageBufferIOSurfaceBackend> *'`

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebCore/ImageBufferTests.cpp: Added.

(TestWebKitAPI::TEST):

10:19 AM Changeset in webkit [278831] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

[iOS] Tighten the WebAuthn Sandbox
https://bugs.webkit.org/show_bug.cgi?id=226944
<rdar://problem/74721792>

Reviewed by Per Arne Vollan.

Revise the WebAuthn process sandbox to remove the many things originally copied from
the WebContent sandbox that are not needed.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebAuthn.sb:
9:14 AM Changeset in webkit [278830] by commit-queue@webkit.org
  • 6 edits in trunk/Source/JavaScriptCore

Unreviewed, reverting r278734.
https://bugs.webkit.org/show_bug.cgi?id=226973

broke jsc testapi

Reverted changeset:

"Shouldn't drain the micro task queue when calling out to
ObjC"
https://bugs.webkit.org/show_bug.cgi?id=161942
https://trac.webkit.org/changeset/278734

8:39 AM Changeset in webkit [278829] by Robert Jenner
  • 1 edit
    3 deletes in trunk/LayoutTests

[LayoutTests] Delete unused LayoutTests/plugins resources
https://bugs.webkit.org/show_bug.cgi?id=226837

Reviewed by Jonathan Bedard.

  • plugins/resources/frame-with-plugin-subframe.html: Removed.
  • plugins/resources/lines.swf: Removed.
  • plugins/resources/plugin-page.html: Removed.
8:37 AM Changeset in webkit [278828] by Ruben Turcios
  • 1 copy in branches/safari-612.1.18.1-branch

New branch.

8:33 AM Changeset in webkit [278827] by Ruben Turcios
  • 1 copy in branches/safari-612.1.18.0-branch

New branch.

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

[AppleWin] Update test expectations
https://bugs.webkit.org/show_bug.cgi?id=226970

Unreviewed test gardening.

  • platform/win/TestExpectations:
6:39 AM Changeset in webkit [278825] by Alan Bujtas
  • 4 edits
    4 adds in trunk

[LFC][TFC] Add support for flexing columns when the content is also flexing
https://bugs.webkit.org/show_bug.cgi?id=226959

Source/WebCore:

Reviewed by Antti Koivisto.

This patch adds support for (the very common) cases when the minimum content width < maximum content width
(e.g. text content wraps across multiple lines) and the parent column does not have fixed width either.
Note that in some cases now table layout agrees with Chrome/Firefox and not with trunk WebKit
(see table-space-distribution-simple-mismatching.htnl).

Tests: fast/layoutformattingcontext/table-space-distribution-simple-mismatching.html

fast/layoutformattingcontext/table-space-distribution-simple2.html

  • layout/formattingContexts/table/TableLayout.cpp:

(WebCore::Layout::TableFormattingContext::TableLayout::distributedHorizontalSpace):

LayoutTests:

Reviewed by Antti Koivisto.

  • TestExpectations: LFC matches Chrome and Firefox.
  • fast/layoutformattingcontext/table-space-distribution-simple-mismatching-expected.txt: Added.
  • fast/layoutformattingcontext/table-space-distribution-simple-mismatching.html: Added.
  • fast/layoutformattingcontext/table-space-distribution-simple2-expected.html: Added.
  • fast/layoutformattingcontext/table-space-distribution-simple2.html: Added.
2:28 AM Changeset in webkit [278824] by pvollan@apple.com
  • 4 edits in trunk/Source

[iOS] Sync Accessibility preferences
https://bugs.webkit.org/show_bug.cgi?id=226738
<rdar://77922839>

Reviewed by Brent Fulgham.

Source/WebKit:

Only attempt to modify Accessibility preferences if they have changed.

  • Shared/AccessibilityPreferences.cpp: Replaced.
  • Shared/AccessibilityPreferences.h: Replaced.
  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::accessibilityPreferencesDidChange):

Source/WTF:

Enable Per-App Accessibility preferences on iOS.

  • wtf/PlatformHave.h:
12:38 AM WebKitGTK/2.32.x edited by zandobersek@gmail.com
(diff)

Jun 13, 2021:

6:23 PM Changeset in webkit [278823] by Wenson Hsieh
  • 5 edits in trunk/Source/WebKit

[watchOS] Quickboard UI for focused select elements should not allow the user to change the input language
https://bugs.webkit.org/show_bug.cgi?id=226958

Reviewed by Tim Horton.

Fix a couple of bugs around focused select element UI that were introduced in watchOS 7, due to changes in
PepperUICore. See below for details.

  • UIProcess/ios/forms/WKQuickboardListViewController.mm:

(-[WKQuickboardListViewController initWithDelegate:]):

Drive-by fix: remove a USE(APPLE_INTERNAL_SDK) guard that was (seemingly) unintentionally added in r262854.

(-[WKQuickboardListViewController viewDidLoad]): Deleted.

Avoid hiding the list view controller's -headerView when focusing select elements. In watchOS 7, the accept
and cancel buttons are positioned inside the -headerView, so having this logic in the base class
(WKQuickboardListViewController) means that the Done button in select menus does not show up. In turn, this
means that currently, users who focus select elements must know to use the crown button to dismiss the select
menu.

For now, we move logic to the only other subclass of WKQuickboardListViewController,
WKTextInputListViewController. However, note that this too is going away in an upcoming patch that refactors
WKTextInputListViewController so that it directly subclasses PUICQuickboardMessageViewController
instead of PUICQuickboardListViewController.

  • Platform/spi/watchos/PepperUICoreSPI.h:

Move a declaration of -initWithDelegate:dictationMode: from PUICDictationViewController to
PUICQuickboardListViewController (see the change in -[WKQuickboardListViewController initWithDelegate:] above).

  • UIProcess/ios/forms/WKSelectMenuListViewController.mm:

(-[WKSelectMenuListViewController shouldShowLanguageButton]):

Since watchOS 7, the language button is now always shown by default in PUICQuickboardListViewController, with a
new subclassing hook to avoid showing it. It doesn't make sense to allow the user to change input languages when
choosing options in a select menu, so we implement this and always return NO here.

  • UIProcess/ios/forms/WKTextInputListViewController.mm:

(-[WKTextInputListViewController viewDidLoad]):

1:34 PM Changeset in webkit [278822] by Fujii Hironori
  • 2 edits in trunk/LayoutTests

[WinCairo] Unreviewed test gardening

  • platform/wincairo/TestExpectations:
12:16 PM Changeset in webkit [278821] by Chris Dumez
  • 4 edits
    3 adds
    3 deletes in trunk

Relax "parent must be an HTMLElement" restriction in outerHTML setter
https://bugs.webkit.org/show_bug.cgi?id=226808

Reviewed by Ryosuke Niwa.

Source/WebCore:

Made the following change to our outerHTML setter for better compatibility and to better
match the specification [1]:

  • Stop throwing an exception when the parent is not an HTML element. This new behavior matches the specification, Blink and Gecko behavior.

I did not fully align us with the specification because we are mostly aligned with Blink at
the moment. In particular:

  • The specification says the outerHTML setter should be a no-op when the parent is null. Firefox matches the specification but WebKit & Blink throw a NoModificationAllowedError.
  • The specification says we should allow setting outerHTML if the parent is a DocumentFragment. Firefox allows this but WebKit & Blink throw a NoModificationAllowedError.
  • WebKit & Blink have some Text node merging logic that is not present in the specification and which Gecko doesn't implement.

[1] https://w3c.github.io/DOM-Parsing/#dom-element-outerhtml

Test: fast/dom/set-outer-html-special-cases.html

  • dom/Element.cpp:

(WebCore::Element::setOuterHTML):

LayoutTests:

  • fast/dom/set-outer-html-special-cases-expected.txt: Added.
  • fast/dom/set-outer-html-special-cases.html: Added.

Add layout test coverage

  • fast/dynamic/outerHTML-no-element-expected.txt:

Rebaseline test due to different exception message.

  • platform/mac-wk1/imported/w3c/web-platform-tests/mathml/relations/css-styling/padding-border-margin/margin-003-expected.txt:
  • platform/mac-wk2/imported/w3c/web-platform-tests/mathml/relations/css-styling/padding-border-margin/margin-003-expected.txt:

Rebaseline WPT test. This is actually a progression because we're no longer throwing. However, the test is still failing
later on.

11:42 AM Changeset in webkit [278820] by weinig@apple.com
  • 2 edits in trunk/Source/WebCore

SimulatedXRDevice::shutDownTrackingAndRendering() should clear it's GraphicsContextGL to ensure the resource is cleaned up quickly
https://bugs.webkit.org/show_bug.cgi?id=226947

Reviewed by Dean Jackson.

SimulatedXRDevice::shutDownTrackingAndRendering() needs to clear its GraphicsContextGL
to ensure the resource is cleaned up quickly, and doesn't wait for GC to be reclaimed.
Without this, we can run out of GraphicsContextGLs and fail tests if GC happens to be
running a bit behind.

  • testing/WebFakeXRDevice.cpp:

(WebCore::SimulatedXRDevice::shutDownTrackingAndRendering):

11:29 AM Changeset in webkit [278819] by sbarati@apple.com
  • 3 edits
    1 add in trunk

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

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/short-circuit-read-modify-write-cant-write-dst-before-tdz-check.js: Added.

(let.result.eval.try.captureV):
(catch):

Source/JavaScriptCore:

ShortCircuitReadModifyResolveNode can't emit a value into
its result until after it emits a TDZ check. We were temporarily
storing the result of the get_from_scope into the dst. Then
we'd emit the TDZ check. The TDZ check can throw, and it could
lead to us returning TDZ from the eval itself. Instead, we need
to use a temporary to emit a TDZ check on. Only after the TDZ check
passes can we move the temporary into the result.

  • bytecompiler/NodesCodegen.cpp:

(JSC::ShortCircuitReadModifyResolveNode::emitBytecode):

6:33 AM Changeset in webkit [278818] by Alan Bujtas
  • 3 edits
    2 adds in trunk

[LFC][TFC] Add support for over-constrained cases for available space distribution
https://bugs.webkit.org/show_bug.cgi?id=226957

Reviewed by Antti Koivisto.

Source/WebCore:

This patch cleans up the code for the available space distribution. It also enables
cases when the final column width is less than the preferred width (available space is negative).
See further explanation inline in the source.

Test: fast/layoutformattingcontext/table-space-distribution-simple.html

  • layout/formattingContexts/table/TableLayout.cpp:

(WebCore::Layout::GridSpace::isEmpty const):
(WebCore::Layout::max):
(WebCore::Layout::operator-):
(WebCore::Layout::operator+=):
(WebCore::Layout::operator/):
(WebCore::Layout::distributeAvailableSpace):
(WebCore::Layout::TableFormattingContext::TableLayout::distributedHorizontalSpace):

LayoutTests:

  • fast/layoutformattingcontext/table-space-distribution-simple-expected.html: Added.
  • fast/layoutformattingcontext/table-space-distribution-simple.html: Added.

Jun 12, 2021:

5:31 PM Changeset in webkit [278817] by weinig@apple.com
  • 2 edits in trunk/LayoutTests

Disable WebXR tests on Windows
https://bugs.webkit.org/show_bug.cgi?id=226956

Reviewed by Alan Bujtas.

  • platform/win/TestExpectations:

Disable all tests in webxr/ on windows as the feature is not enabled there.

4:09 PM Changeset in webkit [278816] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

-Wnonnull warning in JITCall.cpp
https://bugs.webkit.org/show_bug.cgi?id=226643
<rdar://problem/79197261>

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-06-12
Reviewed by Darin Adler.

This is a false-positive, so suppress it using
IGNORE_ERRONEOUS_GCC_NULL_CHECK_WARNINGS_BEGIN.

  • jit/JITCall.cpp:

(JSC::JIT::compileOpCall):

2:45 PM Changeset in webkit [278815] by Wenson Hsieh
  • 5 edits in trunk/Source

Number pad button is missing its image when tapping on <input type=tel> in watchOS 8
https://bugs.webkit.org/show_bug.cgi?id=226955

Reviewed by Darin Adler.

Source/WebKit:

After some recent PepperUICore changes, the Quickboard button for presenting the number pad when focusing a
telephone input on watchOS 8 is missing its icon image. To fix this, stop using deprecated SPI for creating
the list tray button, and instead use +[PUICQuickboardListTrayButton buttonWithType:] and -setAction: to
create and set up the button.

  • Platform/spi/watchos/PepperUICoreSPI.h:
  • UIProcess/ios/forms/WKTextInputListViewController.mm:

(-[WKTextInputListViewController additionalTrayButtons]):

Source/WTF:

Add compile-time flags to guard the presence of PUICQuickboardController and PUICButtonTypePill.

  • wtf/PlatformHave.h:
1:16 PM Changeset in webkit [278814] by Devin Rousso
  • 3 edits in trunk/LayoutTests

(r278618) media/modern-media-controls/overflow-support/chapters.html is timing out since introduction
https://bugs.webkit.org/show_bug.cgi?id=226828
<rdar://problem/79084756>

Unreviewed followup for flaky test.

  • media/modern-media-controls/overflow-support/chapters.html:
  • media/modern-media-controls/overflow-support/chapters-expected.txt:

It may take a moment for the currentTime to updating after selecting a chapter.

11:26 AM Changeset in webkit [278813] by Russell Epstein
  • 1 copy in tags/Safari-612.1.17.10.5

Tag Safari-612.1.17.10.5.

11:23 AM Changeset in webkit [278812] by Russell Epstein
  • 8 edits in branches/safari-612.1.17.10-branch/Source

Versioning.

WebKit-7612.1.17.10.5

10:37 AM Changeset in webkit [278811] by Peng Liu
  • 2 edits in trunk/Source/WebKit

REGRESSION (r278374): [Big Sur] ASSERTION FAILED: !isInRoutingArbitrationForToken(token) in WebCore::SharedRoutingArbitrator::beginRoutingArbitrationForToken()
https://bugs.webkit.org/show_bug.cgi?id=226787

Reviewed by Eric Carlson.

A WebContent process will resume a video element playback after the GPU process crashes
and restarts. During that process, the WebContent process will set category of the audio
session, and the UI process will be asked to begin routing arbitration with the new
category. However, the SharedRoutingArbitrator at the UI process will have stale
routing arbitrator tokens, which lead to the assertion failure.

To fix this issue, this patch cleans up the SharedRoutingArbitrator when the GPU
process crashes.

No new tests. Fix an API test:

  • TestWebKitAPI.GPUProcess.CrashWhilePlayingVideo
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::gpuProcessExited):

10:17 AM Changeset in webkit [278810] by rmorisset@apple.com
  • 12 edits in trunk/Source/JavaScriptCore

We should drop B3 values while running Air
https://bugs.webkit.org/show_bug.cgi?id=226187

Reviewed by Saam Barati.

NB: this patch first landed as r278371, then was reverted in r278587 as it broke --dumpDisassembly().
I fixed the bug (a missing line setDisassembler()) and am now re-landing it. Below is a copy of the original Changelog.

We must keep the following values:

  • WasmBoundsCheck, to know whether it is Pinned or Maximum, and if it is pinned find its argument.
  • CCall/Patch/Check/CheckAdd/CheckSub/CheckMul and all of their children, because all of these are lowered to Air::Patchpoint, which needs to know the type of its arguments, and does so by looking at the children of its origin.

I intend to fix these in later patches if possible.

Finally we must preserve all B3 values in the following cases:

  • if we dump the disassembly or the Air graph: because otherwise we cannot print the origins
  • if we are using the sampling profiler, because it relies on PCToCodeOriginMap which we cannot accurately fill without these origins.

We must also keep m_tuples alive, as it is used by Patchpoints in Air to understand the types of their arguments.
We also don't touch StackSlots (in this patch), because one of them is captured by FTL::State.

Also now PCToOriginMap has a Vector with no inline capacity, since it is either quite large (if needed) or empty (otherwise).

The performance impact of this is a progression on various RAMification subtests on Mac, but is more mitigated on iPhone7, with various regressions.
I suspect these to be noise, and will monitor the performance bots post-landing to make sure of it.

  • b3/B3LowerToAir.cpp:

(JSC::B3::lowerToAir):

  • b3/B3Procedure.cpp:

(JSC::B3::Procedure::freeUnneededB3ValuesAfterLowering):

  • b3/B3Procedure.h:

(JSC::B3::Procedure::releasePCToOriginMap):
(JSC::B3::Procedure::setNeedsPCToOriginMap):
(JSC::B3::Procedure::needsPCToOriginMap):

  • b3/B3SparseCollection.h:

(JSC::B3::SparseCollection::clearAll):
(JSC::B3::SparseCollection::filterAndTransfer):

  • b3/air/AirCode.cpp:

(JSC::B3::Air::Code::Code):

  • b3/air/AirCode.h:

(JSC::B3::Air::Code::shouldPreserveB3Origins const):

  • b3/air/AirGenerate.cpp:

(JSC::B3::Air::generateWithAlreadyAllocatedRegisters):

  • ftl/FTLCompile.cpp:

(JSC::FTL::compile):

  • ftl/FTLState.cpp:

(JSC::FTL::State::State):

12:26 AM Changeset in webkit [278809] by Russell Epstein
  • 1 copy in tags/Safari-612.1.17.10.4

Tag Safari-612.1.17.10.4.

12:22 AM Changeset in webkit [278808] by Russell Epstein
  • 8 edits in branches/safari-612.1.17.10-branch/Source

Versioning.

WebKit-7612.1.17.10.4

Note: See TracTimeline for information about the timeline view.