Timeline



May 12, 2021:

11:45 PM Changeset in webkit [277425] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

RELEASE_ASSERT(m_selection->isNone()) fails in Document::removedLastRef
https://bugs.webkit.org/show_bug.cgi?id=225434

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

Document::removedLastRef asserts that the document's selection is not set. However, setting
that selection is possible in FrameSelection::setSelectionWithoutUpdatingAppearance when the
document has not been destroyed yet but is already detached from its frame. This patch
instead clears the selection in that case.

No new tests.

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance): Clears the selection when
newSelection is in a detached document. Given the other conditions, this is actually
checking equivalent to !m_document->frame().

10:37 PM Changeset in webkit [277424] by Peng Liu
  • 6 edits in trunk/Source/WebCore

[iPad] SourceBufferPrivateAVFObjC should not report an error to the web page when the video playback is interrupted
https://bugs.webkit.org/show_bug.cgi?id=225620

Reviewed by Jer Noble.

If SourceBufferPrivateAVFObjC reports an error to a web page when
AVSampleBufferDisplayLayer reports AVErrorOperationInterrupted (the playback
was interrupted), the web page will likely destroy the video player (and teardown
the video element). That behavior will lead to an empty picture-in-picture window
if the video was playing in picture-in-picture.

With this patch, SourceBufferPrivateAVFObjC will not report an error to the
web page in case of playback interruption. Instead, it takes a note that
the playback was interrupted, so that when we try to resume the playback later,
it will flush the AVSampleBufferDisplayLayer to recover the playback state.

In addition, we need to enqueue an IDR frame first before we enqueue more
samples after flushing the AVSampleBufferDisplayLayer. That is guaranteed
by SourceBufferPrivate::reenqueSamples().

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal):

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

(WebCore::MediaSourcePrivateAVFObjC::flushActiveSourceBuffersIfNeeded):

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

(WebCore::SourceBufferPrivateAVFObjC::flushIfNeeded):
(WebCore::SourceBufferPrivateAVFObjC::layerDidReceiveError):
(WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples):

10:36 PM Changeset in webkit [277423] by Russell Epstein
  • 8 edits in branches/safari-612.1.12-branch/Source

Versioning.

WebKit-7612.1.12.7

10:05 PM Changeset in webkit [277422] by Russell Epstein
  • 1 copy in tags/Safari-612.1.12.6

Tag Safari-612.1.12.6.

10:03 PM Changeset in webkit [277421] by Simon Fraser
  • 1 edit in trunk/Tools/ChangeLog

Update the MotionMark 1.1 plan file

Unreviewed.

Update MotionMark 1.1 to use the version from r277406, which removes the
Focus subtest.

  • Scripts/webkitpy/benchmark_runner/data/plans/motionmark1.1.plan:
10:02 PM Changeset in webkit [277420] by Chris Dumez
  • 19 edits
    2 adds
    2 deletes in trunk

Notification.requestPermission() should return a Promise
https://bugs.webkit.org/show_bug.cgi?id=225712

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Drop manual test that should not have been imported from WPT. The test happened to be using Notification.requestPermission()
internally.

  • web-platform-tests/service-workers/service-worker/fetch-event-within-sw-manual.https-expected.txt: Removed.
  • web-platform-tests/service-workers/service-worker/fetch-event-within-sw-manual.https.html: Removed.

Source/WebCore:

Notification.requestPermission() should return a Promise as per the specification:

Both Firefox and Chrome already support this.

Test: http/tests/notifications/request-with-promise.html

  • Modules/notifications/Notification.cpp:

(WebCore::Notification::requestPermission):

  • Modules/notifications/Notification.h:
  • Modules/notifications/Notification.idl:
  • Modules/notifications/NotificationClient.h:

Source/WebKit:

Update code now that WebCore passes a CompletionHandler instead of a
NotificationPermissionCallback.

  • WebProcess/Notifications/NotificationPermissionRequestManager.cpp:

(WebKit::NotificationPermissionRequestManager::~NotificationPermissionRequestManager):
(WebKit::NotificationPermissionRequestManager::startRequest):

  • WebProcess/Notifications/NotificationPermissionRequestManager.h:
  • WebProcess/WebCoreSupport/WebNotificationClient.cpp:

(WebKit::WebNotificationClient::requestPermission):

  • WebProcess/WebCoreSupport/WebNotificationClient.h:

Source/WebKitLegacy/mac:

Update code now that WebCore passes a CompletionHandler instead of a
NotificationPermissionCallback.

  • WebCoreSupport/WebNotificationClient.h:
  • WebCoreSupport/WebNotificationClient.mm:

(WebNotificationClient::requestPermission):
(-[WebNotificationPolicyListener initWithCompletionHandler:]):
(-[WebNotificationPolicyListener allow]):
(-[WebNotificationPolicyListener deny]):

Source/WebKitLegacy/win:

Update code now that WebCore passes a CompletionHandler instead of a
NotificationPermissionCallback.

  • WebCoreSupport/WebDesktopNotificationsDelegate.cpp:

(WebDesktopNotificationsDelegate::requestPermission):

  • WebCoreSupport/WebDesktopNotificationsDelegate.h:

LayoutTests:

  • http/tests/notifications/notification-in-non-secure-context-expected.txt:

Rebaseline test now that we log an error message in the JS console when trying to call
Notification.requestPermission() in a non-secure context.

  • http/tests/notifications/request-with-promise-expected.txt: Added.
  • http/tests/notifications/request-with-promise.html: Added.

Add layout test coverage.

8:46 PM Changeset in webkit [277419] by Diego Pino Garcia
  • 2 edits
    3 adds in trunk/LayoutTests

[GLIB] http/tests/security/contentSecurityPolicy/report-only-from-header.py is a flaky text failure

Unreviewed test gardening.

Sometimes there's an extra console log error message. Dump all JS console output and emit new baseline.

  • platform/glib/TestExpectations:
  • platform/glib/http/tests/security/contentSecurityPolicy/report-only-from-header-expected.txt: Added.
7:59 PM Changeset in webkit [277418] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

Some webgl/2.0.0/conformance/textures/image_bitmap_from_image_data tests are failing after r277369 if !USE(ACCELERATE)
https://bugs.webkit.org/show_bug.cgi?id=225725

Reviewed by Sam Weinig.

  • platform/graphics/PixelBufferConversion.cpp:

(WebCore::convertImagePixels): Fixed the wrong condition of destination.alphaFormat.

7:35 PM Changeset in webkit [277417] by Fujii Hironori
  • 2 edits in trunk/Source/WebKit

[WinCairo] Failed to open WebInspector UI since r277231
https://bugs.webkit.org/show_bug.cgi?id=225715

Reviewed by Don Olmstead.

Windows WebKit2 failed to open WebInspector UI after r277231
changed Filesystem::pathByAppendingComponent.
"inspector-resource:///Main.html" was wrongly mapped to
"C:
Main.html".

requestURL.fileSystemPath() returns "\Main.html". The preceding
"\" should be removed before concatenating it with the bundle path
by using FileSystem::pathByAppendingComponent.

  • UIProcess/Inspector/win/InspectorResourceURLSchemeHandler.cpp:

(WebKit::InspectorResourceURLSchemeHandler::platformStartTask): Removed the preceding "\".

6:13 PM Changeset in webkit [277416] by Brent Fulgham
  • 9 edits in trunk/Source/WebKit

[Cocoa] Permit sysctl-read operations needed by Metal and other system frameworks
https://bugs.webkit.org/show_bug.cgi?id=225720
<rdar://problem/77438105>

Reviewed by Per Arne Vollan.

Further testing of iOS and macOS have revealed a handful of sysctl-read operations we should allow to improve
performance and correctness of OpenGL/Metal and other high-performance math routines.

  • 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:
  • WebAuthnProcess/mac/com.apple.WebKit.WebAuthnProcess.sb.in:
  • WebProcess/com.apple.WebProcess.sb.in:
5:36 PM Changeset in webkit [277415] by Kyle Piddington
  • 2 edits in trunk/Source/ThirdParty/ANGLE

[Angle METAL] Remove thread qualifiers and pass-by-reference qualifiers for cast functions
https://bugs.webkit.org/show_bug.cgi?id=225702
<rdar://76799461>

Cast functions fail to compile when casting from user uniforms. Update cast functions to remove pass-by-reference
qualifiers.

Reviewed by Dean Jackson.

  • src/compiler/translator/TranslatorMetalDirect/ProgramPrelude.cpp:
5:31 PM Changeset in webkit [277414] by Chris Dumez
  • 19 edits
    2 deletes in trunk/Source/WebKit

Simplify / Modernize Notification permission implementation
https://bugs.webkit.org/show_bug.cgi?id=225711

Reviewed by Alex Christensen.

Simplify / Modernize Notification permission implementation. The main change was
adopting sendWithAsyncReply() for the IPC instead of using 2 separate IPC messages
for the request and the decision. As a result, we don't have to deal with request
identifiers.

No new tests, no behavior change and covered by existing API tests.

  • Sources.txt:
  • UIProcess/API/APIUIClient.h:

(API::UIClient::decidePolicyForNotificationPermissionRequest):

  • UIProcess/API/C/WKNotificationPermissionRequest.cpp:

(WKNotificationPermissionRequestAllow):
(WKNotificationPermissionRequestDeny):

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetPageUIClient):

  • UIProcess/API/glib/WebKitNotificationPermissionRequest.cpp:

(webkitNotificationPermissionRequestAllow):
(webkitNotificationPermissionRequestDeny):

  • UIProcess/API/glib/WebKitUIClient.cpp:
  • UIProcess/Cocoa/UIDelegate.h:
  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::UIClient::decidePolicyForNotificationPermissionRequest):

  • UIProcess/Notifications/NotificationPermissionRequest.h:

(WebKit::NotificationPermissionRequest::create):
(WebKit::NotificationPermissionRequest::~NotificationPermissionRequest):
(WebKit::NotificationPermissionRequest::didReceiveDecision):
(WebKit::NotificationPermissionRequest::NotificationPermissionRequest):

  • UIProcess/Notifications/NotificationPermissionRequestManagerProxy.cpp: Removed.
  • UIProcess/Notifications/NotificationPermissionRequestManagerProxy.h: Removed.
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::resetState):
(WebKit::WebPageProxy::requestNotificationPermission):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Notifications/NotificationPermissionRequestManager.cpp:

(WebKit::NotificationPermissionRequestManager::startRequest):

  • WebProcess/Notifications/NotificationPermissionRequestManager.h:
  • WebProcess/WebPage/WebPage.cpp:
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
5:21 PM Changeset in webkit [277413] by commit-queue@webkit.org
  • 9 edits in trunk/Source/WebKit

[WebXR] Implement XRDeviceProxy::submitFrame
https://bugs.webkit.org/show_bug.cgi?id=225718

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

  • Shared/Cocoa/XRDeviceProxy.h:
  • Shared/Cocoa/XRDeviceProxy.mm:

(WebKit::XRDeviceProxy::submitFrame):

  • UIProcess/Cocoa/PlatformXRCoordinator.h:

(WebKit::PlatformXRCoordinator::submitFrame):

  • UIProcess/Cocoa/PlatformXRSystem.h:
  • UIProcess/Cocoa/PlatformXRSystem.messages.in:
  • UIProcess/Cocoa/PlatformXRSystem.mm:

(WebKit::PlatformXRSystem::submitFrame):

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

(WebKit::PlatformXRSystemProxy::submitFrame):

5:17 PM Changeset in webkit [277412] by Amir Mark Jr.
  • 2 edits in trunk/LayoutTests

[BigSur Wk1 Release] imported/w3c/web-platform-tests/css/css-will-change/will-change-fixpos-cb-transform-1.html is a flaky image failure
https://bugs.webkit.org/show_bug.cgi?id=225704

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
5:09 PM Changeset in webkit [277411] by Chris Dumez
  • 5 edits
    3 adds in trunk

ASSERTION FAILED: actualVTablePointer == expectedVTablePointer in toJSNewlyCreated(JSC::JSGlobalObject *, WebCore::JSDOMGlobalObject *, Ref<WebCore::AudioNode> &&)
https://bugs.webkit.org/show_bug.cgi?id=225719
<rdar://77828031>

Reviewed by Geoffrey Garen.

Source/WebCore:

AudioNode has (a lot of) subclasses that are exposed to JS (for which we call toJS() for).
As a result, AudioNode needs a custom toJS() implementation which returns the correct subclass
wrapper, instead of a generic JSAudioNode.

Test: webaudio/event-relatedTarget-audionode.html

  • Modules/webaudio/AudioNode.idl:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSAudioNodeCustom.cpp: Added.

(WebCore::toJSNewlyCreated):
(WebCore::toJS):

LayoutTests:

Add layout test coverage. This test was reliably crashing before the fix.

  • webaudio/event-relatedTarget-audionode-expected.txt: Added.
  • webaudio/event-relatedTarget-audionode.html: Added.
5:03 PM Changeset in webkit [277410] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ BigSur Release wk2 arm64 ] http/tests/appcache/fail-on-update-2.html (layout-test) is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=225665

Unreviewed test gardening.

Updating expectations to (DumpJSConsoleLogInStdErr Slow ) to stop the constant text failures, and improve the flaky timeouts.

  • platform/mac-wk2/TestExpectations:
4:27 PM Changeset in webkit [277409] by mmaxfield@apple.com
  • 2 edits in trunk/Websites/browserbench.org

[MotionMark] Apply r277406 to Websites/browserbench.org/MotionMark1.2
https://bugs.webkit.org/show_bug.cgi?id=225722

Rubber-stamped by Geoffrey Garen.

Just copy over the change, so the website gets updated.

This doesn't bump the version number, which is okay, because we never actually
"released" version 1.2; we just made a folder on a website, and didn't update any
links to point to it.

  • MotionMark1.2/resources/runner/tests.js:
4:24 PM Changeset in webkit [277408] by Chris Gambrell
  • 2 edits
    7 adds
    5 deletes in trunk/LayoutTests

[LayoutTests] http/tests/misc/last-modified-parsing.html handles non-standard dates differently in PHP than Python
https://bugs.webkit.org/show_bug.cgi?id=224933
<rdar://problem/77020039>

Reviewed by Jonathan Bedard.

  • http/tests/misc/last-modified-parsing-expected.txt: Removed.
  • http/tests/misc/last-modified-parsing.html: Removed.
  • http/tests/misc/no-last-modified-expected.txt: Removed.
  • http/tests/misc/no-last-modified.html: Removed.
  • http/tests/resources/last-modified.php: Removed.
  • http/wpt/misc: Added.
  • http/wpt/misc/last-modified-parsing-expected.txt: Added.
  • http/wpt/misc/last-modified-parsing.html: Added.
  • http/wpt/misc/no-last-modified-expected.txt: Added.
  • http/wpt/misc/no-last-modified.html: Added.
  • http/wpt/misc/resources: Added.
  • http/wpt/misc/resources/last-modified-utilities.js: Added.

(async getLastModified):

  • platform/win/TestExpectations:
4:22 PM Changeset in webkit [277407] by mmaxfield@apple.com
  • 2 edits in trunk/Tools

[MotionMark] Update plan file after r277406
https://bugs.webkit.org/show_bug.cgi?id=225721

Rubber-stamped by Geoffrey Garen.

Just update the plan.

  • Scripts/webkitpy/benchmark_runner/data/plans/motionmark1.1.plan:
4:18 PM Changeset in webkit [277406] by mmaxfield@apple.com
  • 2 edits in trunk/PerformanceTests

[MotionMark] Temporarily remove the focus test
https://bugs.webkit.org/show_bug.cgi?id=225714

Reviewed by Geoffrey Garen.

The focus test is causing unacceptably high variance on test results. Initial investigation
indicates that this is related to secondary and tertiary interactions between the browser's
runloop and the compositor's runloop. Not only that, but the variable cost of the focus test
seems to affect the variance on the subtests which run after it.

This patch temporarily removes the focus test, just so we can get a stronger signal of
browsers' true performance, while we do a deeper analysis of the focus test.

Because the focus test's score is lower than the average score of the subtests, removing it
causes scores in all browsers to increase:

| WebKit | Chrome | Firefox

================================================
Score with Focus | 1020 | 550 | 962
Score without Focus | 1623 | 874 | 1101
Stddev with Focus | 9.3% | 2.3% | 2.9%
Stddev without Focus | 0.7% | 0.5% | 7.9%

  • MotionMark/resources/runner/tests.js:
4:16 PM Changeset in webkit [277405] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ Catalina+ wk2 ] http/tests/webAPIStatistics/screen-functions-accessed-data-collection.html (layout-test) is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=225667

Unreviewed test gardening.

Updating expectation to Slow to see if test conditions improve.

  • platform/mac/TestExpectations:
4:16 PM Changeset in webkit [277404] by Russell Epstein
  • 1 copy in tags/Safari-611.3.2.1.1

Tag Safari-611.3.2.1.1.

4:01 PM Changeset in webkit [277403] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ BigSur ] webaudio/AudioContext/audiocontext-close-basic.html (layout-test) is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=225670

Unreviewed test gardening.

Updating expectations to slow to see if test will pass.

  • platform/mac/TestExpectations:
4:01 PM Changeset in webkit [277402] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-611.3.2.1-branch

Cherry-pick r277373. rdar://problem/77916543

Source/WebCore:
REGRESSION: Release assert in SlotAssignment::assignedNodesForSlot via ComposedTreeIterator::traverseNextInShadowTree
in Element::insertedIntoAncestor
https://bugs.webkit.org/show_bug.cgi?id=225684

Reviewed by Darin Adler.

The release assertion failure was caused by RenderTreeUpdater::tearDownRenderers end up traversing the parts of the DOM
for which Element::insertedIntoAncestor had not been called yet. Since HTMLSlotElement::insertedIntoAncestor is where
SlotAssignment::Slot is updated for a newly inserted slot, SlotAssignment::Slot may not contain this slot element.

Fixed the bug by returning early in SlotAssignment::assignedNodesForSlot when this condition holds, which is when
the shadow root is connected to a document but HTMLSlotElement isn't since its connected flag has not been updated yet.

Test: fast/shadow-dom/insert-host-child-with-slot-renderer-teardown-crash.html

  • dom/SlotAssignment.cpp: (WebCore::SlotAssignment::assignedNodesForSlot):

LayoutTests:
REGRESSION: Release assert in SlotAssignment::assignedNodesForSlot via ComposedTreeIterator::traverseNextInShadowTree in Element::insertedIntoAncestor
https://bugs.webkit.org/show_bug.cgi?id=225684

Reviewed by Darin Adler.

Added a regression test.

  • fast/shadow-dom/insert-host-child-with-slot-renderer-teardown-crash-expected.txt: Added.
  • fast/shadow-dom/insert-host-child-with-slot-renderer-teardown-crash.html: Added.

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

3:59 PM Changeset in webkit [277401] by Russell Epstein
  • 8 edits in branches/safari-611.3.2.1-branch/Source

Versioning.

WebKit-7611.3.2.1.1

3:59 PM Changeset in webkit [277400] by Brent Fulgham
  • 9 edits in trunk/Source/WebKit

[Cocoa] Silence uninteresting sandbox reports
https://bugs.webkit.org/show_bug.cgi?id=225713
<rdar://problem/77483132>

Reviewed by Per Arne Vollan.

Telemetry from the recently released iOS and macOS updates show a set of uninteresting sandbox violations. Most of
these are harmless, but all of them involve some runtime cost and may prevent code from making the best use of
available hardware and should be permitted.

These changes also bring the various sandboxes into better alignment, as many of these items had previously been
added to one of the other sandboxes.

  • 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:
  • WebAuthnProcess/mac/com.apple.WebKit.WebAuthnProcess.sb.in:
  • WebProcess/com.apple.WebProcess.sb.in:
3:56 PM Changeset in webkit [277399] by Russell Epstein
  • 1 copy in tags/Safari-611.3.3

Tag Safari-611.3.3.

3:53 PM Changeset in webkit [277398] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ BigSur wk2 arm64 ] editing/selection/move-by-character-brute-force.html (layout-test) is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=225664

Unreviewed test gardening.

Updating test expectations to slow.

  • platform/mac-wk2/TestExpectations:
3:46 PM Changeset in webkit [277397] by Russell Epstein
  • 1 copy in branches/safari-611.3.2.1-branch

New branch.

3:40 PM Changeset in webkit [277396] by Russell Epstein
  • 1 copy in tags/Safari-612.1.14

Tag Safari-612.1.14.

3:07 PM Changeset in webkit [277395] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[build.webkit.org] Bots should automatically recover from svn checkout is already locked issue
https://bugs.webkit.org/show_bug.cgi?id=225717

Reviewed by Jonathan Bedard.

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

(CheckOutSource): Set haltOnFailure to False so that cleanup step can run. Also set the step name while we are at it.
(CheckOutSource.init): Also set logEnviron to False.
(CheckOutSource.getResultSummary): Run SVNCleanup step in case of failure.
(SVNCleanup):
(SVNCleanup.init):
(SVNCleanup.evaluateCommand):

  • CISupport/build-webkit-org/steps_unittest.py: Added unit-tests for the new step.
3:02 PM Changeset in webkit [277394] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ Catalina+ wk2 ] imported/w3c/web-platform-tests/css/css-transitions/transition-base-response-002.html (layout-test) is a flaky text failure
https://bugs.webkit.org/show_bug.cgi?id=225669

Unreviewed test gardening.

Updating expectations to Pass Failure for macOS Release and Debug.

  • platform/mac-wk2/TestExpectations:
2:57 PM Changeset in webkit [277393] by Chris Dumez
  • 2 edits in trunk/Tools

Unreviewed follow-up to r277376.

Enable the API tests only if ENABLE(NOTIFICATIONS). It is important since
notifications are enabled on macOS but not iOS currently.

  • TestWebKitAPI/Tests/WebKitCocoa/NotificationAPI.mm:
2:56 PM Changeset in webkit [277392] by sihui_liu@apple.com
  • 4 edits in trunk/Tools

[ BigSur Release ] TestWebKitAPI.IndexedDB.KillWebProcessWithOpenConnection is a constant failure
https://bugs.webkit.org/show_bug.cgi?id=225372
<rdar://problem/77532291>

Reviewed by Chris Dumez.

Ensure IDB data is cleared before test and make error logging more detailed.

  • TestWebKitAPI/Tests/WebKitCocoa/KillWebProcessWithOpenConnection-1.html:
  • TestWebKitAPI/Tests/WebKitCocoa/KillWebProcessWithOpenConnection-2.html:
  • TestWebKitAPI/Tests/WebKitCocoa/WebProcessKillIDBCleanup.mm: Listen to version change event because it

indicates that server starts handling second open request in KillWebProcessWithOpenConnection-2.html.
(-[IndexedDBWebProcessKillMessageHandler userContentController:didReceiveScriptMessage:]):
(getNextMessage):
(TEST):

2:43 PM Changeset in webkit [277391] by commit-queue@webkit.org
  • 9 edits in trunk

Wrong position for orthogonal positioned element with writing-mode: vertical-rl
https://bugs.webkit.org/show_bug.cgi?id=180633

Patch by Ziran Sun <Ziran Sun> on 2021-05-12
Reviewed by Javier Fernandez.

LayoutTests/imported/w3c:

Re-sync the following 3 tests with WPT. grid-self-alignment-non-static-positioned-items-009.html and
grid-self-alignment-non-static-positioned-items-010.html are now passing.
grid-self-alignment-non-static-positioned-items-011.html is now producing the same test results as those
in Chromium.

  • web-platform-tests/css/css-grid/alignment/grid-self-alignment-non-static-positioned-items-009.html:
  • web-platform-tests/css/css-grid/alignment/grid-self-alignment-non-static-positioned-items-010.html:
  • web-platform-tests/css/css-grid/alignment/grid-self-alignment-non-static-positioned-items-011.html:

Source/WebCore:

When calculating offset position for orthogonal positioned element with writing mode vertical-rl,
we also need to take into account of borders and paddings. This change corrects computations
for both topOffset and leftOffset.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computePositionedLogicalWidthUsing const):
(WebCore::RenderBox::computePositionedLogicalHeightUsing const):

2:19 PM Changeset in webkit [277390] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

TapStorage::lock freed while locked in AudioSourceProviderAVFObjC::destroyMixIfNeeded()
https://bugs.webkit.org/show_bug.cgi?id=225706
<rdar://77719381>

Reviewed by Ryosuke Niwa.

In r275933, an update was made to protect access to TapStorage during destruction by
locking its lock inside destroyMixIfNeeded(), but if TapStorage has a refCount==1
during that teardown, the lock itself is destroyed while it is still held. Add an
explicit scoping to the lock holder, and only deref the TapStorage outside that
locking scope.

  • platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:

(WebCore::AudioSourceProviderAVFObjC::destroyMixIfNeeded):

2:08 PM Changeset in webkit [277389] by Wenson Hsieh
  • 6 edits in trunk/Source/WebKit

Plumb some more metadata to QuickLook when revealing images
https://bugs.webkit.org/show_bug.cgi?id=225709
rdar://77864866

Reviewed by Devin Rousso.

Add plumbing to supply QuickLook with some additional information about the image URL and current page URL when
revealing images.

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::handleContextMenuRevealImage):

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

(-[WKActionSheetAssistant handleElementActionWithType:element:needsInteraction:]):

  • UIProcess/mac/WKImageExtractionPreviewController.h:
  • UIProcess/mac/WKImageExtractionPreviewController.mm:

(-[WKImageExtractionPreviewItem initWithFileURL:title:imageURL:pageURL:]):
(-[WKImageExtractionPreviewItem dealloc]):
(-[WKImageExtractionPreviewItem previewItemURL]):
(-[WKImageExtractionPreviewItem previewOptions]):
(-[WKImageExtractionPreviewController initWithPage:fileURL:title:imageURL:]):

Rename the URL argument to fileURL, to avoid confusion with the new imageURL that's passed in. Note that
this is temporary, since we'll adopt new QuickLook SPI on macOS once the fix for rdar://74299451 is available.

(-[WKImageExtractionPreviewItem initWithURL:title:]): Deleted.
(-[WKImageExtractionPreviewController initWithPage:url:title:]): Deleted.

2:06 PM Changeset in webkit [277388] by ggaren@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

ConservativeRoots triggers page demand on Speedometer
https://bugs.webkit.org/show_bug.cgi?id=225676

Reviewed by Filip Pizlo.

Use a 2048 item / 16kB inline buffer. That's about 10% bigger than the
max capacity observed on Speedometer, and small enough to reasonably fit
on the stack.

Removed the separate out of line capacity because it was smaller than
the new inline capacity.

  • heap/ConservativeRoots.cpp:

(JSC::ConservativeRoots::grow):

  • heap/ConservativeRoots.h:
1:40 PM Changeset in webkit [277387] by Jonathan Bedard
  • 2 edits in trunk/Tools

[TestWebKitAPI] Explicitly exit after completing tests
https://bugs.webkit.org/show_bug.cgi?id=225703
<rdar://problem/77673980>

Reviewed by Alexey Proskuryakov.

  • TestWebKitAPI/ios/mainIOS.mm:

(main): Explicitly exit the testing process.

1:40 PM Changeset in webkit [277386] by Aditya Keerthi
  • 2 edits in trunk/Source/WebKit

REGRESSION (r275297): Unexpected autofocus when switching tabs
https://bugs.webkit.org/show_bug.cgi?id=225710
<rdar://problem/77542939>

Reviewed by Wenson Hsieh.

r275297 introduced logic to handle a focus environment change by
advancing to the next or previous focusable element, depending on the
focus context's heading direction. This logic enables a tab or a
shift+tab to change the focus from browser chrome directly to an
element on a web page.

However, the focus environment can change through mechanisms other than
tab / shift+tab. One example of this is when a user switches tabs. In
these cases, the UIFocusHeading supplied by the focus context is
UIFocusHeadingNone. Nevertheless, we unconditionally call
-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]
when the focus context changes. Consequently, an element on the web page
is always focused when the WKContentView gains focus.

  • UIProcess/ios/WKContentView.mm:

(-[WKContentView didUpdateFocusInContext:withAnimationCoordinator:]):

To fix, ensure we only focus an element on the page if the focus heading
is UIFocusHeadingNext or UIFocusHeadingPrevious. UIFocusHeadingNext will
focus the first focusable element, while UIFocusHeadingPrevious will focus
the last focusable element.

Note that a call to -[WKContentView becomeFirstResponder] is not made
if the focus heading is UIFocusHeadingNone. From my testing, I observed
that the view already was the first responder in that case.

1:13 PM Changeset in webkit [277385] by Said Abou-Hallawa
  • 3 edits
    2 adds in trunk

Removing the transform CSS property from the SVG element does not cause invalidation
https://bugs.webkit.org/show_bug.cgi?id=225366

Reviewed by Simon Fraser.

Source/WebCore:

If the new or the old RenderStyle includes a transform, the renderer of
the SVG element needs to be repainted.

Test: svg/css/svg-css-transform-dynamic-remove.html

  • rendering/svg/RenderSVGModelObject.cpp:

(WebCore::RenderSVGModelObject::styleDidChange):

LayoutTests:

  • svg/css/svg-css-transform-dynamic-remove-expected.html: Added.
  • svg/css/svg-css-transform-dynamic-remove.html: Added.
1:11 PM Changeset in webkit [277384] by weinig@apple.com
  • 2 edits in trunk/Source/WebCore

Remove inline annoatations for static functions in PixelBufferConversion
https://bugs.webkit.org/show_bug.cgi?id=225708

Reviewed by Darin Adler.

Remove inline annoatations for static functions in PixelBufferConversion
as suggested by Darin. The theory here is that outside of a header, the
use of 'inline' serves no purpose as the compiler is perfectly allowed
and capable of inlining these functions.

  • platform/graphics/PixelBufferConversion.cpp:

(WebCore::makeVImageBuffer):
(WebCore::convertImagePixelsAccelerated):
(WebCore::convertSinglePixelPremultipliedToPremultiplied):
(WebCore::convertSinglePixelPremultipliedToUnpremultiplied):
(WebCore::convertSinglePixelUnpremultipliedToPremultiplied):
(WebCore::convertSinglePixelUnpremultipliedToUnpremultiplied):
(WebCore::convertFunctor):

12:11 PM Changeset in webkit [277383] by mark.lam@apple.com
  • 21 edits
    2 adds in trunk/Source

Implement some common Baseline JIT slow paths using JIT thunks.
https://bugs.webkit.org/show_bug.cgi?id=225682

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

This patch implements the following changes:

  1. Implement exception handling thunks:
    1. handleExceptionGenerator, which calls operationLookupExceptionHandler().
    2. handleExceptionWithCallFrameRollbackGenerator, which calls operationLookupExceptionHandlerFromCallerFrame().

All the JIT tiers were emitting their own copy of these routines to call these
operation, one per CodeBlock. We now emit 2 thunks for these and have all the
tiers just jump to them.

PolymorphicAccess also now uses the handleExceptionGenerator thunk.

DFG::JITCompiler::compileExceptionHandlers() has one small behavior difference
before it calls operationLookupExceptionHandlerFromCallerFrame(): it first
re-sets the top of stack for the function where we are about to throw a
StackOverflowError from. This re-setting of top of stack is useless because
we're imminently unwinding out of at least this frame for the StackOverflowError.
Hence, it is ok to use the handleExceptionWithCallFrameRollbackGenerator thunk
here as well. Note that no other tiers does this re-setting of top of stack.

FTLLowerDFGToB3 has one case using operationLookupExceptionHandlerFromCallerFrame()
which cannot be refactored to use these thunks because it does additional
work to throw a StackOverflowError. A different thunk will be needed. I left
it alone for now.

  1. Introduce JITThunks::existingCTIStub(ThunkGenerator, NoLockingNecessaryTag) so that a thunk can get a pointer to another thunk without locking the JITThunks lock. Otherwise, deadlock ensues.
  1. Change SlowPathCall to emit and use thunks instead of emitting a blob of code to call a slow path function for every bytecode in a CodeBlock.
  1. Introduce JITThunks::ctiSlowPathFunctionStub() to manage these SlowPathFunction thunks.
  1. Introduce JITThunks::preinitializeAggressiveCTIThunks() to initialize these thunks at VM initialization time. Pre-initializing them has multiple benefits:
    1. the thunks are not scattered through out JIT memory, thereby reducing fragmentation.
    2. we don't spend time at runtime compiling them when the user is interacting with the VM. Conceptually, these thunks can be VM independent and can be shared by VMs process-wide. However, it will require some additional work. For now, the thunks remain bound to a specific VM instance.

These changes are only enabled when ENABLE(EXTRA_CTI_THUNKS), which is currently
only available for ARM64 and non-Windows x86_64.

This patch has passed JSC tests on AS Mac.

With this patch, --dumpLinkBufferStats shows the following changes in emitted
JIT code size (using a single run of the CLI version of JetStream2 on AS Mac):

Base New Diff

BaselineJIT: 89089964 (84.962811 MB) 84624776 (80.704475 MB) 0.95x (reduction)

DFG: 39117360 (37.305222 MB) 36415264 (34.728302 MB) 0.93x (reduction)

Thunk: 23230968 (22.154778 MB) 23130336 (22.058807 MB) 1.00x

InlineCache: 22027416 (21.006981 MB) 21969728 (20.951965 MB) 1.00x

FTL: 6575772 (6.271145 MB) 6097336 (5.814873 MB) 0.93x (reduction)

Wasm: 2302724 (2.196049 MB) 2301956 (2.195316 MB) 1.00x

YarrJIT: 1538956 (1.467663 MB) 1522488 (1.451958 MB) 0.99x

CSSJIT: 0 0

Uncategorized: 0 0

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • bytecode/CodeBlock.h:

(JSC::CodeBlock::offsetOfInstructionsRawPointer):

  • bytecode/PolymorphicAccess.cpp:

(JSC::AccessGenerationState::emitExplicitExceptionHandler):

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::compileExceptionHandlers):
(JSC::DFG::JITCompiler::link):

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

(JSC::FTL::compile):

  • ftl/FTLLink.cpp:

(JSC::FTL::link):

  • jit/JIT.cpp:

(JSC::JIT::link):
(JSC::JIT::privateCompileExceptionHandlers):

  • jit/JIT.h:
  • jit/JITThunks.cpp:

(JSC::JITThunks::existingCTIStub):
(JSC::JITThunks::ctiSlowPathFunctionStub):
(JSC::JITThunks::preinitializeExtraCTIThunks):

  • jit/JITThunks.h:
  • jit/SlowPathCall.cpp: Added.

(JSC::JITSlowPathCall::call):
(JSC::JITSlowPathCall::generateThunk):

  • jit/SlowPathCall.h:
  • jit/ThunkGenerators.cpp:

(JSC::handleExceptionGenerator):
(JSC::handleExceptionWithCallFrameRollbackGenerator):
(JSC::popThunkStackPreservesAndHandleExceptionGenerator):

  • jit/ThunkGenerators.h:
  • runtime/CommonSlowPaths.h:
  • runtime/SlowPathFunction.h: Added.
  • runtime/VM.cpp:

(JSC::VM::VM):

Source/WTF:

Introduce ENABLE(EXTRA_CTI_THUNKS) flag to guard the use of these new thunks.
Currently, the thunks are 64-bit only, and only supported for ARM64 and non-Windows
X86_64. The reason it is not supported for Windows as well is because Windows
only has 4 argument registers. In this patch, the thunks do not use that many
registers yet, but there will be more thunks coming that will require the use
of up to 6 argument registers.

  • wtf/PlatformEnable.h:
11:40 AM Changeset in webkit [277382] by achristensen@apple.com
  • 42 edits in trunk/Source/WebCore

Use HashSet<RefPtr<Node>> instead of HashSet<Node*>
https://bugs.webkit.org/show_bug.cgi?id=220464

Reviewed by Chris Dumez and Ryosuke Niwa.

This makes us more resistent to lifetime bugs.

liveNodeSet() and ignoreSet() need to be WeakHashSet, and they are only used in debug builds so that's fine.

MutationObserver::observedNodes() is not called on the main thread, but it's called during garbage collection.
I replaced it with MutationObserver::isReachableFromOpaqueRoots which eliminates the HashSet allocation and hashing,
and it can return true early if it finds a contained opaque root, resulting in less work in several ways.
This should only increase our performance slightly while getting the same behavior.

  • accessibility/AXObjectCache.cpp:

(WebCore::conditionallyAddNodeToFilterList):
(WebCore::filterVectorPairForRemoval):
(WebCore::filterMapForRemoval):
(WebCore::filterListForRemoval):
(WebCore::AXObjectCache::prepareForDocumentDestruction):

  • bindings/js/JSMutationObserverCustom.cpp:

(WebCore::JSMutationObserverOwner::isReachableFromOpaqueRoots):

  • dom/MutationObserver.cpp:

(WebCore::MutationObserver::isReachableFromOpaqueRoots const):
(WebCore:: const): Deleted.

  • dom/MutationObserver.h:
  • dom/MutationObserverRegistration.cpp:

(WebCore::MutationObserverRegistration::isReachableFromOpaqueRoots const):
(WebCore::MutationObserverRegistration::addRegistrationNodesToSet const): Deleted.

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

(WebCore::liveNodeSet):
(WebCore::stringForRareDataUseType):
(WebCore::Node::dumpStatistics):
(WebCore::ignoreSet):
(WebCore::Node::trackForDebugging):
(WebCore::Node::~Node):

  • editing/AppendNodeCommand.cpp:

(WebCore::AppendNodeCommand::getNodesInCommand):

  • editing/AppendNodeCommand.h:
  • editing/CompositeEditCommand.cpp:

(WebCore::EditCommandComposition::getNodesInCommand):

  • editing/CompositeEditCommand.h:
  • editing/DeleteFromTextNodeCommand.cpp:

(WebCore::DeleteFromTextNodeCommand::getNodesInCommand):

  • editing/DeleteFromTextNodeCommand.h:
  • editing/EditCommand.cpp:

(WebCore::SimpleEditCommand::addNodeAndDescendants):

  • editing/EditCommand.h:
  • editing/InsertIntoTextNodeCommand.cpp:

(WebCore::InsertIntoTextNodeCommand::getNodesInCommand):

  • editing/InsertIntoTextNodeCommand.h:
  • editing/InsertNodeBeforeCommand.cpp:

(WebCore::InsertNodeBeforeCommand::getNodesInCommand):

  • editing/InsertNodeBeforeCommand.h:
  • editing/MergeIdenticalElementsCommand.cpp:

(WebCore::MergeIdenticalElementsCommand::getNodesInCommand):

  • editing/MergeIdenticalElementsCommand.h:
  • editing/RemoveNodeCommand.cpp:

(WebCore::RemoveNodeCommand::getNodesInCommand):

  • editing/RemoveNodeCommand.h:
  • editing/ReplaceNodeWithSpanCommand.cpp:

(WebCore::ReplaceNodeWithSpanCommand::getNodesInCommand):

  • editing/ReplaceNodeWithSpanCommand.h:
  • editing/SetNodeAttributeCommand.cpp:

(WebCore::SetNodeAttributeCommand::getNodesInCommand):

  • editing/SetNodeAttributeCommand.h:
  • editing/SetSelectionCommand.h:
  • editing/SpellingCorrectionCommand.cpp:
  • editing/SplitElementCommand.cpp:

(WebCore::SplitElementCommand::getNodesInCommand):

  • editing/SplitElementCommand.h:
  • editing/SplitTextNodeCommand.cpp:

(WebCore::SplitTextNodeCommand::getNodesInCommand):

  • editing/SplitTextNodeCommand.h:
  • editing/WrapContentsInDummySpanCommand.cpp:

(WebCore::WrapContentsInDummySpanCommand::getNodesInCommand):

  • editing/WrapContentsInDummySpanCommand.h:
  • editing/cocoa/HTMLConverter.mm:

(HTMLConverterCaches::cacheAncestorsOfStartToBeConverted):

  • inspector/agents/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::highlightSelector):

  • xml/XPathFunctions.cpp:

(WebCore::XPath::FunId::evaluate const):

  • xml/XPathNodeSet.cpp:

(WebCore::XPath::sortBlock):
(WebCore::XPath::NodeSet::traversalSort const):

  • xml/XPathPath.cpp:

(WebCore::XPath::LocationPath::evaluate const):

  • xml/XPathPredicate.cpp:

(WebCore::XPath::Union::evaluate const):

11:34 AM Changeset in webkit [277381] by commit-queue@webkit.org
  • 5 edits in trunk/Source/JavaScriptCore

Unreviewed, reverting r277346.
https://bugs.webkit.org/show_bug.cgi?id=225705

Introduced a (rare) deadlock

Reverted changeset:

"ConservativeRoots triggers page demand on Speedometer"
https://bugs.webkit.org/show_bug.cgi?id=225676
https://trac.webkit.org/changeset/277346

11:28 AM Changeset in webkit [277380] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Unreviewed follow-up to r277376.

Fix bad early return in NotificationPermissionRequestManager::didReceiveNotificationPermissionDecision().

  • WebProcess/Notifications/NotificationPermissionRequestManager.cpp:

(WebKit::NotificationPermissionRequestManager::didReceiveNotificationPermissionDecision):

11:00 AM Changeset in webkit [277379] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

HTMLMediaElement::mediaLoadingFailedFatally() does direct dispatch of events; should enqueue
https://bugs.webkit.org/show_bug.cgi?id=225700
<rdar://75576322>

Reviewed by Eric Carlson.

In r274559, an update was made to mediaLoadingFailedFatally to adopt recent spec changes, and as
part of that change, an "error" event was changed from being enqueued to being directly dispatched.
However, directly dispatching events exposes the element to JS and has the potential to cause the
element to be garbage collected, deleting the object and potentially other objects in the backtrace.
Events should always be enqueued, rather than directy dispatched, for this reason.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaLoadingFailedFatally):

10:58 AM Changeset in webkit [277378] by svillar@igalia.com
  • 3 edits
    2 adds in trunk

ASSERTION FAILED: m_clients.contains(&client) in CSSFontFace::removeClient via CSSSegmentedFontFace::~CSSSegmentedFontFace()
https://bugs.webkit.org/show_bug.cgi?id=223790

Reviewed by Ryosuke Niwa.

Source/WebCore:

CSSFontFace does not support adding the same client twice as it uses a HashSet to track them. This means that
it's a mistake to call removeClient() more than once. This could happen when specifying the same font
family more than once in a <font-face> element inside a svg container.

Test: fast/css/svg-font-face-duplicate-crash.html

  • css/CSSFontFaceSet.cpp:

(WebCore::CSSFontFaceSet::fontFace): Skip duplicate CSSFontFace's when before calling appendFontFace().

LayoutTests:

  • fast/css/svg-font-face-duplicate-crash-expected.txt: Added.
  • fast/css/svg-font-face-duplicate-crash.html: Added.
10:54 AM Changeset in webkit [277377] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-611-branch

Cherry-pick r277373. rdar://problem/77916543

Source/WebCore:
REGRESSION: Release assert in SlotAssignment::assignedNodesForSlot via ComposedTreeIterator::traverseNextInShadowTree
in Element::insertedIntoAncestor
https://bugs.webkit.org/show_bug.cgi?id=225684

Reviewed by Darin Adler.

The release assertion failure was caused by RenderTreeUpdater::tearDownRenderers end up traversing the parts of the DOM
for which Element::insertedIntoAncestor had not been called yet. Since HTMLSlotElement::insertedIntoAncestor is where
SlotAssignment::Slot is updated for a newly inserted slot, SlotAssignment::Slot may not contain this slot element.

Fixed the bug by returning early in SlotAssignment::assignedNodesForSlot when this condition holds, which is when
the shadow root is connected to a document but HTMLSlotElement isn't since its connected flag has not been updated yet.

Test: fast/shadow-dom/insert-host-child-with-slot-renderer-teardown-crash.html

  • dom/SlotAssignment.cpp: (WebCore::SlotAssignment::assignedNodesForSlot):

LayoutTests:
REGRESSION: Release assert in SlotAssignment::assignedNodesForSlot via ComposedTreeIterator::traverseNextInShadowTree in Element::insertedIntoAncestor
https://bugs.webkit.org/show_bug.cgi?id=225684

Reviewed by Darin Adler.

Added a regression test.

  • fast/shadow-dom/insert-host-child-with-slot-renderer-teardown-crash-expected.txt: Added.
  • fast/shadow-dom/insert-host-child-with-slot-renderer-teardown-crash.html: Added.

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

10:52 AM Changeset in webkit [277376] by Chris Dumez
  • 17 edits
    1 add in trunk

Queue notification permission requests for the same origin on WebKit side
https://bugs.webkit.org/show_bug.cgi?id=225701
<rdar://76804977>

Reviewed by Geoffrey Garen.

Source/WebCore:

Remove some dead code.

  • Modules/notifications/NotificationClient.h:

Source/WebKit:

If there are parallel notification permission requests for the same origin, we now queue them on WebKit
side and only ask the client once for the origin. Once we've received the permission from the client,
we respond to all JS requests at this point.

This patch also removes some dead code to facilitate refactoring the code to support this.
In a follow-up I am planning to use sendWithAsyncReply() and refactor this code further.

  • WebProcess/Notifications/NotificationPermissionRequestManager.cpp:

(WebKit::NotificationPermissionRequestManager::startRequest):
(WebKit::NotificationPermissionRequestManager::permissionLevel):
(WebKit::NotificationPermissionRequestManager::didReceiveNotificationPermissionDecision):

  • WebProcess/Notifications/NotificationPermissionRequestManager.h:
  • WebProcess/Notifications/WebNotificationManager.cpp:

(WebKit::WebNotificationManager::policyForOrigin const):

  • WebProcess/Notifications/WebNotificationManager.h:
  • WebProcess/WebCoreSupport/WebNotificationClient.cpp:

(WebKit::WebNotificationClient::requestPermission):
(WebKit::WebNotificationClient::checkPermission):

  • WebProcess/WebCoreSupport/WebNotificationClient.h:

Source/WebKitLegacy/mac:

Remove some dead code.

  • WebCoreSupport/WebNotificationClient.h:
  • WebCoreSupport/WebNotificationClient.mm:

Source/WebKitLegacy/win:

Remove some dead code.

  • WebCoreSupport/WebDesktopNotificationsDelegate.cpp:
  • WebCoreSupport/WebDesktopNotificationsDelegate.h:

Tools:

Add API test coverage.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/NotificationAPI.mm: Added.

(-[NotificationPermissionMessageHandler userContentController:didReceiveScriptMessage:]):
(-[NotificationPermissionUIDelegate initWithHandler:]):
(-[NotificationPermissionUIDelegate _webView:requestNotificationPermissionForSecurityOrigin:decisionHandler:]):
(TestWebKitAPI::runRequestPermissionTest):
(TestWebKitAPI::TEST):
(TestWebKitAPI::runParallelPermissionRequestsTest):

10:46 AM Changeset in webkit [277375] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Crash in WebPageProxy::endColorPicker()
https://bugs.webkit.org/show_bug.cgi?id=225679

Patch by Julian Gonzalez <julian_a_gonzalez@apple.com> on 2021-05-12
Reviewed by Ryosuke Niwa.

Make sure that endColorPicker() and didEndColorPicker()
do not both attempt to null-out m_colorPicker.

  • UIProcess/WebPageProxy.cpp:

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

10:44 AM Changeset in webkit [277374] by Russell Epstein
  • 8 edits in branches/safari-611-branch/Source

Versioning.

WebKit-7611.3.3

10:13 AM Changeset in webkit [277373] by rniwa@webkit.org
  • 3 edits
    2 adds in trunk

Source/WebCore:
REGRESSION: Release assert in SlotAssignment::assignedNodesForSlot via ComposedTreeIterator::traverseNextInShadowTree
in Element::insertedIntoAncestor
https://bugs.webkit.org/show_bug.cgi?id=225684

Reviewed by Darin Adler.

The release assertion failure was caused by RenderTreeUpdater::tearDownRenderers end up traversing the parts of the DOM
for which Element::insertedIntoAncestor had not been called yet. Since HTMLSlotElement::insertedIntoAncestor is where
SlotAssignment::Slot is updated for a newly inserted slot, SlotAssignment::Slot may not contain this slot element.

Fixed the bug by returning early in SlotAssignment::assignedNodesForSlot when this condition holds, which is when
the shadow root is connected to a document but HTMLSlotElement isn't since its connected flag has not been updated yet.

Test: fast/shadow-dom/insert-host-child-with-slot-renderer-teardown-crash.html

  • dom/SlotAssignment.cpp:

(WebCore::SlotAssignment::assignedNodesForSlot):

LayoutTests:
REGRESSION: Release assert in SlotAssignment::assignedNodesForSlot via ComposedTreeIterator::traverseNextInShadowTree in Element::insertedIntoAncestor
https://bugs.webkit.org/show_bug.cgi?id=225684

Reviewed by Darin Adler.

Added a regression test.

  • fast/shadow-dom/insert-host-child-with-slot-renderer-teardown-crash-expected.txt: Added.
  • fast/shadow-dom/insert-host-child-with-slot-renderer-teardown-crash.html: Added.
9:59 AM Changeset in webkit [277372] by Peng Liu
  • 6 edits in trunk/Source

Implement TextTrackPrivateRemote::inBandMetadataTrackDispatchType()
https://bugs.webkit.org/show_bug.cgi?id=225674

Reviewed by Eric Carlson.

Source/WebCore:

Remove an unused function in InbandTextTrackPrivate.

  • platform/graphics/InbandTextTrackPrivate.h:

(WebCore::InbandTextTrackPrivate::textTrackIndex const): Deleted.

Source/WebKit:

This patch ensures that InbandTextTrack::inBandMetadataTrackDispatchType()
behaviors the same no matter "Media in GPU Process" is enabled or not.

  • GPUProcess/media/RemoteTextTrackProxy.cpp:

(WebKit::RemoteTextTrackProxy::configuration):

  • WebProcess/GPU/media/TextTrackPrivateRemote.cpp:

(WebKit::TextTrackPrivateRemote::updateConfiguration):

  • WebProcess/GPU/media/TextTrackPrivateRemote.h:
8:59 AM Changeset in webkit [277371] by svillar@igalia.com
  • 7 edits in trunk

[css-flexbox] Do not use margins when computing aspect ratio cross sizes
https://bugs.webkit.org/show_bug.cgi?id=221210
LayoutTests/imported/w3c:

<rdar://problem/74097534>

Reviewed by Javier Fernandez.

  • web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-row-013-expected.txt: Replaced FAIL by PASS expectations + new expectations.
  • web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-row-013.html: Imported

latest changes from upstream WPT.

Source/WebCore:

Reviewed by Javier Fernandez.

In r270578 we implemented section 9.8.1 of the flexbox specs which allowed us to compute child's
indefinite cross sizes as definite when the flexbox container had a definite cross size and a couple
of other conditions. However we did not take into account that the child might have some margins in
in the cross direction. Aspect ratio computations must use the content box and thus, we need to
substract the margin extent before trying to compute a cross size based on an aspect ratio.

Note that when computeMainSizeFromAspectRatioUsing() is called the child might not have been ever
laid out. This means that the margins wouldn't have been computed and thus marginXXX() would always
return 0. That's why crossAxisMarginExtentForChild() was also modified so that it actually computes
the margins in case the child needs to be laid out.

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::crossAxisMarginExtentForChild const):
(WebCore::RenderFlexibleBox::computeMainSizeFromAspectRatioUsing const):

LayoutTests:

Reviewed by Javier Fernandez.

  • TestExpectations: Unskipped flex-aspect-ratio-img-row-013.html which is now passing.
8:48 AM Changeset in webkit [277370] by mark.lam@apple.com
  • 9 edits in trunk/Source/JavaScriptCore

Remove dead code around ENABLE(OPCODE_SAMPLING) and ENABLE(CODEBLOCK_SAMPLING).
https://bugs.webkit.org/show_bug.cgi?id=225699

Reviewed by Tadeu Zagallo.

This code revolves around an Interpreter::sampler() method which returns a
SamplingTool*. Neither the Interpreter method nor the SamplingTool class exists
anymore.

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):
(JSC::JIT::compileWithoutLinking):

  • jit/JIT.h:
  • jit/JITCall.cpp:

(JSC::JIT::compileCallEval):
(JSC::JIT::compileCallEvalSlowCase):
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):

  • jit/JITCall32_64.cpp:

(JSC::JIT::compileCallEval):
(JSC::JIT::compileCallEvalSlowCase):
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):

  • jit/JITInlines.h:

(JSC::JIT::sampleInstruction): Deleted.
(JSC::JIT::sampleCodeBlock): Deleted.

  • jit/JITOperations.cpp:
  • jit/SlowPathCall.h:

(JSC::JITSlowPathCall::call):

  • runtime/ScriptExecutable.h:

(JSC::ScriptExecutable::finishCreation): Deleted.

7:51 AM Changeset in webkit [277369] by weinig@apple.com
  • 8 edits
    2 adds in trunk/Source/WebCore

Factor copyImagePixels pixel conversion code into its own file
https://bugs.webkit.org/show_bug.cgi?id=225673

Reviewed by Darin Adler.

Removes virtual ImageBufferBackend::copyImagePixels() function and
moves functionality to new PixelBufferConversion.h/cpp.

Merge USE(ACCELERATE) code from ImageBufferCGBackend into the same
file and do some light cleanup.

  • Function renamed to covert convertImagePixels to convey that it is doing more than copying.
  • Add PixelBufferConversionView/ConstPixelBufferConversionView structs to hold parameters for the conversions, including a ColorSpace member that is not yet used but will be shortly.
  • Uses constexpr conditionals in unaccelerated cases to hoist branch checking for pixel format conversion requirements outside the main loop.
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:

Add new files.

  • platform/graphics/PixelBufferConversion.cpp: Added.

(WebCore::makeVImageBuffer):
(WebCore::convertImagePixelsAccelerated):
(WebCore::convertSinglePixelPremultipliedToPremultiplied):
(WebCore::convertSinglePixelPremultipliedToUnpremultiplied):
(WebCore::convertSinglePixelUnpremultipliedToPremultiplied):
(WebCore::convertSinglePixelUnpremultipliedToUnpremultiplied):
(WebCore::convertFunctor):
(WebCore::convertImagePixels):

  • platform/graphics/PixelBufferConversion.h: Added.

Move existing copyImagePixels implementations here.

  • platform/graphics/ImageBufferBackend.cpp:

(WebCore::ImageBufferBackend::toBGRAData const):
(WebCore::ImageBufferBackend::getPixelBuffer const):
(WebCore::ImageBufferBackend::putPixelBuffer):
(WebCore::copyPremultipliedToPremultiplied): Deleted.
(WebCore::copyPremultipliedToUnpremultiplied): Deleted.
(WebCore::copyUnpremultipliedToPremultiplied): Deleted.
(WebCore::copyUnpremultipliedToUnpremultiplied): Deleted.
(WebCore::copyFunctor): Deleted.
(WebCore::ImageBufferBackend::copyImagePixels const): Deleted.

  • platform/graphics/ImageBufferBackend.h:
  • platform/graphics/cg/ImageBufferCGBackend.cpp:

(WebCore::makeVImageBuffer): Deleted.
(WebCore::copyImagePixelsAccelerated): Deleted.
(WebCore::ImageBufferCGBackend::copyImagePixels const): Deleted.

  • platform/graphics/cg/ImageBufferCGBackend.h:

Remove existing copyImagePixels() implementation and call new
convertImagePixels() instead.

  • platform/graphics/filters/FilterEffect.cpp:

(WebCore::FilterEffect::copyUnmultipliedResult):
(WebCore::FilterEffect::copyPremultipliedResult):
(WebCore::FilterEffect::createUnmultipliedImageResult):
(WebCore::FilterEffect::createPremultipliedImageResult):
Fix pixel format for the PixelBuffers to match existing behaviors.
These are not being used at the moment but will in the future
and new assert in putPixelBuffer caught these being incorrect.

7:33 AM Changeset in webkit [277368] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GLIB] Unreviewed test gardening. media/track/in-band/track-in-band-srt-mkv-kind.html is a flaky crash.

  • platform/glib/TestExpectations:
7:17 AM Changeset in webkit [277367] by commit-queue@webkit.org
  • 6 edits
    2 deletes in trunk

Unreviewed, reverting r277320 and r277329.
https://bugs.webkit.org/show_bug.cgi?id=225698

Added broken test fast/css/visited-link-mix-blend-mode.html

Reverted changesets:

"Don't allow :visited link style in subtrees that use mix-
blend-mode"
https://bugs.webkit.org/show_bug.cgi?id=225446
https://trac.webkit.org/changeset/277320

"Don't allow :visited link style in subtrees that use mix-
blend-mode"
https://bugs.webkit.org/show_bug.cgi?id=225446
https://trac.webkit.org/changeset/277329

6:37 AM Changeset in webkit [277366] by Diego Pino Garcia
  • 1 edit
    2 adds
    1 delete in trunk/LayoutTests

[GTK] Unreviewed test gardening. Update baselines for GTK.

Remove stale GTK baseline after r277321.
Emit new GTK baseline after WPT update in r277160.

  • platform/gtk/imported/w3c/web-platform-tests/css/css-flexbox/flex-item-contains-strict-expected.txt: Removed.
  • platform/gtk/imported/w3c/web-platform-tests/css/mediaqueries/test_media_queries-expected.txt: Added.
5:47 AM Changeset in webkit [277365] by Jean-Yves Avenard
  • 4 edits in trunk/Source/WebCore

Adopt CoreMedia SPI to identify audio-only playback for MSE clients
https://bugs.webkit.org/show_bug.cgi?id=225647
rdar://76138365

Reviewed by Youenn Fablet.

Source/WebCore:

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: tells whether the AVSBAR is attached to an <audio> or <video> element.

Source/WebCore/PAL:

  • pal/spi/cocoa/AVFoundationSPI.h: Add forward declaration for new methods while this isn't in SDK yet.
1:57 AM Changeset in webkit [277364] by youenn@apple.com
  • 10 edits
    1 copy
    4 moves
    2 adds in trunk/Source

Introduce an internal unit to render audio MediaStreamTrack(s)
https://bugs.webkit.org/show_bug.cgi?id=225601

Reviewed by Eric Carlson.

Source/WebCore:

Move files from platform/mediastream/mac to platform/mediastream/cocoa since they are used in both iOS and macOS.
Move Audio Unit functionality out of AudioMediaStreamTrackRendererUnit.
AudioMediaStreamTrackRendererUnit is responsible to manage sources and do the mixing.
To actually render audio, it will use an InternalUnit, which is currently done in process.

A future work will add support for a remote InternalUnit, that would run on GPUProcess.
To prepare for that, a callback allows customizing the Internal Unit creation.
We also change renderer start to be asynchronous, since it requires fetching the audio description from GPUProcess.

No change of behavior, covered by existing tests.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/audio/cocoa/AudioSampleBufferList.h:
  • platform/mediastream/AudioMediaStreamTrackRenderer.h:
  • platform/mediastream/AudioTrackPrivateMediaStream.cpp:

(WebCore::AudioTrackPrivateMediaStream::startRenderer):

  • platform/mediastream/cocoa/AudioMediaStreamTrackRendererCocoa.cpp: Renamed from Source/WebCore/platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.cpp.

(WebCore::AudioMediaStreamTrackRendererCocoa::start):

  • platform/mediastream/cocoa/AudioMediaStreamTrackRendererCocoa.h: Copied from Source/WebCore/platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.h.
  • platform/mediastream/cocoa/AudioMediaStreamTrackRendererInternalUnit.cpp: Renamed from Source/WebCore/platform/mediastream/mac/AudioMediaStreamTrackRendererUnit.cpp.

(WebCore::AudioMediaStreamTrackRendererInternalUnit::createLocalInternalUnit):
(WebCore::LocalAudioMediaStreamTrackRendererInternalUnit::LocalAudioMediaStreamTrackRendererInternalUnit):
(WebCore::LocalAudioMediaStreamTrackRendererInternalUnit::retrieveFormatDescription):
(WebCore::LocalAudioMediaStreamTrackRendererInternalUnit::setAudioOutputDevice):
(WebCore::LocalAudioMediaStreamTrackRendererInternalUnit::start):
(WebCore::LocalAudioMediaStreamTrackRendererInternalUnit::stop):
(WebCore::LocalAudioMediaStreamTrackRendererInternalUnit::createAudioUnitIfNeeded):
(WebCore::LocalAudioMediaStreamTrackRendererInternalUnit::renderingCallback):

  • platform/mediastream/cocoa/AudioMediaStreamTrackRendererInternalUnit.h: Renamed from Source/WebCore/platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.h.
  • platform/mediastream/cocoa/AudioMediaStreamTrackRendererUnit.cpp: Added.

(WebCore::getCreateInternalUnitFunction):
(WebCore::AudioMediaStreamTrackRendererUnit::setCreateInternalUnitFunction):
(WebCore::createInternalUnit):
(WebCore::AudioMediaStreamTrackRendererUnit::singleton):
(WebCore::AudioMediaStreamTrackRendererUnit::AudioMediaStreamTrackRendererUnit):
(WebCore::AudioMediaStreamTrackRendererUnit::~AudioMediaStreamTrackRendererUnit):
(WebCore::AudioMediaStreamTrackRendererUnit::setAudioOutputDevice):
(WebCore::AudioMediaStreamTrackRendererUnit::addSource):
(WebCore::AudioMediaStreamTrackRendererUnit::removeSource):
(WebCore::AudioMediaStreamTrackRendererUnit::start):
(WebCore::AudioMediaStreamTrackRendererUnit::stop):
(WebCore::AudioMediaStreamTrackRendererUnit::retrieveFormatDescription):
(WebCore::AudioMediaStreamTrackRendererUnit::render):

  • platform/mediastream/cocoa/AudioMediaStreamTrackRendererUnit.h: Renamed from Source/WebCore/platform/mediastream/mac/AudioMediaStreamTrackRendererUnit.h.

Source/WebKit:

Update according new WebCore API.

  • GPUProcess/webrtc/RemoteAudioMediaStreamTrackRenderer.cpp:

(WebKit::RemoteAudioMediaStreamTrackRenderer::start):

  • WebProcess/GPU/webrtc/AudioMediaStreamTrackRenderer.cpp:

(WebKit::AudioMediaStreamTrackRenderer::start):

  • WebProcess/GPU/webrtc/AudioMediaStreamTrackRenderer.h:
1:48 AM Changeset in webkit [277363] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GTK] Unreviewed test gardening. Gardened several test failures from GTK post-commit bot.

  • platform/gtk/TestExpectations:
1:09 AM Changeset in webkit [277362] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit

REGRESSION(r277083): Proximity scroll snap is broken on iOS
https://bugs.webkit.org/show_bug.cgi?id=225649

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

No new tests. iOS does not have great support for the event sending test
infrastructure used to test scroll snap.

  • Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:

(ArgumentCoder<FloatScrollSnapOffsetsInfo>::encode): Include the snap type when encoding ScrollSnapOffsetsInfo.
(ArgumentCoder<FloatScrollSnapOffsetsInfo>::decode): Include the snap type when decoding ScrollSnapOffsetsInfo.

  • Shared/WebCoreArgumentCoders.h: Added EnumTraits for ScrollSnapStrictness.
1:05 AM Changeset in webkit [277361] by youenn@apple.com
  • 11 edits in trunk/Source/WebCore

Enumerate AVCaptureDevice list in a background thread
https://bugs.webkit.org/show_bug.cgi?id=225643
<rdar://problem/77820002>

Reviewed by Eric Carlson.

Enumerate AVCaptureDevice in a background queue asynchronously.
Delay getUserMedia and enumerateDevices until this is completed.

Update RealtimeMediaSourceCenter accordingly and introduce RealtimeMediaSourceCenter::enumerateDevices for that purpose.
Replace getCaptureDevices by computeCaptureDevices to do the async computation.
Continue using captureDevices() getters.

Manually tested.

  • platform/mediastream/CaptureDevice.h:

(WebCore::CaptureDevice::CaptureDevice):
(WebCore::CaptureDevice::isolatedCopy):

  • platform/mediastream/CaptureDeviceManager.h:
  • platform/mediastream/RealtimeMediaSourceCenter.cpp:

(WebCore::RealtimeMediaSourceCenter::getMediaStreamDevices):
(WebCore::RealtimeMediaSourceCenter::enumerateDevices):
(WebCore::RealtimeMediaSourceCenter::validateRequestConstraints):
(WebCore::RealtimeMediaSourceCenter::validateRequestConstraintsAfterEnumeration):

  • platform/mediastream/RealtimeMediaSourceCenter.h:
  • platform/mediastream/RealtimeMediaSourceFactory.h:

(WebCore::AudioCaptureFactory::computeSpeakerDevices const):

  • platform/mediastream/ios/AVAudioSessionCaptureDevice.mm:

(WebCore::AVAudioSessionCaptureDevice::AVAudioSessionCaptureDevice):

  • platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.h:
  • platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm:

(WebCore::AVAudioSessionCaptureDeviceManager::scheduleUpdateCaptureDevices):
(WebCore::AVAudioSessionCaptureDeviceManager::computeCaptureDevices):

  • platform/mediastream/mac/AVCaptureDeviceManager.h:
  • platform/mediastream/mac/AVCaptureDeviceManager.mm:

(WebCore::AVCaptureDeviceManager::computeCaptureDevices):
(WebCore::AVCaptureDeviceManager::captureDevices):
(WebCore::AVCaptureDeviceManager::updateCachedAVCaptureDevices):
(WebCore::AVCaptureDeviceManager::retrieveCaptureDevices):
(WebCore::AVCaptureDeviceManager::refreshCaptureDevices):
(WebCore::AVCaptureDeviceManager::AVCaptureDeviceManager):

12:56 AM Changeset in webkit [277360] by youenn@apple.com
  • 2 edits in trunk/LayoutTests

[ macOS wk2 ] http/wpt/mediarecorder/set-srcObject-MediaStream-Blob.html (layout-test) is a flaky text failure
https://bugs.webkit.org/show_bug.cgi?id=225500
<rdar://problem/77636573>

Reviewed by Eric Carlson.

  • http/wpt/mediarecorder/set-srcObject-MediaStream-Blob.html:

Make sure video1 is playing to get its duration.

12:54 AM Changeset in webkit [277359] by youenn@apple.com
  • 2 edits in trunk/LayoutTests

fast/mediastream/getUserMedia-webaudio.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=225655
<rdar://74158395>

Reviewed by Eric Carlson.

  • fast/mediastream/getUserMedia-webaudio.html:

Retry several time instead of just once when detecting no noise to improve robustness.

May 11, 2021:

11:04 PM Changeset in webkit [277358] by Cameron McCormack
  • 6 edits in trunk

Include reasons for compositing in showLayerTree output
https://bugs.webkit.org/show_bug.cgi?id=225640

Reviewed by Simon Fraser.

Source/WebCore:

Since it seems useful to know why a layer is composited.

The logging code was only including one reason, rather than the
whole set of reasons, and that's unchanged (except for the function
name to make that clearer), although we could also just make that
include all of the reasons too.

There were two reason strings missing, which are also added --
OverflowScrollPositioning and WillChange -- which the use of a
switch should help catch in the future.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::logLayerInfo):
(WebCore::compositingReasonToString):
(WebCore::RenderLayerCompositor::logReasonsForCompositing):
(WebCore::operator<<):

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

LayoutTests:

  • fast/harness/render-tree-as-text-options-expected.txt:
10:55 PM Changeset in webkit [277357] by Chris Dumez
  • 32 edits in trunk

Port WTF::FileSystem::listDirectory to std::filesystem
https://bugs.webkit.org/show_bug.cgi?id=225633

Reviewed by Darin Adler.

Source/WebCore:

Update FileSystem::listDirectory() call sites to deal with the fact that:

  • The function now returns file names instead of full file paths
  • The callers now have to do filtering by themselves if they need it
  • Modules/entriesapi/DOMFileSystem.cpp:

(WebCore::listDirectoryWithMetadata):

  • Modules/indexeddb/server/IDBServer.cpp:

(WebCore::IDBServer::IDBServer::getAllDatabaseNamesAndVersions):
(WebCore::IDBServer::collectOriginsForVersion):
(WebCore::IDBServer::removeAllDatabasesForFullOriginPath):
(WebCore::IDBServer::removeAllDatabasesForOriginPath):
(WebCore::IDBServer::IDBServer::removeDatabasesModifiedSinceForVersion):
(WebCore::IDBServer::IDBServer::removeDatabasesWithOriginsForVersion):

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::fullDatabaseDirectoryWithUpgrade):
(WebCore::IDBServer::SQLiteIDBBackingStore::databasesSizeForDirectory):

  • Modules/webdatabase/DatabaseTracker.cpp:

(WebCore::DatabaseTracker::usage):
(WebCore::DatabaseTracker::deleteOrigin):

  • html/DirectoryFileListCreator.cpp:

(WebCore::appendDirectoryFiles):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::uriDecodeBinElementAddedCallback):
(WebCore::MediaPlayerPrivateGStreamer::purgeOldDownloadFiles):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
  • platform/text/hyphen/HyphenationLibHyphen.cpp:

(WebCore::extractLocaleFromDictionaryFileName):
(WebCore::scanDirectoryForDictionaries):

Source/WebKit:

Update FileSystem::listDirectory() call sites to deal with the fact that:

  • The function now returns file names instead of full file paths
  • The callers now have to do filtering by themselves if they need it
  • NetworkProcess/WebStorage/LocalStorageDatabaseTracker.cpp:

(WebKit::LocalStorageDatabaseTracker::origins const):

  • NetworkProcess/cache/CacheStorageEngine.cpp:

(WebKit::CacheStorage::getDirectorySize):
(WebKit::CacheStorage::Engine::getDirectories):
(WebKit::CacheStorage::Engine::clearAllCachesFromDisk):

  • NetworkProcess/cache/NetworkCacheFileSystem.cpp:

(WebKit::NetworkCache::traverseDirectory):

  • UIProcess/API/APIContentRuleListStore.cpp:

(API::ContentRuleListStore::getAvailableContentRuleListIdentifiers):
(API::ContentRuleListStore::synchronousRemoveAllContentRuleLists):

  • UIProcess/DeviceIdHashSaltStorage.cpp:

(WebKit::DeviceIdHashSaltStorage::loadStorageFromDisk):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::mediaKeyOrigins):
(WebKit::WebsiteDataStore::removeMediaKeys):

  • WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.cpp:

(WebKit::WebKitExtensionManager::scanModules):

  • WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:

(WebKit::WebMediaKeyStorageManager::getMediaKeyOrigins):
(WebKit::removeAllMediaKeyStorageForOriginPath):
(WebKit::WebMediaKeyStorageManager::deleteMediaKeyEntriesModifiedBetweenDates):
(WebKit::WebMediaKeyStorageManager::deleteAllMediaKeyEntries):

Source/WebKitLegacy:

Update FileSystem::listDirectory() call sites to deal with the fact that:

  • The function now returns file names instead of full file paths
  • The callers now have to do filtering by themselves if they need it
  • Storage/StorageTracker.cpp:

(WebKit::StorageTracker::syncFileSystemAndTrackerDatabase):

Source/WebKitLegacy/win:

Update FileSystem::listDirectory() call sites to deal with the fact that:

  • The function now returns file names instead of full file paths
  • The callers now have to do filtering by themselves if they need it
  • Plugins/PluginDatabase.cpp:

(WebCore::PluginDatabase::getPluginPathsInDirectories const):

Source/WTF:

Port WTF::FileSystem::listDirectory to std::filesystem with the following 2 changes:

  • The function no longer takes a (blob-style) filter parameter
  • The function now returns file names instead of file paths, allowing the call sites to more easily filter based on prefixes.
  • wtf/FileSystem.cpp:

(WTF::FileSystemImpl::listDirectory):

  • wtf/FileSystem.h:
  • wtf/glib/FileSystemGlib.cpp:
  • wtf/posix/FileSystemPOSIX.cpp:
  • wtf/win/FileSystemWin.cpp:

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WTF/FileSystem.cpp:

(TestWebKitAPI::createTestFile):
(TestWebKitAPI::TEST_F):

  • TestWebKitAPI/Tests/WebCore/cocoa/DatabaseTrackerTest.mm:

(TestWebKitAPI::removeDirectoryAndAllContents):

10:53 PM Changeset in webkit [277356] by Chris Dumez
  • 17 edits
    1 add in trunk

Add SPI to suspend / resume a WKWebView
https://bugs.webkit.org/show_bug.cgi?id=225333
<rdar://77462543>

Reviewed by Geoff Garen.

Source/WebCore:

Add new function to BackForwardCache to suspend a page and return a CachedPage
instead of requiring a HistoryItem and storing the CachedPage on that history
item. This is useful when we want to suspend the page in-place and do not want
to require a history item (or a navigation).

  • Headers.cmake:
  • history/BackForwardCache.cpp:

(WebCore::BackForwardCache::trySuspendPage):
(WebCore::BackForwardCache::addIfCacheable):
(WebCore::BackForwardCache::suspendPage):

  • history/BackForwardCache.h:
  • history/CachedPage.h:

Source/WebKit:

Add SPI to suspend / resume a WKWebView. This suspends the page as if it was in
the back/forward cache but the suspension happens in-place, no need to navigate.
The suspended page is also not part of the Back/Forward cache so its cap on the
number of suspended pages does not apply here.

Most of WKWebView's API / SPI will throw an exception when called on a suspended
view (The WKPageRefAPI will RELEASE_ASSERT()). Some of the basic API will stay
functional (URL, isLoading, title, ...). It is also safe to deallocate / close
a suspended WKWebView.

  • UIProcess/API/C/WKPage.cpp:

(crashIfPageIsSuspended):
(WKPageLoadURL):
(WKPageLoadURLWithShouldOpenExternalURLsPolicy):
(WKPageLoadURLWithUserData):
(WKPageLoadURLRequest):
(WKPageLoadURLRequestWithUserData):
(WKPageLoadFile):
(WKPageLoadFileWithUserData):
(WKPageLoadData):
(WKPageLoadDataWithUserData):
(WKPageLoadHTMLString):
(WKPageLoadHTMLStringWithUserData):
(WKPageLoadAlternateHTMLString):
(WKPageLoadAlternateHTMLStringWithUserData):
(WKPageLoadPlainTextString):
(WKPageLoadPlainTextStringWithUserData):
(WKPageLoadWebArchiveData):
(WKPageLoadWebArchiveDataWithUserData):
(WKPageStopLoading):
(WKPageReload):
(WKPageReloadWithoutContentBlockers):
(WKPageReloadFromOrigin):
(WKPageReloadExpiredOnly):
(WKPageTryClose):
(WKPageClose):
(WKPageGoForward):
(WKPageGoBack):
(WKPageGoToBackForwardListItem):
(WKPageTryRestoreScrollPosition):
(WKPageUpdateWebsitePolicies):
(WKPageSetApplicationNameForUserAgent):
(WKPageSetCustomUserAgent):
(WKPageSetCustomTextEncodingName):
(WKPageTerminate):
(WKPageRestoreFromSessionState):
(WKPageRestoreFromSessionStateWithoutNavigation):
(WKPageSetCustomBackingScaleFactor):
(WKPageSetTextZoomFactor):
(WKPageSetPageZoomFactor):
(WKPageSetPageAndTextZoomFactors):
(WKPageSetScaleFactor):
(WKPageSetUseFixedLayout):
(WKPageSetFixedLayoutSize):
(WKPageListenForLayoutMilestones):
(WKPageSetSuppressScrollbarAnimations):
(WKPageSetRubberBandsAtLeft):
(WKPageSetRubberBandsAtRight):
(WKPageSetRubberBandsAtTop):
(WKPageSetRubberBandsAtBottom):
(WKPageSetEnableVerticalRubberBanding):
(WKPageSetEnableHorizontalRubberBanding):
(WKPageSetBackgroundExtendsBeyondPage):
(WKPageSetPaginationMode):
(WKPageSetPaginationBehavesLikeColumns):
(WKPageSetPageLength):
(WKPageSetGapBetweenPages):
(WKPageSetPaginationLineGridEnabled):
(WKPageSetMaintainsInactiveSelection):
(WKPageCenterSelectionInVisibleArea):
(WKPageFindStringMatches):
(WKPageGetImageForFindMatch):
(WKPageSelectFindMatch):
(WKPageFindString):
(WKPageHideFindUI):
(WKPageCountStringMatches):
(WKPageSetPageContextMenuClient):
(WKPageSetPageFindClient):
(WKPageSetPageFindMatchesClient):
(WKPageSetPageInjectedBundleClient):
(WKPageSetPageFormClient):
(WKPageSetPageLoaderClient):
(WKPageSetPagePolicyClient):
(WKPageSetPageUIClient):
(WKPageSetPageNavigationClient):
(WKPageSetPageStateClient):
(WKPageRunJavaScriptInMainFrame):
(WKPageRunJavaScriptInMainFrame_b):
(WKPageRenderTreeExternalRepresentation):
(WKPageGetSourceForFrame):
(WKPageGetContentsAsString):
(WKPageGetBytecodeProfile):
(WKPageGetSamplingProfilerOutput):
(WKPageGetSelectionAsWebArchiveData):
(WKPageGetContentsAsMHTMLData):
(WKPageForceRepaint):
(WKPageValidateCommand):
(WKPageExecuteCommand):
(WKPageComputePagesForPrinting):
(WKPageDrawPagesToPDF):
(WKPageBeginPrinting):
(WKPageEndPrinting):
(WKPageSetControlledByAutomation):
(WKPageSetAllowsRemoteInspection):
(WKPageSetMediaVolume):
(WKPageSetMuted):
(WKPageSetMediaCaptureEnabled):
(WKPageDidAllowPointerLock):
(WKPageClearUserMediaState):
(WKPageDidDenyPointerLock):
(WKPageSetMayStartMediaWhenInWindow):
(WKPageSelectContextMenuItem):
(WKPageSetScrollPinningBehavior):
(WKPageSetAddsVisitedLinks):
(WKPageClearWheelEventTestMonitor):
(WKPageCallAfterNextPresentationUpdate):
(WKPageSetIgnoresViewportScaleLimits):
(WKPageGetApplicationManifest_b):
(WKPageDumpPrivateClickMeasurement):
(WKPageClearPrivateClickMeasurement):
(WKPageSetPrivateClickMeasurementOverrideTimerForTesting):
(WKPageMarkAttributedPrivateClickMeasurementsAsExpiredForTesting):
(WKPageSimulateResourceLoadStatisticsSessionRestart):
(WKPageSetPrivateClickMeasurementTokenPublicKeyURLForTesting):
(WKPageSetPrivateClickMeasurementTokenSignatureURLForTesting):
(WKPageSetPrivateClickMeasurementAttributionReportURLsForTesting):
(WKPageMarkPrivateClickMeasurementsAsExpiredForTesting):
(WKPageSetPCMFraudPreventionValuesForTesting):
(WKPageSetMockCameraOrientation):
(WKPageLoadedSubresourceDomains):
(WKPageClearLoadedSubresourceDomains):
(WKPageSetMediaCaptureReportingDelayForTesting):
(WKPageDispatchActivityStateUpdateForTesting):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView loadRequest:]):
(-[WKWebView loadFileURL:allowingReadAccessToURL:]):
(-[WKWebView loadHTMLString:baseURL:]):
(-[WKWebView loadData:MIMEType:characterEncodingName:baseURL:]):
(-[WKWebView startDownloadUsingRequest:completionHandler:]):
(-[WKWebView resumeDownloadFromResumeData:completionHandler:]):
(-[WKWebView goToBackForwardListItem:]):
(-[WKWebView goBack]):
(-[WKWebView goForward]):
(-[WKWebView reload]):
(-[WKWebView reloadFromOrigin]):
(-[WKWebView stopLoading]):
(-[WKWebView evaluateJavaScript:completionHandler:]):
(-[WKWebView evaluateJavaScript:inFrame:inContentWorld:completionHandler:]):
(-[WKWebView callAsyncJavaScript:arguments:inFrame:inContentWorld:completionHandler:]):
(-[WKWebView closeAllMediaPresentationsWithCompletionHandler:]):
(-[WKWebView pauseAllMediaPlaybackWithCompletionHandler:]):
(-[WKWebView setAllMediaPlaybackSuspended:completionHandler:]):
(-[WKWebView requestMediaPlaybackStateWithCompletionHandler:]):
(-[WKWebView setMicrophoneCaptureState:completionHandler:]):
(-[WKWebView setCameraCaptureState:completionHandler:]):
(-[WKWebView _evaluateJavaScript:asAsyncFunction:withSourceURL:withArguments:forceUserGesture:inFrame:inWorld:completionHandler:]):
(-[WKWebView takeSnapshotWithConfiguration:completionHandler:]):
(-[WKWebView setAllowsBackForwardNavigationGestures:]):
(-[WKWebView setCustomUserAgent:]):
(-[WKWebView setAllowsLinkPreview:]):
(-[WKWebView setPageZoom:]):
(-[WKWebView findString:withConfiguration:completionHandler:]):
(-[WKWebView setMediaType:]):
(-[WKWebView setInteractionState:]):
(-[WKWebView setAllowsMagnification:]):
(-[WKWebView setMagnification:centeredAtPoint:]):
(-[WKWebView setMagnification:]):
(-[WKWebView printOperationWithPrintInfo:]):
(-[WKWebView createPDFWithConfiguration:completionHandler:]):
(-[WKWebView createWebArchiveDataWithCompletionHandler:]):
(-[WKWebView loadSimulatedRequest:response:responseData:]):
(-[WKWebView loadSimulatedRequest:withResponse:responseData:]):
(-[WKWebView loadSimulatedRequest:responseHTMLString:]):
(-[WKWebView loadSimulatedRequest:withResponseHTMLString:]):
(-[WKWebView loadFileRequest:allowingReadAccessToURL:]):
(-[WKWebView _toggleStrikeThrough:]):
(-[WKWebView _increaseListLevel:]):
(-[WKWebView _decreaseListLevel:]):
(-[WKWebView _changeListType:]):
(-[WKWebView _setViewportSizeForCSSViewportUnits:]):
(-[WKWebView _didEnableBrowserExtensions:]):
(-[WKWebView _didDisableBrowserExtensions:]):
(-[WKWebView _setEditable:]):
(-[WKWebView _executeEditCommand:argument:completion:]):
(-[WKWebView _startTextManipulationsWithConfiguration:completion:]):
(-[WKWebView _completeTextManipulation:completion:]):
(-[WKWebView _completeTextManipulationForItems:completion:]):
(-[WKWebView _takeFindStringFromSelection:]):
(-[WKWebView _updateMediaPlaybackControlsManager]):
(-[WKWebView _togglePictureInPicture]):
(-[WKWebView _closeAllMediaPresentations]):
(-[WKWebView _stopMediaCapture]):
(-[WKWebView _stopAllMediaPlayback]):
(-[WKWebView _suspendAllMediaPlayback]):
(-[WKWebView _resumeAllMediaPlayback]):
(-[WKWebView _restoreAppHighlights:]):
(-[WKWebView _restoreAndScrollToAppHighlight:]):
(-[WKWebView _addAppHighlight]):
(-[WKWebView _loadAlternateHTMLString:baseURL:forUnreachableURL:]):
(-[WKWebView _loadData:MIMEType:characterEncodingName:baseURL:userData:]):
(-[WKWebView _loadRequest:shouldOpenExternalURLs:]):
(-[WKWebView _loadRequest:shouldOpenExternalURLsPolicy:]):
(-[WKWebView _grantAccessToAssetServices]):
(-[WKWebView _revokeAccessToAssetServices]):
(-[WKWebView _switchFromStaticFontRegistryToUserFontRegistry]):
(-[WKWebView _appBoundNavigationDataForDomain:completionHandler:]):
(-[WKWebView _suspendPage:]):
(-[WKWebView _resumePage:]):
(-[WKWebView _setApplicationNameForUserAgent:]):
(-[WKWebView _killWebContentProcess]):
(-[WKWebView _reloadWithoutContentBlockers]):
(-[WKWebView _reloadExpiredOnly]):
(-[WKWebView _killWebContentProcessAndResetState]):
(-[WKWebView _takePDFSnapshotWithConfiguration:completionHandler:]):
(-[WKWebView _getPDFFirstPageSizeInFrame:completionHandler:]):
(-[WKWebView _restoreFromSessionStateData:]):
(-[WKWebView _restoreSessionState:andNavigate:]):
(-[WKWebView _close]):
(-[WKWebView _tryClose]):
(-[WKWebView _insertAttachmentWithFilename:contentType:data:options:completion:]):
(-[WKWebView _insertAttachmentWithFileWrapper:contentType:options:completion:]):
(-[WKWebView _insertAttachmentWithFileWrapper:contentType:completion:]):
(-[WKWebView _attachmentForIdentifier:]):
(-[WKWebView _simulateDeviceOrientationChangeWithAlpha:beta:gamma:]):
(-[WKWebView _showSafeBrowsingWarningWithTitle:warning:details:completionHandler:]):
(-[WKWebView _showSafeBrowsingWarningWithURL:title:warning:details:completionHandler:]):
(-[WKWebView _showSafeBrowsingWarningWithURL:title:warning:detailsWithLinks:completionHandler:]):
(-[WKWebView _isJITEnabled:]):
(-[WKWebView _evaluateJavaScriptWithoutUserGesture:completionHandler:]):
(-[WKWebView _callAsyncJavaScript:arguments:inFrame:inContentWorld:completionHandler:]):
(-[WKWebView _evaluateJavaScript:inFrame:inContentWorld:completionHandler:]):
(-[WKWebView _evaluateJavaScript:withSourceURL:inFrame:inContentWorld:completionHandler:]):
(-[WKWebView _updateWebpagePreferences:]):
(-[WKWebView _notifyUserScripts]):
(-[WKWebView _deferrableUserScriptsNeedNotification]):
(-[WKWebView _setAllowsRemoteInspection:]):
(-[WKWebView _setRemoteInspectionNameOverride:]):
(-[WKWebView _setAddsVisitedLinks:]):
(-[WKWebView _getMainResourceDataWithCompletionHandler:]):
(-[WKWebView _getWebArchiveDataWithCompletionHandler:]):
(-[WKWebView _getContentsAsStringWithCompletionHandler:]):
(-[WKWebView _getContentsOfAllFramesAsStringWithCompletionHandler:]):
(-[WKWebView _getContentsAsAttributedStringWithCompletionHandler:]):
(-[WKWebView _getApplicationManifestWithCompletionHandler:]):
(-[WKWebView _setPaginationMode:]):
(-[WKWebView _setPaginationBehavesLikeColumns:]):
(-[WKWebView _setPageLength:]):
(-[WKWebView _setGapBetweenPages:]):
(-[WKWebView _setPaginationLineGridEnabled:]):
(-[WKWebView _setTextZoomFactor:]):
(-[WKWebView _setPageZoomFactor:]):
(-[WKWebView _countStringMatches:options:maxCount:]):
(-[WKWebView _findString:options:maxCount:]):
(-[WKWebView _hideFindUI]):
(-[WKWebView _saveBackForwardSnapshotForItem:]):
(-[WKWebView _clearServiceWorkerEntitlementOverride:]):
(-[WKWebView _preconnectToServer:]):
(-[WKWebView _setCanUseCredentialStorage:]):
(-[WKWebView _setLayoutMode:]):
(-[WKWebView _setFixedLayoutSize:]):
(-[WKWebView _setBackgroundExtendsBeyondPage:]):
(-[WKWebView _setViewScale:]):
(-[WKWebView _setCORSDisablingPatterns:]):
(-[WKWebView _getProcessDisplayNameWithCompletionHandler:]):
(-[WKWebView _setMinimumEffectiveDeviceWidth:]):
(-[WKWebView _grantAccessToPreferenceService]):
(-[WKWebView _setScrollPerformanceDataCollectionEnabled:]):
(-[WKWebView _setAllowsMediaDocumentInlinePlayback:]):
(-[WKWebView _setMediaCaptureEnabled:]):
(-[WKWebView _setPageMuted:]):
(-[WKWebView _removeDataDetectedLinks:]):
(-[WKWebView _doAfterNextPresentationUpdate:]):
(-[WKWebView _doAfterNextPresentationUpdateWithoutWaitingForPainting:]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::handleTouchEvent):
(WebKit::WebPageProxy::resumeActiveDOMObjectsAndAnimations):
(WebKit::WebPageProxy::suspendActiveDOMObjectsAndAnimations):
(WebKit::WebPageProxy::suspend):
(WebKit::WebPageProxy::resume):
(WebKit::WebPageProxy::requestMediaPlaybackState):
(WebKit::WebPageProxy::resetStateAfterProcessExited):

  • UIProcess/WebPageProxy.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::suspend):
(WebKit::WebPage::resume):

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

Tools:

Add API test coverage.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSuspension.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/postMessage-regularly.html: Added.
9:23 PM Changeset in webkit [277355] by Darin Adler
  • 25 edits
    1 add in trunk

Remove the String::toInt family of functions
https://bugs.webkit.org/show_bug.cgi?id=225599

Reviewed by Anders Carlsson.

Source/WebCore:

  • platform/graphics/GLContext.cpp:

(WebCore::GLContext::version): Use
parseIntegerAllowingTrailingJunk<unsigned> instead of String::toUInt.

  • platform/graphics/GlyphBuffer.h:

(WebCore::GlyphBuffer::checkedStringOffsetAt const): Fix code that was
assuming GlyphBufferStringOffset was signed to compile without a warning
regardless of whether it's signed or unsigned. This was making GTK
builds have tons and tons of warnings, which was distracting while
working on the other fixes here.

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(CachedResourceStreamingClient::responseReceived): Use
parseIntegerAllowingTrailingJunk<uint64_t> instead of String::toUInt64.

Source/WebKit:

  • Shared/win/AuxiliaryProcessMainWin.cpp:

(WebKit::AuxiliaryProcessMainCommon::parseCommandLine): Use
parseIntegerAllowingTrailingJunk<uint64_t> instead of String::toUInt64.

  • UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp:

(WebKit::ScriptMessageClient::didPostMessage): Ditto.

  • UIProcess/win/WebProcessPoolWin.cpp:

(WebKit::initializeRemoteInspectorServer): Use
parseIntegerAllowingTrailingJunk<uint16_t> instead of StringView::toUInt64.
This is a 16-bit port number, so not valuable to parse larger integers.

Source/WTF:

  • wtf/text/AtomString.h: Deleted AtomString::toInt.
  • wtf/text/StringImpl.cpp:

(WTF::StringImpl::toIntStrict): Deleted.
(WTF::StringImpl::toUIntStrict): Deleted.
(WTF::StringImpl::toInt64Strict): Deleted.
(WTF::StringImpl::toUInt64Strict): Deleted.
(WTF::StringImpl::toIntPtrStrict): Deleted.
(WTF::StringImpl::toInt): Deleted.
(WTF::StringImpl::toUInt): Deleted.
(WTF::StringImpl::toInt64): Deleted.
(WTF::StringImpl::toUInt64): Deleted.
(WTF::StringImpl::toIntPtr): Deleted.

  • wtf/text/StringImpl.h: Deleted the above functions.
  • wtf/text/StringToIntegerConversion.h: Removed toIntegralType.
  • wtf/text/StringView.cpp:

(WTF::parseUInt16): Deleted.

  • wtf/text/StringView.h: Deleted StringView::toInt,

StringView::toIntStrict, StringView::toUInt64Strict,
StringView::toInt64Strict, and parseUInt16. Changed the constructor
that takes a const char* to work when passed nullptr. StringView has
a null value, and converting a null const char* should produce that.

  • wtf/text/WTFString.cpp:

(WTF::String::toIntStrict const): Deleted.
(WTF::String::toUIntStrict const): Deleted.
(WTF::String::toInt64Strict const): Deleted.
(WTF::String::toUInt64Strict const): Deleted.
(WTF::String::toIntPtrStrict const): Deleted.
(WTF::String::toInt const): Deleted.
(WTF::String::toUInt const): Deleted.
(WTF::String::toInt64 const): Deleted.
(WTF::String::toUInt64 const): Deleted.
(WTF::String::toIntPtr const): Deleted.
(WTF::lengthOfCharactersAsInteger): Deleted.
(WTF::charactersToIntStrict): Deleted.
(WTF::charactersToUIntStrict): Deleted.
(WTF::charactersToInt64Strict): Deleted.
(WTF::charactersToUInt64Strict): Deleted.
(WTF::charactersToIntPtrStrict): Deleted.
(WTF::charactersToInt): Deleted.
(WTF::charactersToUInt): Deleted.
(WTF::charactersToInt64): Deleted.
(WTF::charactersToUInt64): Deleted.
(WTF::charactersToIntPtr): Deleted.

  • wtf/text/WTFString.h: Deleted the above functions.

Tools:

  • TestWebKitAPI/CMakeLists.txt: Added StringToIntegerConversion.cpp.
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Ditto.
  • TestWebKitAPI/Tests/WTF/StringToIntegerConversion.cpp: Added.

Contains tests moved and adapted from the files below so we don't
lose test coverage. We and and should add many more tests.

  • TestWebKitAPI/Tests/WTF/StringView.cpp: Removed tests for parseUInt16

and StringView::toIntStrict.

  • TestWebKitAPI/Tests/WTF/WTFString.cpp: Removed tests for String::toInt.
  • TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm: Use

parseInteger<uint64_t> instead of StringView::toUInt64Strict.

  • TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm: Ditto.
8:55 PM Changeset in webkit [277354] by Devin Rousso
  • 21 edits in trunk

[macCatalyst] should have CSS hover: hover and pointer: fine
https://bugs.webkit.org/show_bug.cgi?id=225672

Reviewed by Tim Horton.

Source/WebKit:

Test: iOSMouseSupport.MouseAlwaysConnected

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::isMousePrimaryPointingDevice): Added.
(WebKit::hasAccessoryMousePointingDevice): Added.
(WebKit::hasAccessoryStylusPointingDevice): Added.
(WebKit::WebPage::hoverSupportedByPrimaryPointingDevice const):
(WebKit::WebPage::hoverSupportedByAnyAvailablePointingDevice const):
(WebKit::WebPage::pointerCharacteristicsOfPrimaryPointingDevice const):
(WebKit::WebPage::pointerCharacteristicsOfAllAvailablePointingDevices const):
(WebKit::hasMouseDevice): Deleted.
macCatalyst should consider the mouse as the primary pointing device, just like macOS:

  • hover and any-hover should always be hover
  • pointer and any-pointer should always be fine (instead of only if an accessory mouse/stylus is connected)
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeWebProcess):

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

(WebKit::WebProcessProxy::notifyHasMouseDeviceChanged): Added.
(WebKit::WebProcessProxy::notifyHasStylusDeviceChanged):

  • UIProcess/ios/WebProcessProxyIOS.mm:

(WebKit::WebProcessProxy::platformInitialize):
(WebKit::WebProcessProxy::platformDestroy):
(WebKit::WebProcessProxy::notifyHasMouseDeviceChanged): Deleted.

  • UIProcess/ios/WKMouseDeviceObserver.h:
  • UIProcess/ios/WKMouseDeviceObserver.mm:
  • Shared/WebProcessCreationParameters.h:
  • Shared/WebProcessCreationParameters.cpp:

(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):

  • WebProcess/WebProcess.messages.in:
  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):
Clean up macro usage to avoid unnecessary work on macCatalyst.
Drive-by: Move non-platform code to non-platform files.

Source/WTF:

  • wtf/PlatformHave.h:

Add HAVE_MOUSE_DEVICE_OBSERVATION and HAVE_STYLUS_DEVICE_OBSERVATION to make callsites
clearer instead of having a somewhat unrelated connection to HAVE_UIKIT_WITH_MOUSE_SUPPORT
and HAVE_PENCILKIT_TEXT_INPUT (not to mention both of them are PLATFORM(MACCATALYST)
which isn't desirable since macCatalyst should consider the mouse as the primary pointing
device, just like macOS).

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/iOSMouseSupport.mm:

(TEST.iOSMouseSupport.MouseAlwaysConnected):

  • TestWebKitAPI/Tests/WebKitCocoa/iOSStylusSupport.mm:
8:49 PM Changeset in webkit [277353] by commit-queue@webkit.org
  • 17 edits
    1 delete in trunk

Unreviewed, reverting r277341.
https://bugs.webkit.org/show_bug.cgi?id=225685

Caused WK2 layout tests to exit with an exception

Reverted changeset:

"Add SPI to suspend / resume a WKWebView"
https://bugs.webkit.org/show_bug.cgi?id=225333
https://trac.webkit.org/changeset/277341

8:46 PM Changeset in webkit [277352] by Wenson Hsieh
  • 7 edits in trunk

[iOS] Mail compose web view doesn't scroll to reveal the selection in certain configurations
https://bugs.webkit.org/show_bug.cgi?id=225675
rdar://77095886

Reviewed by Tim Horton.

Source/WebKit:

Currently when computing input view bounds upon receiving UIKeyboardDidChangeFrameNotification, we attempt to
map the on-screen bounds of the keyboard to the window's coordinate space, and save the result in an ivar in
WKWebView, _inputViewBounds. The keyboard frame (which corresponds to UIKeyboardFrameEndUserInfoKey in the
notification's userInfo dictionary) is given to us in screen coordinates, and we currently pass this through
-convertRect:fromWindow:, with a nil UIWindow.

However, this results in mapping the rect from the coordinate space of the window's UIWindowScene rather than
the window screen. In shipping Mail on iOS, this doesn't matter because the window containing the compose web
view shares the same coordinate space as the screen. In some other configurations of MobileMail, however, the
compose web view appears inside its own UIWindow. This causes the above coordinate conversion logic to fail,
since we attempt to map a rect given to us in screen coordinates from the compose web view's window scene's
coordinate space, instead of the screen's coordinate space.

We fix this by using -convertRect:fromCoordinateSpace: instead, and explicitly pass in
self.window.screen.coordinateSpace.

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

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

Rename _inputViewBounds to _inputViewBoundsInWindow for clarity.

  • UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h:
  • UIProcess/API/ios/WKWebViewTestingIOS.mm:

(-[WKWebView _inputViewBoundsInWindow]):
(-[WKWebView _inputViewBounds]): Deleted.

Tools:

Rename some testing SPI. See WebKit/ChangeLog for more information.

  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptControllerIOS::inputViewBounds const):

8:40 PM Changeset in webkit [277351] by Simon Fraser
  • 3 edits in trunk/Source/WebKit

Crash in DisplayLink::incrementFullSpeedRequestClientCount()
https://bugs.webkit.org/show_bug.cgi?id=225683
<rdar://77716330>

Reviewed by Tim Horton.

Crash data suggest that in WebPageProxy::updateWheelEventActivityAfterProcessSwap()
the connection might be null. Protect against that an an unset DisplayID, as we do
in wheelEventHysteresisUpdated().

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::updateWheelEventActivityAfterProcessSwap):

  • UIProcess/mac/DisplayLink.cpp:

(WebKit::DisplayLink::incrementFullSpeedRequestClientCount): Remove an extra semicolon.

7:45 PM Changeset in webkit [277350] by Simon Fraser
  • 10 edits in trunk/Source/WebCore

Display-frequency animations in ScrollController should be externally driven
https://bugs.webkit.org/show_bug.cgi?id=225663

Reviewed by Tim Horton.

Display-frequency animations (i.e. those driven by 1/60_s timers) should ultimately
be driven by Page::updateRendering(), since their output should be synchronized with
rendering updates.

As the first step, remove m_snapRubberbandTimer and m_scrollSnapTimer from
ScrollController and have it expose functions that tell its client to start and stop
the animation, and a per-frame callback. Give ScrollAnimator a 1/60_s timer
to drive this, temporarily.

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

(WebCore::ScrollingTreeScrollingNodeDelegateMac::startAnimationCallback):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::stopAnimationCallback):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::scrollControllerAnimationTimerFired):

  • platform/ScrollAnimator.cpp:

(WebCore::ScrollAnimator::ScrollAnimator):
(WebCore::ScrollAnimator::startAnimationCallback):
(WebCore::ScrollAnimator::stopAnimationCallback):
(WebCore::ScrollAnimator::scrollControllerAnimationTimerFired):

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

(WebCore::ScrollController::animationCallback):
(WebCore::ScrollController::startOrStopAnimationCallbacks):
(WebCore::ScrollController::setIsAnimatingRubberBand):
(WebCore::ScrollController::setIsAnimatingScrollSnap):
(WebCore::ScrollController::updateScrollSnapAnimatingState):
(WebCore::ScrollController::updateRubberBandAnimatingState):

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

(WebCore::ScrollSnapAnimatorState::currentAnimatedScrollOffset const):

  • platform/ScrollSnapAnimatorState.h:
  • platform/mac/ScrollController.mm:

(WebCore::ScrollController::stopAllTimers):
(WebCore::ScrollController::handleWheelEvent):
(WebCore::ScrollController::updateRubberBandAnimatingState):
(WebCore::ScrollController::isScrollSnapInProgress const):
(WebCore::ScrollController::stopRubberbanding):
(WebCore::ScrollController::startRubberbandAnimation):
(WebCore::ScrollController::stopSnapRubberbandAnimation):
(WebCore::ScrollController::snapRubberBand):
(WebCore::ScrollController::isRubberBandInProgressInternal const):
(WebCore::ScrollController::scheduleStatelessScrollSnap):
(WebCore::ScrollController::statelessSnapTransitionTimerFired):
(WebCore::ScrollController::processWheelEventForScrollSnap):
(WebCore::ScrollController::startScrollSnapAnimation):
(WebCore::ScrollController::stopScrollSnapAnimation):
(WebCore::ScrollController::updateScrollSnapAnimatingState):
(WebCore::ScrollController::snapRubberBandTimerFired): Deleted.
(WebCore::ScrollController::startSnapRubberbandTimer): Deleted.
(WebCore::ScrollController::stopSnapRubberbandTimer): Deleted.
(WebCore::ScrollController::startScrollSnapTimer): Deleted.
(WebCore::ScrollController::stopScrollSnapTimer): Deleted.
(WebCore::ScrollController::scrollSnapTimerFired): Deleted.

6:25 PM Changeset in webkit [277349] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebKit

Fix the CGDisplayListImageBufferBackend build
https://bugs.webkit.org/show_bug.cgi?id=225681

Unreviewed.

  • Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.cpp:

(WebKit::CGDisplayListImageBufferBackend::getPixelBuffer const):

  • Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.h:
6:16 PM Changeset in webkit [277348] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Unreviewed, reverting r277319.
https://bugs.webkit.org/show_bug.cgi?id=225680

Always enabling AsyncOverflowScrolling made many tests fail or
crash

Reverted changeset:

"[GTK] compositing/overflow/dynamic-composited-scrolling-
status.html is failing"
https://bugs.webkit.org/show_bug.cgi?id=225644
https://trac.webkit.org/changeset/277319

5:54 PM Changeset in webkit [277347] by ggaren@apple.com
  • 2 edits in trunk/Source/WebCore

Function.prototype.toString triggers page demand on Speedometer
https://bugs.webkit.org/show_bug.cgi?id=225678

Reviewed by Mark Lam.

Some JS libraries -- e.g. jQuery, Ember-Debug, Angular -- like to
toString() JS functions in order to enforce return type, argument type,
or deprecation invariants. This triggers pathological page demand if
we keep throwing away the underlying script string.

  • loader/cache/CachedResource.cpp:

(WebCore::deadDecodedDataDeletionIntervalForResourceType): Let's try 5s.

5:52 PM Changeset in webkit [277346] by ggaren@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

ConservativeRoots triggers page demand on Speedometer
https://bugs.webkit.org/show_bug.cgi?id=225676

Reviewed by Saam Barati.

Use a Vector instead of OSAllocator to avoid mmap() and page fault --
and, like, come on.

Bump default inlineCapacity up to 1024 because we seem to overflow
frequently.

  • heap/ConservativeRoots.cpp:

(JSC::ConservativeRoots::ConservativeRoots):
(JSC::ConservativeRoots::~ConservativeRoots):
(JSC::ConservativeRoots::genericAddPointer):
(JSC::ConservativeRoots::grow): Deleted.

  • heap/ConservativeRoots.h:

(JSC::ConservativeRoots::roots const):
(JSC::ConservativeRoots::size const): Deleted.

  • heap/SlotVisitor.cpp:

(JSC::SlotVisitor::append):

  • heap/VerifierSlotVisitor.cpp:

(JSC::VerifierSlotVisitor::append):

5:46 PM Changeset in webkit [277345] by commit-queue@webkit.org
  • 5 edits
    2 adds in trunk

[MSE] QuotaExceededError Exception not thrown even if the sum of totalTrackBufferSize and appendBuffer size exceeds maximumBufferSize.
https://bugs.webkit.org/show_bug.cgi?id=225630

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

Source/WebCore:

Test: media/media-source/media-source-append-buffer-full-quota-exceeded-error.html

  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::appendBufferInternal):

  • platform/graphics/SourceBufferPrivate.cpp:

(WebCore::SourceBufferPrivate::evictCodedFrames):

  • platform/graphics/SourceBufferPrivate.h:

LayoutTests:

  • media/media-source/media-source-append-buffer-full-quota-exceeded-error-expected.txt: Added.
  • media/media-source/media-source-append-buffer-full-quota-exceeded-error.html: Added.
5:05 PM Changeset in webkit [277344] by commit-queue@webkit.org
  • 4 edits in trunk/Source

Remove xpc_connection_kill
https://bugs.webkit.org/show_bug.cgi?id=225602

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

Source/WebKit:

  • UIProcess/Launcher/mac/ProcessLauncherMac.mm:

(WebKit::terminateWithReason):

Source/WTF:

  • wtf/PlatformHave.h:
4:41 PM Changeset in webkit [277343] by sihui_liu@apple.com
  • 8 edits in trunk

Use one VM per thread for IDB serialization work
https://bugs.webkit.org/show_bug.cgi?id=225658

Reviewed by Chris Dumez.

Source/WebCore:

The vm map in IDBSerializationContext uses sessionID as key instead of thread identifier. Normally IDB has one
thread per session (see WebIDBServer and CrossThreadTaskHandler), so we are using one vm per thread. With
r275799, we remove WebIDBServer more aggressively (when no web process is not using IDB) to make sure its thread
does not stay around, and WebIDBServer will be destroyed after it finishes scheduled tasks on the background
thread. Then, it's possible that while a WebIDBServer for some session is removed and finishing last tasks,
a new IDB request for the same session comes in and we create a new WebIDBServer for the session. In this case,
two threads ends up using the same VM.

VM is generally not designed to be used on multiple threads, otherwise we need to acquire lock for each
WTF::String operation to get correct AtomStringTable. So let's just make sure we are using one VM per thread by
making the map in IDBSerializationContext keyed by thread pointer.

New API test: IndexedDB.OneVMPerThread

  • Modules/indexeddb/server/IDBSerializationContext.cpp:

(WebCore::IDBServer::IDBSerializationContext::getOrCreateIDBSerializationContext):
(WebCore::IDBServer::IDBSerializationContext::~IDBSerializationContext):
(WebCore::IDBServer::IDBSerializationContext::vm):
(WebCore::IDBServer::IDBSerializationContext::globalObject):
(WebCore::IDBServer::IDBSerializationContext::IDBSerializationContext):

  • Modules/indexeddb/server/IDBSerializationContext.h:
  • Modules/indexeddb/server/MemoryIDBBackingStore.cpp:

(WebCore::IDBServer::MemoryIDBBackingStore::MemoryIDBBackingStore):

  • Modules/indexeddb/server/MemoryObjectStore.cpp:

(WebCore::IDBServer::MemoryObjectStore::MemoryObjectStore):

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::SQLiteIDBBackingStore):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/IndexedDBDatabaseProcessKill.mm:

(-[DatabaseProcessKillMessageHandler userContentController:didReceiveScriptMessage:]):
(TEST):

4:30 PM Changeset in webkit [277342] by Russell Epstein
  • 8 edits in branches/safari-612.1.12-branch/Source

Versioning.

WebKit-7612.1.12.6

2:39 PM Changeset in webkit [277341] by Chris Dumez
  • 17 edits
    1 add in trunk

Add SPI to suspend / resume a WKWebView
https://bugs.webkit.org/show_bug.cgi?id=225333
<rdar://77462543>

Reviewed by Geoffrey Garen.

Source/WebCore:

Add new function to BackForwardCache to suspend a page and return a CachedPage
instead of requiring a HistoryItem and storing the CachedPage on that history
item. This is useful when we want to suspend the page in-place and do not want
to require a history item (or a navigation).

  • Headers.cmake:
  • history/BackForwardCache.cpp:

(WebCore::BackForwardCache::trySuspendPage):
(WebCore::BackForwardCache::addIfCacheable):
(WebCore::BackForwardCache::suspendPage):

  • history/BackForwardCache.h:
  • history/CachedPage.h:

Source/WebKit:

Add SPI to suspend / resume a WKWebView. This suspends the page as if it was in
the back/forward cache but the suspension happens in-place, no need to navigate.
The suspended page is also not part of the Back/Forward cache so its cap on the
number of suspended pages does not apply here.

Most of WKWebView's API / SPI will throw an exception when called on a suspended
view (The WKPageRefAPI will RELEASE_ASSERT()). Some of the basic API will stay
functional (URL, isLoading, title, ...). It is also safe to deallocate / close
a suspended WKWebView.

  • UIProcess/API/C/WKPage.cpp:

(crashIfPageIsSuspended):
(WKPageLoadURL):
(WKPageLoadURLWithShouldOpenExternalURLsPolicy):
(WKPageLoadURLWithUserData):
(WKPageLoadURLRequest):
(WKPageLoadURLRequestWithUserData):
(WKPageLoadFile):
(WKPageLoadFileWithUserData):
(WKPageLoadData):
(WKPageLoadDataWithUserData):
(WKPageLoadHTMLString):
(WKPageLoadHTMLStringWithUserData):
(WKPageLoadAlternateHTMLString):
(WKPageLoadAlternateHTMLStringWithUserData):
(WKPageLoadPlainTextString):
(WKPageLoadPlainTextStringWithUserData):
(WKPageLoadWebArchiveData):
(WKPageLoadWebArchiveDataWithUserData):
(WKPageStopLoading):
(WKPageReload):
(WKPageReloadWithoutContentBlockers):
(WKPageReloadFromOrigin):
(WKPageReloadExpiredOnly):
(WKPageTryClose):
(WKPageClose):
(WKPageGoForward):
(WKPageGoBack):
(WKPageGoToBackForwardListItem):
(WKPageTryRestoreScrollPosition):
(WKPageUpdateWebsitePolicies):
(WKPageSetApplicationNameForUserAgent):
(WKPageSetCustomUserAgent):
(WKPageSetCustomTextEncodingName):
(WKPageTerminate):
(WKPageRestoreFromSessionState):
(WKPageRestoreFromSessionStateWithoutNavigation):
(WKPageSetCustomBackingScaleFactor):
(WKPageSetTextZoomFactor):
(WKPageSetPageZoomFactor):
(WKPageSetPageAndTextZoomFactors):
(WKPageSetScaleFactor):
(WKPageSetUseFixedLayout):
(WKPageSetFixedLayoutSize):
(WKPageListenForLayoutMilestones):
(WKPageSetSuppressScrollbarAnimations):
(WKPageSetRubberBandsAtLeft):
(WKPageSetRubberBandsAtRight):
(WKPageSetRubberBandsAtTop):
(WKPageSetRubberBandsAtBottom):
(WKPageSetEnableVerticalRubberBanding):
(WKPageSetEnableHorizontalRubberBanding):
(WKPageSetBackgroundExtendsBeyondPage):
(WKPageSetPaginationMode):
(WKPageSetPaginationBehavesLikeColumns):
(WKPageSetPageLength):
(WKPageSetGapBetweenPages):
(WKPageSetPaginationLineGridEnabled):
(WKPageSetMaintainsInactiveSelection):
(WKPageCenterSelectionInVisibleArea):
(WKPageFindStringMatches):
(WKPageGetImageForFindMatch):
(WKPageSelectFindMatch):
(WKPageFindString):
(WKPageHideFindUI):
(WKPageCountStringMatches):
(WKPageSetPageContextMenuClient):
(WKPageSetPageFindClient):
(WKPageSetPageFindMatchesClient):
(WKPageSetPageInjectedBundleClient):
(WKPageSetPageFormClient):
(WKPageSetPageLoaderClient):
(WKPageSetPagePolicyClient):
(WKPageSetPageUIClient):
(WKPageSetPageNavigationClient):
(WKPageSetPageStateClient):
(WKPageRunJavaScriptInMainFrame):
(WKPageRunJavaScriptInMainFrame_b):
(WKPageRenderTreeExternalRepresentation):
(WKPageGetSourceForFrame):
(WKPageGetContentsAsString):
(WKPageGetBytecodeProfile):
(WKPageGetSamplingProfilerOutput):
(WKPageGetSelectionAsWebArchiveData):
(WKPageGetContentsAsMHTMLData):
(WKPageForceRepaint):
(WKPageValidateCommand):
(WKPageExecuteCommand):
(WKPageComputePagesForPrinting):
(WKPageDrawPagesToPDF):
(WKPageBeginPrinting):
(WKPageEndPrinting):
(WKPageSetControlledByAutomation):
(WKPageSetAllowsRemoteInspection):
(WKPageSetMediaVolume):
(WKPageSetMuted):
(WKPageSetMediaCaptureEnabled):
(WKPageDidAllowPointerLock):
(WKPageClearUserMediaState):
(WKPageDidDenyPointerLock):
(WKPageSetMayStartMediaWhenInWindow):
(WKPageSelectContextMenuItem):
(WKPageSetScrollPinningBehavior):
(WKPageSetAddsVisitedLinks):
(WKPageClearWheelEventTestMonitor):
(WKPageCallAfterNextPresentationUpdate):
(WKPageSetIgnoresViewportScaleLimits):
(WKPageGetApplicationManifest_b):
(WKPageDumpPrivateClickMeasurement):
(WKPageClearPrivateClickMeasurement):
(WKPageSetPrivateClickMeasurementOverrideTimerForTesting):
(WKPageMarkAttributedPrivateClickMeasurementsAsExpiredForTesting):
(WKPageSimulateResourceLoadStatisticsSessionRestart):
(WKPageSetPrivateClickMeasurementTokenPublicKeyURLForTesting):
(WKPageSetPrivateClickMeasurementTokenSignatureURLForTesting):
(WKPageSetPrivateClickMeasurementAttributionReportURLsForTesting):
(WKPageMarkPrivateClickMeasurementsAsExpiredForTesting):
(WKPageSetPCMFraudPreventionValuesForTesting):
(WKPageSetMockCameraOrientation):
(WKPageLoadedSubresourceDomains):
(WKPageClearLoadedSubresourceDomains):
(WKPageSetMediaCaptureReportingDelayForTesting):
(WKPageDispatchActivityStateUpdateForTesting):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView loadRequest:]):
(-[WKWebView loadFileURL:allowingReadAccessToURL:]):
(-[WKWebView loadHTMLString:baseURL:]):
(-[WKWebView loadData:MIMEType:characterEncodingName:baseURL:]):
(-[WKWebView startDownloadUsingRequest:completionHandler:]):
(-[WKWebView resumeDownloadFromResumeData:completionHandler:]):
(-[WKWebView goToBackForwardListItem:]):
(-[WKWebView goBack]):
(-[WKWebView goForward]):
(-[WKWebView reload]):
(-[WKWebView reloadFromOrigin]):
(-[WKWebView stopLoading]):
(-[WKWebView evaluateJavaScript:completionHandler:]):
(-[WKWebView evaluateJavaScript:inFrame:inContentWorld:completionHandler:]):
(-[WKWebView callAsyncJavaScript:arguments:inFrame:inContentWorld:completionHandler:]):
(-[WKWebView closeAllMediaPresentationsWithCompletionHandler:]):
(-[WKWebView pauseAllMediaPlaybackWithCompletionHandler:]):
(-[WKWebView setAllMediaPlaybackSuspended:completionHandler:]):
(-[WKWebView requestMediaPlaybackStateWithCompletionHandler:]):
(-[WKWebView setMicrophoneCaptureState:completionHandler:]):
(-[WKWebView setCameraCaptureState:completionHandler:]):
(-[WKWebView _evaluateJavaScript:asAsyncFunction:withSourceURL:withArguments:forceUserGesture:inFrame:inWorld:completionHandler:]):
(-[WKWebView takeSnapshotWithConfiguration:completionHandler:]):
(-[WKWebView setAllowsBackForwardNavigationGestures:]):
(-[WKWebView setCustomUserAgent:]):
(-[WKWebView setAllowsLinkPreview:]):
(-[WKWebView setPageZoom:]):
(-[WKWebView findString:withConfiguration:completionHandler:]):
(-[WKWebView setMediaType:]):
(-[WKWebView setInteractionState:]):
(-[WKWebView setAllowsMagnification:]):
(-[WKWebView setMagnification:centeredAtPoint:]):
(-[WKWebView setMagnification:]):
(-[WKWebView printOperationWithPrintInfo:]):
(-[WKWebView createPDFWithConfiguration:completionHandler:]):
(-[WKWebView createWebArchiveDataWithCompletionHandler:]):
(-[WKWebView loadSimulatedRequest:response:responseData:]):
(-[WKWebView loadSimulatedRequest:withResponse:responseData:]):
(-[WKWebView loadSimulatedRequest:responseHTMLString:]):
(-[WKWebView loadSimulatedRequest:withResponseHTMLString:]):
(-[WKWebView loadFileRequest:allowingReadAccessToURL:]):
(-[WKWebView _toggleStrikeThrough:]):
(-[WKWebView _increaseListLevel:]):
(-[WKWebView _decreaseListLevel:]):
(-[WKWebView _changeListType:]):
(-[WKWebView _setViewportSizeForCSSViewportUnits:]):
(-[WKWebView _didEnableBrowserExtensions:]):
(-[WKWebView _didDisableBrowserExtensions:]):
(-[WKWebView _setEditable:]):
(-[WKWebView _executeEditCommand:argument:completion:]):
(-[WKWebView _startTextManipulationsWithConfiguration:completion:]):
(-[WKWebView _completeTextManipulation:completion:]):
(-[WKWebView _completeTextManipulationForItems:completion:]):
(-[WKWebView _takeFindStringFromSelection:]):
(-[WKWebView _updateMediaPlaybackControlsManager]):
(-[WKWebView _togglePictureInPicture]):
(-[WKWebView _closeAllMediaPresentations]):
(-[WKWebView _stopMediaCapture]):
(-[WKWebView _stopAllMediaPlayback]):
(-[WKWebView _suspendAllMediaPlayback]):
(-[WKWebView _resumeAllMediaPlayback]):
(-[WKWebView _restoreAppHighlights:]):
(-[WKWebView _restoreAndScrollToAppHighlight:]):
(-[WKWebView _addAppHighlight]):
(-[WKWebView _loadAlternateHTMLString:baseURL:forUnreachableURL:]):
(-[WKWebView _loadData:MIMEType:characterEncodingName:baseURL:userData:]):
(-[WKWebView _loadRequest:shouldOpenExternalURLs:]):
(-[WKWebView _loadRequest:shouldOpenExternalURLsPolicy:]):
(-[WKWebView _grantAccessToAssetServices]):
(-[WKWebView _revokeAccessToAssetServices]):
(-[WKWebView _switchFromStaticFontRegistryToUserFontRegistry]):
(-[WKWebView _appBoundNavigationDataForDomain:completionHandler:]):
(-[WKWebView _suspendPage:]):
(-[WKWebView _resumePage:]):
(-[WKWebView _setApplicationNameForUserAgent:]):
(-[WKWebView _killWebContentProcess]):
(-[WKWebView _reloadWithoutContentBlockers]):
(-[WKWebView _reloadExpiredOnly]):
(-[WKWebView _killWebContentProcessAndResetState]):
(-[WKWebView _takePDFSnapshotWithConfiguration:completionHandler:]):
(-[WKWebView _getPDFFirstPageSizeInFrame:completionHandler:]):
(-[WKWebView _restoreFromSessionStateData:]):
(-[WKWebView _restoreSessionState:andNavigate:]):
(-[WKWebView _close]):
(-[WKWebView _tryClose]):
(-[WKWebView _insertAttachmentWithFilename:contentType:data:options:completion:]):
(-[WKWebView _insertAttachmentWithFileWrapper:contentType:options:completion:]):
(-[WKWebView _insertAttachmentWithFileWrapper:contentType:completion:]):
(-[WKWebView _attachmentForIdentifier:]):
(-[WKWebView _simulateDeviceOrientationChangeWithAlpha:beta:gamma:]):
(-[WKWebView _showSafeBrowsingWarningWithTitle:warning:details:completionHandler:]):
(-[WKWebView _showSafeBrowsingWarningWithURL:title:warning:details:completionHandler:]):
(-[WKWebView _showSafeBrowsingWarningWithURL:title:warning:detailsWithLinks:completionHandler:]):
(-[WKWebView _isJITEnabled:]):
(-[WKWebView _evaluateJavaScriptWithoutUserGesture:completionHandler:]):
(-[WKWebView _callAsyncJavaScript:arguments:inFrame:inContentWorld:completionHandler:]):
(-[WKWebView _evaluateJavaScript:inFrame:inContentWorld:completionHandler:]):
(-[WKWebView _evaluateJavaScript:withSourceURL:inFrame:inContentWorld:completionHandler:]):
(-[WKWebView _updateWebpagePreferences:]):
(-[WKWebView _notifyUserScripts]):
(-[WKWebView _deferrableUserScriptsNeedNotification]):
(-[WKWebView _setAllowsRemoteInspection:]):
(-[WKWebView _setRemoteInspectionNameOverride:]):
(-[WKWebView _setAddsVisitedLinks:]):
(-[WKWebView _getMainResourceDataWithCompletionHandler:]):
(-[WKWebView _getWebArchiveDataWithCompletionHandler:]):
(-[WKWebView _getContentsAsStringWithCompletionHandler:]):
(-[WKWebView _getContentsOfAllFramesAsStringWithCompletionHandler:]):
(-[WKWebView _getContentsAsAttributedStringWithCompletionHandler:]):
(-[WKWebView _getApplicationManifestWithCompletionHandler:]):
(-[WKWebView _setPaginationMode:]):
(-[WKWebView _setPaginationBehavesLikeColumns:]):
(-[WKWebView _setPageLength:]):
(-[WKWebView _setGapBetweenPages:]):
(-[WKWebView _setPaginationLineGridEnabled:]):
(-[WKWebView _setTextZoomFactor:]):
(-[WKWebView _setPageZoomFactor:]):
(-[WKWebView _countStringMatches:options:maxCount:]):
(-[WKWebView _findString:options:maxCount:]):
(-[WKWebView _hideFindUI]):
(-[WKWebView _saveBackForwardSnapshotForItem:]):
(-[WKWebView _clearServiceWorkerEntitlementOverride:]):
(-[WKWebView _preconnectToServer:]):
(-[WKWebView _setCanUseCredentialStorage:]):
(-[WKWebView _setLayoutMode:]):
(-[WKWebView _setFixedLayoutSize:]):
(-[WKWebView _setBackgroundExtendsBeyondPage:]):
(-[WKWebView _setViewScale:]):
(-[WKWebView _setCORSDisablingPatterns:]):
(-[WKWebView _getProcessDisplayNameWithCompletionHandler:]):
(-[WKWebView _setMinimumEffectiveDeviceWidth:]):
(-[WKWebView _grantAccessToPreferenceService]):
(-[WKWebView _setScrollPerformanceDataCollectionEnabled:]):
(-[WKWebView _setAllowsMediaDocumentInlinePlayback:]):
(-[WKWebView _setMediaCaptureEnabled:]):
(-[WKWebView _setPageMuted:]):
(-[WKWebView _removeDataDetectedLinks:]):
(-[WKWebView _doAfterNextPresentationUpdate:]):
(-[WKWebView _doAfterNextPresentationUpdateWithoutWaitingForPainting:]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::handleTouchEvent):
(WebKit::WebPageProxy::resumeActiveDOMObjectsAndAnimations):
(WebKit::WebPageProxy::suspendActiveDOMObjectsAndAnimations):
(WebKit::WebPageProxy::suspend):
(WebKit::WebPageProxy::resume):
(WebKit::WebPageProxy::requestMediaPlaybackState):
(WebKit::WebPageProxy::resetStateAfterProcessExited):

  • UIProcess/WebPageProxy.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::suspend):
(WebKit::WebPage::resume):

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

Tools:

Add API test coverage.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSuspension.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/postMessage-regularly.html: Added.
2:22 PM Changeset in webkit [277340] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ BigSur wk2 arm64 ] editing/selection/move-by-character-brute-force.html (layout-test) is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=225664

Unreviewed test gardening.

Updating expectations to Pass Timeout for BigSur wk2 arm64.

  • platform/mac-wk2/TestExpectations:
1:46 PM Changeset in webkit [277339] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ BigSur Release wk2 arm64 ] http/tests/appcache/fail-on-update-2.html (layout-test) is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=225665

Unreviewed test gardening.

Updating test expectations to Pass Timeout for BigSur Release wk2 arm64.

  • platform/mac-wk2/TestExpectations:
1:45 PM Changeset in webkit [277338] by Ben Nham
  • 2 edits in trunk/Source/WebKit

Failing sandbox check for media permissions should not generate a violation report
https://bugs.webkit.org/show_bug.cgi?id=225662

Reviewed by Geoffrey Garen.

We sandbox_check the UIProcess for camera and video permissions. But if the process doesn't
have those permissions, sandbox_check fails and generates an expensive violation report that
task_suspends the process. We need to suppress the reporting with SANDBOX_CHECK_NO_REPORT.

  • UIProcess/Cocoa/MediaPermissionUtilities.mm:

(WebKit::checkSandboxRequirementForType):

12:48 PM Changeset in webkit [277337] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ BigSur wk2 arm64 ] http/tests/cache/disk-cache/redirect-chain-limits.html (layout-test) is a flaky timeout
Nhttps://bugs.webkit.org/show_bug.cgi?id=225666

Unreviewed test gardening.

Updating expectations to Pass timeout.

  • platform/mac-wk2/TestExpectations:
12:47 PM Changeset in webkit [277336] by commit-queue@webkit.org
  • 20 edits in trunk

Add SPI to restrict networking to a set of hosts
https://bugs.webkit.org/show_bug.cgi?id=225426
<rdar://77571521>

Patch by Alex Christensen <achristensen@webkit.org> on 2021-05-11
Reviewed by Tim Horton.

Source/WebCore:

In r259392 I added SPI to turn network access on and off, but a client needs finer grained control.
This uses the same infrastructure to add a set of hosts to allow. Setting it to nil (the default) allows all hosts,
but setting it to an empty set allows no network access. This accomplishes the same ability as the old SPI, so I'm deprecating it
with this as a replacement. The new ability to specify a finite number of hosts to allow creates a limited WKWebView.

  • Modules/websockets/ThreadableWebSocketChannel.cpp:

(WebCore::ThreadableWebSocketChannel::validateURL):

  • loader/ResourceLoadNotifier.cpp:

(WebCore::ResourceLoadNotifier::dispatchWillSendRequest):

  • page/Page.cpp:

(WebCore::Page::allowsLoadFromURL const):

  • page/Page.h:

(WebCore::Page::loadsFromNetwork const): Deleted.

  • page/PageConfiguration.h:

Source/WebKit:

  • Shared/WebPageCreationParameters.cpp:

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

  • Shared/WebPageCreationParameters.h:
  • UIProcess/API/APIPageConfiguration.cpp:

(API::PageConfiguration::copy const):

  • UIProcess/API/APIPageConfiguration.h:

(API::PageConfiguration::allowedNetworkHosts const):
(API::PageConfiguration::setAllowedNetworkHosts):
(API::PageConfiguration::loadsFromNetwork const): Deleted.
(API::PageConfiguration::setLoadsFromNetwork): Deleted.

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration _setLoadsFromNetwork:]):
(-[WKWebViewConfiguration _loadsFromNetwork]):
(-[WKWebViewConfiguration _setAllowedNetworkHosts:]):
(-[WKWebViewConfiguration _allowedNetworkHosts]):

  • UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::creationParameters):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_lastNavigationWasAppBound):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm:

(TEST):
(webSocketAcceptValue): Deleted.

  • TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:
  • TestWebKitAPI/cocoa/HTTPServer.h:

(TestWebKitAPI::Connection::webSocketHandshake):

  • TestWebKitAPI/cocoa/HTTPServer.mm:

(TestWebKitAPI::Connection::webSocketHandshake):

12:02 PM Changeset in webkit [277335] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

REGRESSION (r277071): imported/w3c/web-platform-tests/css/mediaqueries/test_media_queries.html is failing
https://bugs.webkit.org/show_bug.cgi?id=225469

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations: Mark the test as failing for iOS, too.
11:22 AM Changeset in webkit [277334] by Amir Mark Jr.
  • 2 edits in trunk/LayoutTests

[BigSur Wk2 Arm64] http/tests/privateClickMeasurement/store-private-click-measurement-with-source-nonce.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=224783

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
11:05 AM Changeset in webkit [277333] by Robert Jenner
  • 2 edits in trunk/LayoutTests

js/dom/Promise-reject-large-string.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=225258

Unreviewed test gardening.

Updating expectation to Pass Failure for arm64 only.

  • platform/mac/TestExpectations:
11:01 AM Changeset in webkit [277332] by youenn@apple.com
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

Improve usrsctp restart handling
https://bugs.webkit.org/show_bug.cgi?id=225638
<rdar://77582953>

Reviewed by Alex Christensen.

  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_input.c:

(sctp_process_cookie_existing):

11:00 AM Changeset in webkit [277331] by Brent Fulgham
  • 4 edits in trunk/Source/WebKit

[macOS] Extend access to 'com.apple.print.normalizerd' when canvas drawing is done in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=225623
<rdar://problem/77354349>

Reviewed by Per Arne Vollan.

We need to dynamically extend access to 'com.apple.print.normalizerd' when the GPU Process is not handling canvas drawing.
WebKit needs this access to properly draw EPS images.

Tested by fast/images/eps-as-image.html

  • UIProcess/WebPageProxy.cpp:

(WebKit::gpuMachServices): Add 'com.apple.print.normalizerd' to set of required services.

  • WebAuthnProcess/mac/com.apple.WebKit.WebAuthnProcess.sb.in: Remove 'com.apple.print.normalizerd' since it is

not possible to use from the Web Authentication process.

  • WebProcess/com.apple.WebProcess.sb.in: Expect the extension to be dynamically extended on all releases.
10:46 AM Changeset in webkit [277330] by Megan Gardner
  • 6 edits
    2 copies in trunk

Factor out find bounce layer
https://bugs.webkit.org/show_bug.cgi?id=225557

Reviewed by Tim Horton.

Factor out the text indicator bounce layer in preparation of making this
compatable with iOS.

No behavior change.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • page/mac/TextIndicatorWindow.h:
  • page/mac/TextIndicatorWindow.mm:

(WebCore::TextIndicatorWindow::setAnimationProgress):
(WebCore::TextIndicatorWindow::clearTextIndicator):
(WebCore::TextIndicatorWindow::setTextIndicator):
(WebCore::TextIndicatorWindow::closeWindow):
(WebCore::TextIndicatorWindow::startFadeOut):
(indicatorWantsBounce): Deleted.
(indicatorWantsContentCrossfade): Deleted.
(indicatorWantsFadeIn): Deleted.
(indicatorWantsManualAnimation): Deleted.
(-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]): Deleted.
(createBounceAnimation): Deleted.
(createContentCrossfadeAnimation): Deleted.
(createShadowFadeAnimation): Deleted.
(createFadeInAnimation): Deleted.
(-[WebTextIndicatorView _animationDuration]): Deleted.
(-[WebTextIndicatorView hasCompletedAnimation]): Deleted.
(-[WebTextIndicatorView present]): Deleted.
(-[WebTextIndicatorView hideWithCompletionHandler:]): Deleted.
(-[WebTextIndicatorView setAnimationProgress:]): Deleted.
(-[WebTextIndicatorView isFlipped]): Deleted.

10:45 AM Changeset in webkit [277329] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

Don't allow :visited link style in subtrees that use mix-blend-mode
https://bugs.webkit.org/show_bug.cgi?id=225446
rdar://65686091

Unreviewed build fix.

  • rendering/style/RenderStyle.h:
10:16 AM Changeset in webkit [277328] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

Unreviewed, reverting r277322.
https://bugs.webkit.org/show_bug.cgi?id=225657

Causing build failure

Reverted changeset:

"Adopt CoreMedia SPI to identify audio-only playback for MSE
clients"
https://bugs.webkit.org/show_bug.cgi?id=225647
https://trac.webkit.org/changeset/277322

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

[Cocoa] Add _STAttributionDisplayName to macOS and iOS GPUProcess Info.plist
https://bugs.webkit.org/show_bug.cgi?id=225626
rdar://77019240

Reviewed by Youenn Fablet.

  • GPUProcess/EntryPoint/Cocoa/XPCService/GPUService/Info-OSX.plist:
  • GPUProcess/EntryPoint/Cocoa/XPCService/GPUService/Info-iOS.plist:
8:52 AM Changeset in webkit [277326] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Tune number of threads for AS
https://bugs.webkit.org/show_bug.cgi?id=225635

Reviewed by Mark Lam.

Using 4 GC markers (which really means 3 parallel GC worker threads -- the mutator thread is
the 4th), 2 DFG threads, and 2 FTL threads seems to be more optimal than going off ncpu.

~1% JetStream2 speed-up, ~1% Speedometer2 speed-up.

  • runtime/Options.cpp:

(JSC::overrideDefaults):

8:33 AM Changeset in webkit [277325] by Alan Bujtas
  • 6 edits
    2 adds in trunk

REGRESSION(r275515): wpt/quirks/blocks-ignore-line-height.html
https://bugs.webkit.org/show_bug.cgi?id=225591
<rdar://problem/77766308>

Reviewed by Antti Koivisto.

Source/WebCore:

Replace the generic line height quirk with a list-item specific one.
The original quirk was added to cover fast/lists/list-item-line-height.html but it looks like
it only needs a list-item specific quirk. This is copied from legacy line layout (see InlineFlowBox c'tor).

Test: fast/inline/line-height-in-non-standards-mode.html

  • layout/formattingContexts/inline/InlineFormattingContextQuirks.cpp:

(WebCore::Layout::InlineFormattingContext::Quirks::inlineLevelBoxAffectsLineBox const):

  • layout/integration/LayoutIntegrationBoxTree.cpp:

(WebCore::LayoutIntegration::rootBoxStyle):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::isOriginalDisplayListItemType const):
(WebCore::RenderStyle::isDisplayListItemType):

LayoutTests:

  • fast/inline/incorrect-middle-baseline-alignment-with-line-height-expected.html: progression.
  • fast/inline/line-height-in-non-standards-mode-expected.html: Added.
  • fast/inline/line-height-in-non-standards-mode.html: Added.
7:55 AM Changeset in webkit [277324] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebKit

[WebXR] Return a default layer handle in XRDeviceProxy::createLayerProjection
https://bugs.webkit.org/show_bug.cgi?id=225631

Patch by Ada Chan <ada.chan@apple.com> on 2021-05-11
Reviewed by Dean Jackson.

  • Shared/Cocoa/XRDeviceProxy.h:
  • Shared/Cocoa/XRDeviceProxy.mm:

(WebKit::XRDeviceProxy::createLayerProjection):

  • UIProcess/Cocoa/PlatformXRCoordinator.h:

(WebKit::PlatformXRCoordinator::defaultLayerHandle):

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

(WebKit::PlatformXRSystemProxy::createLayerProjection):

6:53 AM Changeset in webkit [277323] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][Integration] Disable IFC when inline level box has box shadow
https://bugs.webkit.org/show_bug.cgi?id=225634

Reviewed by Darin Adler.

Needs painting support.

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::canUseForChild):

6:42 AM Changeset in webkit [277322] by Jean-Yves Avenard
  • 4 edits in trunk/Source/WebCore

Adopt CoreMedia SPI to identify audio-only playback for MSE clients
https://bugs.webkit.org/show_bug.cgi?id=225647
rdar://76138365

Reviewed by Youenn Fablet.

Source/WebCore:

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: tells whether the AVSBAR is attached to an <audio> or <video> element.

Source/WebCore/PAL:

  • pal/spi/cocoa/AVFoundationSPI.h: Add forward declaration for new methods while this isn't in SDK yet.
5:49 AM Changeset in webkit [277321] by cathiechen
  • 37 edits in trunk

[CSS contain] Support contain:size
https://bugs.webkit.org/show_bug.cgi?id=223570

Reviewed by Alan Bujtas.

LayoutTests/imported/w3c:

<canvas> and <video> don't support computing aspect ratio from width and height attributes yet,
so the heights are zero when they are with "contain: size".

  • web-platform-tests/css/css-contain/contain-size-grid-003-expected.txt:
  • web-platform-tests/css/css-contain/contain-size-grid-004-expected.txt:
  • web-platform-tests/css/css-contain/contain-size-multicol-as-flex-item-expected.txt:
  • web-platform-tests/css/css-flexbox/flex-item-contains-strict-expected.txt:
  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/canvas-aspect-ratio-expected.txt:
  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-aspect-ratio-expected.txt:

Source/WebCore:

This patch brings initial support of CSS contain:size according to [1].
It adds shouldApplySizeContainment() to indicate whether the object is a size containment box.
The intrinsic sizes of size containment box are determined as if it had no content.
So the implementation need to cooperate with the layout steps:

  • Computing logical width: Size containment boxes skip handling children while computing minLogicalWidth and maxLogicalWidth in computeIntrinsicLogicalWidths. So the logical width is not affected by children.
  • Layout children: The logical height is changed after layout all children.
  • Computing logical height: At the beginning, size containment boxes need to reset logical height to the empty content height if it is not renderGrid. So the logical height is not affected by children.

We also need to calculate the sizes according to the layout algorithms.

  • Grid layout: To calculate the minLogicalWidth and maxLogicalWidth for indefinite size RenderGrid. The widths are calculated by GridTrackSizingAlgorithm: m_minContentSize and m_maxContentSize which are the sum of m_baseSize/m_growthLimit of all GridTracks. The size containment RenderGrid skips handling content in resolveIntrinsicTrackSizes and the m_maxContentSize will be the sum of m_baseSize. The logical height is same to width, but after calculating RenderGrid's logical height, it needs to calculate the track sizes again, to make sure that they are distributed properly. We use computeTrackSizesForDefiniteSize(ForRows, trackBasedLogicalHeight) to recalculate it.
  • MultiColumn layout: According to the specification, size containment boxes should be monolithic, so we need to extend column height for overflow and positioned size containment boxes. m_spaceShortageForSizeContainment is added to indicate the shortage space that need to balance the column heights. adjustSizeContainmentChildForPagination() will calculate the shortage.

[1] https://www.w3.org/TR/css-contain-1/#containment-size

  • rendering/GridTrackSizingAlgorithm.cpp: Add isComputingSizeContainment to indicate if it is calculating sizes for indefinite size RenderGrid which is size containment.

(WebCore::GridTrackSizingAlgorithm::gridAreaBreadthForChild const):
(WebCore::GridTrackSizingAlgorithm::computeGridContainerIntrinsicSizes):

It skips resolveIntrinsicTrackSizes if isComputingSizeContainment, so growthLimit might be undefined,
if so, use track.baseSize() instead.

(WebCore::GridTrackSizingAlgorithm::resolveIntrinsicTrackSizes): Skip resolve the content if isComputingSizeContainment().
(WebCore::GridTrackSizingAlgorithm::advanceNextState): Added RowSizingExtraIterationForSizeContainment.
(WebCore::GridTrackSizingAlgorithm::isValidTransition const):
(WebCore::GridTrackSizingAlgorithm::run): Do not stretch the track sizes if isComputingSizeContainment().

  • rendering/GridTrackSizingAlgorithm.h:
  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::layoutPositionedObject): Calculate m_spaceShortageForSizeContainment for positioned size containment.
(WebCore::RenderBlock::computeIntrinsicLogicalWidths const): Skip computeBlockPreferredLogicalWidths if shouldApplySizeContainment.

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::computeIntrinsicLogicalWidths const): Skip handling the children for size containment box.
(WebCore::RenderBlockFlow::adjustBlockChildForPagination): Calculate m_spaceShortageForSizeContainment for child.
(WebCore::RenderBlockFlow::adjustSizeContainmentChildForPagination): m_spaceShortageForSizeContainment = childOverflowHeight - remainingLogicalHeight.

  • rendering/RenderBlockFlow.h:
  • rendering/RenderBox.cpp:

(WebCore::RenderBox::updateLogicalHeight): Reset the logical height to empty content height for size containment box.
(WebCore::RenderBox::isUnsplittableForPagination const): Size containment box is unsplittable.

  • rendering/RenderDeprecatedFlexibleBox.cpp:

(WebCore::RenderDeprecatedFlexibleBox::computeIntrinsicLogicalWidths const): Ditto.

  • rendering/RenderFileUploadControl.cpp:

(WebCore::RenderFileUploadControl::computeIntrinsicLogicalWidths const): Ditto.

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::computeIntrinsicLogicalWidths const): Ditto.

  • rendering/RenderFragmentedFlow.h:
  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::layoutBlock): If it is size containment with infiniteSize, using trackBasedLogicalHeight
to compute track sizes again to make sure the height is distributed properly.
(WebCore::RenderGrid::computeEmptyTracksForAutoRepeat const): Collapse if shouldApplySizeContainment.

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::computeIntrinsicRatioInformation const): This is handled in RenderReplaced::computeIntrinsicRatioInformation instead.

  • rendering/RenderListBox.cpp:

(WebCore::RenderListBox::computeIntrinsicLogicalWidths const): The widths of size containment boxes are optionsSpacingHorizontal.

  • rendering/RenderMenuList.cpp:

(RenderMenuList::computeIntrinsicLogicalWidths const): The widths of size containment box are theme.minimumMenuListSize.

  • rendering/RenderMultiColumnFlow.cpp:

(WebCore::RenderMultiColumnFlow::updateSpaceShortageForSizeContainment): Set m_spaceShortageForSizeContainment.

  • rendering/RenderMultiColumnFlow.h:
  • rendering/RenderMultiColumnSet.cpp:

(WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
(WebCore::RenderMultiColumnSet::calculateBalancedHeight const): Add m_spaceShortageForSizeContainment to the column height.
(WebCore::RenderMultiColumnSet::prepareForLayout): Reset m_spaceShortageForSizeContainment.

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

(WebCore::shouldApplySizeContainment): Check if the object is a size containment box.

  • rendering/RenderObject.h:

(WebCore::RenderObject::isAtomicInlineLevelBox const):

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox const):
(WebCore::RenderReplaced::computeIntrinsicRatioInformation const): Use the empty intrinsicSize.

  • rendering/RenderReplaced.h: The intrinsicSize of size containment is (0, 0).
  • rendering/RenderSlider.cpp:

(WebCore::RenderSlider::computeIntrinsicLogicalWidths const): Ditto.

  • rendering/RenderTextControl.cpp:

(WebCore::RenderTextControl::computeIntrinsicLogicalWidths const): Ditto.

  • rendering/RenderVideo.cpp:

(WebCore::RenderVideo::calculateIntrinsicSize): Ditto.

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::containsSize const):

  • rendering/svg/RenderSVGRoot.cpp:

(WebCore::RenderSVGRoot::computeIntrinsicRatioInformation const): Handled in RenderReplaced::computeIntrinsicRatioInformation instead.

LayoutTests:

Update the test result for size containment. Added explanations for size containment tests
that depended on other features.

5:24 AM Changeset in webkit [277320] by Antti Koivisto
  • 6 edits
    2 adds in trunk

Don't allow :visited link style in subtrees that use mix-blend-mode
https://bugs.webkit.org/show_bug.cgi?id=225446
rdar://65686091

Reviewed by Darin Adler.
Source/WebCore:

Test: fast/css/visited-link-mix-blend-mode.html

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::visitedDependentColor const):

Return unvisited style in substrees that use mix-blend-mode.

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::setBlendMode):
(WebCore::RenderStyle::isInSubtreeWithBlendMode const):

Add an inherited fake property for tracking this.

  • rendering/style/StyleRareInheritedData.cpp:

(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator== const):

  • rendering/style/StyleRareInheritedData.h:

LayoutTests:

  • fast/css/visited-link-mix-blend-mode-expected.html: Added.
  • fast/css/visited-link-mix-blend-mode.html: Added.
3:39 AM Changeset in webkit [277319] by Diego Pino Garcia
  • 2 edits in trunk/Tools

[GTK] compositing/overflow/dynamic-composited-scrolling-status.html is failing
https://bugs.webkit.org/show_bug.cgi?id=225644

Reviewed by Carlos Garcia Campos.

The test started failing in r277258, which makes WebKitGTK to use
always async scrolling in AC mode. After this change, WebKitTestRunner
should always enable AsyncOverflowScrolling.

  • WebKitTestRunner/gtk/TestControllerGtk.cpp:

(WTR::TestController::platformSpecificFeatureDefaultsForTest const): Enable AsyncOverflowScrolling.

1:34 AM Changeset in webkit [277318] by Angelos Oikonomopoulos
  • 6 edits in trunk/Tools

[JSC] detect infrastructure failure for remote stress tests
https://bugs.webkit.org/show_bug.cgi?id=222601

Reviewed by Mark Lam.

run-jsc-stress-tests currently detects failures by the absence of
a failure file (that is generated by each failing test). This is
fragile to begin with, as it assumes that tests that fail to run
(e.g. because of an error in the runner script) are successful by
default.

However, the main motivation for this patch is to make execution
more robust when using remote hosts. Currently,
--gnu-parallel-runner will transparently reschedule jobs on a
different host when a remote host goes away. But detectFailures
expects to be able to connect to all hosts and fetch the failure
files, which fails if a remote host is still down when the run
finishes.

Instead, this patch changes the runners to always generate a status
file with the exit code. detectFailures then fetches all status
files from all hosts that are live on exit. Tests that failed to
run are explicitly accounted for as 'noreport' and are set to
ERROR in the final report.

  • Scripts/run-javascriptcore-tests:

(runJSCStressTests):

  • Scripts/run-jsc-stress-tests:
  • Scripts/webkitruby/jsc-stress-test-writer-default.rb:

May 10, 2021:

9:46 PM Changeset in webkit [277317] by Chris Dumez
  • 3 edits in trunk/Tools

Use non-throwing std::filesystem API in TestRunner
https://bugs.webkit.org/show_bug.cgi?id=225632

Reviewed by Darin Adler.

  • TestRunnerShared/TestCommand.cpp:

(WTR::testPath):
(WTR::testURLString):

  • TestRunnerShared/TestFeatures.cpp:

(WTR::parseTestHeader):

9:31 PM Changeset in webkit [277316] by Wenson Hsieh
  • 10 edits
    1 add in trunk

[macOS] Allow immediate action gestures to begin when force clicking text inside image overlays
https://bugs.webkit.org/show_bug.cgi?id=225600
<rdar://problem/77792365>

Reviewed by Tim Horton.

Source/WebCore:

Allow immediate action hit-testing to descend into image overlay content. Currently, this uses the
DisallowsUserAgentShadowContent hit-testing option, causing us to ignore image overlays (which exist inside
the UA shadow root). To fix this, we introduce a DisallowsUserAgentShadowContentExceptForImageOverlays option
that behaves like the existing DisallowsUserAgentShadowContent option, with the exception that we allow hit-
testing to pierce the UA shadow root to find nodes inside image overlays.

Tests: ImmediateActionTests.ImmediateActionOverText

ImmediateActionTests.ImmediateActionOverBody
ImmediateActionTests.ImmediateActionOverImageOverlay

  • page/EventHandler.cpp:

(WebCore::EventHandler::hitTestResultAtPoint const):

  • rendering/HitTestRequest.h:

Add support for the new hit-test option, which allows hit-testing to descend into image overlays (and is
intended to be mutually exclusive with the existing DisallowsUserAgentShadowContent option). Specifying both
options will lead to an assertion on debug builds, and DisallowsUserAgentShadowContent takes precedence on
release builds.

(WebCore::HitTestRequest::disallowsUserAgentShadowContentExceptForImageOverlays const):

  • rendering/HitTestResult.cpp:

(WebCore::HitTestResult::addNodeToListBasedTestResultCommon):

Source/WebCore/PAL:

  • pal/spi/mac/NSImmediateActionGestureRecognizerSPI.h:

Source/WebKit:

Adopt the new hit-test option. See WebCore/ChangeLog for more details.

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::performImmediateActionHitTestAtLocation):
(WebKit::WebPage::lookupTextAtLocation):

Tools:

Add new API tests to exercise these changes by grabbing the immediate action NSGestureRecognizer from
WKWebView and calling into its delegate. This patch adds two basic immediate action tests by simulating the
immediate action over text and the body element, and includes a third test that installs an image overlay using
an injected internals object, and verifies that the immediate action in an image overlay matches that of
regular text on the page.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/mac/ImmediateActionTests.mm: Added.

(swizzledImmediateActionLocationInView):
(-[WKWebViewForTestingImmediateActions _immediateActionAnimationControllerForHitTestResult:withType:userData:]):
(-[WKWebViewForTestingImmediateActions immediateActionGesture]):
(-[WKWebViewForTestingImmediateActions simulateImmediateAction:]):
(TestWebKitAPI::TEST):

7:14 PM Changeset in webkit [277315] by Chris Dumez
  • 4 edits in trunk

[ macOS Release wk2 ] http/tests/cache-storage/cache-records-persistency.https.html is flaky crashing
https://bugs.webkit.org/show_bug.cgi?id=225522
<rdar://problem/77680019>

Reviewed by Darin Adler.

Source/WTF:

Pass ec parameter to std::filesystem::directory_iterator() so that it doesn't throw in case of the
path does not exist. Normally, the function would return early earlier if the path does not exist
or isn't a directory. However, in the context of the test, this function is getting called on a
background thread and another thread is deleting the directory in parallel.

  • wtf/FileSystem.cpp:

(WTF::FileSystemImpl::deleteEmptyDirectory):

LayoutTests:

Restore previous expectation for the test, now that it is no longer flaky crashing.

  • platform/mac-wk2/TestExpectations:
7:05 PM Changeset in webkit [277314] by Russell Epstein
  • 1 copy in tags/Safari-612.1.12.5

Tag Safari-612.1.12.5.

6:34 PM Changeset in webkit [277313] by weinig@apple.com
  • 88 edits in trunk/Source

Use PixelBuffer rather than ImageData in platform/ code to fix layering violation
https://bugs.webkit.org/show_bug.cgi?id=225584

Reviewed by Darin Adler.

Source/WebCore:

Replace use of the DOM layer & ref-counted ImageData class with the new
platform layer PixelBuffer class, which ImageData now uses internally.

Since PixelBuffer is not-reference counted or heap-allocated in most cases,
many uses of RefPtr<ImageData> to indicate a potentially null ImageData have
been replaced with Optional<PixelBuffer>. Generally, this allows us to remove
an unnecessary allocation that was only needed for the DOM object.

Additionally, to many functions with ImageData in their name now have
PixelBuffer in their name instead, e.g. ImageBuffer::getImageData is now
ImageBuffer::getPixelBuffer (though I think changing this in the future to
ImageBuffer::copyPixelBuffer is a good idea).

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneSerializer::dumpImageBitmap):
(WebCore::CloneDeserializer::readImageBitmap):

  • html/HTMLCanvasElement.cpp:

(WebCore::HTMLCanvasElement::toDataURL):
(WebCore::HTMLCanvasElement::toBlob):
(WebCore::HTMLCanvasElement::getImageData):

  • html/ImageBitmap.cpp:

(WebCore::ImageBitmap::createPromise):

  • html/ImageData.cpp:

(WebCore::ImageData::create):

  • html/ImageData.h:

(WebCore::ImageData::pixelBuffer const):

  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::CanvasRenderingContext2DBase::getImageData const):
(WebCore::CanvasRenderingContext2DBase::putImageData):

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::paintRenderingResultsToPixelBuffer):
(WebCore::WebGLRenderingContextBase::texImageSourceHelper):
(WebCore::WebGLRenderingContextBase::paintRenderingResultsToImageData): Deleted.

  • html/canvas/WebGLRenderingContextBase.h:
  • page/PageConsoleClient.cpp:

(WebCore::PageConsoleClient::screenshot):

  • platform/graphics/ConcreteImageBuffer.h:

(WebCore::ConcreteImageBuffer::putPixelBuffer):
(WebCore::ConcreteImageBuffer::putImageData): Deleted.

  • platform/graphics/GraphicsContextGL.cpp:

(WebCore::GraphicsContextGL::extractPixelBuffer):
(WebCore::GraphicsContextGL::extractImageData): Deleted.

  • platform/graphics/GraphicsContextGL.h:
  • platform/graphics/ImageBuffer.cpp:
  • platform/graphics/ImageBuffer.h:

(WebCore::ImageBuffer::putPixelBuffer):
(WebCore::ImageBuffer::putImageData): Deleted.

  • platform/graphics/ImageBufferBackend.cpp:

(WebCore::ImageBufferBackend::drawConsuming):
(WebCore::ImageBufferBackend::convertToLuminanceMask):
(WebCore::ImageBufferBackend::toBGRAData const):
(WebCore::copyPremultipliedToPremultiplied):
(WebCore::copyPremultipliedToUnpremultiplied):
(WebCore::copyUnpremultipliedToPremultiplied):
(WebCore::copyUnpremultipliedToUnpremultiplied):
(WebCore::copyFunctor):
(WebCore::ImageBufferBackend::copyImagePixels const):
(WebCore::ImageBufferBackend::getPixelBuffer const):
(WebCore::ImageBufferBackend::putPixelBuffer):
(WebCore::ImageBufferBackend::getImageData const): Deleted.
(WebCore::ImageBufferBackend::putImageData): Deleted.

  • platform/graphics/ImageBufferBackend.h:
  • platform/graphics/PixelBuffer.cpp:

(WebCore::computeBufferSize):
(WebCore::PixelBuffer::tryCreateForDecoding):
(WebCore::PixelBuffer::tryCreate):
(WebCore::operator<<):

  • platform/graphics/PixelBuffer.h:

(WebCore::PixelBuffer::encode const):
(WebCore::PixelBuffer::decode):

  • platform/graphics/ShadowBlur.cpp:

(WebCore::ShadowBlur::blurShadowBuffer):

  • platform/graphics/angle/GraphicsContextGLANGLE.cpp:

(WebCore::GraphicsContextGLOpenGL::readPixelsForPaintResults):
(WebCore::GraphicsContextGLOpenGL::readRenderingResults):

  • platform/graphics/cairo/GraphicsContextGLCairo.cpp:

(WebCore::GraphicsContextGLOpenGL::paintToCanvas):

  • platform/graphics/cairo/ImageBufferCairoSurfaceBackend.cpp:

(WebCore::ImageBufferCairoSurfaceBackend::getPixelBuffer const):
(WebCore::ImageBufferCairoSurfaceBackend::putPixelBuffer):
(WebCore::ImageBufferCairoSurfaceBackend::getImageData const): Deleted.
(WebCore::ImageBufferCairoSurfaceBackend::putImageData): Deleted.

  • platform/graphics/cairo/ImageBufferCairoSurfaceBackend.h:
  • platform/graphics/cg/GraphicsContextGLCG.cpp:

(WebCore::GraphicsContextGLOpenGL::paintToCanvas):

  • platform/graphics/cg/ImageBufferCGBackend.cpp:

(WebCore::ImageBufferCGBackend::toCFData const):

  • platform/graphics/cg/ImageBufferCGBitmapBackend.cpp:

(WebCore::ImageBufferCGBitmapBackend::getPixelBuffer const):
(WebCore::ImageBufferCGBitmapBackend::putPixelBuffer):
(WebCore::ImageBufferCGBitmapBackend::getImageData const): Deleted.
(WebCore::ImageBufferCGBitmapBackend::putImageData): Deleted.

  • platform/graphics/cg/ImageBufferCGBitmapBackend.h:
  • platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp:

(WebCore::ImageBufferIOSurfaceBackend::toCFData const):
(WebCore::ImageBufferIOSurfaceBackend::getPixelBuffer const):
(WebCore::ImageBufferIOSurfaceBackend::putPixelBuffer):
(WebCore::ImageBufferIOSurfaceBackend::getImageData const): Deleted.
(WebCore::ImageBufferIOSurfaceBackend::putImageData): Deleted.

  • platform/graphics/cg/ImageBufferIOSurfaceBackend.h:
  • platform/graphics/cg/ImageBufferUtilitiesCG.cpp:

(WebCore::cfData):
(WebCore::dataURL):
(WebCore::data):

  • platform/graphics/cg/ImageBufferUtilitiesCG.h:
  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:

(WebCore::GraphicsContextGLOpenGL::readCompositedResults):

  • platform/graphics/cpu/arm/filters/FEBlendNEON.h:

(WebCore::FEBlend::platformApplySoftware):

  • platform/graphics/displaylists/DisplayList.cpp:

(WebCore::DisplayList::DisplayList::append):

  • platform/graphics/displaylists/DisplayListItemBuffer.cpp:

(WebCore::DisplayList::ItemHandle::apply):
(WebCore::DisplayList::ItemHandle::destroy):
(WebCore::DisplayList::ItemHandle::safeCopy const):

  • platform/graphics/displaylists/DisplayListItemType.cpp:

(WebCore::DisplayList::sizeOfItemInBytes):
(WebCore::DisplayList::isDrawingItem):
(WebCore::DisplayList::isInlineItem):

  • platform/graphics/displaylists/DisplayListItemType.h:
  • platform/graphics/displaylists/DisplayListItems.cpp:

(WebCore::DisplayList::operator<<):
(WebCore::DisplayList::PutPixelBuffer::PutPixelBuffer):
(WebCore::DisplayList::PutImageData::PutImageData): Deleted.

  • platform/graphics/displaylists/DisplayListItems.h:

(WebCore::DisplayList::GetPixelBuffer::GetPixelBuffer):
(WebCore::DisplayList::PutPixelBuffer::pixelBuffer const):
(WebCore::DisplayList::PutPixelBuffer::encode const):
(WebCore::DisplayList::PutPixelBuffer::decode):
(WebCore::DisplayList::GetImageData::GetImageData): Deleted.
(WebCore::DisplayList::GetImageData::outputFormat const): Deleted.
(WebCore::DisplayList::GetImageData::srcRect const): Deleted.
(WebCore::DisplayList::PutImageData::inputFormat const): Deleted.
(WebCore::DisplayList::PutImageData::imageData const): Deleted.
(WebCore::DisplayList::PutImageData::srcRect const): Deleted.
(WebCore::DisplayList::PutImageData::destPoint const): Deleted.
(WebCore::DisplayList::PutImageData::destFormat const): Deleted.
(WebCore::DisplayList::PutImageData::localBounds const): Deleted.
(WebCore::DisplayList::PutImageData::globalBounds const): Deleted.
(WebCore::DisplayList::PutImageData::encode const): Deleted.
(WebCore::DisplayList::PutImageData::decode): Deleted.

  • platform/graphics/displaylists/DisplayListRecorder.cpp:

(WebCore::DisplayList::Recorder::getPixelBuffer):
(WebCore::DisplayList::Recorder::putPixelBuffer):
(WebCore::DisplayList::Recorder::getImageData): Deleted.
(WebCore::DisplayList::Recorder::putImageData): Deleted.

  • platform/graphics/displaylists/DisplayListRecorder.h:
  • platform/graphics/displaylists/DisplayListReplayer.h:
  • platform/graphics/filters/FEColorMatrix.cpp:

(WebCore::FEColorMatrix::platformApplySoftware):

  • platform/graphics/filters/FEComponentTransfer.cpp:

(WebCore::FEComponentTransfer::platformApplySoftware):

  • platform/graphics/filters/FEComposite.cpp:

(WebCore::FEComposite::platformApplySoftware):

  • platform/graphics/filters/FEConvolveMatrix.cpp:

(WebCore::FEConvolveMatrix::platformApplySoftware):

  • platform/graphics/filters/FEDisplacementMap.cpp:

(WebCore::FEDisplacementMap::platformApplySoftware):

  • platform/graphics/filters/FEDropShadow.cpp:

(WebCore::FEDropShadow::platformApplySoftware):

  • platform/graphics/filters/FEGaussianBlur.cpp:

(WebCore::FEGaussianBlur::platformApplySoftware):

  • platform/graphics/filters/FELighting.cpp:

(WebCore::FELighting::platformApplySoftware):

  • platform/graphics/filters/FEMorphology.cpp:

(WebCore::FEMorphology::platformApplySoftware):

  • platform/graphics/filters/FETurbulence.cpp:

(WebCore::FETurbulence::platformApplySoftware):

  • platform/graphics/filters/FilterEffect.cpp:

(WebCore::FilterEffect::requestedRegionOfInputPixelBuffer const):
(WebCore::FilterEffect::clearResult):
(WebCore::FilterEffect::imageBufferResult):
(WebCore::FilterEffect::unmultipliedResult):
(WebCore::FilterEffect::premultipliedResult):
(WebCore::FilterEffect::convertPixelBufferToColorSpace):
(WebCore::FilterEffect::convertImageBufferToColorSpace):
(WebCore::FilterEffect::copyConvertedImageBufferToDestination):
(WebCore::FilterEffect::copyConvertedPixelBufferToDestination):
(WebCore::FilterEffect::copyUnmultipliedResult):
(WebCore::FilterEffect::copyPremultipliedResult):
(WebCore::FilterEffect::createUnmultipliedImageResult):
(WebCore::FilterEffect::createPremultipliedImageResult):
(WebCore::FilterEffect::requiresPixelBufferColorSpaceConversion):
(WebCore::FilterEffect::transformResultColorSpace):
(WebCore::FilterEffect::requestedRegionOfInputImageData const): Deleted.
(WebCore::FilterEffect::convertImageDataToColorSpace): Deleted.
(WebCore::FilterEffect::copyConvertedImageDataToDestination): Deleted.
(WebCore::FilterEffect::requiresImageDataColorSpaceConversion): Deleted.

  • platform/graphics/filters/FilterEffect.h:
  • platform/graphics/opengl/GraphicsContextGLOpenGL.cpp:

(WebCore::GraphicsContextGLOpenGL::paintRenderingResultsToCanvas):
(WebCore::GraphicsContextGLOpenGL::paintCompositedResultsToCanvas):
(WebCore::GraphicsContextGLOpenGL::paintRenderingResultsToPixelBuffer):
(WebCore::GraphicsContextGLOpenGL::readRenderingResultsForPainting):
(WebCore::GraphicsContextGLOpenGL::readCompositedResultsForPainting):
(WebCore::GraphicsContextGLOpenGL::readCompositedResults):
(WebCore::GraphicsContextGLOpenGL::paintRenderingResultsToImageData): Deleted.

  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:
  • platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp:

(WebCore::GraphicsContextGLOpenGL::readPixelsForPaintResults):

  • platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:

(WebCore::GraphicsContextGLOpenGL::readRenderingResults):

  • platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp:

(WebCore::GraphicsContextGLOpenGL::readnPixels):
(WebCore::GraphicsContextGLOpenGL::readPixelsForPaintResults):

  • platform/graphics/win/ImageBufferDirect2DBackend.cpp:

(WebCore::ImageBufferDirect2DBackend::getPixelBuffer const):
(WebCore::ImageBufferDirect2DBackend::putPixelBuffer):
(WebCore::ImageBufferDirect2DBackend::getImageData const): Deleted.
(WebCore::ImageBufferDirect2DBackend::putImageData): Deleted.

  • platform/graphics/win/ImageBufferDirect2DBackend.h:
  • rendering/CSSFilter.cpp:

(WebCore::CSSFilter::outputRect const):

  • rendering/shapes/Shape.cpp:

(WebCore::Shape::createRasterShape):

Source/WebKit:

Replace all uses of the DOM layer object WebCore::ImageData with the new platform
layer WebCore::PixelBuffer, which fixes a layering violation WebCore and avoids
unnecessary allocations / reference counting.

  • Platform/IPC/ArgumentCoders.h:

(IPC::ArgumentCoder<Optional<T>>::encode):
(IPC::ArgumentCoder<Optional<T>>::decode):
Add templatized Encoder/Decoder to work with streaming encoder.

  • GPUProcess/graphics/RemoteGraphicsContextGL.cpp:

(WebKit::RemoteGraphicsContextGL::paintRenderingResultsToCanvas):
(WebKit::RemoteGraphicsContextGL::paintCompositedResultsToCanvas):
(WebKit::RemoteGraphicsContextGL::paintPixelBufferToImageBuffer):
(WebKit::RemoteGraphicsContextGL::paintImageDataToImageBuffer): Deleted.

  • GPUProcess/graphics/RemoteGraphicsContextGL.h:
  • GPUProcess/graphics/RemoteGraphicsContextGL.messages.in:
  • GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h:

(paintRenderingResultsToPixelBuffer):
(paintRenderingResultsToImageData): Deleted.

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

(WebKit::RemoteRenderingBackend::updateSharedMemoryForGetPixelBufferHelper):
(WebKit::RemoteRenderingBackend::updateSharedMemoryForGetPixelBuffer):
(WebKit::RemoteRenderingBackend::semaphoreForGetPixelBuffer):
(WebKit::RemoteRenderingBackend::updateSharedMemoryAndSemaphoreForGetPixelBuffer):
(WebKit::RemoteRenderingBackend::destroyGetPixelBufferSharedMemory):
(WebKit::RemoteRenderingBackend::populateGetPixelBufferSharedMemory):
(WebKit::RemoteRenderingBackend::decodeItem):
(WebKit::RemoteRenderingBackend::updateSharedMemoryForGetImageDataHelper): Deleted.
(WebKit::RemoteRenderingBackend::updateSharedMemoryForGetImageData): Deleted.
(WebKit::RemoteRenderingBackend::semaphoreForGetImageData): Deleted.
(WebKit::RemoteRenderingBackend::updateSharedMemoryAndSemaphoreForGetImageData): Deleted.
(WebKit::RemoteRenderingBackend::destroyGetImageDataSharedMemory): Deleted.
(WebKit::RemoteRenderingBackend::populateGetImageDataSharedMemory): Deleted.

  • GPUProcess/graphics/RemoteRenderingBackend.h:
  • GPUProcess/graphics/RemoteRenderingBackend.messages.in:
  • Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.cpp:

(WebKit::CGDisplayListImageBufferBackend::getPixelBuffer const):
(WebKit::CGDisplayListImageBufferBackend::putPixelBuffer):
(WebKit::CGDisplayListImageBufferBackend::getImageData const): Deleted.
(WebKit::CGDisplayListImageBufferBackend::putImageData): Deleted.

  • Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.h:
  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<Ref<WebCore::ImageData>>::encode): Deleted.
(IPC::ArgumentCoder<Ref<WebCore::ImageData>>::decode): Deleted.
(IPC::ArgumentCoder<RefPtr<WebCore::ImageData>>::encode): Deleted.
(IPC::ArgumentCoder<RefPtr<WebCore::ImageData>>::decode): Deleted.

  • Shared/WebCoreArgumentCoders.h:
  • WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp:

(WebKit::ImageBufferShareableBitmapBackend::getPixelBuffer const):
(WebKit::ImageBufferShareableBitmapBackend::putPixelBuffer):
(WebKit::ImageBufferShareableBitmapBackend::getImageData const): Deleted.
(WebKit::ImageBufferShareableBitmapBackend::putImageData): Deleted.

  • WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h:
  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:

(WebKit::RemoteGraphicsContextGLProxy::paintRenderingResultsToCanvas):

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:
  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp:

(WebKit::RemoteGraphicsContextGLProxy::paintRenderingResultsToPixelBuffer):
(WebKit::RemoteGraphicsContextGLProxy::paintRenderingResultsToImageData): Deleted.

  • WebProcess/GPU/graphics/RemoteImageBufferProxy.h:

(WebKit::RemoteImageBufferProxy::putPixelBuffer):
(WebKit::RemoteImageBufferProxy::putImageData): Deleted.

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:

(WebKit::RemoteRenderingBackendProxy::sharedMemoryForGetPixelBuffer):
(WebKit::RemoteRenderingBackendProxy::waitForGetPixelBufferToComplete):
(WebKit::RemoteRenderingBackendProxy::destroyGetPixelBufferSharedMemory):
(WebKit::RemoteRenderingBackendProxy::sharedMemoryForGetImageData): Deleted.
(WebKit::RemoteRenderingBackendProxy::waitForGetImageDataToComplete): Deleted.
(WebKit::RemoteRenderingBackendProxy::destroyGetImageDataSharedMemory): Deleted.

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h:
  • WebProcess/GPU/graphics/cocoa/ImageBufferShareableIOSurfaceBackend.cpp:

(WebKit::ImageBufferShareableIOSurfaceBackend::getPixelBuffer const):
(WebKit::ImageBufferShareableIOSurfaceBackend::putPixelBuffer):
(WebKit::ImageBufferShareableIOSurfaceBackend::getImageData const): Deleted.
(WebKit::ImageBufferShareableIOSurfaceBackend::putImageData): Deleted.

  • WebProcess/GPU/graphics/cocoa/ImageBufferShareableIOSurfaceBackend.h:
5:44 PM Changeset in webkit [277312] by mark.lam@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Removed unused CallRecord::bytecodeIndex field.
https://bugs.webkit.org/show_bug.cgi?id=225627

Reviewed by Yusuke Suzuki.

  • jit/JIT.cpp:

(JSC::JIT::privateCompileExceptionHandlers):

  • jit/JIT.h:

(JSC::CallRecord::CallRecord):

  • jit/JITInlines.h:

(JSC::JIT::emitNakedNearCall):
(JSC::JIT::emitNakedNearTailCall):

5:41 PM Changeset in webkit [277311] by Chris Gambrell
  • 1 edit
    1 move
    2 deletes in trunk/LayoutTests

[LayoutTests] Decouple http/tests/media/resources/create-id3-db.php from webserver
https://bugs.webkit.org/show_bug.cgi?id=224561
<rdar://problem/76653054>

Reviewed by Jonathan Bedard.

Replacing the creation of metadata.db with JSON into a new file named metadata.json. This standalone script remains in PHP to be able to still use getid3.

  • http/tests/media/resources/create-id3-db.php: Removed.
  • http/tests/resources/dir-helpers.php: Removed.
  • http/tests/resources/portabilityLayer.php: Removed.
  • media/content/create-id3-db: Copied from LayoutTests/http/tests/media/resources/create-id3-db.php.
5:35 PM Changeset in webkit [277310] by Russell Epstein
  • 4 edits
    2 deletes in branches/safari-612.1.14-branch

Cherry-pick r277297. rdar://problem/77797456

Unreviewed, reverting r277222.
https://bugs.webkit.org/show_bug.cgi?id=225618

WebContent process crashes while visiting
<http://ign.com|ign.com> (RenderFlexibleBox::layoutFlexItems)

Reverted changeset:

"[css-flexbox] Flex item construction may affect sibling flex
item height computation"
https://bugs.webkit.org/show_bug.cgi?id=225489
https://trac.webkit.org/changeset/277222

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

5:25 PM Changeset in webkit [277309] by Brent Fulgham
  • 3 edits in trunk/Source/WebKit

[Cocoa] Extend Network Process sandbox to access more Network Extension databases
https://bugs.webkit.org/show_bug.cgi?id=225614
<rdar://problem/77696566>

Reviewed by Per Arne Vollan.

We don't allow the Network Process to directly memory-map files used by the network extensions
feature. We can improve memory performance by allowing the process to mmap these files, rather
than forcing a series of XPC operations to build the same database in memory.

  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
5:19 PM Changeset in webkit [277308] by Amir Mark Jr.
  • 2 edits in trunk/LayoutTests

[BigSur Wk1 Release] imported/w3c/web-platform-tests/css/css-masking/clip-path/clip-path-filter-order.html is a flaky image failure
https://bugs.webkit.org/show_bug.cgi?id=225625

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
4:54 PM Changeset in webkit [277307] by commit-queue@webkit.org
  • 42 edits in trunk/Source/WebCore

Unreviewed, reverting r277281.
https://bugs.webkit.org/show_bug.cgi?id=225622

Broke multiple debug tests

Reverted changeset:

"Use HashSet<RefPtr<Node>> instead of HashSet<Node*>"
https://bugs.webkit.org/show_bug.cgi?id=220464
https://trac.webkit.org/changeset/277281

4:52 PM Changeset in webkit [277306] by Kate Cheney
  • 6 edits
    4 adds in trunk

Speculative revalidation requests not properly attributed as app-bound
https://bugs.webkit.org/show_bug.cgi?id=225613
<rdar://problem/77664358>

Reviewed by Brent Fulgham.

Source/WebKit:

Speculative revalidation requests make network connections and should
be attributed as app-bound based on the initiating navigation.

  • NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:

(WebKit::NetworkCache::constructRevalidationRequest):
(WebKit::NetworkCache::SpeculativeLoadManager::registerLoad):
(WebKit::NetworkCache::SpeculativeLoadManager::startSpeculativeRevalidation):

  • NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h:
  • NetworkProcess/cache/NetworkCacheSubresourcesEntry.h:

(WebKit::NetworkCache::SubresourceInfo::isAppBound const):
(WebKit::NetworkCache::SubresourceInfo::setIsAppBound):
(WebKit::NetworkCache::SubresourcesEntry::subresources):
(WebKit::NetworkCache::SubresourcesEntry::subresources const): Deleted.
Remove const qualifier for the SubresourcesEntry::subresources()
function now that we need to store the app-bound value.

LayoutTests:

Layout test coverage.

  • http/tests/in-app-browser-privacy/app-bound-attribution-speculative-revalidation-expected.txt: Added.
  • http/tests/in-app-browser-privacy/app-bound-attribution-speculative-revalidation.html: Added.
  • http/tests/in-app-browser-privacy/resources/frame-with-authenticated-resource.py: Added.
  • http/tests/in-app-browser-privacy/resources/resource-with-auth.py: Added.
  • platform/ios-wk2/TestExpectations:

Essentially copied http/tests/cache/disk-cache/speculative-validation/http-auth.html
to hit the speculative revalidation code path, and added in a check
for app-bound load data at the end to confirm all requests are marked
correctly.

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

Add support to collect stats on cumulative LinkBuffer linked sizes based on profiles.
https://bugs.webkit.org/show_bug.cgi?id=225617

Reviewed by Saam Barati.

Source/JavaScriptCore:

There are 2 ways to dump the stats:

  1. Specify --dumpLinkBufferStats as an argument to the jsc shell.
  2. Call $vm.dumpLinkBufferStats() from your JS script to get the stats as a string. e.g.

$vm.print($vm.dumpLinkBufferStats());

Here's an example of what the dump looks like:

Cummulative LinkBuffer profile sizes:

BaselineJIT: 79480320 (75.798340 MB)

DFG: 36108672 (34.435913 MB)

Thunk: 22495360 (21.453247 MB)

InlineCache: 19538521 (18.633386 MB)

FTL: 5186240 (4.945984 MB)

Wasm: 1998272 (1.905701 MB)

YarrJIT: 1331072 (1.269409 MB)

CSSJIT: 0

Uncategorized: 0

The stats are currently grouped into some coarse profiles. If needed, we can
break these down into more fine grain profiles later.

  • assembler/LinkBuffer.cpp:

(JSC::LinkBuffer::performFinalization):
(JSC::LinkBuffer::dumpProfileStatistics):

  • assembler/LinkBuffer.h:

(JSC::LinkBuffer::LinkBuffer):

  • bytecode/InlineAccess.cpp:

(JSC::linkCodeInline):
(JSC::InlineAccess::rewireStubAsJump):

  • bytecode/PolymorphicAccess.cpp:

(JSC::PolymorphicAccess::regenerate):

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::compile):
(JSC::DFG::JITCompiler::compileFunction):

  • dfg/DFGOSRExit.cpp:

(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

  • dfg/DFGThunks.cpp:

(JSC::DFG::osrExitGenerationThunkGenerator):
(JSC::DFG::osrEntryThunkGenerator):

  • ftl/FTLCompile.cpp:

(JSC::FTL::compile):

  • ftl/FTLLazySlowPath.cpp:

(JSC::FTL::LazySlowPath::generate):

  • ftl/FTLLink.cpp:

(JSC::FTL::link):

  • ftl/FTLOSRExitCompiler.cpp:

(JSC::FTL::compileStub):

  • ftl/FTLThunks.cpp:

(JSC::FTL::genericGenerationThunkGenerator):
(JSC::FTL::slowPathCallThunkGenerator):

  • jit/ExecutableAllocator.cpp:

(JSC::jitWriteThunkGenerator):

  • jit/JIT.cpp:

(JSC::JIT::compileWithoutLinking):

  • jit/JITMathIC.h:

(JSC::JITMathIC::generateOutOfLine):

  • jit/JITOpcodes.cpp:

(JSC::JIT::privateCompileHasIndexedProperty):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::privateCompileHasIndexedProperty):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::privateCompilePutByVal):
(JSC::JIT::privateCompilePutPrivateNameWithCachedId):
(JSC::JIT::privateCompilePutByValWithCachedId):

  • jit/Repatch.cpp:

(JSC::linkPolymorphicCall):

  • jit/SpecializedThunkJIT.h:

(JSC::SpecializedThunkJIT::finalize):

  • jit/ThunkGenerators.cpp:

(JSC::throwExceptionFromCallSlowPathGenerator):
(JSC::linkCallThunkGenerator):
(JSC::linkPolymorphicCallThunkGenerator):
(JSC::virtualThunkFor):
(JSC::nativeForGenerator):
(JSC::arityFixupGenerator):
(JSC::unreachableGenerator):
(JSC::stringGetByValGenerator):
(JSC::boundFunctionCallGenerator):

  • jsc.cpp:

(CommandLine::parseArguments):
(jscmain):

  • llint/LLIntThunks.cpp:

(JSC::LLInt::generateThunkWithJumpTo):
(JSC::LLInt::generateThunkWithJumpToPrologue):
(JSC::LLInt::generateThunkWithJumpToLLIntReturnPoint):
(JSC::LLInt::getHostCallReturnValueThunk):
(JSC::LLInt::createJSGateThunk):
(JSC::LLInt::createWasmGateThunk):
(JSC::LLInt::createTailCallGate):
(JSC::LLInt::loopOSREntryGateThunk):
(JSC::LLInt::entryOSREntryGateThunk):
(JSC::LLInt::wasmOSREntryGateThunk):
(JSC::LLInt::exceptionHandlerGateThunk):
(JSC::LLInt::returnFromLLIntGateThunk):
(JSC::LLInt::tagGateThunk):
(JSC::LLInt::untagGateThunk):
(JSC::LLInt::jitCagePtrThunk):

  • tools/JSDollarVM.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::JSDollarVM::finishCreation):

  • wasm/WasmBBQPlan.cpp:

(JSC::Wasm::BBQPlan::work):
(JSC::Wasm::BBQPlan::didCompleteCompilation):

  • wasm/WasmBinding.cpp:

(JSC::Wasm::wasmToWasm):

  • wasm/WasmLLIntPlan.cpp:

(JSC::Wasm::LLIntPlan::didCompleteCompilation):

  • wasm/WasmOMGForOSREntryPlan.cpp:

(JSC::Wasm::OMGForOSREntryPlan::work):

  • wasm/WasmOMGPlan.cpp:

(JSC::Wasm::OMGPlan::work):

  • wasm/WasmThunks.cpp:

(JSC::Wasm::throwExceptionFromWasmThunkGenerator):
(JSC::Wasm::throwStackOverflowFromWasmThunkGenerator):
(JSC::Wasm::triggerOMGEntryTierUpThunkGenerator):

  • wasm/js/WasmToJS.cpp:

(JSC::Wasm::wasmToJS):

  • wasm/js/WebAssemblyFunction.cpp:

(JSC::WebAssemblyFunction::jsCallEntrypointSlow):

  • yarr/YarrJIT.cpp:

Source/WebCore:

  • cssjit/SelectorCompiler.cpp:

(WebCore::SelectorCompiler::SelectorCodeGenerator::compile):

4:16 PM Changeset in webkit [277304] by Devin Rousso
  • 2 edits in trunk/Source/WTF

SLEEP_THREAD_FOR_DEBUGGER should print the PID before sleeping
https://bugs.webkit.org/show_bug.cgi?id=225619

Reviewed by Tim Horton.

  • wtf/DebugUtilities.h:
4:05 PM Changeset in webkit [277303] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ BigSur Release wk2 ARM64 ] mathml/scripts-removeChild.html is a flaky image failure
https://bugs.webkit.org/show_bug.cgi?id=225533

Unreviewed test gardening.

Updating test expectations to Pass ImageOnlyFailure for BigSur Release wk2 arm64 only.

  • platform/mac-wk2/TestExpectations:
3:52 PM Changeset in webkit [277302] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ BigSur Debug wk2 ARM64 ] imported/w3c/web-platform-tests/webrtc-encoded-transform/sframe-transform-readable.html is flaky crashing
https://bugs.webkit.org/show_bug.cgi?id=225534

Unrviewed test gardening.

Updating test expectation to Pass Crash for BigSur Debug wk2 arm64 only.

  • platform/mac-wk2/TestExpectations:
3:41 PM Changeset in webkit [277301] by Kate Cheney
  • 18 edits
    4 adds in trunk

Preflight requests not properly attributed as app-bound
https://bugs.webkit.org/show_bug.cgi?id=225596
<rdar://problem/77664272>

Reviewed by Brent Fulgham.

Source/WebCore:

Tests: http/tests/in-app-browser-privacy/app-bound-attribution-preflight-async.html

http/tests/in-app-browser-privacy/app-bound-attribution-preflight-sync.html

A preflight request initiated by a main navigation that was app-bound
should also be app-bound. Testing sync preflight requests revealed
that we also need to mark this when loading a synchronous resource.

  • loader/CrossOriginAccessControl.cpp:

(WebCore::createAccessControlPreflightRequest):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadResourceSynchronously):

Source/WebKit:

Testing SPI to request load data to check if preflight requests
were properly marked.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _didLoadAppBoundRequest:]):
(-[WKWebView _didLoadNonAppBoundRequest:]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:

Tools:

Add test infrastructure.

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::didLoadAppBoundRequest):
(WTR::TestRunner::didLoadNonAppBoundRequest):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::didLoadAppBoundRequest):
(WTR::TestController::didLoadNonAppBoundRequest):

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::TestController::didLoadAppBoundRequest):
(WTR::TestController::didLoadNonAppBoundRequest):

  • WebKitTestRunner/cocoa/TestRunnerWKWebView.h:
  • WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:

(-[TestRunnerWKWebView _didLoadAppBoundRequest:]):
(-[TestRunnerWKWebView _didLoadNonAppBoundRequest:]):

LayoutTests:

Add two tests for sync and async preflight requests.

  • http/tests/in-app-browser-privacy/app-bound-attribution-preflight-async-expected.txt: Added.
  • http/tests/in-app-browser-privacy/app-bound-attribution-preflight-async.html: Added.
  • http/tests/in-app-browser-privacy/app-bound-attribution-preflight-sync-expected.txt: Added.
  • http/tests/in-app-browser-privacy/app-bound-attribution-preflight-sync.html: Added.
  • platform/ios-wk2/TestExpectations:

These tests rely on internal additions, we should skip them in open
source expectations.

3:34 PM Changeset in webkit [277300] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ BigSur ARM64] http/wpt/fetch/fetch-response-body-stop-in-worker.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=225528

Unreviewed test gardening.

Updating expectations to Pass Crash for arm64 only.

  • platform/mac/TestExpectations:
3:27 PM Changeset in webkit [277299] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ BigSur Release wk2 arm64 ] scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-overflow-in-iframe.html is a flaky text failure
https://bugs.webkit.org/show_bug.cgi?id=225529

Uneviewed test gardening.

Updating expectations to Pass Failure for BigSur Release wk2 arm64 only.

  • platform/mac-wk2/TestExpectations:
3:16 PM Changeset in webkit [277298] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ macOS Release wk2 ] http/tests/cache-storage/cache-records-persistency.https.html is flaky crashing
https://bugs.webkit.org/show_bug.cgi?id=225522

Unreviewed test gardening.

Updating expectations to Pass Crash while test is reviewed.

  • platform/mac-wk2/TestExpectations:
3:01 PM Changeset in webkit [277297] by commit-queue@webkit.org
  • 4 edits
    2 deletes in trunk

Unreviewed, reverting r277222.
https://bugs.webkit.org/show_bug.cgi?id=225618

WebContent process crashes while visiting
<http://ign.com|ign.com> (RenderFlexibleBox::layoutFlexItems)

Reverted changeset:

"[css-flexbox] Flex item construction may affect sibling flex
item height computation"
https://bugs.webkit.org/show_bug.cgi?id=225489
https://trac.webkit.org/changeset/277222

2:39 PM Changeset in webkit [277296] by Ryan Haddad
  • 2 edits in trunk/Source/WebKit

Unreviewed, fix the build with recent SDKs.

  • UIProcess/ios/forms/WKFormSelectPicker.mm:

(-[WKSelectMultiplePicker configurePresentation]):

2:31 PM Changeset in webkit [277295] by Wenson Hsieh
  • 44 edits in trunk/Source

Make WebCore::HitTestRequest::RequestType an enum class
https://bugs.webkit.org/show_bug.cgi?id=225597

Reviewed by Sam Weinig.

Source/WebCore:

Rename HitTestRequest::RequestType to HitTestRequest::Type, and make it an enum class. I also noticed that
the first request type, ReadOnly, starts at a value of 2 (1 << 1) instead of 1 (which seems to have been an
unintentional change in <https://trac.webkit.org/r60761>).

No change in behavior.

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::press):

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::visiblePositionForPoint const):
(WebCore::AccessibilityRenderObject::accessibilityHitTest const):

  • dom/Document.cpp:

(WebCore::isValidPageSampleLocation):

  • dom/TreeScope.cpp:

(WebCore::TreeScope::elementsFromPoint):

  • html/HTMLPlugInElement.cpp:

(WebCore::HTMLPlugInElement::isReplacementObscured):

  • html/MediaElementSession.cpp:

(WebCore::isElementMainContentForPurposesOfAutoplay):

  • page/AutoscrollController.cpp:

(WebCore::AutoscrollController::updateAutoscrollRenderer):

  • page/ContextMenuController.cpp:

(WebCore::ContextMenuController::handleContextMenuEvent):
(WebCore::ContextMenuController::showContextMenu):
(WebCore::ContextMenuController::maybeCreateContextMenu):

  • page/ContextMenuController.h:
  • page/DragController.cpp:

(WebCore::DragController::canProcessDrag):
(WebCore::DragController::hitTestResultForDragStart const):

  • page/EventHandler.cpp:

(WebCore::EventHandler::eventMayStartDrag const):
(WebCore::EventHandler::updateSelectionForMouseDrag):
(WebCore::EventHandler::hitTestResultAtPoint const):
(WebCore::EventHandler::updateCursor):
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::handleMouseDoubleClickEvent):
(WebCore::EventHandler::handleMouseMoveEvent):
(WebCore::EventHandler::handleMouseReleaseEvent):
(WebCore::EventHandler::handleMouseForceEvent):
(WebCore::EventHandler::updateDragAndDrop):
(WebCore::EventHandler::isInsideScrollbar const):
(WebCore::EventHandler::sendContextMenuEvent):
(WebCore::EventHandler::sendContextMenuEventForKey):
(WebCore::EventHandler::hoverTimerFired):
(WebCore::EventHandler::dragSourceEndedAt):
(WebCore::EventHandler::handleDrag):
(WebCore::hitTestResultInFrame):
(WebCore::EventHandler::handleTouchEvent):
(WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled):

  • page/EventHandler.h:
  • page/FocusController.cpp:

(WebCore::updateFocusCandidateIfNeeded):

  • page/Frame.cpp:

(WebCore::Frame::visiblePositionForPoint const):
(WebCore::Frame::documentAtPoint):

  • page/Page.cpp:

(WebCore::Page::editableElementsInRect const):

  • page/PointerCaptureController.cpp:

(WebCore::PointerCaptureController::cancelPointer):

  • page/ios/EventHandlerIOS.mm:

(WebCore::EventHandler::tryToBeginDragAtPoint):

  • page/ios/FrameIOS.mm:

(WebCore::Frame::renderRectForPoint const):
(WebCore::Frame::betterApproximateNode):
(WebCore::Frame::hitTestResultAtViewportLocation):
(WebCore::Frame::qualifyingNodeAtViewportLocation):

  • rendering/HitTestRequest.h:

(WebCore::HitTestRequest::HitTestRequest):
(WebCore::HitTestRequest::readOnly const):
(WebCore::HitTestRequest::active const):
(WebCore::HitTestRequest::move const):
(WebCore::HitTestRequest::release const):
(WebCore::HitTestRequest::ignoreCSSPointerEventsProperty const):
(WebCore::HitTestRequest::ignoreClipping const):
(WebCore::HitTestRequest::svgClipContent const):
(WebCore::HitTestRequest::touchEvent const):
(WebCore::HitTestRequest::disallowsUserAgentShadowContent const):
(WebCore::HitTestRequest::allowsFrameScrollbars const):
(WebCore::HitTestRequest::allowsChildFrameContent const):
(WebCore::HitTestRequest::allowsVisibleChildFrameContent const):
(WebCore::HitTestRequest::isChildFrameHitTest const):
(WebCore::HitTestRequest::resultIsElementList const):
(WebCore::HitTestRequest::includesAllElementsUnderPoint const):
(WebCore::HitTestRequest::type const):
(): Deleted.

  • rendering/RenderWidget.cpp:

(WebCore::RenderWidget::nodeAtPoint):

  • rendering/svg/RenderSVGContainer.cpp:

(WebCore::RenderSVGContainer::nodeAtFloatPoint):

  • rendering/svg/RenderSVGResourceClipper.cpp:

(WebCore::RenderSVGResourceClipper::hitTestClipContent):

  • testing/Internals.cpp:

(WebCore::Internals::nodesFromRect const):

  • testing/Internals.mm:

(WebCore::Internals::rangeForDictionaryLookupAtLocation):

Source/WebKit:

See WebCore/ChangeLog for more details.

  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:

(-[WKWebProcessPlugInFrame hitTest:options:]):

  • WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:

(WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction):

  • WebProcess/WebPage/Cocoa/WebPageCocoa.mm:

(WebKit::WebPage::performDictionaryLookupAtLocation):

  • WebProcess/WebPage/WebFrame.cpp:

(WebKit::WebFrame::hitTest const):

  • WebProcess/WebPage/WebFrame.h:

(WebKit::WebFrame::defaultHitTestRequestTypes):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::handleContextMenuEvent):
(WebKit::WebPage::characterIndexForPointAsync):
(WebKit::WebPage::updateWithImageExtractionResult):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::rectForElementAtInteractionLocation const):
(WebKit::rangeForPointInRootViewCoordinates):
(WebKit::WebPage::setFocusedFrameBeforeSelectingTextAtLocation):
(WebKit::isObscuredElement):
(WebKit::selectionPositionInformation):
(WebKit::textInteractionPositionInformation):
(WebKit::WebPage::positionInformation):

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::shouldDelayWindowOrderingEvent):
(WebKit::WebPage::acceptsFirstMouse):
(WebKit::WebPage::performImmediateActionHitTestAtLocation):
(WebKit::WebPage::lookupTextAtLocation):

Source/WebKitLegacy/ios:

See WebCore/ChangeLog for more details.

  • WebCoreSupport/WebFrameIOS.mm:

(-[WebFrame elementRectAtPoint:]):

Source/WebKitLegacy/mac:

See WebCore/ChangeLog for more details.

  • WebCoreSupport/WebFrameLoaderClient.mm:

(WebFrameLoaderClient::actionDictionary const):

  • WebView/WebFrame.mm:

(-[WebFrame elementAtPoint:]):

  • WebView/WebHTMLView.mm:

(-[WebHTMLView elementAtPoint:allowShadowContent:]):

  • WebView/WebImmediateActionController.mm:

(-[WebImmediateActionController performHitTestAtPoint:]):

Source/WebKitLegacy/win:

See WebCore/ChangeLog for more details.

  • WebActionPropertyBag.cpp:

(WebActionPropertyBag::Read):

  • WebView.cpp:

(WebView::handleContextMenuEvent):
(WebView::gestureNotify):
(WebView::elementAtPoint):

2:25 PM Changeset in webkit [277294] by Chris Dumez
  • 4 edits in trunk

[iOS] Pages with service workers do not suspend promptly
https://bugs.webkit.org/show_bug.cgi?id=225598
Source/WebKit:

Reviewed by Youenn Fablet.

WebProcessProxy::updateServiceWorkerProcessAssertion() was starting a foreground/background activity
if there is a service worker in-process and if any of the client processes are foreground/background.
The issue is that a common case is that one of the client process is the service worker process
itself (since we run the service worker in-process whenever possible nowadays). As a result, it would
create a process assertion cycle. We'd start a foreground activity due to the service worker but we
would not release it when the view is no longer foreground, because the process would stay "foreground"
due to the service worker process assertion.

To address this, updateServiceWorkerProcessAssertion() now only takes process assertions if there
are client processes other than the current process. This avoids the cycle and this is really the only
case we need to make sure the service worker process doesn't suspend. In the case where the service
worker and the client are in the same process, then the normal process assertions are sufficient.

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::updateServiceWorkerProcessAssertion):

Tools:

<rdar://problem/77753717>

Reviewed by Youenn Fablet.

Update WebKit API test accordingly.

  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
2:21 PM Changeset in webkit [277293] by Andres Gonzalez
  • 3 edits in trunk/LayoutTests

[ Mac ] accessibility/mac/expanded-notification.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=205410
rdar://58056289

Reviewed by Chris Fleizach.

  • accessibility/mac/expanded-notification.html:

Replaced the setTimeout(..., 10) with the use of Promises to make it
time deterministic.

2:17 PM Changeset in webkit [277292] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Add null check in CachedResource::clearLoader
https://bugs.webkit.org/show_bug.cgi?id=225605
<rdar://69912354>

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

As much as we would like it not to be the case, we have records that m_loader can be null.
If it's null, let's not crash.

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::clearLoader):

1:53 PM Changeset in webkit [277291] by Russell Epstein
  • 1 copy in tags/Safari-611.2.7.1.5

Tag Safari-611.2.7.1.5.

1:35 PM Changeset in webkit [277290] by Russell Epstein
  • 8 edits in branches/safari-612.1.12-branch/Source

Versioning.

WebKit-7612.1.12.5

1:35 PM Changeset in webkit [277289] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Network: rename "XHR" to "XHR/Fetch"
https://bugs.webkit.org/show_bug.cgi?id=224900

Reviewed by Timothy Hatcher.

  • UserInterface/Views/NetworkTableContentView.js:

(WI.NetworkTableContentView):
(WI.NetworkTableContentView.addScopeBarItem): Added.
(WI.NetworkTableContentView.displayNameForResource):
(WI.NetworkTableContentView.shortDisplayNameForResourceType): Deleted.

  • Localizations/en.lproj/localizedStrings.js:
12:58 PM Changeset in webkit [277288] by Ruben Turcios
  • 2 edits in branches/safari-612.1.12-branch/Source/WebCore

Cherry-pick r277228. rdar://problem/77772960

Increase stored AppHighlight character limit to 500
https://bugs.webkit.org/show_bug.cgi?id=225558

Reviewed by Tim Horton.

  • Modules/highlight/AppHighlightStorage.cpp:

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

12:56 PM Changeset in webkit [277287] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

[iOS] WPT css/css-color-adjust/rendering/dark-color-scheme/color-scheme-system-colors.html is failing
https://bugs.webkit.org/show_bug.cgi?id=225607

Unreviewed test gardening.

  • platform/ios/TestExpectations:
12:50 PM Changeset in webkit [277286] by Andres Gonzalez
  • 4 edits
    2 adds in trunk

Fix for assert crash in AXObjectCache::visiblePositionForTextMarkerData.
https://bugs.webkit.org/show_bug.cgi?id=225303
<rdar://problem/77453921>

Reviewed by Chris Fleizach.

Source/WebCore:

Test: accessibility/mac/pseudo-element-text-markers.html

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::visiblePositionForTextMarkerData):
Added check for Node::isPseudoElement to avoid hitting the assertion during the creation of a Position.

LayoutTests:

  • accessibility/mac/pseudo-element-text-markers-expected.txt: Added.
  • accessibility/mac/pseudo-element-text-markers.html: Added.
12:49 PM Changeset in webkit [277285] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

[iOS] WPT css-fonts/font-feature-resolution-001.html and css-fonts/font-feature-resolution-002.html are failing
https://bugs.webkit.org/show_bug.cgi?id=225606

Unreviewed test gardening.

  • platform/ios/TestExpectations:
12:33 PM Changeset in webkit [277284] by Nikita Vasilyev
  • 6 edits
    1 copy in trunk/Source/WebInspectorUI

Web Inspector: Layout panel "Grid Overlays" main checkbox has dead space (no interaction) between checkbox and label text
https://bugs.webkit.org/show_bug.cgi?id=225433
<rdar://problem/77590883>

Reviewed by Devin Rousso.

Make the empty space between the checkbox and the label text clickable in:

  • Everywhere in Settings tab
  • Layout panel, Page Overlay Options
  • Grid Overlay header
  • UserInterface/Main.html:
  • UserInterface/Views/CSSGridSection.css:

(.css-grid-section .node-display-name):
(.css-grid-section .toggle-all):
(.css-grid-section :is(.setting-editor, .node-overlay-list-item-container, .heading) input[type="checkbox"]):
(.css-grid-section .setting-editor > input[type="checkbox"]):
(.css-grid-section .node-display-name,): Deleted.
Make all checkbox labels in the Grid section align vertically.

  • UserInterface/Views/CSSGridSection.js:

(WI.CSSGridSection.prototype.initialLayout):

  • UserInterface/Views/SettingEditor.css: Copied from Source/WebInspectorUI/UserInterface/Views/CSSGridSection.css.

(.setting-editor input):
(.setting-editor > input[type="checkbox"]):
(.setting-editor > label):

  • UserInterface/Views/SettingEditor.js:

(WI.SettingEditor):

  • UserInterface/Views/SettingsTabContentView.css:

(.content-view.tab.settings > .settings-view > .container > .editor-group > .setting-editor):
(.content-view.tab.settings > .settings-view > .container > .editor-group > .setting-editor:first-child > *):
(.content-view.tab.settings > .settings-view > .container > .editor-group > .setting-editor input[type="checkbox"]):
(.content-view.tab.settings > .settings-view > .container > .editor-group > .setting-editor select):
(.content-view.tab.settings > .settings-view > .container > .editor-group > .setting-editor input[type="number"]):
(.content-view.tab.settings > .settings-view > .container > .editor-group > .setting-editor input[type="text"]):
(.content-view.tab.settings > .settings-view > .container > .editor-group > .editor): Deleted.
(.content-view.tab.settings > .settings-view > .container > .editor-group > .editor:first-child > *): Deleted.
(.content-view.tab.settings > .settings-view > .container > .editor-group > .editor input): Deleted.
(.content-view.tab.settings > .settings-view > .container > .editor-group > .editor input[type="checkbox"]): Deleted.
(.content-view.tab.settings > .settings-view > .container > .editor-group > .editor select): Deleted.
(.content-view.tab.settings > .settings-view > .container > .editor-group > .editor input[type="number"]): Deleted.
(.content-view.tab.settings > .settings-view > .container > .editor-group > .editor input[type="text"]): Deleted.
Rename ".editor" to ".setting-editor" so it matches SettingEditor.css.

12:28 PM Changeset in webkit [277283] by Russell Epstein
  • 8 edits in branches/safari-611.2.7.1-branch/Source

Versioning.

WebKit-7611.2.7.1.5

12:20 PM Changeset in webkit [277282] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

[iOS] imported/w3c/web-platform-tests/css/css-flexbox/flex-item-compressible-001.html is failing after WPT re-sync
https://bugs.webkit.org/show_bug.cgi?id=225604

Unreviewed test gardening.

Rebaseline test for iOS.

  • platform/ios/imported/w3c/web-platform-tests/css/css-flexbox/flex-item-compressible-001-expected.txt:
12:09 PM Changeset in webkit [277281] by commit-queue@webkit.org
  • 42 edits in trunk/Source/WebCore

Use HashSet<RefPtr<Node>> instead of HashSet<Node*>
https://bugs.webkit.org/show_bug.cgi?id=220464

Patch by Alex Christensen <achristensen@webkit.org> on 2021-05-10
Reviewed by Chris Dumez.

This makes us more resistent to lifetime bugs.

  • accessibility/AXObjectCache.cpp:

(WebCore::conditionallyAddNodeToFilterList):
(WebCore::filterVectorPairForRemoval):
(WebCore::filterMapForRemoval):
(WebCore::filterListForRemoval):
(WebCore::AXObjectCache::prepareForDocumentDestruction):

  • bindings/js/JSMutationObserverCustom.cpp:

(WebCore::JSMutationObserverOwner::isReachableFromOpaqueRoots):

  • dom/MutationObserver.cpp:

(WebCore::MutationObserver::observedNodes const):
(WebCore:: const): Deleted.

  • dom/MutationObserver.h:
  • dom/MutationObserverRegistration.cpp:

(WebCore::MutationObserverRegistration::addRegistrationNodesToSet const):

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

(WebCore::liveNodeSet):
(WebCore::ignoreSet):

  • editing/AppendNodeCommand.cpp:

(WebCore::AppendNodeCommand::getNodesInCommand):

  • editing/AppendNodeCommand.h:
  • editing/CompositeEditCommand.cpp:

(WebCore::EditCommandComposition::getNodesInCommand):

  • editing/CompositeEditCommand.h:
  • editing/DeleteFromTextNodeCommand.cpp:

(WebCore::DeleteFromTextNodeCommand::getNodesInCommand):

  • editing/DeleteFromTextNodeCommand.h:
  • editing/EditCommand.cpp:

(WebCore::SimpleEditCommand::addNodeAndDescendants):

  • editing/EditCommand.h:
  • editing/InsertIntoTextNodeCommand.cpp:

(WebCore::InsertIntoTextNodeCommand::getNodesInCommand):

  • editing/InsertIntoTextNodeCommand.h:
  • editing/InsertNodeBeforeCommand.cpp:

(WebCore::InsertNodeBeforeCommand::getNodesInCommand):

  • editing/InsertNodeBeforeCommand.h:
  • editing/MergeIdenticalElementsCommand.cpp:

(WebCore::MergeIdenticalElementsCommand::getNodesInCommand):

  • editing/MergeIdenticalElementsCommand.h:
  • editing/RemoveNodeCommand.cpp:

(WebCore::RemoveNodeCommand::getNodesInCommand):

  • editing/RemoveNodeCommand.h:
  • editing/ReplaceNodeWithSpanCommand.cpp:

(WebCore::ReplaceNodeWithSpanCommand::getNodesInCommand):

  • editing/ReplaceNodeWithSpanCommand.h:
  • editing/SetNodeAttributeCommand.cpp:

(WebCore::SetNodeAttributeCommand::getNodesInCommand):

  • editing/SetNodeAttributeCommand.h:
  • editing/SetSelectionCommand.h:
  • editing/SpellingCorrectionCommand.cpp:
  • editing/SplitElementCommand.cpp:

(WebCore::SplitElementCommand::getNodesInCommand):

  • editing/SplitElementCommand.h:
  • editing/SplitTextNodeCommand.cpp:

(WebCore::SplitTextNodeCommand::getNodesInCommand):

  • editing/SplitTextNodeCommand.h:
  • editing/WrapContentsInDummySpanCommand.cpp:

(WebCore::WrapContentsInDummySpanCommand::getNodesInCommand):

  • editing/WrapContentsInDummySpanCommand.h:
  • editing/cocoa/HTMLConverter.mm:

(HTMLConverterCaches::cacheAncestorsOfStartToBeConverted):

  • inspector/agents/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::highlightSelector):

  • xml/XPathFunctions.cpp:

(WebCore::XPath::FunId::evaluate const):

  • xml/XPathNodeSet.cpp:

(WebCore::XPath::sortBlock):
(WebCore::XPath::NodeSet::traversalSort const):

  • xml/XPathPath.cpp:

(WebCore::XPath::LocationPath::evaluate const):

  • xml/XPathPredicate.cpp:

(WebCore::XPath::Union::evaluate const):

11:58 AM Changeset in webkit [277280] by achristensen@apple.com
  • 12 edits in trunk

Add ObjC API similar to WKBundlePageCopyGroupIdentifier
https://bugs.webkit.org/show_bug.cgi?id=225477

Reviewed by Chris Dumez.

Source/WebKit:

Once adopted this will allow us to remove WKWebProcessPlugInPageGroup

  • Shared/Cocoa/APIObject.mm:

(API::Object::newObject):

  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroup.h:
  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroup.mm:
  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroupInternal.h:
  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.h:
  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:

(-[WKWebProcessPlugInBrowserContextController _groupIdentifier]):

  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/RemoteObjectRegistry.h:
  • TestWebKitAPI/Tests/WebKitCocoa/RemoteObjectRegistry.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/RemoteObjectRegistryPlugIn.mm:

(-[RemoteObjectRegistryPlugIn getGroupIdentifier:]):

11:43 AM Changeset in webkit [277279] by Devin Rousso
  • 7 edits
    3 adds in trunk/Source/WebInspectorUI

Web Inspector: add support for panning/zooming on images
https://bugs.webkit.org/show_bug.cgi?id=224655

Reviewed by Timothy Hatcher.

  • UserInterface/Controllers/GestureController.js: Added.

(WI.GestureController):
(WI.GestureController.prototype.get scale):
(WI.GestureController.prototype.set scale):
(WI.GestureController.prototype.get translate):
(WI.GestureController.prototype.set translate):
(WI.GestureController.prototype.reset):
(WI.GestureController.prototype._startScaleInteraction):
(WI.GestureController.prototype._updateScaleInteraction):
(WI.GestureController.prototype._endScaleInteraction):
(WI.GestureController.prototype._handleWheel):
(WI.GestureController.prototype._handleGestureStart):
(WI.GestureController.prototype._handleGestureChange):
(WI.GestureController.prototype._handleGestureEnd):
(WI.GestureController.prototype._handleMouseDown):
(WI.GestureController.prototype._handleMouseMove):
(WI.GestureController.prototype._handleMouseUp):
Add a general controller class that takes a target (and optionally a container) and adds
event listeners to handle various gestures:

  • scale (both via trackpad and mouse wheel)
  • transform (mouse click and drag)
  • UserInterface/Views/ImageResourceContentView.js:

(WI.ImageResourceContentView):
(WI.ImageResourceContentView.prototype.get navigationItems):
(WI.ImageResourceContentView.prototype.contentAvailable):
(WI.ImageResourceContentView.prototype.gestureControllerDidScale): Added.
(WI.ImageResourceContentView.prototype.gestureControllerDidTranslate): Added.
(WI.ImageResourceContentView.prototype._updateResetGestureButtonNavigationItemLabel): Added.
(WI.ImageResourceContentView.prototype._handleResetGestureButtonNavitationItemClicked): Added.
(WI.ImageResourceContentView.prototype._handleZoomOutGestureButtonNavitationItemClicked): Added.
(WI.ImageResourceContentView.prototype._handleZoomInGestureButtonNavitationItemClicked): Added.

  • UserInterface/Views/ImageResourceContentView.css:

(.content-view.resource.image > .img-container):
(.navigation-bar > .item.image-gesture-reset): Added.
Add a WI.GestureController and manipulate the scale and transform of the <img>.
Add navigation items that show the current scale (clicking it will reset the gesture), zoom
in, and zoom out.

  • UserInterface/Views/LocalResourceOverrideLabelView.css:

(.local-resource-override-label-view):
Add a z-index so that zoomed images don't appear on top.

  • UserInterface/Views/ResourceCollectionContentView.js:

(WI.ResourceCollectionContentView.prototype.get contentViewConstructorOptions):
Don't create the WI.GestureController in collection views.

  • UserInterface/Main.html:
  • UserInterface/Images/ZoomIn.svg: Added.
  • UserInterface/Images/ZoomOut.svg: Added.
  • Localizations/en.lproj/localizedStrings.js:
11:37 AM Changeset in webkit [277278] by Russell Epstein
  • 8 edits in branches/safari-612.1.14-branch/Source

Versioning.

WebKit-7612.1.14

11:32 AM Changeset in webkit [277277] by Russell Epstein
  • 1 copy in branches/safari-612.1.14-branch

New branch.

11:29 AM Changeset in webkit [277276] by Russell Epstein
  • 8 edits in trunk/Source

Versioning.

WebKit-7612.1.15

11:10 AM Changeset in webkit [277275] by aakash_jain@apple.com
  • 2 edits
    1 move in trunk/Tools

[build.webkit.org] Rename master_buildbot2.cfg to master.cfg
https://bugs.webkit.org/show_bug.cgi?id=222600

Reviewed by Jonathan Bedard.

  • CISupport/build-webkit-org/buildbot.tac:
  • CISupport/build-webkit-org/master.cfg: Moved from Tools/CISupport/build-webkit-org/master_buildbot2.cfg.
  • CISupport/build-webkit-org/master_buildbot2.cfg: Removed.
11:10 AM Changeset in webkit [277274] by Wenson Hsieh
  • 14 edits
    2 moves
    2 adds in trunk

[macOS] ImageOverlayController should paint selection quads instead of bounding rects
https://bugs.webkit.org/show_bug.cgi?id=225585
<rdar://problem/77725745>

Reviewed by Tim Horton.

Source/WebCore:

Teach SelectionRectGatherer (now renamed to SelectionGeometryGatherer) to emit quads, rather than bounding
rects around each quad. We use these quads in ImageOverlayController to render selection quads via page
overlay (i.e., in the case where the image containing the overlay is transparent).

Test: fast/images/image-extraction/mac/select-rotated-transparent-image-overlay.html

  • Headers.cmake:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • editing/SelectionGeometryGatherer.cpp: Renamed from Source/WebCore/editing/SelectionRectGatherer.cpp.

Rename SelectionRectGatherer to SelectionGeometryGatherer, to reflect the fact that this helper class now
aggregates both selection quads and gap rects.

(WebCore::SelectionGeometryGatherer::SelectionGeometryGatherer):
(WebCore::SelectionGeometryGatherer::addQuad):

Rename addRect to addQuad, and make it take a FloatQuad instead.

(WebCore::SelectionGeometryGatherer::addGapRects):
(WebCore::SelectionGeometryGatherer::Notifier::Notifier):
(WebCore::SelectionGeometryGatherer::Notifier::~Notifier):
(WebCore::SelectionGeometryGatherer::boundingRects const):
(WebCore::SelectionGeometryGatherer::clearAndCreateNotifier):

  • editing/SelectionGeometryGatherer.h: Renamed from Source/WebCore/editing/SelectionRectGatherer.h.

(WebCore::SelectionGeometryGatherer::setTextOnly):
(WebCore::SelectionGeometryGatherer::isTextOnly const):

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::updateWithImageExtractionResult):

Minor tweak - don't add any margin around the word when the line only contains a single word.

  • page/ImageOverlayController.cpp:

(WebCore::ImageOverlayController::selectionQuadsDidChange):

Rename selectionRectsDidChange to selectionQuadsDidChange, and take a FloatQuad in absolute coordinates
instead of a LayoutRect. Store these quads in m_overlaySelectionQuads (also renamed from
m_overlaySelectionRects).

(WebCore::ImageOverlayController::uninstallPageOverlayIfNeeded):
(WebCore::ImageOverlayController::drawRect):

Make a few changes when painting selections using the ImageOverlayController:

  1. Instead of painting with fillRect(), coalesce all of the collected selection quads into a single Path

object, and pass that Path into fillPath(). This allows us to render each piece of selected content as a
quad instead of a bounding rect, and additionally prevents us from rendering overlapping selections
when using ImageOverlayController.

  1. Clip selections to the absolute bounds of the image overlay host element's renderer, which prevents the new

selection quads from spilling out of the host element.

(WebCore::ImageOverlayController::selectionRectsDidChange): Deleted.

  • page/ImageOverlayController.h:
  • rendering/RenderSelectionInfo.cpp:

(WebCore::RenderSelectionInfo::RenderSelectionInfo):

  • rendering/RenderSelectionInfo.h:

(WebCore::RenderSelectionInfo::collectedSelectionQuads const):
(WebCore::RenderSelectionInfo::collectedSelectionRects const): Deleted.

More minor refactoring: rename collectedSelectionRects to collectedSelectionQuads, and make it take the
original FloatQuad instead of the quad's bounding box.

  • rendering/RenderText.cpp:

(WebCore::RenderText::collectSelectionGeometriesForLineBoxes):

  • rendering/RenderText.h:
  • rendering/SelectionRangeData.cpp:

(WebCore::SelectionRangeData::SelectionRangeData):
(WebCore::SelectionRangeData::set):
(WebCore::SelectionRangeData::apply):

  • rendering/SelectionRangeData.h:

LayoutTests:

Add a new layout test to cover the change. Currently, the below test case renders a visible selection rect in
the image overlay since we render the bounding rect of the overlay text quad, which intersects with the image
overlay's bounds. However, the text quad is positioned outside of the image overlay, so there shouldn't be any
visible selection rect. As such, this test is expected to render the same content as a plain image (even without
an image overlay).

Unfortunately, I couldn't write a matching ref-test for the case where the selection rect is inside the bounds
of the image overlay, since doing so led to tiny subpixel differences between the transparent image case (using
ImageOverlayController) and the regular image overlay selection case.

  • fast/images/image-extraction/mac/select-rotated-transparent-image-overlay-expected.html: Added.
  • fast/images/image-extraction/mac/select-rotated-transparent-image-overlay.html: Added.
11:06 AM Changeset in webkit [277273] by graouts@webkit.org
  • 4 edits in trunk/Source/WebKit

Fix some unified build errors
https://bugs.webkit.org/show_bug.cgi?id=225594

Reviewed by Wenson Hsieh.

  • UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h:
  • UIProcess/ios/WKTextSelectionRect.mm:
  • UIProcess/mac/WKTextInputWindowController.mm:
10:46 AM Changeset in webkit [277272] by eric.carlson@apple.com
  • 3 edits in trunk/Source/WebCore

[GPUP-MSE] Implement time changed callback
https://bugs.webkit.org/show_bug.cgi?id=225485
<rdar://problem/77625992>

Reviewed by Jer Noble.

Implement MediaPlayerPrivateMediaSourceAVFObjC::setCurrentTimeDidChangeCallback so
the GPU process doesn't have to poll currentTime.

No change in functionality.

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

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::~MediaPlayerPrivateMediaSourceAVFObjC):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCurrentTimeDidChangeCallback):

10:30 AM Changeset in webkit [277271] by achristensen@apple.com
  • 6 edits
    2 adds in trunk/Tools

Add unit test for r274129
https://bugs.webkit.org/show_bug.cgi?id=224021

Reviewed by Chris Dumez.

  • TestWebKitAPI/SourcesCocoa.txt:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/RemoteObjectRegistry.h:
  • TestWebKitAPI/Tests/WebKitCocoa/RemoteObjectRegistry.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/RemoteObjectRegistryPlugIn.mm:

(-[RemoteObjectRegistryPlugIn sendAwakener:completionHandler:]):

  • TestWebKitAPI/Tests/WebKitCocoa/TestAwakener.h: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/TestAwakener.mm: Added.

(-[TestAwakener awakeAfterUsingCoder:]):
(-[TestAwakener initWithValue:]):
(-[TestAwakener value]):
(+[TestAwakener supportsSecureCoding]):
(-[TestAwakener encodeWithCoder:]):
(-[TestAwakener initWithCoder:]):

10:20 AM Changeset in webkit [277270] by Devin Rousso
  • 8 edits in trunk

Add support for a media attribute on <meta name="theme-color" content="...">
https://bugs.webkit.org/show_bug.cgi?id=224389
<rdar://problem/74991621>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Tests: WKWebViewThemeColor.MetaElementValidNameAndColorAndMedia

WKWebViewThemeColor.MetaElementInvalidName
WKWebViewThemeColor.MetaElementInvalidColor
WKWebViewThemeColor.MetaElementInvalidMedia
WKWebViewThemeColor.MetaElementMultipleValid
WKWebViewThemeColor.MetaElementValidSubframe
WKWebViewThemeColor.KVO

  • html/HTMLMetaElement.idl:
  • html/HTMLMetaElement.h:
  • html/HTMLMetaElement.cpp:

(WebCore::parseMedia): Added.
(WebCore::mediaMatches): Added.
(WebCore::HTMLMetaElement::mediaAttributeMatches): Added.
(WebCore::HTMLMetaElement::contentColor): Added.
(WebCore::HTMLMetaElement::attributeChanged):
(WebCore::HTMLMetaElement::parseAttribute):
(WebCore::HTMLMetaElement::removedFromAncestor):
(WebCore::HTMLMetaElement::process):
Add support for a reflected media attribute. Cache the most recently parsed media (which
becomes a Ref<MediaQuerySet>) and content (which can become a Color) to avoid doing
repeated work when determining the active theme color after media state changes. Notify the
Document whenever the name or content or media attribute changes if the new or old
value will be or would have been related to calculating the theme color.

  • dom/Document.h:

(WebCore::Document::themeColor const): Deleted.

  • dom/Document.cpp:

(WebCore::Document::themeColor): Added.
(WebCore::Document::metaElementThemeColorChanged): Added.
(WebCore::Document::determineActiveThemeColorMetaElement): Added.
(WebCore::Document::themeColorChanged):
(WebCore::Document::updateElementsAffectedByMediaQueries):
(WebCore::Document::processMetaElementThemeColor): Deleted.
Make calculating the theme color into a two stage process:

  1. find all <meta name="theme-color"> that have a valid CSS color content in tree order
  2. return the HTMLMetaElement::contentColor of the first item from step 1 that HTMLMetaElement::mediaAttributeMatches

This is done so that Document::updateElementsAffectedByMediaQueries doesn't have to repeat
step 1 each time it's run (which can be often) and instead only needs to iterate a (likely
very small) list in step 2. The actions/situations listed above would clear the cached data
from both steps, meaning that the next Document::themeColor will do a full recalculation.
Notify the UIProcess of a change in theme color if the result of step 2 is different from a
previously cached result (if set).

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewThemeColor.mm:

(TEST.WKWebViewThemeColor.MetaElementValidNameAndColor): Added.
(TEST.WKWebViewThemeColor.MetaElementValidNameAndColorAndMedia): Added.
(TEST.WKWebViewThemeColor.MetaElementInvalidName): Added.
(TEST.WKWebViewThemeColor.MetaElementInvalidColor): Added.
(TEST.WKWebViewThemeColor.MetaElementInvalidMedia): Added.
(TEST.WKWebViewThemeColor.MetaElementMultipleValid): Added.
(TEST.WKWebViewThemeColor.MetaElementValidSubframe): Added.
(-[WKWebViewThemeColorObserver observeValueForKeyPath:ofObject:change:context:]):
(TEST.WKWebViewThemeColor.KVO):
(TEST.WKWebViewThemeColor.MetaElementOnLoad): Deleted.
(TEST.WKWebViewThemeColor.MetaElementMultipleTags): Deleted.

9:57 AM Changeset in webkit [277269] by Darin Adler
  • 53 edits in trunk

Remove all remaining uses of the String::toInt family of functions
https://bugs.webkit.org/show_bug.cgi?id=225580

Reviewed by Sam Weinig.

Source/WebCore:

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::extractExistingDatabaseInfo):
Use parseInteger<uint64_t> instead of String::toUInt64Strict.
(WebCore::IDBServer::SQLiteIDBBackingStore::databaseNameAndVersionFromFile):
Ditto.

  • Modules/websockets/WebSocketDeflateFramer.cpp:

(WebCore::WebSocketExtensionDeflateFrame::WebSocketExtensionDeflateFrame):
Use a reference instead of a pointer.
(WebCore::WebSocketExtensionDeflateFrame::processResponse): Use
ASCIILiteral. Use parseIntegerAllowingTrailingJunk<int> instead of
String::toInt. Use auto. Use references instead of pointers.
(WebCore::DeflateResultHolder::DeflateResultHolder): Use a reference.
(WebCore::DeflateResultHolder::~DeflateResultHolder): Ditto.
(WebCore::InflateResultHolder::InflateResultHolder): Ditto.
(WebCore::InflateResultHolder::~InflateResultHolder): Ditto.
(WebCore::WebSocketDeflateFramer::WebSocketDeflateFramer): Deleted.
(WebCore::WebSocketDeflateFramer::createExtensionProcessor): Pass a reference.
(WebCore::WebSocketDeflateFramer::deflate): Ditto.
(WebCore::WebSocketDeflateFramer::inflate): Ditto.

  • Modules/websockets/WebSocketDeflateFramer.h: Use forward declarations

instead of includes, references instead of pointers, initialize data members
in the class definition, and remove an unnecessary explicit default constructor.

  • Modules/websockets/WebSocketHandshake.cpp:

(WebCore::headerHasValidHTTPVersion): Use parseInteger<int> instead of
StringView::toIntStrict.
(WebCore::WebSocketHandshake::readStatusLine): Ditto.

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::headingLevel const): Use
getIntegralAttribute instead of AtomString::toInt.
(WebCore::AccessibilityNodeObject::hierarchicalLevel const): Ditto.

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::getIntegralAttribute const): Added.
Since AccessibilityObject has its own getAttribute function, we need to
re-implement Element::getIntegralAttribute here.
(WebCore::AccessibilityObject::setSize const): Use getIntegralAttribute
instead of AtomString::toInt.
(WebCore::AccessibilityObject::posInSet const): Ditto.

  • accessibility/AccessibilityObject.h: Added getIntegralAttribute.
  • accessibility/AccessibilityTable.cpp:

(WebCore::AccessibilityTable::isDataTable const):Use getIntegralAttribute
instead of AtomString::toInt.
(WebCore::AccessibilityTable::axColumnCount const): Ditto.
(WebCore::AccessibilityTable::axRowCount const): Ditto.

  • accessibility/AccessibilityTableCell.cpp:

(WebCore::AccessibilityTableCell::axColumnIndex const): Ditto.
(WebCore::AccessibilityTableCell::axRowIndex const): Ditto.
(WebCore::AccessibilityTableCell::axColumnSpan const): Ditto.
(WebCore::AccessibilityTableCell::axRowSpan const): Ditto.

  • accessibility/AccessibilityTableRow.cpp:

(WebCore::AccessibilityTableRow::axColumnIndex const): Ditto.
(WebCore::AccessibilityTableRow::axRowIndex const): Ditto.

  • css/parser/CSSSelectorParser.cpp:

(WebCore::consumeANPlusB): Use parseInteger<int> instead of String::toIntStrict

  • css/parser/CSSTokenizer.cpp:

(WebCore::CSSTokenizer::consumeEscape): Use parseInteger<uint32_t> instead of
String::toUIntStrict.

  • editing/cocoa/DataDetection.mm:

(WebCore::DataDetection::canPresentDataDetectorsUIForElement):
Use parseIntegerAllowingTrailingJunk<int> instead of String::toInt.
Also use StringView instead of String.
(WebCore::dataDetectorStringForPath): Use makeString instead of StringBuilder.

  • editing/cocoa/HTMLConverter.mm:

(HTMLConverter::computedAttributesForElement): Use
parseIntegerAllowingTrailingJunk<int> instead of String::toInt.

  • html/HTMLFrameElement.cpp:

(WebCore::HTMLFrameElement::parseAttribute): Use parseHTMLInteger instead
of parseIntegerAllowingTrailingJunk<int>.

  • html/HTMLFrameSetElement.cpp:

(WebCore::HTMLFrameSetElement::parseAttribute): Ditto.

  • html/HTMLHRElement.cpp:

(WebCore::HTMLHRElement::collectStyleForPresentationAttribute): Ditto.

  • html/HTMLIFrameElement.cpp:

(WebCore::HTMLIFrameElement::collectStyleForPresentationAttribute): Ditto.

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::parseAttribute): Ditto.

  • html/HTMLLIElement.cpp:

(WebCore::HTMLLIElement::parseValue): Ditto.

  • html/HTMLMarqueeElement.cpp:

(WebCore::HTMLMarqueeElement::loop const): Use getIntegralAttribute
instead of parseIntegerAllowingTrailingJunk<int>.

  • html/HTMLTableCellElement.cpp:

(WebCore::HTMLTableCellElement::collectStyleForPresentationAttribute):
Use parseHTMLInteger instead of parseIntegerAllowingTrailingJunk<int>.

  • html/HTMLTableColElement.cpp:

(WebCore::HTMLTableColElement::parseAttribute): Ditto.

  • html/HTMLTableElement.cpp:

(WebCore::HTMLTableElement::parseAttribute): Ditto.

  • inspector/InspectorFrontendClientLocal.cpp:

(WebCore::InspectorFrontendClientLocal::restoreAttachedWindowHeight):
Use parseIntegerAllowingTrailingJunk<unsigned> instead of
String::toUInt.

  • inspector/agents/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::nodeForPath): Use
parseIntegerAllowingTrailingJunk<unsigned> instead of String::toUInt.

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::TreeBuilder::createLayoutBox): Use parseHTMLInteger
instead of AtomString::toInt.

  • loader/CrossOriginPreflightResultCache.cpp:

(WebCore::parseAccessControlMaxAge): Use parseInteger<uint64_t> instead
of String::toUIntStrict.

  • loader/FTPDirectoryParser.cpp:

(WebCore::parseOneFTPLine): Use parseIntegerAllowingTrailingJunk<unsigned>
instead of String::toUInt.

  • loader/PrivateClickMeasurement.cpp:

(WebCore::PrivateClickMeasurement::parseAttributionRequest): Use
parseInteger<uint64_t> instead of String::toUInt64Strict.

  • mathml/MathMLSelectElement.cpp:

(WebCore::MathMLSelectElement::getSelectedActionChildAndIndex):
Use getIntegralAttribute instead of parseIntegerAllowingTrailingJunk<int>.

  • page/EventSource.cpp:

(WebCore::EventSource::parseEventStreamLine): Use
parseIntegerAllowingTrailingJunk<uint64_t> instead of charactersToUInt64.

  • page/Location.cpp:

(WebCore::Location::setPort): Use parseInteger<uint16_t> instead of parseUInt16.

  • page/SecurityOriginData.cpp:

(WebCore::SecurityOriginData::fromDatabaseIdentifier): Use
parseIntegerAllowingTrailingJunk<uint16_t> instead of String::toInt, which
allows us to remove some range checking and type conversion.

  • page/WindowFeatures.cpp:

(WebCore::setWindowFeature): Use parseIntegerAllowingTrailingJunk<int>
instead of StringView::toInt.

  • page/csp/ContentSecurityPolicySourceList.cpp:

(WebCore::ContentSecurityPolicySourceList::parsePort): Use
parseInteger<uint16_t> instead of charactersToIntStrict.

  • page/linux/ResourceUsageThreadLinux.cpp:

(WebCore::collectCPUUsage): Use parseInteger<pid_t> instead of
String::toIntStrict. Also removed unneeded special cases for "." and
".." since both will fail to parse as an integer, and this no longer
need to put d_name into a WTF::String.

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(CachedResourceStreamingClient::responseReceived): Use
parseIntegerAllowingTrailingJunk<int> instead of String::toInt.

  • platform/graphics/gstreamer/eme/CDMThunder.cpp:

(WebCore::ParsedResponseMessage::ParsedResponseMessage): Use
parseInteger<int> instead of String::toInt to parse a single-digit.
Probably should write this another way.

  • platform/network/curl/CookieUtil.cpp:

(WebCore::CookieUtil::parseCookieAttributes): Use
parseIntegerAllowingTrailingJunk<int64_t> instead of String::toInt64.

  • platform/network/curl/CurlCacheEntry.cpp:

(WebCore::CurlCacheEntry::setResponseFromCachedHeaders): Use
parseIntegerAllowingTrailingJunk<long long> instead of String::toInt64.

  • svg/SVGToOTFFontConversion.cpp:

(WebCore::SVGToOTFFontConverter::appendOS2Table): Use parseHTMLInteger
instead of parseIntegerAllowingTrailingJunk<int>. Might be even better
to refactor to use getIntegralAttribute later.
(WebCore::SVGToOTFFontConverter::appendVORGTable): Ditto.

  • testing/Internals.cpp:

(WebCore::Internals::setSFrameCounter): Use parseInteger<uint64_t>
instead of StringView::toUInt64Strict.

Source/WebDriver:

  • WebDriverService.cpp:

(WebDriver::WebDriverService::run): Use
parseIntegerAllowingTrailingJunk<uint16_t> instead of String::toUInt.

  • glib/WebDriverServiceGLib.cpp:

(WebDriver::parseVersion): Use
parseIntegerAllowingTrailingJunk<uint64_t> instead of String::toInt64,
and then assigning into a uint64_t.

  • socket/HTTPParser.cpp:

(WebDriver::HTTPParser::expectedBodyLength const): Use
parseIntegerAllowingTrailingJunk<size_t> instead of String::toInt.
Also use StringView instead of String::substringSharingImpl and
dropped an unneeded call to String::stripWhiteSpace.

Source/WebKitLegacy/win:

  • Plugins/PluginDatabaseWin.cpp:

(WebCore::parseVersionString): Use parseIntegerAllowinTrailingJunk<int>
isnstead of String::toInt.

  • Plugins/PluginView.cpp:

(WebCore::PluginView::handlePost): Use
parseIntegerAllowingTrailingJunk<unsigned> instead of String::toInt,
and then assigning to an unsigned.

Tools:

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

(WTR::AccessibilityUIElement::numberAttributeValue): Use
parseIntegerAllowingTrailingJunk<int> instead of String::toInt.
(WTR::AccessibilityUIElement::hierarchicalLevel const): Ditto.

9:56 AM Changeset in webkit [277268] by achristensen@apple.com
  • 4 edits in trunk

css-display-none actions from WKContentRuleList should apply to pages loaded with loadData and loadHTMLString
https://bugs.webkit.org/show_bug.cgi?id=225493
<rdar://77331789>

Reviewed by Darin Adler.

Source/WebCore:

Blocking and https upgrade don't really make sense on the url from loadData and loadHTMLString because blocking would be
incompatible with existing apps and because you're not really connecting to a server, you're just pretending you did.

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::handleSubstituteDataLoadNow):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm:

(TEST):

9:38 AM Changeset in webkit [277267] by Chris Dumez
  • 2 edits in trunk/Tools

Fix potential races in AppleLanguagesTest.UpdateAppleLanguages API test
https://bugs.webkit.org/show_bug.cgi?id=225429

Reviewed by Darin Adler.

Calling [TestWKWebView performAfterReceivingAnyMessage] registers a MessageHandler which sends an
async WebUserContentController::AddUserScriptMessageHandlers IPC to the WebProcess. We want to
make sure that that message handler is registered in the WebProcess before the JS on the page
calls webkit.messageHandlers.testHandler.postMessage(). To address this issue, I moved the
call to [TestWKWebView performAfterReceivingAnyMessage] before the call to evaluateJavaScript
that registers the event listener that may call webkit.messageHandlers.testHandler.postMessage().

Also make sure the PreferenceObserver has been allocated after sending the
"NSApplicationDidBecomeActiveNotification" and before proceeding with the test.

I am also adding an extra check at the end to make sure that the value of navigator.language is
correct and to make sure that WKPreferenceObserver.preferenceDidChange was called. This was done
to help diagnose flakiness issues on the bots that I cannot reproduce locally.

  • TestWebKitAPI/Tests/WebKit/OverrideAppleLanguagesPreference.mm:

(TEST_F):

9:35 AM Changeset in webkit [277266] by youenn@apple.com
  • 6 edits in trunk/Source/WebKit

Have IPC::Semaphore::wait return a state boolean
https://bugs.webkit.org/show_bug.cgi?id=225587

Reviewed by Alex Christensen.

Semaphore::wait might return early, in particular if its sempahore is destroyed.
To handle this case, return false in that case to allow specific handling by caller.
Use return state in RemoteCaptureSampleManager::RemoteAudio::startThread as a way to stop the capture thread.
Covered by existing tests.

  • Platform/IPC/IPCSemaphore.h:
  • Platform/IPC/darwin/IPCSemaphoreDarwin.cpp:

(IPC::Semaphore::wait):

  • Platform/IPC/unix/IPCSemaphoreUnix.cpp:

(IPC::Semaphore::wait):

  • Platform/IPC/win/IPCSemaphoreWin.cpp:

(IPC::Semaphore::wait):

  • WebProcess/cocoa/RemoteCaptureSampleManager.cpp:

(WebKit::RemoteCaptureSampleManager::RemoteAudio::startThread):

9:26 AM Changeset in webkit [277265] by Aditya Keerthi
  • 7 edits
    2 adds in trunk

[iPadOS] Do not present custom input peripherals when switching back to a tab with a focused element
https://bugs.webkit.org/show_bug.cgi?id=225541
<rdar://problem/77537795>

Reviewed by Wenson Hsieh.

Source/WebKit:

With the introduction of desktop-class browing on iPad, form control
elements began to retain focus even after their input peripheral
(popover, menu, etc.) was dismissed. This behavior matches macOS - when
a <select> element is clicked, a menu is presented, and when a option
is selected, the menu is dismissed but the element retains focus.

Consequently, when a <select> menu is dismissed by choosing an option on
an iPad with a hardware keyboard, the element retains focus. Now, when
switching tabs and coming back to the tab with the focused <select>, an
activity state update is triggered. Upon recognizing that there is a
focused element, an ElementDidFocus message is sent to the UIProcess.

In [WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:activityStateChanges:userObject:],
the focus is given permission to present the input peripheral (menu)
when the hardware keyboard is attached. This is necessary when necessary
when focusing a text input, because the UCB needs to be displayed and
text selection needs to be set up. However, the behavior is undesirable
for elements that present a popover or a menu (select, color inputs, and
date inputs), since the user is unexpectedly shown an input peripheral.
Even worse, the user's scroll position will be changed to ensure the
focused element is visible.

To fix the undesirable behavior, and get closer to the macOS behavior,
custom input peripherals should not be displayed when switching back
to a tab with a focused element.

Test: fast/forms/ios/focus-select-and-switch-tabs.html

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:activityStateChanges:userObject:]):

Only show the input peripheral if it is not a keyboard view.

Tools:

Updated a UIScriptController hook that simulates attaching a hardware
keyboard to also swizzle [UIKeyboard isInHardwareKeyboardMode].

  • WebKitTestRunner/ios/TestControllerIOS.mm:

(WTR::TestController::platformInitialize):
(WTR::TestController::platformResetStateToConsistentValues):

Moved the default swizzling behavior into this method so that it remains
consistent across tests.

Unfortunately, the default swizzling behavior contrasts with the default
value of GSEventSetHardwareKeyboardAttached. However, this is an existing
inconsistency, and should be looked at more carefully in a separate
investigation.

  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::returnYes):
(WTR::returnNo):
(WTR::UIScriptControllerIOS::setHardwareKeyboardAttached):

LayoutTests:

Added a test which simulates a tab switch by removing and re-adding the
webview to the window.

  • fast/forms/ios/focus-select-and-switch-tabs-expected.txt: Added.
  • fast/forms/ios/focus-select-and-switch-tabs.html: Added.
  • resources/ui-helper.js:

(window.UIHelper.becomeFirstResponder):
(window.UIHelper.removeViewFromWindow):
(window.UIHelper.addViewToWindow):

9:08 AM Changeset in webkit [277264] by achristensen@apple.com
  • 29 edits
    2 deletes in trunk

Remove WKBundlePageGroupRef
https://bugs.webkit.org/show_bug.cgi?id=225471

Reviewed by Darin Adler.

Source/WebKit:

Its last use was removed in rdar://60987265

  • Sources.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/InjectedBundle/API/APIInjectedBundleBundleClient.h:

(API::InjectedBundle::Client::willDestroyPage):
(API::InjectedBundle::Client::didInitializePageGroup): Deleted.

  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroup.mm:
  • WebProcess/InjectedBundle/API/c/WKBundle.cpp:

(WKBundleSetAsynchronousSpellCheckingEnabledForTesting):
(WKBundleGetLiveDocumentURLsForTesting):
(WKBundleSetUserStyleSheetLocationForTesting):
(WKBundleAddUserScript): Deleted.
(WKBundleAddUserStyleSheet): Deleted.
(WKBundleRemoveUserScript): Deleted.
(WKBundleRemoveUserStyleSheet): Deleted.
(WKBundleRemoveUserScripts): Deleted.
(WKBundleRemoveUserStyleSheets): Deleted.
(WKBundleRemoveAllUserContent): Deleted.
(WKBundleSetAsynchronousSpellCheckingEnabled): Deleted.
(WKBundleGetLiveDocumentURLs): Deleted.
(WKBundleSetUserStyleSheetLocation): Deleted.

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

(WKBundlePageGetPageGroup): Deleted.

  • WebProcess/InjectedBundle/API/c/WKBundlePage.h:
  • WebProcess/InjectedBundle/API/c/WKBundlePageGroup.cpp: Removed.
  • WebProcess/InjectedBundle/API/c/WKBundlePageGroup.h: Removed.
  • WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::setAsynchronousSpellCheckingEnabled):
(WebKit::InjectedBundle::setUserStyleSheetLocation):
(WebKit::InjectedBundle::liveDocumentURLs):
(WebKit::InjectedBundle::didInitializePageGroup): Deleted.

  • WebProcess/InjectedBundle/InjectedBundle.h:
  • WebProcess/InjectedBundle/InjectedBundleClient.cpp:

(WebKit::InjectedBundleClient::didInitializePageGroup): Deleted.

  • WebProcess/InjectedBundle/InjectedBundleClient.h:
  • WebProcess/WebPage/WebPageGroupProxy.cpp:

(WebKit::WebPageGroupProxy::create):

Tools:

Also use some smart pointers instead of raw pointers to keep things safe.

  • TestWebKitAPI/InjectedBundleController.cpp:

(TestWebKitAPI::InjectedBundleController::InjectedBundleController):
(TestWebKitAPI::InjectedBundleController::initialize):
(TestWebKitAPI::InjectedBundleController::didInitializePageGroup): Deleted.

  • TestWebKitAPI/InjectedBundleController.h:

(TestWebKitAPI::InjectedBundleController::bundle const):

  • TestWebKitAPI/InjectedBundleTest.h:

(TestWebKitAPI::InjectedBundleTest::willDestroyPage):
(TestWebKitAPI::InjectedBundleTest::Register::create):
(TestWebKitAPI::InjectedBundleTest::didInitializePageGroup): Deleted.

  • TestWebKitAPI/Tests/WebKit/DOMWindowExtensionBasic_Bundle.cpp:
  • TestWebKitAPI/Tests/WebKit/DOMWindowExtensionNoCache_Bundle.cpp:
  • TestWebKitAPI/Tests/WebKit/DocumentStartUserScriptAlertCrash_Bundle.cpp:
  • TestWebKitAPI/Tests/WebKit/InjectedBundleDisableOverrideBuiltinsBehavior_Bundle.cpp:
  • TestWebKitAPI/Tests/WebKit/InjectedBundleMakeAllShadowRootsOpen_Bundle.cpp:
  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::initialize):
(WTR::InjectedBundle::didCreatePage):
(WTR::InjectedBundle::didReceiveMessage):
(WTR::InjectedBundle::reportLiveDocuments):
(WTR::InjectedBundle::didReceiveMessageToPage):
(WTR::InjectedBundle::beginTesting):
(WTR::InjectedBundle::statisticsNotifyObserver):
(WTR::InjectedBundle::didInitializePageGroup): Deleted.

  • WebKitTestRunner/InjectedBundle/InjectedBundle.h:

(WTR::InjectedBundle::bundle const):
(WTR::InjectedBundle::pageGroup const): Deleted.

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setUserStyleSheetEnabled):
(WTR::TestRunner::setAsynchronousSpellCheckingEnabled):

8:41 AM Changeset in webkit [277263] by aboya@igalia.com
  • 1 edit
    1 delete in trunk/Source/WebCore

[MSE][GStreamer] Remove stale PlaybackPipeline.cpp
https://bugs.webkit.org/show_bug.cgi?id=225595

Reviewed by Adrian Perez de Castro.

The WebKitMediaSrc v2 patch removed PlaybackPipeline but accidentally
the .cpp file survived the rebases.

This patch introduces no behavior changes, the file was not being
compiled anymore.

  • platform/graphics/gstreamer/mse/PlaybackPipeline.cpp: Removed.
5:17 AM Changeset in webkit [277262] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebKit

[GTK] Add picker UI for <input type=date> and <input type=datetime-local>
https://bugs.webkit.org/show_bug.cgi?id=224924

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2021-05-10
Reviewed by Adrian Perez de Castro.

Use a GtkPopover with a GtkCalendar.

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseSetFocus): Only notify the web process about focus changes when shouldNotifyFocusEvents is true.
(webkitWebViewBaseSetShouldNotifyFocusEvents): Set whether the web view should notify about focus changes to the
web process.

  • UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
  • UIProcess/gtk/WebDateTimePickerGtk.cpp:

(WebKit::WebDateTimePickerGtk::~WebDateTimePickerGtk): Call invalidate instead of endPicker.
(WebKit::WebDateTimePickerGtk::invalidate): Destroy the popover and allow the web view to notify about focus
events again.
(WebKit::WebDateTimePickerGtk::endPicker): Invalidate and notify the parent.
(WebKit::timeToString): Helper to convert the time portions of a DateComponents to a string.
(WebKit::calendarDateToString): Helper to convert selected date to a string.
(WebKit::WebDateTimePickerGtk::didChooseDate): Notify the WebPageProxy about the selected date.
(WebKit::WebDateTimePickerGtk::showDateTimePicker): Create or update a GtkPopover with a calendar.
(WebKit::WebDateTimePickerGtk::update): Update the calendar and current date.

  • UIProcess/gtk/WebDateTimePickerGtk.h:
3:55 AM Changeset in webkit [277261] by commit-queue@webkit.org
  • 4 edits in trunk

[GStreamer] fast/mediastream/MediaStream-video-element-video-tracks-disabled.html fails
https://bugs.webkit.org/show_bug.cgi?id=225518

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

Source/WebCore:

  • platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp: Fix out-of-bounds memset().

LayoutTests:

  • platform/glib/TestExpectations: Unflag a couple more mediastream tests that are passing now.
3:08 AM WebKitGTK/2.32.x edited by Adrian Perez de Castro
(diff)
3:02 AM Changeset in webkit [277260] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.32.1

WebKitGTK 2.32.1

3:01 AM Changeset in webkit [277259] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.32

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.32.1 release

.:

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

Source/WebKit:

  • gtk/NEWS: Add release notes for 2.32.1
2:13 AM Changeset in webkit [277258] by Carlos Garcia Campos
  • 5 edits in trunk/Source/WebKit

[GTK] Use always async scrolling in accelerated compositing mode
https://bugs.webkit.org/show_bug.cgi?id=225512

Reviewed by Fujii Hironori.

We currently use async scrolling only when the hardware acceleration policy is set for always, but not when
entering accelerating compositing mode in ondemand policy. Since the GTK port still supports the non accelerated
compositing mode we need to add and remove the scrolling tree when entering and leaving the accelerated
compositing mode.

  • UIProcess/API/glib/WebKitSettings.cpp:

(webkit_settings_set_hardware_acceleration_policy): Always enable async scrolling when accelerated compositing
is enabled.

  • UIProcess/gtk/WebPreferencesGtk.cpp:

(WebKit::WebPreferences::platformInitializeStore): Ditto.

  • WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:

(WebKit::DrawingAreaCoordinatedGraphics::~DrawingAreaCoordinatedGraphics): Remove the scrolling tree if the
drawing area is destroyed in accelerated compositing mode.
(WebKit::DrawingAreaCoordinatedGraphics::enterAcceleratedCompositingMode): Add the scrolling tree.
(WebKit::DrawingAreaCoordinatedGraphics::exitAcceleratedCompositingMode): Remove the scrolling tree.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage): Do not add the scrolling tree from here for the GTK port.
(WebKit::WebPage::close): Do not remove the scrolling tree from here for the GTK port.

12:16 AM Changeset in webkit [277257] by commit-queue@webkit.org
  • 26 edits
    4 adds in trunk

Implement <form>.requestSubmit()
https://bugs.webkit.org/show_bug.cgi?id=197958

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

LayoutTests/imported/w3c:

Update improved test results and import requestSubmit tests.

  • web-platform-tests/html/dom/idlharness.https-expected.txt:
  • web-platform-tests/html/semantics/forms/form-submission-0/request-submit-activation-expected.txt: Added.
  • web-platform-tests/html/semantics/forms/form-submission-0/request-submit-activation.html: Added.
  • web-platform-tests/html/semantics/forms/the-form-element/form-requestsubmit-autofocus-expected.txt: Added.
  • web-platform-tests/html/semantics/forms/the-form-element/form-requestsubmit-autofocus.html: Added.
  • web-platform-tests/html/semantics/forms/the-form-element/form-requestsubmit-expected.txt:
  • web-platform-tests/html/semantics/forms/the-form-element/form-requestsubmit.html:

Source/WebCore:

Implement the requestSubmit method as defined here [1].

Behavior matches Chrome and Firefox.

[1] https://html.spec.whatwg.org/multipage/forms.html#dom-form-requestsubmit

Tests: imported/w3c/web-platform-tests/html/semantics/forms/the-form-element/form-requestsubmit.html

imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/request-submit-activation.html
imported/w3c/web-platform-tests/html/semantics/forms/the-form-element/form-requestsubmit-autofocus.html

  • html/HTMLButtonElement.cpp:

(WebCore::HTMLButtonElement::defaultEventHandler):
(WebCore::HTMLButtonElement::isSubmitButton const):

  • html/HTMLButtonElement.h:
  • html/HTMLFormControlElement.h:

(WebCore::HTMLFormControlElement::isSubmitButton const):

  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::submitImplicitly):
(WebCore::HTMLFormElement::submitIfPossible):
(WebCore::HTMLFormElement::requestSubmit):
(WebCore::HTMLFormElement::findSubmitButton):
(WebCore::HTMLFormElement::submit):
(WebCore::HTMLFormElement::effectiveTarget const):
(WebCore::HTMLFormElement::findSubmitter const):
(WebCore::HTMLFormElement::reportValidity):
(WebCore::HTMLFormElement::prepareForSubmission): Deleted.
(WebCore::HTMLFormElement::findSubmitButton const): Deleted.

  • html/HTMLFormElement.h:
  • html/HTMLFormElement.idl:
  • html/HTMLInputElement.h:
  • html/ImageInputType.cpp:

(WebCore::ImageInputType::handleDOMActivateEvent):

  • html/ImageInputType.h:
  • html/InputType.h:

(WebCore::InputType::isSubmitButton const):

  • html/SubmitInputType.cpp:

(WebCore::SubmitInputType::handleDOMActivateEvent):

  • loader/FormSubmission.cpp:

(WebCore::FormSubmission::create):

  • loader/FormSubmission.h:

Source/WTF:

Add requestSubmit as experimental feature, disabled by default.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

LayoutTests:

Update improved test results.

  • platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
12:10 AM Changeset in webkit [277256] by youenn@apple.com
  • 5 edits in trunk/Source/WebKit

Use IPC::Semaphore instead of sending an IPC message for every captured audio sample
https://bugs.webkit.org/show_bug.cgi?id=225452

Reviewed by Eric Carlson.

Previously, we were sending an IPC message from UIProcess or GPUProcess to WebProcess for every microphone audio sample chunk.
We are now using IPC::Semaphore to signal that a new chunk is to be processed.

We no longer send the chunk timestamp. Instead, we reconstruct it from the number of previously processed samples.
At audio storage change, we send the start time and we assume that there is continuous timing based on sample counts after that.
That is why we recreate a new audio storage change anytime we need to reset or the configuration changes, which should not happen often in practice.

We process fixed-size chunks on WebProcess side and signal it on GPUProcess/UIProcess side.
This size is sent through IPC at audio storage change time and is the max of 128 samples (WebAudio quantum) and AudioSession preferred size.
In case WebAudio is used, it should be 128 samples. In case WebAudio is not used, it should be 20 ms of audio data.

Covered by existing tests and manually tested.

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:

(WebKit::UserMediaCaptureManagerProxy::SourceProxy::start):
(WebKit::UserMediaCaptureManagerProxy::SourceProxy::storageChanged):

  • WebProcess/cocoa/RemoteCaptureSampleManager.cpp:

(WebKit::RemoteCaptureSampleManager::audioStorageChanged):
(WebKit::RemoteCaptureSampleManager::RemoteAudio::RemoteAudio):
(WebKit::RemoteCaptureSampleManager::RemoteAudio::~RemoteAudio):
(WebKit::RemoteCaptureSampleManager::RemoteAudio::stopThread):
(WebKit::RemoteCaptureSampleManager::RemoteAudio::startThread):
(WebKit::RemoteCaptureSampleManager::RemoteAudio::setStorage):

  • WebProcess/cocoa/RemoteCaptureSampleManager.h:
  • WebProcess/cocoa/RemoteCaptureSampleManager.messages.in:

May 9, 2021:

6:48 PM Changeset in webkit [277255] by weinig@apple.com
  • 4 edits in trunk/Source/WebCore

Add back protection of the pixel buffer in ImageBufferCGBackend::toCFData removed in r277237
https://bugs.webkit.org/show_bug.cgi?id=225574

Reviewed by Darin Adler.

In r277237, I accidentally removed a RefPtr<Uint8ClampedArray> protectedPixelArray
in ImageBufferCGBackend::toCFData that was needed to avoided crashing in some cases
when running fast/canvas/canvas-toDataURL-jpeg-crash.html.

Since it wasn't super clear what it was doing, this switches to using the more idiomatic
method of keeping the data alive in a CGDataProviderRef by passing the leaked image data
as the context and derefing in the callback lambda.

Just to be consistent, I went to other callers of CGDataProviderCreateWithData and
updated them to be idiomatically consistent.

  • platform/graphics/cg/GraphicsContextGLCG.cpp:

(WebCore::GraphicsContextGLOpenGL::paintToCanvas):
(WebCore::releaseImageData): Deleted.

  • platform/graphics/cg/ImageBufferCGBackend.cpp:

(WebCore::ImageBufferCGBackend::toCFData const):

  • platform/graphics/cg/ImageBufferCGBitmapBackend.cpp:

(WebCore::ImageBufferCGBitmapBackend::create):

5:26 PM Changeset in webkit [277254] by Lauro Moura
  • 2 edits in trunk/Source/WebCore

[WebXR] Remove reference cycle in WebXRSession
https://bugs.webkit.org/show_bug.cgi?id=225025
<rdar://problem/77111217>

Unreviewed WPE build fix.

  • Modules/webxr/WebXRInputSourceArray.h: Add missing namespace.
5:10 PM WebKitGTK/2.28.x edited by clopez@igalia.com
(diff)
2:21 PM Changeset in webkit [277253] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

[WinCairo][Clang] lld-link: error: undefined symbol: public: static class GenericTypedArrayView<>::tryCreate() in CryptoKeyRSAOpenSSL.cpp
https://bugs.webkit.org/show_bug.cgi?id=225581

Unreviewed build for r277142.

  • crypto/openssl/CryptoKeyRSAOpenSSL.cpp: Include <JavaScriptCore/TypedArrayInlines.h>.
12:11 PM Changeset in webkit [277252] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[Tools] Generate marshalling code without source reference
https://bugs.webkit.org/show_bug.cgi?id=225283

Patch by Khem Raj <raj.khem@gmail.com> on 2021-05-09
Reviewed by Carlos Alberto Lopez Perez.

  • MiniBrowser/gtk/CMakeLists.txt:
12:04 PM Changeset in webkit [277251] by dino@apple.com
  • 15 edits in trunk/Source/WebCore

[WebXR] Remove reference cycle in WebXRSession
https://bugs.webkit.org/show_bug.cgi?id=225025
<rdar://problem/77111217>

Reviewed by Sam Weinig.

Patch by Sam Weinig, who took my bad patch and made it better.

WebXRSession was attempting to create an WebXRInputSourceArray in
its constructor, which itself was trying to hold a strong reference
back to WebXRSession - causing a crash.

  • Modules/webxr/WebXRBoundedReferenceSpace.h: Fix small typo.
  • Modules/webxr/WebXRFrame.cpp: Use reference in constructor, since we

know the session exists.
(WebCore::WebXRFrame::create):
(WebCore::WebXRFrame::WebXRFrame):

  • Modules/webxr/WebXRFrame.h:
  • Modules/webxr/WebXRInputSource.cpp: Use a WeakPtr as a reference back

to the WebXRSession.
(WebCore::WebXRInputSource::create):
(WebCore::WebXRInputSource::WebXRInputSource):
(WebCore::WebXRInputSource::session): Add this getter.
(WebCore::WebXRInputSource::update): Check for null.
(WebCore::WebXRInputSource::pollEvents):
(WebCore::WebXRInputSource::createEvent): Deleted - moved to lambda.

  • Modules/webxr/WebXRInputSource.h:
  • Modules/webxr/WebXRInputSource.idl:
  • Modules/webxr/WebXRInputSourceArray.cpp: Add GenerateIsReachable.

(WebCore::WebXRInputSourceArray::create):
(WebCore::WebXRInputSourceArray::WebXRInputSourceArray):
(WebCore::WebXRInputSourceArray::ref):
(WebCore::WebXRInputSourceArray::deref):
(WebCore::WebXRInputSourceArray::update):
(WebCore::WebXRInputSourceArray::handleAddedOrUpdatedInputSources):

  • Modules/webxr/WebXRInputSourceArray.h:
  • Modules/webxr/WebXRInputSourceArray.idl:
  • Modules/webxr/WebXRInputSpace.cpp: Use reference in constructor.

(WebCore::WebXRInputSpace::create):
(WebCore::WebXRInputSpace::WebXRInputSpace):

  • Modules/webxr/WebXRInputSpace.h:
  • Modules/webxr/WebXRSession.cpp: Use a UniqueRef for input source array.

(WebCore::WebXRSession::onFrame):

  • Modules/webxr/WebXRSession.h:
  • bindings/scripts/CodeGeneratorJS.pm: Add ImplWebXRSessionRoot to GenerateIsReachable.

(GenerateImplementation):

11:57 AM Changeset in webkit [277250] by rniwa@webkit.org
  • 8 edits in trunk

IPC testing API should have the ability to send and receive shared memory
https://bugs.webkit.org/show_bug.cgi?id=225576

Reviewed by Wenson Hsieh.

Source/WebKit:

This patch adds the capability to send & receive shared memory for IPC testing purposes.
It adds IPC.createSharedMemory which creates a JavaScript object representing a newly
allocated IPC-sharable memory. It has readBytes and writeBytes methods. Both takes offset
and the number of bytes to read / write. readBytes will return a new ArrayBuffer and
writeBytes takes an ArrayBuffer or a typed array as the first argument.

IPC.sendMessage and IPC.sendSyncMessage now supprts encoding this SharedMemory JavaScript
object. It supports the type specific arguments of "protection" and "dataSize" in addition
to the regular "value" property for the SharedMemory object.

This patch also adds the support for sending Semaphore object over IPC created via
IPC.createSemaphore, which was supposed to be added in r277199.

Finally, this patch also exposes the VM page size via IPC.vmPageSize to facilitate
the allocation of a sharable memory of an interesting size for testing purposes.

Tests: TestWebKitAPI.IPCTestingAPI.CanReceiveSharedMemory

TestWebKitAPI.IPCTestingAPI.CanCreateSharedMemory
TestWebKitAPI.IPCTestingAPI.CanSendSemaphpre
TestWebKitAPI.IPCTestingAPI.CanSendSharedMemory

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::updateSharedMemoryForGetImageData): Use uint32_t instead
of size_t since the latter depends on the specific architecture (e.g. 32-bit vs 64-bit).
(WebKit::RemoteRenderingBackend::updateSharedMemoryAndSemaphoreForGetImageData): Ditto.

  • GPUProcess/graphics/RemoteRenderingBackend.h:
  • GPUProcess/graphics/RemoteRenderingBackend.messages.in: Ditto.
  • Platform/IPC/JSIPCBinding.h: Added a specialization for SharedMemory::IPCHandle.
  • WebProcess/WebPage/IPCTestingAPI.cpp:

(WebKit::IPCTestingAPI::JSIPCSemaphore::encode const): Added.
(WebKit::IPCTestingAPI::JSSharedMemory): Added.
(WebKit::IPCTestingAPI::JSSharedMemory::create): Added.
(WebKit::IPCTestingAPI::JSSharedMemory::size): Added.
(WebKit::IPCTestingAPI::JSSharedMemory::JSSharedMemory): Added.
(WebKit::IPCTestingAPI::convertToUint64): Moved up here.
(WebKit::IPCTestingAPI::JSIPCSemaphore::signal): Fixed a typo.
(WebKit::IPCTestingAPI::JSIPCSemaphore::waitFor): Ditto.
(WebKit::IPCTestingAPI::JSSharedMemory::createHandle): Added.
(WebKit::IPCTestingAPI::JSSharedMemory::createJSWrapper): Added.
(WebKit::IPCTestingAPI::JSSharedMemory::wrapperClass): Added.
(WebKit::IPCTestingAPI::JSSharedMemory::unwrap): Added.
(WebKit::IPCTestingAPI::JSSharedMemory::toWrapped): Added.
(WebKit::IPCTestingAPI::JSSharedMemory::initialize): Added.
(WebKit::IPCTestingAPI::JSSharedMemory::finalize): Added.
(WebKit::IPCTestingAPI::JSSharedMemory::staticFunctions): Added.
(WebKit::IPCTestingAPI::JSSharedMemory::readBytes): Added.
(WebKit::IPCTestingAPI::arrayBufferDataFromValueRef): Extracted out of encodeTypedArray.
(WebKit::IPCTestingAPI::JSSharedMemory::writeBytes): Added.
(WebKit::IPCTestingAPI::JSIPC::staticFunctions): Added IPC.createSharedMemory.
(WebKit::IPCTestingAPI::JSIPC::staticValues): Added IPC.vmPageSize.
(WebKit::IPCTestingAPI::encodeTypedArray):
(WebKit::IPCTestingAPI::getObjectIdentifierFromProperty): Now uses convertToUint64.
(WebKit::IPCTestingAPI::encodeSharedMemory): Added.
(WebKit::IPCTestingAPI::encodeSemaphore): Added.
(WebKit::IPCTestingAPI::encodeArgument): Added the support for encoding SharedMemory and
Semaphore.
(WebKit::IPCTestingAPI::JSIPC::createSharedMemory): Added.
(WebKit::IPCTestingAPI::JSIPC::vmPageSize): Added.
(IPC::jsValueForDecodedArgumentValue): Added. Creates a newly added SharedMemory JavaScript
object for SharedMemory::IPCHandle. It also exposes dataSize and protection value.
This decoder detects whether the shared memory is writable or not by attempting to map it
as Protection::ReadWrite and falling back to Protection::ReadOnly if the former fails.

Tools:

Added tests for sending and receiving shared memory in the IPC testing API.
Also added a test to send semaphore, which was missing in r277199.

  • TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm:

(IPCTestingAPI.CanReceiveSharedMemory): Added.
(IPCTestingAPI.CanCreateSharedMemory): Added.
(IPCTestingAPI.CanSendSemaphpre): Added after r277199.
(IPCTestingAPI.CanSendSharedMemory): Added.

11:54 AM Changeset in webkit [277249] by Darin Adler
  • 6 edits in trunk/Source/WebCore

Remove uses of the String::toInt family of functions from the WebCore/platform directory
https://bugs.webkit.org/show_bug.cgi?id=225575

Second half.

Reviewed by Sam Weinig.

  • platform/mediastream/mac/ScreenDisplayCapturerMac.mm:

(WebCore::ScreenDisplayCapturerMac::create): Use parseInteger<uint32_t>
instead of String::toUIntStrict.
(WebCore::ScreenDisplayCapturerMac::screenCaptureDeviceWithPersistentID): Ditto.

  • platform/mediastream/mac/WindowDisplayCapturerMac.mm:

(WebCore::WindowDisplayCapturerMac::create): Ditto.
(WebCore::WindowDisplayCapturerMac::windowCaptureDeviceWithPersistentID): Ditto.

  • platform/network/HTTPParsers.cpp:

(WebCore::parseRange): Use parseInteger<long long> instead of
String::toInt64Strict. Also use StringView so we don't allocate substrings on
the heap just to parse integers within an existing string. And removed unneeded
call to stripWhiteSpace in one place since parseInteger already allows leading
and trailing spaces, and in another case where we need to strip because of an
empty string check, used stripLeadingAndTrailingHTTPSpaces instead.

  • platform/network/ParsedContentRange.cpp:

(WebCore::parseContentRange): Use parseInteger<int64_t> instead of
StringView::toInt64Strict.

  • platform/network/ParsedRequestRange.cpp:

(WebCore::ParsedRequestRange::parse): Use parseInteger<uint64_t> instead of
StringView::toUInt64Strict.

11:39 AM ProjectsWorthDoing edited by weinig@apple.com
(diff)
11:39 AM Changeset in webkit [277248] by Darin Adler
  • 1 edit in trunk/Source/WebCore/ChangeLog

fixed ChangeLog

11:35 AM Changeset in webkit [277247] by Darin Adler
  • 2 edits in trunk/Source/WebCore

Follow-up to: Remove uses of the String::toInt family of functions from the WebCore/platform directory
https://bugs.webkit.org/show_bug.cgi?id=225575

Reviewed by Sam Weinig.

  • html/FTPDirectoryDocument.cpp:

(WebCore::processFilesizeString): Change format to "1000.0" as we discussed.

11:31 AM Changeset in webkit [277246] by Darin Adler
  • 10 edits in trunk/Source/WebCore

Remove uses of the String::toInt family of functions from the WebCore/platform directory
https://bugs.webkit.org/show_bug.cgi?id=225575

Reviewed by Sam Weinig.

  • platform/DateComponents.cpp: Tweak a comment on the local parseInt function here

that should likely be consolidated with parseInteger at some point.

  • platform/Length.cpp:

(WebCore::parseLength): Use parseInteger<int> instead of charactersToIntStrict.

  • platform/encryptedmedia/clearkey/CDMClearKey.cpp:

(WebCore::CDMPrivateClearKey::sanitizeSessionId const): Use parseInteger<uint32_t>
instead of String::toUIntStrict.

  • platform/graphics/HEVCUtilities.cpp:

(WebCore::parseHEVCCodecParameters): Use parseInteger<uint8/32_t> instead of
toIntegralType<uint8/32_t>.
(WebCore::parseDoViCodecParameters): Ditto.

  • platform/graphics/VP9Utilities.cpp:

(WebCore::parseVPCodecParameters): Ditto.

  • platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:

(WebCore::CDMPrivateMediaSourceAVFObjC::parseKeySystem): Use parseInteger<int>
instead of String::toInt. There's no need for the "allow trailing junk" here
because a regular expression is used to check format before we call parseInteger.
Also removed an unnecessary empty string check, since the regular expression
match check will fail on an empty string.

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

(WebCore::SourceBufferPrivateAVFObjC::trackDidChangeSelected): Use
parseIntegerAllowingTrailingJunk<uint64_t> instead ot toUInt64.
(WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled): Ditto.
(WebCore::SourceBufferPrivateAVFObjC::flush): Ditto.
(WebCore::SourceBufferPrivateAVFObjC::enqueueSample): Ditto.
(WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples): Ditto.
(WebCore::SourceBufferPrivateAVFObjC::notifyClientWhenReadyForMoreSamples): Ditto.
(WebCore::SourceBufferPrivateAVFObjC::canSetMinimumUpcomingPresentationTime const): Ditto.

  • platform/graphics/cocoa/HEVCUtilitiesCocoa.mm:

(WebCore::parseStringArrayFromDictionaryToUInt16Vector): Use
parseInteger<uint16_t> instead of toIntegralType<uint16_t>. We could also
consider using -[NSString intValue] here with some range checking instead
of converting to WTF::String.

  • platform/mediastream/mac/ScreenDisplayCapturerMac.mm:

(WebCore::ScreenDisplayCapturerMac::create): Use parseInteger<uint32_t>
instead of String::toUIntStrict.
(WebCore::ScreenDisplayCapturerMac::screenCaptureDeviceWithPersistentID): Ditto.

  • platform/mediastream/mac/WindowDisplayCapturerMac.mm:

(WebCore::WindowDisplayCapturerMac::create): Ditto.
(WebCore::WindowDisplayCapturerMac::windowCaptureDeviceWithPersistentID): Ditto.

  • platform/network/HTTPParsers.cpp:

(WebCore::parseRange): Use parseInteger<long long> instead of
String::toInt64Strict. Also use StringView so we don't allocate substrings on
the heap just to parse integers within an existing string. And removed unneeded
call to stripWhiteSpace in one place since parseInteger already allows leading
and trailing spaces, and in another case where we need to strip because of an
empty string check, used stripLeadingAndTrailingHTTPSpaces instead.

  • platform/network/ParsedContentRange.cpp:

(WebCore::parseContentRange): Use parseInteger<int64_t> instead of
StringView::toInt64Strict.

  • platform/network/ParsedRequestRange.cpp:

(WebCore::ParsedRequestRange::parse): Use parseInteger<uint64_t> instead of
StringView::toUInt64Strict.

11:22 AM Changeset in webkit [277245] by Darin Adler
  • 35 edits
    1 copy
    1 add in trunk/Source

Remove uses of the String::toInt family of functions from WebCore/html and similar directories
https://bugs.webkit.org/show_bug.cgi?id=225577

Reviewed by Sam Weinig.

Source/WebCore:

  • dom/Document.cpp:

(WebCore::Document::createEvent): Fix spelling error.

  • html/FTPDirectoryDocument.cpp:

(WebCore::processFilesizeString): Use parseIntegerAllowingTrailingJunk<uint64_t>
instead of String::toUInt64.

  • html/FormController.cpp:

(WebCore::deserializeFormControlState): Use parseIntegerAllowingTrailingJunk<size_t>
instead of String::toUInt.
(WebCore::SavedFormState::deserialize): Ditto.

  • html/HTMLFontElement.cpp:

(WebCore::parseFontSize): Use parseInteger<int> instead of
charactersToIntStrict.

  • html/HTMLFrameElement.cpp:

(WebCore::HTMLFrameElement::parseAttribute): Use parseIntegerAllowingTrailingJunk<int>
instead of String::toInt.

  • html/HTMLFrameSetElement.cpp:

(WebCore::HTMLFrameSetElement::parseAttribute): Ditto.

  • html/HTMLHRElement.cpp:

(WebCore::HTMLHRElement::collectStyleForPresentationAttribute): Ditto.

  • html/HTMLIFrameElement.cpp:

(WebCore::HTMLIFrameElement::collectStyleForPresentationAttribute): Ditto.

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::parseAttribute): Ditto.

  • html/HTMLLIElement.cpp:

(WebCore::HTMLLIElement::parseValue): Ditto.

  • html/HTMLMarqueeElement.cpp:

(WebCore::HTMLMarqueeElement::loop const): Ditto.

  • html/HTMLTableCellElement.cpp:

(WebCore::HTMLTableCellElement::collectStyleForPresentationAttribute): Ditto.

  • html/HTMLTableColElement.cpp:

(WebCore::HTMLTableColElement::parseAttribute): Ditto.

  • html/HTMLTableElement.cpp:

(WebCore::HTMLTableElement::parseAttribute): Ditto.

  • html/LinkIconCollector.cpp:

(WebCore::LinkIconCollector::iconsOfTypes): Use parseIntegerAllowingTrailingJunk<unsigned>
instead of String::toUInt. Also removed unneeded call to stripWhiteSpace since the
integer parsing function already skips leading and trailing spaces.

  • html/MediaFragmentURIParser.cpp:

(WebCore::MediaFragmentURIParser::parseNPTTime): Use parseInteger<int> instead of
String::toInt. The strings passsed in are fixed size and all digits.

  • html/TypeAhead.cpp:

(WebCore::TypeAhead::handleEvent): Use parseIntegerAllowingTrailingJunk<int>
instead of String::toInt.

  • html/URLDecomposition.cpp:

(WebCore::URLDecomposition::setHost): Use parseInteger<uint16_t> instead of parseUInt16.
(WebCore::parsePort): Ditto.

  • html/shadow/DateTimeNumericFieldElement.cpp:

(WebCore::DateTimeNumericFieldElement::handleKeyboardEvent): Use
parseIntegerAllowingTrailingJunk<int> instead of String::toInt.

  • html/track/VTTScanner.cpp:

(WebCore::VTTScanner::scanDigits): Use parseInteger<int> instead of
charactersToIntStrict.

  • mathml/MathMLSelectElement.cpp:

(WebCore::MathMLSelectElement::getSelectedActionChildAndIndex): Use
parseIntegerAllowingTrailingJunk<int> instead of AtomString::toInt.

Source/WTF:

  • wtf/text/StringBuilder.h: Added conversion operator to make a StringView, built on the exiting

is8Bit, characters8, characters16 and length functions. Removed now-uneeded equal function and

and != operators since the StringView ones work for those same cases with the same syntax.

11:13 AM ProjectsWorthDoing created by weinig@apple.com
10:43 AM WikiStart edited by weinig@apple.com
(diff)
10:42 AM WikiStart edited by weinig@apple.com
(diff)
2:52 AM Changeset in webkit [277244] by mmaxfield@apple.com
  • 12 edits in trunk

[GPU Process] Simplify DisplayList::Iterator part 6: Migrate ItemBufferWritingClient from ItemHandle to a const Variant&
https://bugs.webkit.org/show_bug.cgi?id=224270

Reviewed by Wenson Hsieh.

Source/WebCore:

This patch adds a new Variant that contains all the DisplayList item types, named DisplayListItem. It also migrates
ItemBufferWritingClient from ItemHandle to this new Variant.

There are two benefits to this:

  1. The templated overload of ItemBuffer::append() is way simpler now. Previously, we used to allocate a byte buffer

on the stack and run a placement new of the display list item type into it. Now, we can just run the DisplayListItem
constructor instead. Using the Variant does require more stack space, but we only will ever have one of these objects
on the stack at a time.

  1. The big table inside RemoteImageBufferProxy::encodeItemOutOfLine() is gone, and is replaced with just 7 lines. This is

one fewer place where we'll have to make sure the DisplayListItem types match a function in an entirely different
framework.

No new tests, because there is no behavior change.

  • platform/graphics/displaylists/DisplayListItemBuffer.cpp:

(WebCore::DisplayList::copyInto):
(WebCore::DisplayList::safeCopyHelper):
(WebCore::DisplayList::safeCopy):
(WebCore::DisplayList::ItemBuffer::append):

  • platform/graphics/displaylists/DisplayListItemBuffer.h:

(WebCore::DisplayList::ItemBufferWritingClient::requiredSizeForItem const):
(WebCore::DisplayList::ItemBufferWritingClient::encodeItemOutOfLine const):
(WebCore::DisplayList::ItemBufferWritingClient::encodeItemInline const):
(WebCore::DisplayList::ItemBuffer::append):

  • platform/graphics/displaylists/DisplayListItemType.cpp:

(WebCore::DisplayList::paddedSizeOfTypeAndItemInBytes):
(WebCore::DisplayList::displayListItemType):

  • platform/graphics/displaylists/DisplayListItems.h:
  • platform/graphics/displaylists/InMemoryDisplayList.cpp:

(WebCore::DisplayList::InMemoryDisplayList::WritingClient::requiredSizeForItem const):
(WebCore::DisplayList::InMemoryDisplayList::WritingClient::encodeItemInline const):

  • platform/graphics/displaylists/InMemoryDisplayList.h:

Source/WebKit:

  • WebProcess/GPU/graphics/RemoteImageBufferProxy.h:

(WebKit::RemoteImageBufferProxy::encodeItemOutOfLineHelper):

Tools:

  • TestWebKitAPI/Tests/WebCore/DisplayListTests.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp:
12:17 AM Changeset in webkit [277243] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebCore

[Cocoa] Unify last resort fallback font between all Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=225569

Reviewed by Darin Adler.

Just remove an unnecessary #if.

Covered by existing tests.

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::FontCache::lastResortFallbackFont):

May 8, 2021:

9:53 PM Changeset in webkit [277242] by Peng Liu
  • 14 edits in trunk/Source

[GPUP] A small video element enters fullscreen with strange animations
https://bugs.webkit.org/show_bug.cgi?id=225548

Reviewed by Eric Carlson.

Use FloatRect instead of IntRect to exchange video element location/size
information between WebContent processes and the UI process to avoid information
mismatch due to floating-point rounding.

Source/WebCore:

Manually tested.

  • platform/ios/VideoFullscreenInterfaceAVKit.h:
  • platform/ios/VideoFullscreenInterfaceAVKit.mm:

(VideoFullscreenInterfaceAVKit::setupFullscreen):
(VideoFullscreenInterfaceAVKit::exitFullscreen):
(VideoFullscreenInterfaceAVKit::preparedToReturnToInline):
(VideoFullscreenInterfaceAVKit::setInlineRect):

Source/WebKit:

Deal with the video element resizing differently for two cases:
1) Video is playing in the inline mode.
2) Video is entering fullscreen/picture-in-picture.
For the latter case, -[WKVideoLayerRemote layoutSublayers] will scale the layer
with the same factor in both X and Y direction.

  • GPUProcess/media/RemoteMediaPlayerProxy.h:
  • GPUProcess/media/RemoteMediaPlayerProxy.messages.in:
  • GPUProcess/media/cocoa/RemoteMediaPlayerProxyCocoa.mm:

(WebKit::setVideoInlineSizeIfPossible):
(WebKit::RemoteMediaPlayerProxy::setVideoInlineSizeFenced):

  • UIProcess/Cocoa/VideoFullscreenManagerProxy.h:
  • UIProcess/Cocoa/VideoFullscreenManagerProxy.messages.in:
  • UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:

(WebKit::VideoFullscreenManagerProxy::setupFullscreenWithID):
(WebKit::VideoFullscreenManagerProxy::exitFullscreen):
(WebKit::VideoFullscreenManagerProxy::setInlineRect):
(WebKit::VideoFullscreenManagerProxy::preparedToReturnToInline):

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:

(WebKit::MediaPlayerPrivateRemote::setVideoInlineSizeFenced):
(WebKit::MediaPlayerPrivateRemote::inVideoFullscreenOrPictureInPicture const):

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
  • WebProcess/GPU/media/cocoa/VideoLayerRemoteCocoa.mm:

(-[WKVideoLayerRemote layoutSublayers]):
(-[WKVideoLayerRemote resolveBounds]):

  • WebProcess/cocoa/VideoFullscreenManager.mm:

(WebKit::inlineVideoFrame):
(WebKit::VideoFullscreenManager::requestUpdateInlineRect):

9:31 PM Changeset in webkit [277241] by basuke.suzuki@sony.com
  • 2 edits in trunk/Source/ThirdParty/ANGLE

[WinCairo] Remove linker warning on ANGLE
https://bugs.webkit.org/show_bug.cgi?id=225501

Reviewed by Darin Adler.

libANGLE is statically linked to libGLESv2.dll so that declspec(dllimport) is not required here.

  • include/platform/PlatformMethods.h:
9:15 PM Changeset in webkit [277240] by Darin Adler
  • 4 edits in trunk/Source/JavaScriptCore

Remove calls to the String::toInt family of functions from JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=225571

Reviewed by Sam Weinig.

  • inspector/agents/InspectorDebuggerAgent.cpp:

(Inspector::parseLocation): Use parseIntegerAllowingTrailingJunk<JSC::SourceID>
instead of String::toIntPtr. There was no reason to parse the source ID as a
signed integer, and it's more elegant to parse the type we intend to store and
process, not a different but similar type.
(Inspector::InspectorDebuggerAgent::searchInContent): Ditto.
(Inspector::InspectorDebuggerAgent::getScriptSource): Ditto.

  • inspector/agents/InspectorRuntimeAgent.cpp:

(Inspector::InspectorRuntimeAgent::getRuntimeTypesForVariablesAtOffsets): Use
parseInteger<uintptr_t> instead of String::toIntPtrStrict.
(Inspector::InspectorRuntimeAgent::getBasicBlocks): Use
parseIntegerAllowingTrailingJunk<uintptr_t> instead of String::toIntPtr.

  • runtime/FuzzerPredictions.cpp:

(JSC::FuzzerPredictions::FuzzerPredictions): Use parseInteger<uint64_t>
instead of String::toUInt64Strict.

9:09 PM Changeset in webkit [277239] by Darin Adler
  • 7 edits in trunk/Source/WebKit

Remove uses of the WTF::String::toInt family of functions from WebKit framework sources
https://bugs.webkit.org/show_bug.cgi?id=225570

Reviewed by Sam Weinig.

  • NetworkProcess/cache/CacheStorageEngine.cpp:

(WebKit::CacheStorage::Engine::readSizeFile): Use parseInteger<uint64_t>
instead of charactersToUIntStrict. Also simplified the code a bit by
reducing the mixing of integer types in the function.

  • NetworkProcess/cache/NetworkCacheStorage.cpp:

(WebKit::NetworkCache::Storage::deleteOldVersions): Use parseInteger<unsigned>
instead of String::toUIntStrict. Also use StringView::substring so we don't
have to allocate a copy of a substring just to parse it.

  • Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.mm:

(WebKit::XPCServiceInitializerDelegate::getClientSDKVersion): Use
parseInteger<uint32_t> instead of charactersToUIntStrict. Also let the
StringView constructor take care of converting the const char*
so we don't have to write explicit calls to std::strlen here.
(WebKit::XPCServiceInitializerDelegate::getProcessIdentifier): Use
parseInteger<uint64_t> instead of String::toUInt64Strict. Also pass the
const char* as a StringView rather than converting it to a String so we
don't have to allocate a copy of the string just to parse it.

  • Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:

(WebKit::PluginVersion::parse): Use parseIntegerAllowingTrailingJunk<unsigned>
instead of String::toUInt. Also use StringView::split instead of String::split
so we don't have to allocate memory for all the substrings and a range-based
for loop for simplicity.

  • UIProcess/API/Cocoa/WKWebView.mm:

(coreTextManipulationItemIdentifierFromString): Use -[NSString longLongValue]
instead of String::toUInt64. There's no need to parse this unsigned because
the values will fit in 63 bits just fine, and it's nice to use NSString
directly rather than copying the string just to parse the integer in it.
(coreTextManipulationTokenIdentifierFromString): Ditto.

  • WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:

(WebKit::parsePostBuffer): Use parseIntegerAllowingTrailingJunk<unsigned>
instead of String::toInt. The length can't be negative; it was not helpful
to parse negative numbers before and this is a small bug fix, but in a code
path that is probably not used for much of anything any more.

7:18 PM Changeset in webkit [277238] by Ross Kirsling
  • 12 edits in trunk/Source/JavaScriptCore

[JSC] Fix invalid exception checks after recent ErrorInstance changes
https://bugs.webkit.org/show_bug.cgi?id=225565

Reviewed by Alexey Shvayka.

r277221 and r277224 each introduced issues under validateExceptionChecks=1; this patch fixes them.

Of particular note:
The earlier patch sought to consolidate Error#cause logic under ErrorInstance::finishCreation.
This part must be undone as it is crucial that non-user-thrown errors be able to bypass that logic
(otherwise throwException itself would need to be exception-checked).

  • runtime/AggregateError.cpp:

(JSC::createAggregateError):

  • runtime/ArrayPrototype.cpp:

(JSC::getProperty):

  • runtime/Error.cpp:

(JSC::createError):
(JSC::createEvalError):
(JSC::createRangeError):
(JSC::createReferenceError):
(JSC::createSyntaxError):
(JSC::createTypeError):
(JSC::createURIError):
(JSC::createGetterTypeError):

  • runtime/ErrorInstance.cpp:

(JSC::ErrorInstance::create):
(JSC::ErrorInstance::finishCreation):

  • runtime/ErrorInstance.h:

(JSC::ErrorInstance::create):

  • runtime/JSObject.h:
  • runtime/JSObjectInlines.h:

(JSC::JSObject::getIfPropertyExists):

  • runtime/NullSetterFunction.cpp:

(JSC::NullSetterFunctionInternal::JSC_DEFINE_HOST_FUNCTION):

  • wasm/js/JSWebAssemblyCompileError.cpp:

(JSC::createJSWebAssemblyCompileError):

  • wasm/js/JSWebAssemblyLinkError.cpp:

(JSC::createJSWebAssemblyLinkError):

  • wasm/js/JSWebAssemblyRuntimeError.cpp:

(JSC::createJSWebAssemblyRuntimeError):

6:29 PM Changeset in webkit [277237] by weinig@apple.com
  • 39 edits
    2 adds in trunk/Source

Factor out pixel buffer from DOM specific ImageData class
https://bugs.webkit.org/show_bug.cgi?id=225554

Reviewed by Darin Adler.

Source/WebCore:

Prepare to fix layering violating use of DOM level ImageData being
used by platform code by factoring out the pixel storage into a new
PixelBuffer class. Since it will be a little more general that
ImageData is now (though ImageData will need to gain these soon)
PixelBuffer also captures the pixel format and color space the pixel
data represents.

While here, update ImageData::data() to return a reference rather than
a pointer to indicate it is never null and update all the callers.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSImageDataCustom.cpp:

(WebCore::toJSNewlyCreated):

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneSerializer::dumpImageBitmap):
(WebCore::CloneSerializer::dumpIfTerminal):
(WebCore::CloneDeserializer::readTerminal):

  • html/ImageBitmap.cpp:

(WebCore::ImageBitmap::createPromise):

  • html/ImageData.cpp:

(WebCore::ImageData::create):
(WebCore::ImageData::ImageData):
(WebCore::ImageData::deepClone const):
(WebCore::operator<<):

  • html/ImageData.h:

(WebCore::ImageData::size const):
(WebCore::ImageData::width const):
(WebCore::ImageData::height const):
(WebCore::ImageData::data const):
(WebCore::ImageData::colorSpace const):
(WebCore::ImageData::format const):

  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::createEmptyImageData):
(WebCore::CanvasRenderingContext2DBase::putImageData):

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::texImageSourceHelper):

  • inspector/InspectorCanvas.cpp:

(WebCore::InspectorCanvas::buildArrayForImageData):

  • platform/graphics/GraphicsContextGL.cpp:

(WebCore::GraphicsContextGL::extractImageData):

  • platform/graphics/ImageBufferBackend.cpp:

(WebCore::ImageBufferBackend::convertToLuminanceMask):
(WebCore::ImageBufferBackend::getImageData const):
(WebCore::ImageBufferBackend::putImageData):

  • platform/graphics/PixelBuffer.cpp: Added.

(WebCore::PixelBuffer::PixelBuffer):
(WebCore::PixelBuffer::deepClone const):

  • platform/graphics/PixelBuffer.h: Added.

(WebCore::PixelBuffer::colorSpace const):
(WebCore::PixelBuffer::format const):
(WebCore::PixelBuffer::size const):
(WebCore::PixelBuffer::data const):

  • platform/graphics/ShadowBlur.cpp:

(WebCore::ShadowBlur::blurShadowBuffer):

  • platform/graphics/angle/GraphicsContextGLANGLE.cpp:

(WebCore::GraphicsContextGLOpenGL::readPixelsForPaintResults):

  • platform/graphics/cg/GraphicsContextGLCG.cpp:

(WebCore::GraphicsContextGLOpenGL::paintToCanvas):

  • platform/graphics/cg/ImageBufferCGBackend.cpp:

(WebCore::ImageBufferCGBackend::toCFData const):

  • platform/graphics/cg/ImageBufferUtilitiesCG.cpp:

(WebCore::cfData):

  • platform/graphics/filters/FEColorMatrix.cpp:

(WebCore::FEColorMatrix::platformApplySoftware):

  • platform/graphics/filters/FEComponentTransfer.cpp:

(WebCore::FEComponentTransfer::platformApplySoftware):

  • platform/graphics/filters/FEComposite.cpp:

(WebCore::FEComposite::platformApplySoftware):

  • platform/graphics/filters/FEConvolveMatrix.cpp:

(WebCore::FEConvolveMatrix::platformApplySoftware):

  • platform/graphics/filters/FEDisplacementMap.cpp:

(WebCore::FEDisplacementMap::platformApplySoftware):

  • platform/graphics/filters/FEDropShadow.cpp:

(WebCore::FEDropShadow::platformApplySoftware):

  • platform/graphics/filters/FEGaussianBlur.cpp:

(WebCore::FEGaussianBlur::platformApplySoftware):

  • platform/graphics/filters/FELighting.cpp:

(WebCore::FELighting::platformApplySoftware):

  • platform/graphics/filters/FEMorphology.cpp:

(WebCore::FEMorphology::platformApplySoftware):

  • platform/graphics/filters/FETurbulence.cpp:

(WebCore::FETurbulence::platformApplySoftware):

  • platform/graphics/filters/FilterEffect.cpp:

(WebCore::FilterEffect::forceValidPreMultipliedPixels):
(WebCore::FilterEffect::copyConvertedImageBufferToDestination):
(WebCore::FilterEffect::copyConvertedImageDataToDestination):
(WebCore::FilterEffect::copyUnmultipliedResult):
(WebCore::FilterEffect::copyPremultipliedResult):

  • rendering/shapes/Shape.cpp:

(WebCore::Shape::createRasterShape):

Source/WebKit:

Update for ImageData::data() returning a reference.

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::populateGetImageDataSharedMemory):

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<Ref<WebCore::ImageData>>::encode):

  • WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
6:26 PM Changeset in webkit [277236] by Darin Adler
  • 2 edits in trunk/Source/WebKitLegacy/mac

[Cocoa] Remove the one use of String::toInt from WebKitLegacy
https://bugs.webkit.org/show_bug.cgi?id=225568

Reviewed by Sam Weinig.

  • DOM/DOMHTMLInputElement.mm:

(-[DOMHTMLInputElement setSize:]): Use -[NSString intValue] instead of WTF::String::toInt.
Both functions ignore leading spaces, and both ignore trailing junk, so there is no
significant change in behavior.

6:17 PM Changeset in webkit [277235] by commit-queue@webkit.org
  • 16 edits
    2 deletes in trunk

REGRESSION (r276797?): [ macOS/iOS ] TestWebKitAPI.URLSchemeHandler.Exceptions is flakey crashing
https://bugs.webkit.org/show_bug.cgi?id=225373

Patch by Alex Christensen <achristensen@webkit.org> on 2021-05-08
Reviewed by Sam Weinig.

Source/WebKit:

This patch fixes three problems related to the lifetime of WKURLSchemeTasks:

  1. There was an unneeded abstraction API::URLSchemeTask which wrapped a WebURLSchemeTask, which could have a different lifetime than its owner. This is especially bad since at least one was used on multiple threads.
  2. We weren't explicitly keeping a strong reference to the task given to the API client in startURLSchemeTask: and stopURLSchemeTask: which could cause all our internal maps to release their references to the task after the first call to didFailWithError and there was a test that did multiple calls to didFailWithError and verifies it throws an NSException the second time.
  3. We were keeping a HashSet of raw WebURLSchemeHandler pointers, then using each of them without keeping it alive.

This is covered by at least the URLSchemeHandler.Exceptions API test which would crash in many exciting places before this but doesn't crash after this.

  • Sources.txt:
  • UIProcess/API/APIURLSchemeTask.cpp: Removed.
  • UIProcess/API/APIURLSchemeTask.h: Removed.
  • UIProcess/API/C/WKTestingSupport.cpp:

(WKGetAPIURLSchemeTaskInstanceCount): Deleted.

  • UIProcess/API/C/WKTestingSupport.h:
  • UIProcess/API/Cocoa/WKURLSchemeTask.mm:

(-[WKURLSchemeTaskImpl init]):
(-[WKURLSchemeTaskImpl dealloc]):
(-[WKURLSchemeTaskImpl request]):
(-[WKURLSchemeTaskImpl _requestOnlyIfCached]):
(-[WKURLSchemeTaskImpl _willPerformRedirection:newRequest:completionHandler:]):
(-[WKURLSchemeTaskImpl didReceiveResponse:]):
(-[WKURLSchemeTaskImpl didReceiveData:]):
(-[WKURLSchemeTaskImpl didFinish]):
(-[WKURLSchemeTaskImpl didFailWithError:]):
(-[WKURLSchemeTaskImpl _didPerformRedirection:newRequest:]):
(-[WKURLSchemeTaskImpl _frame]):

  • UIProcess/API/Cocoa/WKURLSchemeTaskInternal.h:
  • UIProcess/Cocoa/WebURLSchemeHandlerCocoa.h:
  • UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm:

(WebKit::WebURLSchemeHandlerCocoa::platformStartTask):
(WebKit::WebURLSchemeHandlerCocoa::platformStopTask):
(WebKit::WebURLSchemeHandlerCocoa::platformTaskCompleted): Deleted.

  • UIProcess/Inspector/socket/RemoteInspectorProtocolHandler.h:
  • UIProcess/Inspector/win/InspectorResourceURLSchemeHandler.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::stopAllURLSchemeTasks):

  • UIProcess/WebURLSchemeHandler.cpp:

(WebKit::WebURLSchemeHandler::taskCompleted):

  • UIProcess/WebURLSchemeHandler.h:
  • UIProcess/WebURLSchemeTask.h:
  • WebKit.xcodeproj/project.pbxproj:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-leaks.mm:

(runUntilTasksInFlight):

5:59 PM Changeset in webkit [277234] by Darin Adler
  • 4 edits in trunk/Source/WTF

Rename toIntegralType to parseInteger and prepare to use it to replace all our integer-parsing functions
https://bugs.webkit.org/show_bug.cgi?id=225560

Reviewed by Sam Weinig.

I have a much larger patch that replaces all the many toInt functions with these parseInteger
function templates. The parseInteger ones take StringView, which means we can pass almost any
type of string or character/length pair including a substring without allocating a new string,
return Optional rather than using an out argument to report failure, take the integer type as
a template parameter so can be used for precisely the desired type at each call site, and make
the "allow trailing junk" feature explicit, rather than implicitly including it in the shortest
named functions, which I hope will discourage people from using that junk-ignoring mode
when it's not desirable.

Also includes adoption of parseInteger within WTF itself, outside the string classes.

My plan is to land the rest of adoption of this in chunks so we can review carefully and spot
mistakes as we go. Then return to files like WTFString.h and remove the many old functions
this replaces, including the String::toInt and charactersToInt families of functions.

  • wtf/URL.cpp:

(WTF::URL::port const): Use parseInteger<uint16_t>.
(WTF::URL::setHostAndPort): Ditto.

  • wtf/text/StringToIntegerConversion.h: Refactored the existing code to tighten things up

a bit, and got rid of overloads that take pointer and length and the the generic "any string
type" feature, since StringView already works well for that. Renamed toIntegralType to
parseInteger, leaving the old name behind to ease the transition while adopting parseInteger.

  • wtf/text/WTFString.cpp:

(WTF::toDoubleType): Use the TrailingJunkPolicy enumeration from the
StringToIntegerConversion.h header.
(WTF::charactersToDouble): Ditto.
(WTF::charactersToFloat): Ditto.

5:51 PM Changeset in webkit [277233] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebCore

[Cocoa] Unify font collection handling between all Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=225566

Reviewed by Darin Adler.

Just remove an unnecessary #if.

Covered by existing tests.

  • platform/graphics/mac/FontCustomPlatformData.cpp:

(WebCore::createFontCustomPlatformData):

5:13 PM Changeset in webkit [277232] by mmaxfield@apple.com
  • 4 edits in trunk/Source/WebCore

Add bounds checks around calls to GlyphBuffer::stringOffsetAt()
https://bugs.webkit.org/show_bug.cgi?id=225335
<rdar://problem/75663608>

Reviewed by Simon Fraser and Geoff Garen.

We're getting crash reports that look like they're from string offsets being out-of-bounds.
These string offsets round-trip through Core Text, which is allowed to modify them, which
can end up making them out-of-bounds.

No new tests because I don't have a reproducible test case; just crash reports.

  • platform/graphics/FontCascade.cpp:

(WebCore::computeUnderlineType):

  • platform/graphics/GlyphBuffer.h:

(WebCore::GlyphBuffer::uncheckedStringOffsetAt const):
(WebCore::GlyphBuffer::checkedStringOffsetAt const):
(WebCore::GlyphBuffer::stringOffsetAt const): Deleted.

  • platform/graphics/WidthIterator.cpp:

(WebCore::WidthIterator::applyFontTransforms):
(WebCore::WidthIterator::applyExtraSpacingAfterShaping):

3:35 PM Changeset in webkit [277231] by Chris Dumez
  • 9 edits in trunk

Port Filesystem::pathByAppendingComponent() & Filesystem:: pathByAppendingComponents() to std::filesystem
https://bugs.webkit.org/show_bug.cgi?id=225550

Reviewed by Darin Adler.

Source/JavaScriptCore:

Build fix.

  • Configurations/JavaScriptCore.xcconfig:

Source/WTF:

Port Filesystem::pathByAppendingComponent() & Filesystem:: pathByAppendingComponents() to std::filesystem
and get rid of platform-specific implementations.

  • wtf/FileSystem.cpp:

(WTF::FileSystemImpl::pathByAppendingComponent):
(WTF::FileSystemImpl::pathByAppendingComponents):

  • wtf/glib/FileSystemGlib.cpp:
  • wtf/posix/FileSystemPOSIX.cpp:
  • wtf/win/FileSystemWin.cpp:

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WTF/FileSystem.cpp:

(TestWebKitAPI::TEST_F):

10:56 AM Changeset in webkit [277230] by commit-queue@webkit.org
  • 7 edits in trunk

Fix a typo
https://bugs.webkit.org/show_bug.cgi?id=225502

Patch by Ricky Mondello <Ricky Mondello> on 2021-05-08
Reviewed by Chris Dumez.

Source/WebCore:

  • loader/LinkLoader.cpp:

(WebCore::LinkLoader::preconnectIfNeeded):

LayoutTests:

Update test expectations.

  • http/tests/in-app-browser-privacy/context-string-preconnect-expected.txt:
  • http/tests/preconnect/link-header-rel-preconnect-http-expected.txt:
  • http/tests/preconnect/link-rel-preconnect-http-expected.txt:
  • http/tests/preconnect/link-rel-preconnect-https-expected.txt:
9:54 AM Changeset in webkit [277229] by Diego Pino Garcia
  • 3 edits in trunk/Source/WTF

[GLIB] REGRESSION(r277158) imported/w3c/web-platform-tests/xhr/FormData-append.html is crashing
https://bugs.webkit.org/show_bug.cgi?id=225551

Reviewed by Chris Dumez.

  • wtf/FileSystem.cpp:

(WTF::FileSystemImpl::fileIsDirectory): Remove unnecessary path.isEmpty check.

  • wtf/glib/FileSystemGlib.cpp:

(WTF::FileSystemImpl::fileSystemRepresentation): Return empty CString if path is empty.

8:03 AM Changeset in webkit [277228] by Megan Gardner
  • 2 edits in trunk/Source/WebCore

Increase stored AppHighlight character limit to 500
https://bugs.webkit.org/show_bug.cgi?id=225558

Reviewed by Tim Horton.

  • Modules/highlight/AppHighlightStorage.cpp:
7:12 AM Changeset in webkit [277227] by Adrian Perez de Castro
  • 1 copy in releases/WPE WebKit/webkit-2.32.1

WPE WebKit 2.32.1

7:11 AM Changeset in webkit [277226] by Adrian Perez de Castro
  • 4 edits in releases/WebKitGTK/webkit-2.32

Unreviewed. Update OptionsWPE.cmake and NEWS for the 2.32.1 release

.:

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

Source/WebKit:

  • wpe/NEWS: Add release notes for 2.32.1
3:43 AM Changeset in webkit [277225] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebKit

[SOUP] Use the new libsoup network metrics API
https://bugs.webkit.org/show_bug.cgi?id=225510

Reviewed by Michael Catanzaro.

Use the new API available in libsoup3. It provides more accurate information for time metrics and also size
metrics that were missing.

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
(WebKit::NetworkDataTaskSoup::createRequest):
(WebKit::NetworkDataTaskSoup::clearRequest):
(WebKit::NetworkDataTaskSoup::resume):
(WebKit::NetworkDataTaskSoup::didSendRequest):
(WebKit::NetworkDataTaskSoup::dispatchDidCompleteWithError):
(WebKit::NetworkDataTaskSoup::continueHTTPRedirection):
(WebKit::NetworkDataTaskSoup::didGetHeaders):
(WebKit::NetworkDataTaskSoup::wroteHeadersCallback):
(WebKit::NetworkDataTaskSoup::wroteBodyCallback):
(WebKit::NetworkDataTaskSoup::gotBodyCallback):
(WebKit::NetworkDataTaskSoup::networkEvent):
(WebKit::NetworkDataTaskSoup::didStartRequest):
(WebKit::NetworkDataTaskSoup::didRestart):

  • NetworkProcess/soup/NetworkDataTaskSoup.h:
12:32 AM Changeset in webkit [277224] by Ross Kirsling
  • 5 edits in trunk/Source/JavaScriptCore

Introduce JSObject::getIfPropertyExists helper
https://bugs.webkit.org/show_bug.cgi?id=225553

Reviewed by Alexey Shvayka.

Suggested by Alexey during review of r277221.
ArrayPrototype also has a "Has-guarded Get", so it's helpful for JSObject to house this functionality.

  • runtime/ArrayPrototype.cpp:

(JSC::getProperty):

  • runtime/ErrorInstance.cpp:

(JSC::ErrorInstance::finishCreation):

  • runtime/JSObject.h:
  • runtime/JSObjectInlines.h:

(JSC::JSObject::getIfPropertyExists):

Note: See TracTimeline for information about the timeline view.