Timeline



Nov 29, 2021:

11:28 PM Changeset in webkit [286285] by Simon Fraser
  • 9 edits in trunk/Tools

Store image resolution in layout test snapshots, and have ImageDiff read it
https://bugs.webkit.org/show_bug.cgi?id=233609

Reviewed by Darin Adler.

On the way to fixing bug 232525, we need to communicate to ImageDiff the resolution of
layout test snapshots so that it can account for the resolution when computing pixel
tolerance values, which should be reported in CSS pixels.

So have DumpRenderTree and WebKitTestRunner, on Cocoa platforms, add image resolution
metadata, where a 2x snapshot (i.e. a hidpi test) reports a horizontal and vertical
resolution of 144dpi.

Change ImageDiff to read these values and store them in PlatformImage; a future patch will
make use of the data.

  • DumpRenderTree/cg/PixelDumpSupportCG.cpp:

(printPNG):
(dumpBitmap):

  • DumpRenderTree/cg/PixelDumpSupportCG.h:

(BitmapContext::scaleFactor const):
(BitmapContext::setScaleFactor):

  • DumpRenderTree/ios/PixelDumpSupportIOS.mm:

(createBitmapContextFromWebView):

  • DumpRenderTree/mac/PixelDumpSupportMac.mm:

(createBitmapContextFromWebView):

  • ImageDiff/ImageDiff.cpp:

(main):

  • ImageDiff/PlatformImage.h:

(ImageDiff::PlatformImage::scaleFactor const):

  • ImageDiff/cg/PlatformImageCG.cpp:

(ImageDiff::createImageFromDataProvider):
(ImageDiff::PlatformImage::createFromFile):
(ImageDiff::PlatformImage::createFromStdin):
(ImageDiff::PlatformImage::PlatformImage):

  • WebKitTestRunner/cg/TestInvocationCG.cpp:

(WTR::dumpBitmap):
(WTR::TestInvocation::dumpPixelsAndCompareWithExpected):

9:24 PM Changeset in webkit [286284] by Chris Dumez
  • 61 edits
    4 copies
    1 add in trunk

Add initial implementation for the Web Lock API
https://bugs.webkit.org/show_bug.cgi?id=233289

Reviewed by Geoff Garen.

LayoutTests/imported/w3c:

Rebaseline Web Locks WPT tests now that they are all passing.

  • web-platform-tests/web-locks/acquire.tentative.https.any-expected.txt:
  • web-platform-tests/web-locks/acquire.tentative.https.any.serviceworker-expected.txt:
  • web-platform-tests/web-locks/acquire.tentative.https.any.worker-expected.txt:
  • web-platform-tests/web-locks/clientids.tentative.https-expected.txt:
  • web-platform-tests/web-locks/frames.tentative.https-expected.txt:
  • web-platform-tests/web-locks/held.tentative.https.any-expected.txt:
  • web-platform-tests/web-locks/held.tentative.https.any.serviceworker-expected.txt:
  • web-platform-tests/web-locks/held.tentative.https.any.worker-expected.txt:
  • web-platform-tests/web-locks/idlharness.tentative.https.any-expected.txt:
  • web-platform-tests/web-locks/idlharness.tentative.https.any.serviceworker-expected.txt:
  • web-platform-tests/web-locks/idlharness.tentative.https.any.worker-expected.txt:
  • web-platform-tests/web-locks/ifAvailable.tentative.https.any-expected.txt:
  • web-platform-tests/web-locks/ifAvailable.tentative.https.any.serviceworker-expected.txt:
  • web-platform-tests/web-locks/ifAvailable.tentative.https.any.worker-expected.txt:
  • web-platform-tests/web-locks/lock-attributes.tentative.https.any-expected.txt:
  • web-platform-tests/web-locks/lock-attributes.tentative.https.any.serviceworker-expected.txt:
  • web-platform-tests/web-locks/lock-attributes.tentative.https.any.worker-expected.txt:
  • web-platform-tests/web-locks/mode-exclusive.tentative.https.any-expected.txt:
  • web-platform-tests/web-locks/mode-exclusive.tentative.https.any.serviceworker-expected.txt:
  • web-platform-tests/web-locks/mode-exclusive.tentative.https.any.worker-expected.txt:
  • web-platform-tests/web-locks/mode-mixed.tentative.https.any-expected.txt:
  • web-platform-tests/web-locks/mode-mixed.tentative.https.any.serviceworker-expected.txt:
  • web-platform-tests/web-locks/mode-mixed.tentative.https.any.worker-expected.txt:
  • web-platform-tests/web-locks/mode-shared.tentative.https.any-expected.txt:
  • web-platform-tests/web-locks/mode-shared.tentative.https.any.serviceworker-expected.txt:
  • web-platform-tests/web-locks/mode-shared.tentative.https.any.worker-expected.txt:
  • web-platform-tests/web-locks/opaque-origin.tentative.https-expected.txt:
  • web-platform-tests/web-locks/query-empty.tentative.https.any-expected.txt:
  • web-platform-tests/web-locks/query-empty.tentative.https.any.serviceworker-expected.txt:
  • web-platform-tests/web-locks/query-empty.tentative.https.any.worker-expected.txt:
  • web-platform-tests/web-locks/query-ordering.tentative.https-expected.txt:
  • web-platform-tests/web-locks/query.tentative.https.any-expected.txt:
  • web-platform-tests/web-locks/query.tentative.https.any.worker-expected.txt:
  • web-platform-tests/web-locks/resource-names.tentative.https.any-expected.txt:
  • web-platform-tests/web-locks/resource-names.tentative.https.any.serviceworker-expected.txt:
  • web-platform-tests/web-locks/resource-names.tentative.https.any.worker-expected.txt:
  • web-platform-tests/web-locks/signal.tentative.https.any-expected.txt:
  • web-platform-tests/web-locks/signal.tentative.https.any.serviceworker-expected.txt:
  • web-platform-tests/web-locks/signal.tentative.https.any.worker-expected.txt:
  • web-platform-tests/web-locks/steal.tentative.https.any-expected.txt:
  • web-platform-tests/web-locks/steal.tentative.https.any.serviceworker-expected.txt:
  • web-platform-tests/web-locks/steal.tentative.https.any.worker-expected.txt:
  • web-platform-tests/web-locks/workers.tentative.https-expected.txt:

Source/WebCore:

Add initial implementation for the Web Lock API as per:

The implementation is complete and passes all the WPT tests. However,
to reduce the patch size, the current implementation only works within
a single WebProcess. In a follow-up, I'll update the implementation so
that the registry lives in the UIProcess and the WebProcess just does
IPC.

No new tests, rebaselined existing tests.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Modules/web-locks/WebLock.cpp:

(WebCore::WebLock::create):
(WebCore::WebLock::WebLock):

  • Modules/web-locks/WebLock.h:

(WebCore::WebLock::identifier const):

  • Modules/web-locks/WebLockGrantedCallback.idl:
  • Modules/web-locks/WebLockIdentifier.h: Copied from Source/WebCore/Modules/web-locks/WebLockGrantedCallback.idl.
  • Modules/web-locks/WebLockManager.cpp:

(WebCore::clientOriginFromContext):
(WebCore::WebLockManager::LockRequest::isValid const):
(WebCore::WebLockManager::create):
(WebCore::WebLockManager::WebLockManager):
(WebCore::WebLockManager::request):
(WebCore::WebLockManager::didCompleteLockRequest):
(WebCore::WebLockManager::requestLockOnMainThread):
(WebCore::WebLockManager::releaseLockOnMainThread):
(WebCore::WebLockManager::abortLockRequestOnMainThread):
(WebCore::WebLockManager::queryOnMainThread):
(WebCore::WebLockManager::query):
(WebCore::WebLockManager::signalToAbortTheRequest):
(WebCore::WebLockManager::settleReleasePromise):
(WebCore::WebLockManager::stop):
(WebCore::WebLockManager::virtualHasPendingActivity const):
(WebCore::WebLockManager::activeDOMObjectName const):

  • Modules/web-locks/WebLockManager.h:
  • Modules/web-locks/WebLockManager.idl:
  • Modules/web-locks/WebLockManagerSnapshot.h: Copied from Source/WebCore/Modules/web-locks/WebLock.h.

(WebCore::WebLockManagerSnapshot::Info::isolatedCopy const):
(WebCore::WebLockManagerSnapshot::isolatedCopy const):

  • Modules/web-locks/WebLockManagerSnapshot.idl: Copied from Source/WebCore/Modules/web-locks/WebLockGrantedCallback.idl.
  • Modules/web-locks/WebLockRegistry.cpp: Added.

(WebCore::WebLockRegistry::registryForOrigin):
(WebCore::WebLockRegistry::WebLockRegistry):
(WebCore::WebLockRegistry::~WebLockRegistry):
(WebCore::WebLockRegistry::requestLock):
(WebCore::WebLockRegistry::releaseLock):
(WebCore::WebLockRegistry::abortLockRequest):
(WebCore::WebLockRegistry::isGrantable const):
(WebCore::WebLockRegistry::processLockRequestQueue):
(WebCore::WebLockRegistry::snapshot):
(WebCore::WebLockRegistry::clientIsGoingAway):

  • Modules/web-locks/WebLockRegistry.h: Copied from Source/WebCore/Modules/web-locks/WebLock.h.
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSDOMConvertPromise.h:

(WebCore::Converter<IDLPromise<T>>::convert):
Update Converter<IDLPromise<T>>::convert() to deal with worker termination similarly to
what is done is some other places (e.g. DeferredPromise::handleTerminationExceptionIfNeeded(()).
I had to make this fix because one of the WPT tests was hitting a debug assertions in JSC on
worker termination otherwise.

  • page/NavigatorBase.cpp:

(WebCore::NavigatorBase::locks):

Source/WTF:

Update Deque::removeAllMatching() to return the number of items removed, similarly
to the corresponding API on Vector.

  • wtf/Deque.h:

(WTF::inlineCapacity>::removeAllMatching):

8:43 PM Changeset in webkit [286283] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] jumpForTypedArrayOutOfBounds should use asAnyInt since it uses isAnyInt
https://bugs.webkit.org/show_bug.cgi?id=233610
rdar://85820476

Reviewed by Saam Barati.

JSTests:

  • stress/anyint-index.js: Added.

(foo):

Source/JavaScriptCore:

Since we are using isAnyInt, then we should use asAnyInt. asUInt32 will crash
if the value is double AnyInt etc.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::jumpForTypedArrayOutOfBounds):

8:23 PM Changeset in webkit [286282] by Wenson Hsieh
  • 3 edits
    2 adds in trunk

[Webpage translation] Avoid translating text inside image overlays
https://bugs.webkit.org/show_bug.cgi?id=233225
rdar://85713734

Reviewed by Aditya Keerthi.

Source/WebCore:

Add translate="no" to image overlay content; text in image overlays is meant to visually match recognized text
in the image, and should never be modified as a part of webpage translation.

Test: fast/images/text-recognition/image-overlay-do-not-translate.html

  • dom/ImageOverlay.cpp:

(WebCore::ImageOverlay::updateSubtree):

LayoutTests:

Add a test to verify that translate is false on the image overlay root container element.

  • fast/images/text-recognition/image-overlay-do-not-translate-expected.txt: Added.
  • fast/images/text-recognition/image-overlay-do-not-translate.html: Added.
7:25 PM Changeset in webkit [286281] by Lauro Moura
  • 2 edits in trunk/LayoutTests

[GLIB] Gardening SVG filter failures after r286203

Unreviewed test gardening.

  • platform/glib/TestExpectations:
6:33 PM Changeset in webkit [286280] by Alan Coon
  • 1 copy in tags/Safari-612.3.6.1.6

Tag Safari-612.3.6.1.6.

6:25 PM Changeset in webkit [286279] by Alan Coon
  • 1 copy in tags/Safari-612.3.6.0.4

Tag Safari-612.3.6.0.4.

5:58 PM Changeset in webkit [286278] by sbarati@apple.com
  • 4 edits
    3 adds in trunk

FTL's implementation of HasIndexedProperty for InBounds accesses checks the inverse of what it should be checking when exiting by seeing a hole
https://bugs.webkit.org/show_bug.cgi?id=233408
<rdar://problem/85787251>

Reviewed by Mark Lam.

JSTests:

  • stress/in-by-val-has-indexed-property-ftl-3.js: Added.
  • stress/in-by-val-has-indexed-property-ftl-2.js: Added.
  • stress/in-by-val-has-indexed-property-ftl.js: Added.

Source/JavaScriptCore:

The implementation of an InBounds HasIndexedProperty in FTL, when speculating, we
would exit when we did not see a hole, not when we did see a hole. This is
the inverse of what we need to do, we should exit when we do see a hole.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):

  • tools/JSDollarVM.cpp:

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

5:42 PM Changeset in webkit [286277] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Fix the build

  • Shared/ios/WebIOSEventFactory.mm:

(WebIOSEventFactory::createWebWheelEvent):

5:23 PM Changeset in webkit [286276] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Run keyboard-animated scrolls on the scrolling thread
https://bugs.webkit.org/show_bug.cgi?id=233591

Reviewed by Tim Horton.

Calling m_scrollableArea.scrollToPositionWithAnimation() hits the FrameView/RenderLayerScrollableArea
overrides of requestAnimatedScrollToPosition() which dispatch the scroll to the scrolling thread.

This allows the ScrollAnimationSmooth for keyboard-triggered scrolls (spacebar, page up/down, home/end)
to run on the scrolling thread.

  • platform/ScrollAnimator.cpp:

(WebCore::ScrollAnimator::singleAxisScroll):

5:20 PM Changeset in webkit [286275] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] slice should be aware of TerminationException
https://bugs.webkit.org/show_bug.cgi?id=233593
rdar://85823844

Reviewed by Mark Lam.

JSTests:

  • stress/slice-termination-exception.js: Added.

(async infiniteLoop):

Source/JavaScriptCore:

Since termination exception can happen at any time, assertNoException is wrong.

  • runtime/ArrayPrototype.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

5:20 PM Changeset in webkit [286274] by Simon Fraser
  • 10 edits in trunk

Revert changes related to using a scroll animator for momentum scrolling
https://bugs.webkit.org/show_bug.cgi?id=233585

Reviewed by Tim Horton.

Source/WebCore:

It turns out that running an animation for the momentum phase of a scroll isn't web
compatible, adds a bunch of complexity around interactions with rubberbanding, and
has issues when ScrollAnimationMomentum behavior differs from the momentum event
behavior in its response to initial velocity.

So revert these changes added in r285787, r285797, r285917, r285953, r285964.

  • page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:

(WebCore::ScrollingTreeScrollingNodeDelegateMac::handleWheelEvent):

  • platform/ScrollingEffectsController.h:
  • platform/mac/ScrollingEffectsController.mm:

(WebCore::ScrollingEffectsController::handleWheelEvent):
(WebCore::ScrollingEffectsController::startRubberBandAnimation):
(WebCore::phaseToString): Deleted.
(WebCore::adjustedVelocity): Deleted.

LayoutTests:

We can keep the tests but they don't need to change the setting any more.

  • fast/scrolling/mac/momentum-animator-end-event-stops.html:
  • fast/scrolling/mac/momentum-animator-in-overflow.html:
  • fast/scrolling/mac/momentum-animator-maybegin-stops.html:
  • fast/scrolling/mac/momentum-animator.html:
  • platform/mac-wk2/TestExpectations:
4:20 PM Changeset in webkit [286273] by beidson@apple.com
  • 9 edits
    4 copies
    4 adds in trunk

Make webpushd "fake registration for testing" much more complicated by adding a "mock app bundle" install
https://bugs.webkit.org/show_bug.cgi?id=233454

Reviewed by Alex Christensen.

Covered by API tests.

Before this patch, webpushd remembered "registrations" using a simple in-memory HashMap.

In the near future, registrations will actually be represented with a placeholder app bundle on disk.

The process of installing placeholders (and checking for existing ones) is complicated and asynchronous.

This patch shifts the in-memory testing implementation from a simple HashMap to a "complicated and asynchronous"
registration mechanism that simulates how app-bundle installs will work.

Once the "real" mechanisms are in place there will be much more in-depth testing that we can do.
For now, this is a "no behavior change" patch.

  • NetworkProcess/Notifications/Cocoa/WebPushDaemonConnectionCocoa.mm:

(WebKit::WebPushD::Connection::connectionReceivedEvent const):

  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • WebKit.xcodeproj/project.pbxproj:

"PushAppBundle" is an abstract base class for representing a placeholder application bundle for a registration.
Eventually there will be a native one for each platform that actually does system operations.
For now, the concrete implementation is the in-memory "Mock" app bundle.

  • webpushd/PushAppBundle.h: Copied from Source/WebKit/webpushd/PushClientConnection.h.
  • webpushd/PushAppBundle.mm: Copied from Source/WebKit/webpushd/PushClientConnection.h.

(WebPushD::PushAppBundleClient::~PushAppBundleClient):
(WebPushD::PushAppBundle::PushAppBundle):
(WebPushD::PushAppBundle::~PushAppBundle):
(WebPushD::PushAppBundle::detachFromClient):

An "AppBundleRequest" is a queable operation meant to do something with an "App bundle".
For now the operations are "create" and "delete"

  • webpushd/AppBundleRequest.h: Added.

(WebPushD::AppBundleRequestImpl::AppBundleRequestImpl):
(WebPushD::AppBundleRequestImpl::~AppBundleRequestImpl):
(WebPushD::AppBundleRequestImpl::callCompletionHandlerAndCleanup):
(WebPushD::AppBundlePermissionsRequest::AppBundlePermissionsRequest):
(WebPushD::AppBundleDeletionRequest::AppBundleDeletionRequest):

  • webpushd/AppBundleRequest.mm: Added.

(WebPushD::AppBundleRequest::AppBundleRequest):
(WebPushD::AppBundleRequest::~AppBundleRequest):
(WebPushD::AppBundleRequest::start):
(WebPushD::AppBundleRequest::cancel):
(WebPushD::AppBundleRequest::cleanupAfterCompletionHandler):
(WebPushD::AppBundlePermissionsRequest::startInternal):
(WebPushD::AppBundlePermissionsRequest::didCheckForExistingBundle):
(WebPushD::AppBundlePermissionsRequest::didCreateAppBundle):
(WebPushD::AppBundleDeletionRequest::startInternal):
(WebPushD::AppBundleDeletionRequest::didDeleteExistingBundleWithError):

  • webpushd/MockAppBundleForTesting.h: Copied from Source/WebKit/webpushd/PushClientConnection.h.

(WebPushD::MockAppBundleForTesting::create):

  • webpushd/MockAppBundleForTesting.mm: Added.

(WebPushD::MockAppBundleForTesting::MockAppBundleForTesting):
(WebPushD::MockAppBundleForTesting::~MockAppBundleForTesting):
(WebPushD::MockAppBundleForTesting::checkForExistingBundle):
(WebPushD::MockAppBundleForTesting::deleteExistingBundle):
(WebPushD::MockAppBundleForTesting::createBundle):
(WebPushD::MockAppBundleForTesting::stop):

  • webpushd/MockAppBundleRegistry.h: Copied from Source/WebKit/webpushd/PushClientConnection.h.
  • webpushd/MockAppBundleRegistry.mm: Added.

(WebPushD::MockAppBundleRegistry::singleton):
(WebPushD::MockAppBundleRegistry::getOriginsWithRegistrations):
(WebPushD::MockAppBundleRegistry::doesBundleExist):
(WebPushD::MockAppBundleRegistry::createBundle):
(WebPushD::MockAppBundleRegistry::deleteBundle):

  • webpushd/PushClientConnection.h:
  • webpushd/PushClientConnection.mm:

(WebPushD::ClientConnection::create):
(WebPushD::ClientConnection::enqueueAppBundleRequest):
(WebPushD::ClientConnection::maybeStartNextAppBundleRequest):
(WebPushD::ClientConnection::didCompleteAppBundleRequest):
(WebPushD::ClientConnection::connectionClosed):

  • webpushd/WebPushDaemon.h:
  • webpushd/WebPushDaemon.mm:

(WebPushD::Daemon::connectionAdded):
(WebPushD::Daemon::connectionRemoved):
(WebPushD::Daemon::requestSystemNotificationPermission):
(WebPushD::Daemon::getOriginsWithPushAndNotificationPermissions):
(WebPushD::Daemon::deletePushAndNotificationRegistration):

4:20 PM Changeset in webkit [286272] by ddkilzer@apple.com
  • 7 edits in trunk/Source

Disable experimental web features on platforms without UI to enable them
<https://webkit.org/b/233152>
<rdar://problem/85430643>

Reviewed by Brent Fulgham.

Source/WebKit:

  • UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:

(WebKit::RemoteLayerTreeHost::makeNode):

  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteModelHosting.h:
  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteModelHosting.mm:
  • Fix build when ENABLE(MODEL_ELEMENT) is false.

Source/WTF:

  • wtf/PlatformEnableCocoa.h:

(ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER):
(ENABLE_CSS_PAINTING_API):
(ENABLE_CSS_TYPED_OM):
(ENABLE_MODEL_ELEMENT):
(ENABLE_SEPARATED_MODEL):

  • Disable if HAVE(EXPERIMENTAL_WEB_FEATURES_UI) is defined.
  • wtf/PlatformHave.h:

(HAVE_EXPERIMENTAL_WEB_FEATURES_UI): Add.

  • Define for tvOS and watchOS, which don't have UI to enable experimental web features.

(HAVE_CELESTIAL):
(HAVE_CFNETWORK_ALTERNATIVE_SERVICE):
(HAVE_NETWORK_LOADER):
(HAVE_AVSAMPLEBUFFERVIDEOOUTPUT):

  • Disable if HAVE(EXPERIMENTAL_WEB_FEATURES_UI) is defined.
4:02 PM Changeset in webkit [286271] by Jonathan Bedard
  • 2 edits in trunk/Tools

[webkitscmpy] Guard git-webkit with name
https://bugs.webkit.org/show_bug.cgi?id=233278

Reviewed by Stephanie Lewis and Dewei Zhu.

  • Scripts/libraries/webkitscmpy/git-webkit:

Canonical link: https://commits.webkit.org/244632@main

3:58 PM Changeset in webkit [286270] by timothy_horton@apple.com
  • 10 edits in trunk/Source

Plumb raw platform scrolling deltas along in wheel events
https://bugs.webkit.org/show_bug.cgi?id=233583

Reviewed by Simon Fraser.

Source/WebCore:

  • platform/PlatformWheelEvent.cpp:

(WebCore::PlatformWheelEvent::createFromGesture):

  • platform/PlatformWheelEvent.h:

(WebCore::PlatformWheelEvent::rawPlatformDelta const):

  • PAL/pal/spi/mac/IOKitSPIMac.h:

Source/WebKit:

  • Shared/WebEventConversion.cpp:

(WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):

  • Shared/WebWheelEvent.cpp:

(WebKit::WebWheelEvent::WebWheelEvent):
(WebKit::WebWheelEvent::encode const):
(WebKit::WebWheelEvent::decode):

  • Shared/WebWheelEvent.h:

(WebKit::WebWheelEvent::rawPlatformDelta const):

  • Shared/WebWheelEventCoalescer.cpp:

(WebKit::WebWheelEventCoalescer::coalesce):

  • Shared/mac/WebEventFactory.mm:

(WebKit::WebEventFactory::createWebWheelEvent):
Extract and plumb raw unaccelerated (in the HID sense) deltas in scroll
events for use in a future patch.

3:46 PM Changeset in webkit [286269] by Alan Coon
  • 8 edits in branches/safari-612.3.6.1-branch/Source

Versioning.

WebKit-7612.3.6.1.6

3:30 PM Changeset in webkit [286268] by Alan Coon
  • 8 edits in branches/safari-612.3.6.0-branch/Source

Versioning.

WebKit-7612.3.6.0.4

3:18 PM Changeset in webkit [286267] by Chris Dumez
  • 4 edits in trunk/Source/WebKit

Add WebKitAdditions bits for captive portal mode
https://bugs.webkit.org/show_bug.cgi?id=233569
<rdar://85819906>

Reviewed by Geoffrey Garen.

  • UIProcess/API/Cocoa/WKWebpagePreferences.h:
  • UIProcess/API/Cocoa/WKWebpagePreferences.mm:
3:10 PM Changeset in webkit [286266] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[WP] Sandbox telemetry is missing for some system calls
https://bugs.webkit.org/show_bug.cgi?id=233594
<rdar://problem/85832755>

Reviewed by Brent Fulgham.

Sandbox telemetry is missing for some system calls, since telemetry rules are automatically overridden in some cases.
This patch is addressing this by disabling system call inference.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
2:47 PM Changeset in webkit [286265] by Wenson Hsieh
  • 6 edits
    2 adds in trunk

Add a basic heuristic for sizing text in image overlay blocks
https://bugs.webkit.org/show_bug.cgi?id=233343
rdar://85755755

Reviewed by Tim Horton.

Source/WebCore:

Address a FIXME by implementing a simple heuristic for sizing text in image overlay blocks. Each image overlay
block has a predetermined target width and height; currently, we hard-code the font size in each of these blocks
to be 80% of the target height. While this works in some cases, it also causes content in these blocks to
overflow the container if there's too much text.

Avoid this problem by finding the largest font size, such that text in each container fits within the target
bounds without overflowing vertically (we don't need to worry about horizontal overflow because horizontally
overflowing text will simply wrap to the next line).

Because of line wrapping, it's difficult to analytically compute this font size, so I'm instead using binary
search (up to a fixed number of iterations) to converge on this largest size that avoids exceeding the target
height. See below for more details.

Test: fast/images/text-recognition/image-overlay-blocks.html

  • dom/ImageOverlay.cpp:

(WebCore::ImageOverlay::updateWithTextRecognitionResult):

Implement the main logic of the binary search. Establish a goal of ending up with text that fills at least 90%
of the available space in the container (with a max of just slightly over 100%, so that we stop early if we
happen to only barely exceed the target height). Then, starting with a font size that's 80% of the target
height, converge on a font size between 0% and 100% of the target height that achieves this goal. In practice,
most of the injected blocks of text will stop after a single iteration (due to the "80%-of-height" font size
being sufficient to mostly fill available vertical space).

Each FontSizeAdjustmentState here represents a single block container. At the beginning of each iteration, we
ensure that layout is up to date, and set the font size to be between the current min and max value (scaling by
target height to get font size). Using linesBoundingBox(), we compute the height of the rendered text relative
to its parent (which we know a-priori to be as tall as the target height). If this height is at least 90% of the
target height, we finish and remove the font size adjustment state from the vector of pending font adjustments;
otherwise, we adjust the min and max to either increase or decrease the font size as needed, and continue the
loop. We finally bail after an arbitrarily-chosen 10 iterations, if the text in the container is still too
small.

  • testing/Internals.cpp:

(WebCore::Internals::installImageOverlay):

Augment this testing-only internals hook so that we can inject arbitrary image overlay block content inside
image overlays.

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

LayoutTests:

Add a new layout test. See WebCore/ChangeLog for more details.

  • fast/images/text-recognition/image-overlay-blocks-expected.html: Added.
  • fast/images/text-recognition/image-overlay-blocks.html: Added.
2:38 PM Changeset in webkit [286264] by Chris Dumez
  • 4 edits in trunk

REGRESSION(r283855) [GTK][WPE] imported/w3c/web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/panner-equalpower.html fails
https://bugs.webkit.org/show_bug.cgi?id=233529

Reviewed by Philippe Normand.

Source/WebCore:

The non-USE(ACCELERATE) implementation for VectorMath::multiplyByScalarThenAddToVector() was wrong, causing the test
to fail on non Cocoa ports. The implementation was wrongly calling multiplyByScalarThenAddToOutput() instead of
multiplyByScalar() before calling add().

  • platform/audio/VectorMath.cpp:

(WebCore::VectorMath::multiplyByScalarThenAddToVector):

LayoutTests:

Unskip test that is now passing.

  • platform/glib/TestExpectations:
2:29 PM Changeset in webkit [286263] by Jonathan Bedard
  • 5 edits in trunk/Tools

[webkitcorepy] Delete unused environment variables
https://bugs.webkit.org/show_bug.cgi?id=233565
<rdar://problem/85820306>

Reviewed by Dewei Zhu.

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

(Environment.init): Keep track of sure environment files.
(Environment.load): Ditto.
(Environment.secure): Delete all unused environment files, since they may contain credentials.

  • Scripts/libraries/webkitcorepy/webkitcorepy/tests/environment_unittest.py:

(TestEnvironment.test_secure):

Canonical link: https://commits.webkit.org/244626@main

2:04 PM Changeset in webkit [286262] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

REGRESSION(r286205) [WinCairo] WebGL tests are failing
https://bugs.webkit.org/show_bug.cgi?id=233589

Unreviewed crash fix.

EGL_BIND_TO_TEXTURE_TARGET_ANGLE isn't available for Windows.
Restored the previous code.

  • platform/graphics/angle/GraphicsContextGLANGLE.cpp:

(WebCore::GraphicsContextGLOpenGL::drawingBufferTextureTarget):
Set m_drawingBufferTextureTarget to EGL_TEXTURE_2D for
PLATFORM(WIN) instead of querying with EGL_BIND_TO_TEXTURE_TARGET_ANGLE.

1:34 PM Changeset in webkit [286261] by Lauro Moura
  • 2 edits in trunk/Tools

[webkitcorepy] Environment: Sort values before comparing in unittest
https://bugs.webkit.org/show_bug.cgi?id=233582

Reviewed by Jonathan Bedard.

While Python3.6+'s dicts happen to keep insertion order, os.listdir
does not guarantee the order of the listed items[1]. This may cause
the Environment unittest to fail when comparing to the fixed expected
data, as it has been happending in some GTK/WPE bots.

[1] https://docs.python.org/3/library/os.html#os.listdir

  • Scripts/libraries/webkitcorepy/webkitcorepy/tests/environment_unittest.py:

(TestEnvironment.test_list):

1:24 PM Changeset in webkit [286260] by Wenson Hsieh
  • 4 edits in trunk

WKContentView should allow -captureTextFromCamera: with a caret selection unless the sender is the callout bar
https://bugs.webkit.org/show_bug.cgi?id=233378
rdar://85478344

Reviewed by Tim Horton.

Source/WebKit:

Allow clients to query whether or not the "capture text from camera" action should be enabled on WKWebView in
contexts outside of the callout bar. Currently, WKContentView returns NO for this action when there is a non-
collapsed selection range, but this behavior is only intended for the callout bar; in the case where the action
is (for instance) triggered by a button in the web view chrome, it doesn't make sense to only enable it when the
selection is a caret.

Additionally, adjust the check to use focused element information instead of editor state, such that WebKit
clients can easily query this API (-canPerformAction:withSender:) inside of input delegate callbacks when
beginning an input session to know whether or not "capture text from camera" should be allowed.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView canPerformActionForWebView:withSender:]):

Tools:

Adjust an API test to exercise the changes. See WebKit/ChangeLog for more details.

  • TestWebKitAPI/Tests/WebKitCocoa/WKContentViewEditingActions.mm:
12:48 PM Changeset in webkit [286259] by Chris Fleizach
  • 26 edits
    1 move
    1 add
    2 deletes in trunk

AX: Unify speech synthesizer platform usage for Mac/iOS
https://bugs.webkit.org/show_bug.cgi?id=231895
<rdar://problem/84372479>

Reviewed by Andres Gonzalez.

LayoutTests/imported/w3c:

Update expectations now that the test passes.

  • web-platform-tests/speech-api/SpeechSynthesis-speak-events-expected.txt:

Source/WebCore:

AVSpeechSynthesizer has been fully supported on macOS for a number of years. This allows us to unify platform usage.
Fix a number of tests that had been marked failing/flaky related to speech synthesis.

  • Modules/speech/SpeechSynthesis.cpp:

(WebCore::SpeechSynthesis::SpeechSynthesis):
(WebCore::SpeechSynthesis::startSpeakingImmediately):
(WebCore::SpeechSynthesis::speak):

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • page/SpeechSynthesisClient.h:
  • platform/PlatformSpeechSynthesizer.h:
  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::variationAxes):

  • platform/ios/PlatformSpeechSynthesizerIOS.mm: Removed.
  • platform/mac/PlatformSpeechSynthesizerMac.mm: Removed.
  • Source/WebCore/platform/cocoa/PlatformSpeechSynthesizerCocoa.mm: Added.

Source/WebCore/PAL:

  • PAL.xcodeproj/project.pbxproj:
  • pal/cocoa/AVFoundationSoftLink.h:
  • pal/cocoa/AVFoundationSoftLink.mm:
  • pal/spi/cocoa/AXSpeechManagerSPI.h:
  • pal/spi/mac/SpeechSynthesisSPI.h: Removed.

Source/WebKit:

Create a new message for resetting speech synthesis state when the DOMWindow changes
but the Page (and its referenced speech synthesis) stays the same.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::speechSynthesisResetState):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/WebCoreSupport/WebSpeechSynthesisClient.cpp:

(WebKit::WebSpeechSynthesisClient::resetState):

  • WebProcess/WebCoreSupport/WebSpeechSynthesisClient.h:

Source/WTF:

  • wtf/PlatformHave.h:

LayoutTests:

  • fast/speechsynthesis/speech-synthesis-speak-empty-string-expected.txt:
  • platform/mac-catalina-wk1/TestExpectations: Added.
  • platform/mac-wk1/TestExpectations:
  • platform/mac-wk2/TestExpectations:
  • platform/mac/TestExpectations:
12:37 PM Changeset in webkit [286258] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

REGRESSION(286219): Build fix.
https://bugs.webkit.org/show_bug.cgi?id=233388
<rdar://problem/84481565>

Unreviewed build fix after r286219.

  • WebKit.xcodeproj/project.pbxproj: Don't make duplicate copies of WebContent resources when building the CaptivePortal version of the WCP.
12:36 PM Changeset in webkit [286257] by Tyler Wilcock
  • 2 edits in trunk

Mark myself (Tyler Wilcock) as committer

Unreviewed.

  • metadata/contributors.json:
12:33 PM Changeset in webkit [286256] by mmaxfield@apple.com
  • 52 edits
    2 deletes in trunk/Source/WebKit

[WebGPU] Delete ObjectRegistry in favor of ObjectHeap
https://bugs.webkit.org/show_bug.cgi?id=233549

Reviewed by Dean Jackson.

Originally, I made these two classes distinct because I thought there were two separate use cases:

  1. ObjectHeap is the object that owns all WebGPU objects in the GPU process
  2. ObjectRegistry is the object that can map between WebGPUIdentifiers and their full objects. This

is needed when we receive a message that contains a WebGPUIdentifier, and we need to look up
its represented object.

The original idea was for ObjectHeap to own the objects, and each object would hold a reference to the
shared ObjectRegistry. However, this turns out not to be necessary, because new objects are created
via creation routines on _other objects_. This means that every object is going to have to know about
its owning ObjectHeap anyway (to be able to add newly created objects to it), so there aren't any
separation-of-concerns benefits to be had. If the ObjectHeap owned all the objects by just storing
them in a HashMap<WebGPUIdentifier, Ref<Object>> map, that would allow it to do double duty - it could
own all the objects _and_ be able to look up which WebGPUIdentifier is associated with which object.
So there's no point in having two distinct objects, when just one is sufficient.

So, accepting that, this patch is fairly straightforward, despite being large:

  • Before, we were doing m_objectRegistry.addObject(m_identifier, m_backing) and

m_objectHeap.addObject(remoteRenderPassEncoder). Now, we just do
m_objectHeap.addObject(identifier, remoteRenderPassEncoder) instead.

  • convertFromBacking() calls go from m_objectRegistry.convertFromBacking() to

m_objectHeap.convertFromBacking().

  • objectRegistry.removeObject() calls can be entirely deleted, because the ObjectHeap already knows

when objects are deleted, because it owns them in the first place.

No new tests because there is no behavior change.

  • GPUProcess/graphics/WebGPU/RemoteAdapter.cpp:

(WebKit::RemoteAdapter::RemoteAdapter):
(WebKit::RemoteAdapter::requestDevice):
(WebKit::RemoteAdapter::~RemoteAdapter): Deleted.

  • GPUProcess/graphics/WebGPU/RemoteAdapter.h:
  • GPUProcess/graphics/WebGPU/RemoteBindGroup.cpp:

(WebKit::RemoteBindGroup::RemoteBindGroup):
(WebKit::RemoteBindGroup::~RemoteBindGroup): Deleted.

  • GPUProcess/graphics/WebGPU/RemoteBindGroup.h:
  • GPUProcess/graphics/WebGPU/RemoteBindGroupLayout.cpp:

(WebKit::RemoteBindGroupLayout::RemoteBindGroupLayout):
(WebKit::RemoteBindGroupLayout::~RemoteBindGroupLayout): Deleted.

  • GPUProcess/graphics/WebGPU/RemoteBindGroupLayout.h:
  • GPUProcess/graphics/WebGPU/RemoteBuffer.cpp:

(WebKit::RemoteBuffer::RemoteBuffer):
(WebKit::RemoteBuffer::~RemoteBuffer): Deleted.

  • GPUProcess/graphics/WebGPU/RemoteBuffer.h:
  • GPUProcess/graphics/WebGPU/RemoteCommandBuffer.cpp:

(WebKit::RemoteCommandBuffer::RemoteCommandBuffer):
(WebKit::RemoteCommandBuffer::~RemoteCommandBuffer): Deleted.

  • GPUProcess/graphics/WebGPU/RemoteCommandBuffer.h:
  • GPUProcess/graphics/WebGPU/RemoteCommandEncoder.cpp:

(WebKit::RemoteCommandEncoder::RemoteCommandEncoder):
(WebKit::RemoteCommandEncoder::beginRenderPass):
(WebKit::RemoteCommandEncoder::beginComputePass):
(WebKit::RemoteCommandEncoder::copyBufferToBuffer):
(WebKit::RemoteCommandEncoder::copyBufferToTexture):
(WebKit::RemoteCommandEncoder::copyTextureToBuffer):
(WebKit::RemoteCommandEncoder::copyTextureToTexture):
(WebKit::RemoteCommandEncoder::fillBuffer):
(WebKit::RemoteCommandEncoder::writeTimestamp):
(WebKit::RemoteCommandEncoder::resolveQuerySet):
(WebKit::RemoteCommandEncoder::finish):
(WebKit::RemoteCommandEncoder::~RemoteCommandEncoder): Deleted.

  • GPUProcess/graphics/WebGPU/RemoteCommandEncoder.h:
  • GPUProcess/graphics/WebGPU/RemoteComputePassEncoder.cpp:

(WebKit::RemoteComputePassEncoder::RemoteComputePassEncoder):
(WebKit::RemoteComputePassEncoder::setPipeline):
(WebKit::RemoteComputePassEncoder::dispatchIndirect):
(WebKit::RemoteComputePassEncoder::beginPipelineStatisticsQuery):
(WebKit::RemoteComputePassEncoder::setBindGroup):
(WebKit::RemoteComputePassEncoder::~RemoteComputePassEncoder): Deleted.

  • GPUProcess/graphics/WebGPU/RemoteComputePassEncoder.h:
  • GPUProcess/graphics/WebGPU/RemoteComputePipeline.cpp:

(WebKit::RemoteComputePipeline::RemoteComputePipeline):
(WebKit::RemoteComputePipeline::getBindGroupLayout):
(WebKit::RemoteComputePipeline::~RemoteComputePipeline): Deleted.

  • GPUProcess/graphics/WebGPU/RemoteComputePipeline.h:
  • GPUProcess/graphics/WebGPU/RemoteDevice.cpp:

(WebKit::RemoteDevice::RemoteDevice):
(WebKit::RemoteDevice::createBuffer):
(WebKit::RemoteDevice::createTexture):
(WebKit::RemoteDevice::createSampler):
(WebKit::RemoteDevice::importExternalTexture):
(WebKit::RemoteDevice::createBindGroupLayout):
(WebKit::RemoteDevice::createPipelineLayout):
(WebKit::RemoteDevice::createBindGroup):
(WebKit::RemoteDevice::createShaderModule):
(WebKit::RemoteDevice::createComputePipeline):
(WebKit::RemoteDevice::createRenderPipeline):
(WebKit::RemoteDevice::createComputePipelineAsync):
(WebKit::RemoteDevice::createRenderPipelineAsync):
(WebKit::RemoteDevice::createCommandEncoder):
(WebKit::RemoteDevice::createRenderBundleEncoder):
(WebKit::RemoteDevice::createQuerySet):
(WebKit::RemoteDevice::~RemoteDevice): Deleted.

  • GPUProcess/graphics/WebGPU/RemoteDevice.h:
  • GPUProcess/graphics/WebGPU/RemoteExternalTexture.cpp:

(WebKit::RemoteExternalTexture::RemoteExternalTexture):
(WebKit::RemoteExternalTexture::~RemoteExternalTexture): Deleted.

  • GPUProcess/graphics/WebGPU/RemoteExternalTexture.h:
  • GPUProcess/graphics/WebGPU/RemoteGPU.cpp:

(WebKit::RemoteGPU::RemoteGPU):
(WebKit::RemoteGPU::requestAdapter):
(WebKit::RemoteGPU::~RemoteGPU): Deleted.

  • GPUProcess/graphics/WebGPU/RemoteGPU.h:
  • GPUProcess/graphics/WebGPU/RemotePipelineLayout.cpp:

(WebKit::RemotePipelineLayout::RemotePipelineLayout):
(WebKit::RemotePipelineLayout::~RemotePipelineLayout): Deleted.

  • GPUProcess/graphics/WebGPU/RemotePipelineLayout.h:
  • GPUProcess/graphics/WebGPU/RemoteQuerySet.cpp:

(WebKit::RemoteQuerySet::RemoteQuerySet):
(WebKit::RemoteQuerySet::~RemoteQuerySet): Deleted.

  • GPUProcess/graphics/WebGPU/RemoteQuerySet.h:
  • GPUProcess/graphics/WebGPU/RemoteQueue.cpp:

(WebKit::RemoteQueue::RemoteQueue):
(WebKit::RemoteQueue::submit):
(WebKit::RemoteQueue::writeBuffer):
(WebKit::RemoteQueue::writeTexture):
(WebKit::RemoteQueue::copyExternalImageToTexture):
(WebKit::RemoteQueue::~RemoteQueue): Deleted.

  • GPUProcess/graphics/WebGPU/RemoteQueue.h:
  • GPUProcess/graphics/WebGPU/RemoteRenderBundle.cpp:

(WebKit::RemoteRenderBundle::RemoteRenderBundle):
(WebKit::RemoteRenderBundle::~RemoteRenderBundle): Deleted.

  • GPUProcess/graphics/WebGPU/RemoteRenderBundle.h:
  • GPUProcess/graphics/WebGPU/RemoteRenderBundleEncoder.cpp:

(WebKit::RemoteRenderBundleEncoder::RemoteRenderBundleEncoder):
(WebKit::RemoteRenderBundleEncoder::setPipeline):
(WebKit::RemoteRenderBundleEncoder::setIndexBuffer):
(WebKit::RemoteRenderBundleEncoder::setVertexBuffer):
(WebKit::RemoteRenderBundleEncoder::drawIndirect):
(WebKit::RemoteRenderBundleEncoder::drawIndexedIndirect):
(WebKit::RemoteRenderBundleEncoder::setBindGroup):
(WebKit::RemoteRenderBundleEncoder::finish):
(WebKit::RemoteRenderBundleEncoder::~RemoteRenderBundleEncoder): Deleted.

  • GPUProcess/graphics/WebGPU/RemoteRenderBundleEncoder.h:
  • GPUProcess/graphics/WebGPU/RemoteRenderPassEncoder.cpp:

(WebKit::RemoteRenderPassEncoder::RemoteRenderPassEncoder):
(WebKit::RemoteRenderPassEncoder::setPipeline):
(WebKit::RemoteRenderPassEncoder::setIndexBuffer):
(WebKit::RemoteRenderPassEncoder::setVertexBuffer):
(WebKit::RemoteRenderPassEncoder::drawIndirect):
(WebKit::RemoteRenderPassEncoder::drawIndexedIndirect):
(WebKit::RemoteRenderPassEncoder::setBindGroup):
(WebKit::RemoteRenderPassEncoder::setBlendConstant):
(WebKit::RemoteRenderPassEncoder::beginPipelineStatisticsQuery):
(WebKit::RemoteRenderPassEncoder::executeBundles):
(WebKit::RemoteRenderPassEncoder::~RemoteRenderPassEncoder): Deleted.

  • GPUProcess/graphics/WebGPU/RemoteRenderPassEncoder.h:
  • GPUProcess/graphics/WebGPU/RemoteRenderPipeline.cpp:

(WebKit::RemoteRenderPipeline::RemoteRenderPipeline):
(WebKit::RemoteRenderPipeline::getBindGroupLayout):
(WebKit::RemoteRenderPipeline::~RemoteRenderPipeline): Deleted.

  • GPUProcess/graphics/WebGPU/RemoteRenderPipeline.h:
  • GPUProcess/graphics/WebGPU/RemoteSampler.cpp:

(WebKit::RemoteSampler::RemoteSampler):
(WebKit::RemoteSampler::~RemoteSampler): Deleted.

  • GPUProcess/graphics/WebGPU/RemoteSampler.h:
  • GPUProcess/graphics/WebGPU/RemoteShaderModule.cpp:

(WebKit::RemoteShaderModule::RemoteShaderModule):
(WebKit::RemoteShaderModule::~RemoteShaderModule): Deleted.

  • GPUProcess/graphics/WebGPU/RemoteShaderModule.h:
  • GPUProcess/graphics/WebGPU/RemoteTexture.cpp:

(WebKit::RemoteTexture::RemoteTexture):
(WebKit::RemoteTexture::createView):
(WebKit::RemoteTexture::~RemoteTexture): Deleted.

  • GPUProcess/graphics/WebGPU/RemoteTexture.h:
  • GPUProcess/graphics/WebGPU/RemoteTextureView.cpp:

(WebKit::RemoteTextureView::RemoteTextureView):
(WebKit::RemoteTextureView::~RemoteTextureView): Deleted.

  • GPUProcess/graphics/WebGPU/RemoteTextureView.h:
  • GPUProcess/graphics/WebGPU/WebGPUObjectHeap.cpp:

(WebKit::WebGPU::ObjectHeap::addObject):
(WebKit::WebGPU::ObjectHeap::removeObject):
(WebKit::WebGPU::ObjectHeap::convertAdapterFromBacking):
(WebKit::WebGPU::ObjectHeap::convertBindGroupFromBacking):
(WebKit::WebGPU::ObjectHeap::convertBindGroupLayoutFromBacking):
(WebKit::WebGPU::ObjectHeap::convertBufferFromBacking):
(WebKit::WebGPU::ObjectHeap::convertCommandBufferFromBacking):
(WebKit::WebGPU::ObjectHeap::convertCommandEncoderFromBacking):
(WebKit::WebGPU::ObjectHeap::convertComputePassEncoderFromBacking):
(WebKit::WebGPU::ObjectHeap::convertComputePipelineFromBacking):
(WebKit::WebGPU::ObjectHeap::convertDeviceFromBacking):
(WebKit::WebGPU::ObjectHeap::convertExternalTextureFromBacking):
(WebKit::WebGPU::ObjectHeap::convertPipelineLayoutFromBacking):
(WebKit::WebGPU::ObjectHeap::convertQuerySetFromBacking):
(WebKit::WebGPU::ObjectHeap::convertQueueFromBacking):
(WebKit::WebGPU::ObjectHeap::convertRenderBundleEncoderFromBacking):
(WebKit::WebGPU::ObjectHeap::convertRenderBundleFromBacking):
(WebKit::WebGPU::ObjectHeap::convertRenderPassEncoderFromBacking):
(WebKit::WebGPU::ObjectHeap::convertRenderPipelineFromBacking):
(WebKit::WebGPU::ObjectHeap::convertSamplerFromBacking):
(WebKit::WebGPU::ObjectHeap::convertShaderModuleFromBacking):
(WebKit::WebGPU::ObjectHeap::convertTextureFromBacking):
(WebKit::WebGPU::ObjectHeap::convertTextureViewFromBacking):

  • GPUProcess/graphics/WebGPU/WebGPUObjectHeap.h:
  • GPUProcess/graphics/WebGPU/WebGPUObjectRegistry.cpp: Removed.
  • GPUProcess/graphics/WebGPU/WebGPUObjectRegistry.h: Removed.
  • GPUProcess/media/RemoteAudioSourceProviderProxy.cpp:

(WebKit::RemoteAudioSourceProviderProxy::create):
(WebKit::RemoteAudioSourceProviderProxy::createRingBuffer):
(WebKit::RemoteAudioSourceProviderProxy::storageChanged):

  • Platform/IPC/ScopedActiveMessageReceiveQueue.h:
  • Shared/WebGPU/WebGPUConvertFromBackingContext.h:
  • Sources.txt:
  • WebKit.xcodeproj/project.pbxproj:
12:29 PM Changeset in webkit [286255] by ysuzuki@apple.com
  • 11 edits in trunk

[JSC] Add Intl.NumberFormat.formatRangeToParts
JSTests:

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

Reviewed by Ross Kirsling.

  • stress/intl-numberformat-format-large.js:

(nf.formatRangeToParts.shouldBe.JSON.stringify.nf.formatRangeToParts):
(nf.formatRangeToParts.shouldBe.JSON.stringify.nf2.formatRangeToParts):

  • stress/intl-numberformat-format-range-v3.js:

(nf.formatRange.nf.formatRangeToParts.methods.forEach):
(nf.formatRange.string_appeared_here.forEach): Deleted.

  • stress/intl-numberformat-format-string-v3.js:

(nf.formatRangeToParts.shouldBe.JSON.stringify.nf.formatRangeToParts):
(nf.formatRangeToParts.shouldBe.JSON.stringify.nf2.formatRangeToParts):

  • stress/intl-numberformat-format-string.js:

(nf.formatRangeToParts.shouldBe.JSON.stringify.nf.formatRangeToParts):
(nf.formatRangeToParts.shouldBe.JSON.stringify.nf2.formatRangeToParts):

Source/JavaScriptCore:

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

Reviewed by Ross Kirsling.

This patch implements Intl.NumberFormat#formatRangeToParts if ICU is 69 or greater.
It also cleans up / optimizes existing Intl.NumberFormat#formatToParts implementation.

We first collect all fields generated by ICU. And then, flattening nested fields into
non-overlapping sequence of parts via flattenFields.

  • runtime/IntlNumberFormat.cpp:

(JSC::flattenFields):
(JSC::numberFieldsPracticallyEqual):
(JSC::IntlNumberFormat::formatRangeToPartsInternal):
(JSC::IntlNumberFormat::formatRangeToParts const):
(JSC::IntlNumberFormat::formatToPartsInternal):
(JSC::IntlNumberFormat::formatToParts const):

  • runtime/IntlNumberFormat.h:
  • runtime/IntlNumberFormatPrototype.cpp:

(JSC::IntlNumberFormatPrototype::finishCreation):
(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/IntlRelativeTimeFormat.cpp:

(JSC::IntlRelativeTimeFormat::formatToParts const):

12:24 PM Changeset in webkit [286254] by mmaxfield@apple.com
  • 6 edits in trunk

[Cocoa] REGRESSION(r281291): Text Style fonts don't have the correct weight set
https://bugs.webkit.org/show_bug.cgi?id=233070

Reviewed by Cameron McCormack.

Source/WebCore:

Text style fonts (like font: -apple-system-body) weren't having their weights detected correctly. When the
bold-fonts accessibility setting is enabled, our detection logic was indicating that the fonts weren't
bold when they actually were. This patch fixes the detection logic to use kCTFontCSSWeightAttribute
instead.

Test: platform/ios/ios/fast/text/opticalFontWithWeight.html

  • rendering/RenderThemeCocoa.mm:

(WebCore::cssWeightOfSystemFont):

LayoutTests:

  • platform/ios-14/platform/ios/ios/fast/text/opticalFontWithWeight-expected.txt:
  • platform/ios/ios/fast/text/opticalFontWithWeight-expected.txt:
  • platform/ios/platform/ios/ios/fast/text/opticalFontWithWeight-expected.txt:
12:18 PM Changeset in webkit [286253] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

[GTK] 2.35.1 fails to build for Fedora: undefined reference to 'llint_link_call'
https://bugs.webkit.org/show_bug.cgi?id=233574

Unreviewed, add missing attributes.

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-11-29

  • llint/LLIntSlowPaths.h:
12:11 PM Changeset in webkit [286252] by mmaxfield@apple.com
  • 78 edits in trunk/Source

[WebGPU] Provide default values for descriptor struct members
https://bugs.webkit.org/show_bug.cgi?id=233431

Reviewed by Alex Christensen.

Source/WebCore/PAL:

The purpose of this is to be defensive. Ideally these wouldn't actually be used, but it's
a good idea to be safe and have them specified anyway.

I didn't provide default values for members whose types already have something well-defined,
like variants or optionals. But I did for ints and enums.

Where possible, I've matched the default values listed in the spec.

  • pal/graphics/WebGPU/WebGPUBindGroupEntry.h:
  • pal/graphics/WebGPU/WebGPUBindGroupLayoutEntry.h:
  • pal/graphics/WebGPU/WebGPUBlendComponent.h:
  • pal/graphics/WebGPU/WebGPUBufferBinding.h:
  • pal/graphics/WebGPU/WebGPUBufferBindingLayout.h:
  • pal/graphics/WebGPU/WebGPUBufferDescriptor.h:
  • pal/graphics/WebGPU/WebGPUCanvasConfiguration.h:
  • pal/graphics/WebGPU/WebGPUColor.h:
  • pal/graphics/WebGPU/WebGPUColorTargetState.h:
  • pal/graphics/WebGPU/WebGPUCompilationMessage.h:
  • pal/graphics/WebGPU/WebGPUComputePassTimestampWrites.h:
  • pal/graphics/WebGPU/WebGPUDepthStencilState.h:
  • pal/graphics/WebGPU/WebGPUExtent3D.h:
  • pal/graphics/WebGPU/WebGPUExternalTextureDescriptor.h:
  • pal/graphics/WebGPU/WebGPUImageCopyTexture.h:
  • pal/graphics/WebGPU/WebGPUImageCopyTextureTagged.h:
  • pal/graphics/WebGPU/WebGPUImageDataLayout.h:
  • pal/graphics/WebGPU/WebGPUMultisampleState.h:
  • pal/graphics/WebGPU/WebGPUOrigin2D.h:
  • pal/graphics/WebGPU/WebGPUOrigin3D.h:
  • pal/graphics/WebGPU/WebGPUPipelineDescriptorBase.h:
  • pal/graphics/WebGPU/WebGPUPrimitiveState.h:
  • pal/graphics/WebGPU/WebGPUQuerySetDescriptor.h:
  • pal/graphics/WebGPU/WebGPURenderBundleEncoderDescriptor.h:
  • pal/graphics/WebGPU/WebGPURenderPassColorAttachment.h:
  • pal/graphics/WebGPU/WebGPURenderPassDepthStencilAttachment.h:
  • pal/graphics/WebGPU/WebGPURenderPassDescriptor.h:
  • pal/graphics/WebGPU/WebGPURenderPassLayout.h:
  • pal/graphics/WebGPU/WebGPURenderPassTimestampWrites.h:
  • pal/graphics/WebGPU/WebGPURequestAdapterOptions.h:
  • pal/graphics/WebGPU/WebGPUSamplerBindingLayout.h:
  • pal/graphics/WebGPU/WebGPUSamplerDescriptor.h:
  • pal/graphics/WebGPU/WebGPUStencilFaceState.h:
  • pal/graphics/WebGPU/WebGPUStorageTextureBindingLayout.h:
  • pal/graphics/WebGPU/WebGPUTextureBindingLayout.h:
  • pal/graphics/WebGPU/WebGPUTextureDescriptor.h:
  • pal/graphics/WebGPU/WebGPUTextureViewDescriptor.h:
  • pal/graphics/WebGPU/WebGPUVertexAttribute.h:
  • pal/graphics/WebGPU/WebGPUVertexBufferLayout.h:

Source/WebKit:

No new tests because there is no behavior change.

  • Shared/WebGPU/WebGPUBindGroupEntry.h:
  • Shared/WebGPU/WebGPUBindGroupLayoutEntry.h:
  • Shared/WebGPU/WebGPUBlendComponent.h:
  • Shared/WebGPU/WebGPUBufferBinding.h:
  • Shared/WebGPU/WebGPUBufferBindingLayout.h:
  • Shared/WebGPU/WebGPUBufferDescriptor.h:
  • Shared/WebGPU/WebGPUCanvasConfiguration.h:
  • Shared/WebGPU/WebGPUColor.h:
  • Shared/WebGPU/WebGPUColorTargetState.h:
  • Shared/WebGPU/WebGPUCompilationMessage.h:
  • Shared/WebGPU/WebGPUComputePassTimestampWrites.h:
  • Shared/WebGPU/WebGPUDepthStencilState.h:
  • Shared/WebGPU/WebGPUExtent3D.h:
  • Shared/WebGPU/WebGPUExternalTextureDescriptor.h:
  • Shared/WebGPU/WebGPUImageCopyTexture.h:
  • Shared/WebGPU/WebGPUImageCopyTextureTagged.h:
  • Shared/WebGPU/WebGPUImageDataLayout.h:
  • Shared/WebGPU/WebGPUMultisampleState.h:
  • Shared/WebGPU/WebGPUOrigin2D.h:
  • Shared/WebGPU/WebGPUOrigin3D.h:
  • Shared/WebGPU/WebGPUPrimitiveState.h:
  • Shared/WebGPU/WebGPUQuerySetDescriptor.h:
  • Shared/WebGPU/WebGPURenderBundleEncoderDescriptor.h:
  • Shared/WebGPU/WebGPURenderPassColorAttachment.h:
  • Shared/WebGPU/WebGPURenderPassDepthStencilAttachment.h:
  • Shared/WebGPU/WebGPURenderPassLayout.h:
  • Shared/WebGPU/WebGPURenderPassTimestampWrites.h:
  • Shared/WebGPU/WebGPURequestAdapterOptions.h:
  • Shared/WebGPU/WebGPUSamplerBindingLayout.h:
  • Shared/WebGPU/WebGPUSamplerDescriptor.h:
  • Shared/WebGPU/WebGPUStencilFaceState.h:
  • Shared/WebGPU/WebGPUStorageTextureBindingLayout.h:
  • Shared/WebGPU/WebGPUTextureBindingLayout.h:
  • Shared/WebGPU/WebGPUTextureDescriptor.h:
  • Shared/WebGPU/WebGPUTextureViewDescriptor.h:
  • Shared/WebGPU/WebGPUVertexAttribute.h:
  • Shared/WebGPU/WebGPUVertexBufferLayout.h:
12:04 PM Changeset in webkit [286251] by ysuzuki@apple.com
  • 15 edits
    4 adds in trunk

[JSC] Public Class Field initialization is slow
https://bugs.webkit.org/show_bug.cgi?id=232479

Reviewed by Alexey Shvayka.

JSTests:

  • microbenchmarks/class-fields-classic-constructor-assignments.js: Added.

(Classic_Constructor_Assignments):
(bench):

  • microbenchmarks/class-fields-private-fields.js: Added.

(ES2022_Private_Fields):
(bench):

  • microbenchmarks/class-fields-public-fields.js: Added.

(ES2022_Public_Fields):
(bench):

  • stress/class-fields-getter-override.js: Added.

(shouldThrow):
(defineCGetter.):
(B):
(define0Getter.):
(define0Getter):
(D):

  • stress/custom-get-set-proto-chain-put.js:

(let.object.of.getObjects):

  • stress/freeze-and-seal-should-prevent-extensions.js:
  • stress/object-assign-fast-path.js:
  • stress/ordinary-set-exceptions.js:

(shouldThrow):

  • stress/put-non-reified-static-function-or-custom.js:
  • wasm/js-api/test_basic_api.js:

(const.c.in.constructorProperties.switch):

Source/JavaScriptCore:

Class public field implementation did not have optimization for initializing class fields: using
runtime call to initialize fields instead of IC. This patch leverages put_by_id / put_by_val with
direct flag so that we can enable IC.

Currently, we are not changing original putDirect semantics since it is out of this patch's scope.
We will look into it and probably changing it in a separate patch, but not in this patch.

ToT Patched

class-fields-classic-constructor-assignments

17.1491+-2.6327 15.0906+-0.6795 might be 1.1364x faster

class-fields-public-fields 409.4328+-8.3140 20.2752+-2.0835 definitely 20.1938x faster
class-fields-private-fields 27.2621+-1.3858 25.1810+-3.9873 might be 1.0826x faster

  • bytecompiler/NodesCodegen.cpp:

(JSC::DefineFieldNode::emitBytecode):

  • runtime/CommonSlowPaths.h:

(JSC::CommonSlowPaths::putDirectWithReify):

  • runtime/JSObject.cpp:

(JSC::JSObject::putDirectCustomAccessor):
(JSC::JSObject::putDirectNonIndexAccessor):

  • runtime/JSObject.h:

(JSC::JSObject::putDirect):
(JSC::JSObject::putDirectRespectingExtensibility):

  • runtime/JSObjectInlines.h:

(JSC::JSObject::putInlineFast):
(JSC::JSObject::putDirectInternal):
(JSC::JSObject::putOwnDataProperty):
(JSC::JSObject::putOwnDataPropertyMayBeIndex):

Source/WTF:

  • wtf/text/ASCIILiteral.h:
11:57 AM Changeset in webkit [286250] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Make support for WebKitAdditions in Framework headers conditional based on deployment target
https://bugs.webkit.org/show_bug.cgi?id=233566

Reviewed by Wenson Hsieh.

Only support using WebKitAdditions in framework headers on macOS 12+, iOS 16+, tvOS 16+ and
watchOS 9+.

  • mac/replace-webkit-additions-includes.py:

(is_supported_os):
(main):

11:55 AM Changeset in webkit [286249] by ysuzuki@apple.com
  • 4 edits
    1 add in trunk

[JSC] private name operation should use RETURN_IF_EXCEPTION
https://bugs.webkit.org/show_bug.cgi?id=233577
rdar://85813869

Reviewed by Mark Lam.

JSTests:

  • stress/termination-error-in-private-name.js: Added.

(C):

Source/JavaScriptCore:

Because of TerminatedExecutionError, error can be thrown at any time.

  • jit/JITOperations.cpp:

(JSC::JSC_DEFINE_JIT_OPERATION):
(JSC::putPrivateNameOptimize):
(JSC::putPrivateName):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

11:51 AM Changeset in webkit [286248] by ysuzuki@apple.com
  • 8 edits
    1 add in trunk

[JSC] Move m_incomingPolymorphicCalls out of CodeBlock::JITData
https://bugs.webkit.org/show_bug.cgi?id=233415

Reviewed by Mark Lam and Darin Adler.

Source/JavaScriptCore:

This patch moves m_incomingPolymorphicCalls from CodeBlock::JITData to CodeBlock since it is now used
in LLInt too if JIT is enabled. To keep CodeBlock small, this patch shrinks sizeof(SentinelLinkedList).

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::linkIncomingPolymorphicCall):
(JSC::CodeBlock::unlinkIncomingCalls):

  • bytecode/CodeBlock.h:

Source/WTF:

Make sizeof(SentinelLinkedList) small. We do not need to have two sentinel for the list.

  • wtf/SentinelLinkedList.h:

(WTF::SentinelLinkedList::SentinelLinkedList):
(WTF::RawNode>::begin):
(WTF::RawNode>::end):
(WTF::RawNode>::push):
(WTF::RawNode>::append):
(WTF::RawNode>::takeFrom):
(WTF::RawNode>::SentinelLinkedList): Deleted.

Tools:

Add tests for SentinelLinkedList.

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

(TestWebKitAPI::TestNode::TestNode):
(TestWebKitAPI::TestNode::value const):
(TestWebKitAPI::TEST):

11:43 AM Changeset in webkit [286247] by Alan Coon
  • 14 edits in branches/safari-612-branch/Source

Cherry-pick r285648. rdar://problem/85171163

Log memory usage metadata when WebContent crosses critical or warning level memory thresholds
https://bugs.webkit.org/show_bug.cgi?id=232976

Reviewed by Darin Adler.

Source/WebCore:

WebCore::logMemoryStatistics was changed to:

  • Emit VM tag names as public strings to the log. There isn't anything privacy sensitive about our 256 fixed VM tags, and emitting them to the logs as as private string (as we were doing before) made those log lines useless.
  • Use WebCore::memoryUsageStatistics to gather memory metadata, since other WebCore callsites were already using that and it reduces code duplication.
  • Only log JS object type counts on internal OS builds. Previously we also logged those counts on public OS builds, but that was useless since all the class names were redacted in the log.
  • page/MemoryRelease.cpp: (WebCore::logMemoryStatistics): (WebCore::logMemoryStatisticsReasonDescription): (WebCore::pageCount): Deleted. (WebCore::logMemoryStatisticsAtTimeOfDeath): Deleted.
  • page/MemoryRelease.h:
  • page/PerformanceLogging.cpp: (WebCore::PerformanceLogging::memoryUsageStatistics): (WebCore::PerformanceLogging::didReachPointOfInterest):
  • page/PerformanceLogging.h:
  • page/cocoa/PerformanceLoggingCocoa.mm: (WebCore::PerformanceLogging::getPlatformMemoryUsageStatistics):

Source/WebKit:

Added callbacks to log memory usage metadata the first time a process hits these milestones:

  • exceeded inactive memory limit while active (on Mac)
  • exceeded warning process limit threshold (on other non-Mac Apple platforms)
  • exceeded critical process limit threshold (on other non-Mac Apple platforms)

The reason for this is we receive a large number of out of memory reports with very little
info in the logs. We want to log more metadata about memory usage (similar to what we do on
Mac in WebCore::logMemoryStatisticsAtTimeOfDeath) to help us debug those reports.

  • WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess):
  • WebProcess/WebProcess.h:

Source/WTF:

Fixed several issues with memory usage tracking:

  • pagesPerVMTag now properly accounts for swapped-out pages in its footprint calculation, as footprint(1) already does.
  • displayNamePerVMTag now includes all of the most common VM tags associated with WebKit.
  • MemoryPressureHandler now knows the specific type of pressure event that occurred. This allows it to differentiate between the entire system being at a warning pressure level vs. just this process hitting its warning memory level limit.
  • wtf/MemoryPressureHandler.cpp: (WTF::MemoryPressureHandler::setMemoryPressureStatus): (WTF::MemoryPressureHandler::memoryPressureStatusChanged): (WTF::MemoryPressureHandler::setUnderMemoryPressure): Deleted.
  • wtf/MemoryPressureHandler.h: (WTF::MemoryPressureHandler::setMemoryPressureStatusChangedCallback): (WTF::MemoryPressureHandler::isUnderMemoryPressure const):
  • wtf/ResourceUsage.h:
  • wtf/cocoa/MemoryPressureHandlerCocoa.mm: (WTF::MemoryPressureHandler::install):
  • wtf/cocoa/ResourceUsageCocoa.cpp: (WTF::displayNameForVMTag): (WTF::pagesPerVMTag):
  • wtf/unix/MemoryPressureHandlerUnix.cpp: (WTF::MemoryPressureHandler::triggerMemoryPressureEvent):
  • wtf/win/MemoryPressureHandlerWin.cpp: (WTF::MemoryPressureHandler::windowsMeasurementTimerFired):

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

11:38 AM Changeset in webkit [286246] by Russell Epstein
  • 5 edits in branches/safari-612-branch/Source

Apply patch. rdar://problem/83673859

11:38 AM Changeset in webkit [286245] by Russell Epstein
  • 4 edits in branches/safari-612-branch/Source

Cherry-pick r285130. rdar://problem/85166839

[macOS] Opening local html files is failing
https://bugs.webkit.org/show_bug.cgi?id=232572
<rdar://81330442>

Reviewed by Brent Fulgham.

Source/WebKit:

On some macOS versions, opening local html files is failing. In order for the WebContent process
to successfully issue the file extension to the Networking process, the flags for the extension
in the WebContent process must include the user intent flag when the extension is issued with an
audit token.

  • Shared/Cocoa/SandboxExtensionCocoa.mm: (WebKit::SandboxExtensionImpl::sandboxExtensionForType):

Source/WTF:

Declare sandbox flag.

  • wtf/spi/darwin/SandboxSPI.h:

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

11:38 AM Changeset in webkit [286244] by Russell Epstein
  • 3 edits
    3 adds in branches/safari-612-branch

Cherry-pick r285823. rdar://problem/85236459

Cross-Origin-Embedder-Policy: require-corp prevents loading of data URL images
https://bugs.webkit.org/show_bug.cgi?id=233131
<rdar://85236459>

Reviewed by Geoffrey Garen.

Source/WebCore:

When doing an initial data URL <img> load, we properly wouldn't perform a cross-origin resource policy check.
This is per the Fetch specification that says to use a scheme fetch [1] when the request URL is a data URL.
When the protocol is data, the scheme fetch algorithm would return a response without performing an HTTP
Fetch. The HTTP check [2] is the algorithm that actually performs a cross-origin resource policy check, at
step 7.

The issue with our implementation was that data URL <img> loads would perform a cross-origin resource policy
check in the case where the image is loaded from our memory cache, due to a check we had in
CachedResourceLoader::requestResource(). As a result, data URL <img> loads would fail when served from the
memory cache, when CORP is enforced. To address the issue and match the specification, we now disable this
CORP check when the request URL is a data URL.

[1] https://fetch.spec.whatwg.org/#scheme-fetch
[2] https://fetch.spec.whatwg.org/#concept-http-fetch

Test: http/wpt/html/cross-origin-embedder-policy/require-corp-data-url.html

  • loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::requestResource):

LayoutTests:

Add layout test coverage. This test is based on a reduce test case from Cameron McCormack.

  • http/wpt/html/cross-origin-embedder-policy/require-corp-data-url-expected.txt: Added.
  • http/wpt/html/cross-origin-embedder-policy/require-corp-data-url.html: Added.
  • http/wpt/html/cross-origin-embedder-policy/require-corp-data-url.html.headers: Added.

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

11:38 AM Changeset in webkit [286243] by Russell Epstein
  • 2 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r283386. rdar://problem/83953959

Protect WebFrame during invalidatePolicyListener()
https://bugs.webkit.org/show_bug.cgi?id=229981
<rdar://problem/82807413>

Reviewed by Alex Christensen.

  • WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::invalidatePolicyListeners): Protect the WebFrame while policy handlers are run.

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

11:38 AM Changeset in webkit [286242] by Russell Epstein
  • 4 edits in branches/safari-612-branch/Source/WebCore

Apply patch. rdar://problem/83971417

11:38 AM Changeset in webkit [286241] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-612-branch

Cherry-pick r285728. rdar://problem/85236241

[Web Animations] Accelerated animations with a single keyframe don't account for prior forward-filling animations
https://bugs.webkit.org/show_bug.cgi?id=233041
<rdar://problem/85236241>

Reviewed by Dean Jackson.

Source/WebCore:

Test: webanimations/accelerated-animation-after-forward-filling-animation.html

When starting an accelerated animation, we would fill any implicit keyframes based on the unanimated style.
We now also apply all animations below this animation in the target's effect stack such that a previous
forward-filling animation is accounted for.

  • animation/KeyframeEffect.cpp: (WebCore::KeyframeEffect::applyPendingAcceleratedActions):

LayoutTests:

Add a new test that runs a forward-filling animation for transform, waits for its completion,
then runs another transform animation with an implicit initial keyframe, ensuring that the
result of the first forward-filling animation is accounted for when computing the initial
keyframe.

This test would fail prior to this patch.

  • webanimations/accelerated-animation-after-forward-filling-animation-expected.html: Added.
  • webanimations/accelerated-animation-after-forward-filling-animation.html: Added.

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

11:38 AM Changeset in webkit [286240] by Russell Epstein
  • 1 edit in branches/safari-612-branch/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.h

Unreviewed build fix. rdar://problem/83159358

error: out-of-line definition of 'isolatedSession' does not match any declaration in 'WebKit::SessionSet'

11:38 AM Changeset in webkit [286239] by Russell Epstein
  • 3 edits in branches/safari-612-branch/Source/WebKit

Revert r285690. rdar://problem/83381842

11:38 AM Changeset in webkit [286238] by Russell Epstein
  • 2 edits in branches/safari-612-branch/Source/WebCore

Revert r285691. rdar://problem/83381842

11:38 AM Changeset in webkit [286237] by Russell Epstein
  • 3 edits in branches/safari-612-branch/Source/WebCore

Revert r285680. rdar://problem/85004449

11:38 AM Changeset in webkit [286236] by Russell Epstein
  • 9 edits in branches/safari-612-branch

Cherry-pick r285565. rdar://problem/83159358

[macOS] Enable NSURLSession partitioning based on first-party domain at CFNetwork level
https://bugs.webkit.org/show_bug.cgi?id=230750
<rdar://problem/83159358>

Reviewed by Alex Christensen.

Source/WebKit:

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa): (overrideAttributionContext): Deleted. Stop disabling CFNetwork NSURLSession partitioning based on first-party domain on macOS.
  • NetworkProcess/cocoa/NetworkSessionCocoa.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm: (WebKit::NetworkSessionCocoa::sessionWrapperForTask): (WebKit::NetworkSessionCocoa::hasIsolatedSession const): (WebKit::NetworkSessionCocoa::clearIsolatedSessions): (WebKit::NetworkSessionCocoa::invalidateAndCancelSessionSet): Disable ITP session partitioning of certain prevalent domains on platforms where CFNetwork already does full partitioning of all domains (now that it is enabled on macOS 12+ and iOS15+).

Source/WTF:

Add HAVE(CFNETWORK_SESSION_PARTITIONING_BASED_ON_FIRST_PARTY_DOMAIN) build time flag that is true
on newer Apple OSes where CFNetwork does NSURLSession partitioning based on first-party domain for
us.

  • wtf/PlatformHave.h:

LayoutTests:

Skip a few ITP session partitioning tests on newer OSes now that session partitioning
happens for all first-party domains at CFNetwork level on these OSes.

  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:

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

11:37 AM Changeset in webkit [286235] by Russell Epstein
  • 2 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r285550. rdar://problem/85075538

REGRESSION (Safari 15): AudioContext.currentTime speeds up (and audio won't play) when Bluetooth speaker connected
https://bugs.webkit.org/show_bug.cgi?id=232728
<rdar://problem/85075538>

Reviewed by Jer Noble.

This was a regression from us moving WebAudio to the GPUProcess in Safari 15. The issue occurred because the
WebProcess (writer) would get further and further ahead of the GPUProcess (reader) after a hardware sample
rate change.

When rendering on https://mdn.github.io/webaudio-examples/audiocontext-states/ with a hardware sample rate of
96Khz, RemoteAudioDestination::render() would get called with a numberOfFrame=128. Each time
RemoteAudioDestination::render() was called, it would signal the IPC semaphore, causing the WebProcess to
produce one WebAudio rendering quantum (128 frames). This would match perfectly and there would be no issues.
However, if during playback, the hardware sample rate changes (which can happen when connecting to bluetooth
speakers), CoreAudio would start calling RemoteAudioDestination::render() with a different numberOfFrame.
For example, when switching the hardware sample rate to 44.1Khz, numberOfFrames would be 278. Every time it
is called, render() would signal the semaphore 3 times, causing the WebProcess to produce 3 WebAudio rendering
quantums (3 * 128 = 384 frames). So each time render() is called, the WebProcess would generate 384 - 278 = 105
frames too many, causing it to get further and further ahead of the GPUProcess. One symptom would be that
AudioContext.currentTime would progress too fast. Also, eventually, our RingBuffer between the 2 process would
fill up and lead to rendering issues.

To address the issue, I updated RemoteAudioDestination::render() to keep track of how many extra samples it
requested from the WebProcess previously. This avoids signalling the IPC semaphore too many times and the
WebProcess can no longer get too far ahead of the GPUProcess. The logic matches what was already done in
RemoteAudioMediaStreamTrackRendererInternalUnitManager::Unit::render().

  • GPUProcess/media/RemoteAudioDestinationManager.cpp:

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

11:37 AM Changeset in webkit [286234] by Russell Epstein
  • 2 edits in branches/safari-612-branch/Source/WebCore

Cherry-pick r285531. rdar://problem/83381842

Fix macCatalyst build after r285509
https://bugs.webkit.org/show_bug.cgi?id=232863

Unreviewed.

  • Modules/speech/cocoa/SpeechRecognizerCocoa.mm:

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

11:37 AM Changeset in webkit [286233] by Russell Epstein
  • 3 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r285509. rdar://problem/83381842

Fix wrong frame count of CARingBuffer in SpeechRecognitionRemoteRealtimeMediaSource
https://bugs.webkit.org/show_bug.cgi?id=232863
<rdar://83381842>

Reviewed by Youenn Fablet.

SpeechRecognitionRealtimeMediaSourceManager::Source uses shared ring buffer to pass audio data to
SpeechRecognitionRemoteRealtimeMediaSource. We used to ask CARingBuffer in
SpeechRecognitionRealtimeMediaSourceManager::Source to allocate with m_numberOfFrames and send m_numberOfFrames
to SpeechRecognitionRemoteRealtimeMediaSource (so SpeechRecognitionRemoteRealtimeMediaSource can create a
corresponding CARingBuffer). This is wrong because CARingBuffer::allocate() rounds up frameCount to power of
two, which means m_numberOfFrames may be not the number used. We should get the actual frameCount in the
setStorage callback of SharedRingBufferStorage, and pass that value to SpeechRecognitionRemoteRealtimeMediaSource.

Manually tested.

  • UIProcess/SpeechRecognitionRemoteRealtimeMediaSource.cpp: (WebKit::SpeechRecognitionRemoteRealtimeMediaSource::setStorage):
  • WebProcess/Speech/SpeechRecognitionRealtimeMediaSourceManager.cpp: (WebKit::SpeechRecognitionRealtimeMediaSourceManager::Source::Source): (WebKit::SpeechRecognitionRealtimeMediaSourceManager::Source::storageChanged):

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

11:37 AM Changeset in webkit [286232] by Russell Epstein
  • 3 edits in branches/safari-612-branch/Source/WebCore

Cherry-pick r285330. rdar://problem/85004449

Nested run loops under MediaPlayerPrivateAVFoundationObjC::waitForVideoOutputMediaDataWillChange can cause hang when timeout fires
https://bugs.webkit.org/show_bug.cgi?id=232695
<rdar://problem/85004449>

Reviewed by Jer Noble.

It's possible for MediaPlayerPrivateAVFoundationObjC::waitForVideoOutputMediaDataWillChange
to be called re-entrantly, if the RunLoop::run call ends up processing
an event that also wants to synchronously update the media image. This
can cause a hang:

  1. Enter the outer waitForVideoOutputMediaDataWillChange call.
  2. Set up the outer timeout timer.
  3. Call RunLoop::run.

3.1. Enter the inner waitForVideoOutputMediaDataWillChange call.
3.2. Set up the inner timeout timer.
3.3. Call RunLoop::run.

3.3.1. Wait for new RunLoop events, and none arrive.
3.3.2. The outer timeout timer fires, calling RunLoop::stop.

3.4. Return from waitForVideoOutputMediaDataWillChange, cancelling

the inner timeout timer.

3.5. Wait for more events on the run loop, forever.

To avoid this, we can set up a single timeout timer, and track the
nesting level of our RunLoop::run calls. The innermost RunLoop::run call
will finish either by the timer firing (which calls RunLoop::stop) or by
the video data updating (which also calls RunLoop::stop, under
outputMediaDataWillChange). Either way, once the innermost
RunLoop::run call is finished, we know we can stop processing all of
the ancestor RunLoop:run calls.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::waitForVideoOutputMediaDataWillChange): (WebCore::MediaPlayerPrivateAVFoundationObjC::outputMediaDataWillChange):

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

11:37 AM Changeset in webkit [286231] by Russell Epstein
  • 3 edits
    3 adds in branches/safari-612-branch

Cherry-pick r284434. rdar://problem/77969801

WebM with invalid size should fail to load with error
https://bugs.webkit.org/show_bug.cgi?id=231886
rdar://77969801

Reviewed by Jer Noble.

Source/WebCore:

libwebm for some elements are using a std::string or a std::vector<uint8_t>
to store their content. Those have infallible memory allocators.
We limit the size we allow the parser to use to some reasonable values.

Test: media/media-webm-invalid-check.html

  • platform/graphics/cocoa/SourceBufferParserWebM.cpp: (WebCore::SourceBufferParserWebM::OnElementBegin):

LayoutTests:

  • media/content/invalid-size.webm: Added.
  • media/media-webm-invalid-check-expected.txt: Added.
  • media/media-webm-invalid-check.html: Added.

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

11:37 AM Changeset in webkit [286230] by Russell Epstein
  • 3 edits
    1 add in branches/safari-612-branch

Cherry-pick r283300. rdar://problem/85259264

DFG strength reduction on % operator should handle an INT_MIN divisor.
https://bugs.webkit.org/show_bug.cgi?id=230391
<rdar://problem/83229740>

Reviewed by Robin Morisset.

JSTests:

  • stress/dfg-strength-reduction-on-mod-should-handle-INT_MIN.js: Added.

Source/JavaScriptCore:

  • dfg/DFGStrengthReductionPhase.cpp: (JSC::DFG::StrengthReductionPhase::handleNode):

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

11:30 AM Changeset in webkit [286229] by commit-queue@webkit.org
  • 3 edits
    5 adds in trunk/LayoutTests

[GLIB] Update test expectations and baselines. Unreviewed test gardening.
https://bugs.webkit.org/show_bug.cgi?id=233530

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-11-29

  • platform/glib/TestExpectations:
  • platform/glib/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-interpolation-inline-value-expected.txt: Added.
  • platform/glib/storage/domstorage/sessionstorage/blocked-file-access-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
11:10 AM Changeset in webkit [286228] by ysuzuki@apple.com
  • 6 edits
    1 add in trunk

[JSC] GetTypedArrayLengthAsInt52 can get Array::Generic ArrayMode
https://bugs.webkit.org/show_bug.cgi?id=233571
rdar://85812164

Reviewed by Mark Lam.

JSTests:

  • stress/get-typed-array-length-as-int52-generic.js: Added.

(foo.bar):
(foo):

Source/JavaScriptCore:

If speculation is not populated enough, then GetTypedArrayLengthAsInt52 can get Array::Generic.
In that case, we should convert it to Array::ForceExit as it is done in GetArrayLength.
And blessArrayOperation inserts ForceOSRExit. So GetTypedArrayLengthAsInt52 won't be compiled.

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGFixupPhase.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compileGetTypedArrayLengthAsInt52):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileGetTypedArrayLengthAsInt52):

11:06 AM Changeset in webkit [286227] by graouts@webkit.org
  • 36 edits in trunk/Source

[Model] clean up compile-time flags and condition IDL methods behind them
https://bugs.webkit.org/show_bug.cgi?id=233407

Reviewed by Tim Horton.

Source/WebCore:

We condition the availability of IDL methods recently added to HTMLModelElement by
the new set of ENABLE_MODEL_ELEMENT_XXX_CONTROL flags.

  • Modules/model-element/HTMLModelElement.cpp:
  • Modules/model-element/HTMLModelElement.h:
  • Modules/model-element/HTMLModelElement.idl:
  • Modules/model-element/ModelPlayer.h:
  • Modules/model-element/dummy/DummyModelPlayer.cpp:
  • Modules/model-element/dummy/DummyModelPlayer.h:
  • Modules/model-element/scenekit/SceneKitModelPlayer.h:
  • Modules/model-element/scenekit/SceneKitModelPlayer.mm:

Source/WebCore/PAL:

We adopt the changes made to flags in wtf/PlatformEnableCocoa.h and wtf/PlatformHave.h.
We also remove the use of existing flags in QuartzCoreSPI.h since they're not actually
valid.

  • pal/spi/cocoa/QuartzCoreSPI.h:
  • pal/spi/ios/SystemPreviewSPI.h:
  • pal/spi/mac/SystemPreviewSPI.h:

Source/WebKit:

On top of adopting the changes made to flags in wtf/PlatformEnableCocoa.h and wtf/PlatformHave.h,
we condition the definition of code related to IDL methods recently added to HTMLModelElement by
the new set of ENABLE_MODEL_ELEMENT_XXX_CONTROL flags, uncluding WebPageProxy messages allowing
for this feature to work.

  • Shared/ModelIdentifier.h:

(WebKit::ModelIdentifier::encode const):
(WebKit::ModelIdentifier::decode):

  • UIProcess/Cocoa/ModelElementControllerCocoa.mm:

(WebKit::previewHasCameraSupport):
(WebKit::ModelElementController::getCameraForModelElement):
(WebKit::ModelElementController::setCameraForModelElement):
(WebKit::previewHasAnimationSupport):
(WebKit::ModelElementController::isPlayingAnimationForModelElement):
(WebKit::ModelElementController::setAnimationIsPlayingForModelElement):
(WebKit::ModelElementController::isLoopingAnimationForModelElement):
(WebKit::ModelElementController::setIsLoopingAnimationForModelElement):
(WebKit::ModelElementController::animationDurationForModelElement):
(WebKit::ModelElementController::animationCurrentTimeForModelElement):
(WebKit::ModelElementController::setAnimationCurrentTimeForModelElement):
(WebKit::previewHasAudioSupport):
(WebKit::ModelElementController::hasAudioForModelElement):
(WebKit::ModelElementController::isMutedForModelElement):
(WebKit::ModelElementController::setIsMutedForModelElement):

  • UIProcess/ModelElementController.h:
  • UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:

(WebKit::RemoteLayerTreeHost::makeNode):

  • UIProcess/WebPageProxy.cpp:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/WKModelInteractionGestureRecognizer.h:
  • UIProcess/ios/WKModelInteractionGestureRecognizer.mm:
  • UIProcess/ios/WKModelView.h:
  • UIProcess/ios/WKModelView.mm:
  • WebProcess/Model/ARKitInlinePreviewModelPlayer.h:
  • WebProcess/Model/ARKitInlinePreviewModelPlayer.mm:
  • WebProcess/Model/WebModelPlayerProvider.cpp:

(WebKit::WebModelPlayerProvider::createModelPlayer):

  • WebProcess/Model/ios/ARKitInlinePreviewModelPlayerIOS.h:
  • WebProcess/Model/ios/ARKitInlinePreviewModelPlayerIOS.mm:
  • WebProcess/Model/mac/ARKitInlinePreviewModelPlayerMac.h:
  • WebProcess/Model/mac/ARKitInlinePreviewModelPlayerMac.mm:

(WebKit::ARKitInlinePreviewModelPlayerMac::supportsMouseInteraction):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::setWebsiteDataStoreParameters):

Source/WTF:

We refactor and augment the flags related to the <model> element. First, we change the
following existing flags from ENABLE to HAVE since they are about the availability of
specific APIs in ARKit, and more specific ASVInlinePreview. The changes are as follows:

ENABLE_ARKIT_INLINE_PREVIEW_IOS => HAVE_ASV_INLINE_PREVIEW_IOS
ENABLE_ARKIT_INLINE_PREVIEW_MAC => HAVE_ASV_INLINE_PREVIEW_MAC
ENABLE_ARKIT_INLINE_PREVIEW_CAMERA_TRANSFORM => HAVE_ASV_INLINE_PREVIEW_CAMERA_CONTROL
ENABLE_ARKIT_INLINE_PREVIEW_ANIMATIONS_CONTROL => HAVE_ASV_INLINE_PREVIEW_ANIMATION_CONTROL
ENABLE_ARKIT_INLINE_PREVIEW_AUDIO_CONTROL => HAVE_ASV_INLINE_PREVIEW_AUDIO_CONTROL

We retain the ENABLE_ARKIT_INLINE_PREVIEW flag however as, even when the ASVInlinePreview API is
available, we may elect to not use this API.

Then, we add three new flags to specify whether some <model> features exposed to the Web are enabled,
all currently conditioned by the matching HAVE_ASV_INLINE_PREVIEW_ flags, but those could be subject
to more complex rules when other <model> backends expose supporting APIs for these features.

ENABLE_MODEL_ELEMENT_CAMERA_CONTROL
ENABLE_MODEL_ELEMENT_ANIMATION_CONTROL
ENABLE_MODEL_ELEMENT_AUDIO_CONTROL

Finally, we modify the macOS version used to define the HAVE_ASV_INLINE_PREVIEW_XXX_CONTROL flags.

  • wtf/PlatformEnableCocoa.h:
  • wtf/PlatformHave.h:
10:43 AM Changeset in webkit [286226] by Antti Koivisto
  • 9 edits in trunk

[:has() pseudo-class] id invalidation support
https://bugs.webkit.org/show_bug.cgi?id=233557

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/selectors/invalidation/attribute-or-elemental-selectors-in-has-expected.txt:

Source/WebCore:

The existing invalidation code doesn't automatically cover id mutations for has since it doesn't use rulesets
(because id mutations are rare and have not been worth optimizing).

  • style/ChildChangeInvalidation.cpp:

(WebCore::Style::ChildChangeInvalidation::invalidateForChangedElement):

Invalidate for ids.
Only look for descendant matching :has rulesets for non-children.

  • style/IdChangeInvalidation.cpp:

(WebCore::Style::IdChangeInvalidation::invalidateStyle):

Invalidate with RuleSets.

  • style/RuleFeature.cpp:

(WebCore::Style::RuleFeatureSet::recursivelyCollectFeaturesFromSelector):

Collect ids for building rulesets for :has case only, similar to tags.

(WebCore::Style::RuleFeatureSet::collectFeatures):
(WebCore::Style::RuleFeatureSet::add):

Use some lambdas to reduce copy code.

(WebCore::Style::RuleFeatureSet::clear):
(WebCore::Style::RuleFeatureSet::shrinkToFit):

  • style/RuleFeature.h:
  • style/StyleScopeRuleSets.cpp:

(WebCore::Style::ScopeRuleSets::idInvalidationRuleSets const):

  • style/StyleScopeRuleSets.h:
10:38 AM Changeset in webkit [286225] by mmaxfield@apple.com
  • 47 edits in trunk/Source/WebGPU

[WebGPU] Make WebGPU.framework's classes reference counted
https://bugs.webkit.org/show_bug.cgi?id=233547

Reviewed by Dean Jackson.

This is a fairly mechanical change of replacing constructors with calls to create(), and
changing instances to Ref<...>, and using -> instead of .

There's one somewhat interesting design choice here. The header has things like:

typedef struct WGPUAdapterImpl* WGPUAdapter;

But we're using C++ so we want to have something like

namespace WebGPU {
class Adapter : public RefCounted<Adapter> {

...

};
}

So we need to have some way of connecting these two things. This patch opts to do this like so:

struct WGPUAdapterImpl {

Ref<Adapter> adapter;

};

This isn't perfect, because it means that all method calls require a double dereference: one to
dereference the WGPUAdapter to get the WGPUAdapterImpl, and one to dereference the Ref<Adapter>
to get the Adapter. This is the most elegant solution for now, because it doesn't require any
reinterpret_cast<>()'ing. This patch chooses this elegant solution, because premature optimization
is the root of all evil.

  • WebGPU/Adapter.h:

(WebGPU::Adapter::create):

  • WebGPU/Adapter.mm:

(WebGPU::Adapter::requestDevice):
(wgpuAdapterGetLimits):
(wgpuAdapterGetProperties):
(wgpuAdapterHasFeature):
(wgpuAdapterGetFeatureAtIndex):
(wgpuAdapterRequestDevice):

  • WebGPU/BindGroup.h:

(WebGPU::BindGroup::create):

  • WebGPU/BindGroup.mm:

(wgpuBindGroupSetLabel):

  • WebGPU/BindGroupLayout.h:

(WebGPU::BindGroupLayout::create):

  • WebGPU/BindGroupLayout.mm:

(wgpuBindGroupLayoutSetLabel):

  • WebGPU/Buffer.h:

(WebGPU::Buffer::create):

  • WebGPU/Buffer.mm:

(WebGPU::Buffer::mapAsync):
(wgpuBufferDestroy):
(wgpuBufferGetConstMappedRange):
(wgpuBufferGetMappedRange):
(wgpuBufferMapAsync):
(wgpuBufferUnmap):
(wgpuBufferSetLabel):

  • WebGPU/CommandBuffer.h:

(WebGPU::CommandBuffer::create):

  • WebGPU/CommandBuffer.mm:

(wgpuCommandBufferSetLabel):

  • WebGPU/CommandEncoder.h:

(WebGPU::CommandEncoder::create):

  • WebGPU/CommandEncoder.mm:

(WebGPU::CommandEncoder::beginComputePass):
(WebGPU::CommandEncoder::beginRenderPass):
(WebGPU::CommandEncoder::finish):
(wgpuCommandEncoderBeginComputePass):
(wgpuCommandEncoderBeginRenderPass):
(wgpuCommandEncoderCopyBufferToBuffer):
(wgpuCommandEncoderCopyBufferToTexture):
(wgpuCommandEncoderCopyTextureToBuffer):
(wgpuCommandEncoderCopyTextureToTexture):
(wgpuCommandEncoderFillBuffer):
(wgpuCommandEncoderFinish):
(wgpuCommandEncoderInsertDebugMarker):
(wgpuCommandEncoderPopDebugGroup):
(wgpuCommandEncoderPushDebugGroup):
(wgpuCommandEncoderResolveQuerySet):
(wgpuCommandEncoderWriteTimestamp):
(wgpuCommandEncoderSetLabel):

  • WebGPU/ComputePassEncoder.h:

(WebGPU::ComputePassEncoder::create):

  • WebGPU/ComputePassEncoder.mm:

(wgpuComputePassEncoderBeginPipelineStatisticsQuery):
(wgpuComputePassEncoderDispatch):
(wgpuComputePassEncoderDispatchIndirect):
(wgpuComputePassEncoderEndPass):
(wgpuComputePassEncoderEndPipelineStatisticsQuery):
(wgpuComputePassEncoderInsertDebugMarker):
(wgpuComputePassEncoderPopDebugGroup):
(wgpuComputePassEncoderPushDebugGroup):
(wgpuComputePassEncoderSetBindGroup):
(wgpuComputePassEncoderSetPipeline):
(wgpuComputePassEncoderWriteTimestamp):
(wgpuComputePassEncoderSetLabel):

  • WebGPU/ComputePipeline.h:

(WebGPU::ComputePipeline::create):

  • WebGPU/ComputePipeline.mm:

(WebGPU::ComputePipeline::getBindGroupLayout):
(wgpuComputePipelineGetBindGroupLayout):
(wgpuComputePipelineSetLabel):

  • WebGPU/Device.h:

(WebGPU::Device::create):

  • WebGPU/Device.mm:

(WebGPU::Device::createBindGroup):
(WebGPU::Device::createBindGroupLayout):
(WebGPU::Device::createBuffer):
(WebGPU::Device::createCommandEncoder):
(WebGPU::Device::createComputePipeline):
(WebGPU::Device::createComputePipelineAsync):
(WebGPU::Device::createPipelineLayout):
(WebGPU::Device::createQuerySet):
(WebGPU::Device::createRenderBundleEncoder):
(WebGPU::Device::createRenderPipeline):
(WebGPU::Device::createRenderPipelineAsync):
(WebGPU::Device::createSampler):
(WebGPU::Device::createShaderModule):
(WebGPU::Device::createSwapChain):
(WebGPU::Device::createTexture):
(WebGPU::Device::getQueue):
(WebGPU::Device::popErrorScope):
(WebGPU::Device::setDeviceLostCallback):
(WebGPU::Device::setUncapturedErrorCallback):
(wgpuDeviceCreateBindGroup):
(wgpuDeviceCreateBindGroupLayout):
(wgpuDeviceCreateBuffer):
(wgpuDeviceCreateCommandEncoder):
(wgpuDeviceCreateComputePipeline):
(wgpuDeviceCreateComputePipelineAsync):
(wgpuDeviceCreatePipelineLayout):
(wgpuDeviceCreateQuerySet):
(wgpuDeviceCreateRenderBundleEncoder):
(wgpuDeviceCreateRenderPipeline):
(wgpuDeviceCreateRenderPipelineAsync):
(wgpuDeviceCreateSampler):
(wgpuDeviceCreateShaderModule):
(wgpuDeviceCreateSwapChain):
(wgpuDeviceCreateTexture):
(wgpuDeviceDestroy):
(wgpuDeviceGetLimits):
(wgpuDeviceGetQueue):
(wgpuDevicePopErrorScope):
(wgpuDevicePushErrorScope):
(wgpuDeviceSetDeviceLostCallback):
(wgpuDeviceSetUncapturedErrorCallback):
(wgpuDeviceSetLabel):

  • WebGPU/Instance.h:

(WebGPU::Instance::create):

  • WebGPU/Instance.mm:

(WebGPU::Instance::createSurface):
(WebGPU::Instance::requestAdapter):
(wgpuInstanceCreateSurface):
(wgpuInstanceProcessEvents):
(wgpuInstanceRequestAdapter):

  • WebGPU/PipelineLayout.h:

(WebGPU::PipelineLayout::create):

  • WebGPU/PipelineLayout.mm:

(wgpuPipelineLayoutSetLabel):

  • WebGPU/QuerySet.h:

(WebGPU::QuerySet::create):

  • WebGPU/QuerySet.mm:

(wgpuQuerySetDestroy):
(wgpuQuerySetSetLabel):

  • WebGPU/Queue.h:

(WebGPU::Queue::create):

  • WebGPU/Queue.mm:

(WebGPU::Queue::onSubmittedWorkDone):
(wgpuQueueOnSubmittedWorkDone):
(wgpuQueueSubmit):
(wgpuQueueWriteBuffer):
(wgpuQueueWriteTexture):
(wgpuQueueSetLabel):

  • WebGPU/RenderBundle.h:

(WebGPU::RenderBundle::create):

  • WebGPU/RenderBundle.mm:

(wgpuRenderBundleSetLabel):

  • WebGPU/RenderBundleEncoder.h:

(WebGPU::RenderBundleEncoder::create):

  • WebGPU/RenderBundleEncoder.mm:

(WebGPU::RenderBundleEncoder::finish):
(wgpuRenderBundleEncoderDraw):
(wgpuRenderBundleEncoderDrawIndexed):
(wgpuRenderBundleEncoderDrawIndexedIndirect):
(wgpuRenderBundleEncoderDrawIndirect):
(wgpuRenderBundleEncoderFinish):
(wgpuRenderBundleEncoderInsertDebugMarker):
(wgpuRenderBundleEncoderPopDebugGroup):
(wgpuRenderBundleEncoderPushDebugGroup):
(wgpuRenderBundleEncoderSetBindGroup):
(wgpuRenderBundleEncoderSetIndexBuffer):
(wgpuRenderBundleEncoderSetPipeline):
(wgpuRenderBundleEncoderSetVertexBuffer):
(wgpuRenderBundleEncoderSetLabel):

  • WebGPU/RenderPassEncoder.h:

(WebGPU::RenderPassEncoder::create):

  • WebGPU/RenderPassEncoder.mm:

(wgpuRenderPassEncoderBeginOcclusionQuery):
(wgpuRenderPassEncoderBeginPipelineStatisticsQuery):
(wgpuRenderPassEncoderDraw):
(wgpuRenderPassEncoderDrawIndexed):
(wgpuRenderPassEncoderDrawIndexedIndirect):
(wgpuRenderPassEncoderDrawIndirect):
(wgpuRenderPassEncoderEndOcclusionQuery):
(wgpuRenderPassEncoderEndPass):
(wgpuRenderPassEncoderEndPipelineStatisticsQuery):
(wgpuRenderPassEncoderExecuteBundles):
(wgpuRenderPassEncoderInsertDebugMarker):
(wgpuRenderPassEncoderPopDebugGroup):
(wgpuRenderPassEncoderPushDebugGroup):
(wgpuRenderPassEncoderSetBindGroup):
(wgpuRenderPassEncoderSetBlendConstant):
(wgpuRenderPassEncoderSetIndexBuffer):
(wgpuRenderPassEncoderSetPipeline):
(wgpuRenderPassEncoderSetScissorRect):
(wgpuRenderPassEncoderSetStencilReference):
(wgpuRenderPassEncoderSetVertexBuffer):
(wgpuRenderPassEncoderSetViewport):
(wgpuRenderPassEncoderWriteTimestamp):
(wgpuRenderPassEncoderSetLabel):

  • WebGPU/RenderPipeline.h:

(WebGPU::RenderPipeline::create):

  • WebGPU/RenderPipeline.mm:

(WebGPU::RenderPipeline::getBindGroupLayout):
(wgpuRenderPipelineGetBindGroupLayout):
(wgpuRenderPipelineSetLabel):

  • WebGPU/Sampler.h:

(WebGPU::Sampler::create):

  • WebGPU/Sampler.mm:

(wgpuSamplerSetLabel):

  • WebGPU/ShaderModule.h:

(WebGPU::ShaderModule::create):

  • WebGPU/ShaderModule.mm:

(wgpuShaderModuleSetLabel):

  • WebGPU/Surface.h:

(WebGPU::Surface::create):

  • WebGPU/Surface.mm:

(wgpuSurfaceGetPreferredFormat):

  • WebGPU/SwapChain.h:

(WebGPU::SwapChain::create):

  • WebGPU/SwapChain.mm:

(WebGPU::SwapChain::getCurrentTextureView):
(wgpuSwapChainGetCurrentTextureView):
(wgpuSwapChainPresent):

  • WebGPU/Texture.h:

(WebGPU::Texture::create):

  • WebGPU/Texture.mm:

(WebGPU::Texture::createView):
(wgpuTextureCreateView):
(wgpuTextureDestroy):
(wgpuTextureSetLabel):

  • WebGPU/TextureView.h:

(WebGPU::TextureView::create):

  • WebGPU/TextureView.mm:

(wgpuTextureViewSetLabel):

10:21 AM Changeset in webkit [286224] by mmaxfield@apple.com
  • 78 edits in trunk/Source

[WebGPU] IPC class refactorings
https://bugs.webkit.org/show_bug.cgi?id=233546

Reviewed by Dean Jackson.

Source/WebCore/PAL:

Make classes fast allocated.

GPUImpl gets a create() function with no arguments, for ease of callers.

  • pal/graphics/WebGPU/Impl/WebGPUAdapterImpl.h:
  • pal/graphics/WebGPU/Impl/WebGPUBindGroupImpl.h:
  • pal/graphics/WebGPU/Impl/WebGPUBindGroupLayoutImpl.h:
  • pal/graphics/WebGPU/Impl/WebGPUBufferImpl.h:
  • pal/graphics/WebGPU/Impl/WebGPUCommandBufferImpl.h:
  • pal/graphics/WebGPU/Impl/WebGPUCommandEncoderImpl.h:
  • pal/graphics/WebGPU/Impl/WebGPUComputePassEncoderImpl.h:
  • pal/graphics/WebGPU/Impl/WebGPUComputePipelineImpl.h:
  • pal/graphics/WebGPU/Impl/WebGPUConvertToBackingContext.h:
  • pal/graphics/WebGPU/Impl/WebGPUDeviceImpl.h:
  • pal/graphics/WebGPU/Impl/WebGPUDowncastConvertToBackingContext.h:
  • pal/graphics/WebGPU/Impl/WebGPUExternalTextureImpl.h:
  • pal/graphics/WebGPU/Impl/WebGPUImpl.cpp:

(PAL::WebGPU::GPUImpl::create):

  • pal/graphics/WebGPU/Impl/WebGPUImpl.h:
  • pal/graphics/WebGPU/Impl/WebGPUPipelineLayoutImpl.h:
  • pal/graphics/WebGPU/Impl/WebGPUQuerySetImpl.h:
  • pal/graphics/WebGPU/Impl/WebGPUQueueImpl.h:
  • pal/graphics/WebGPU/Impl/WebGPURenderBundleEncoderImpl.h:
  • pal/graphics/WebGPU/Impl/WebGPURenderBundleImpl.h:
  • pal/graphics/WebGPU/Impl/WebGPURenderPassEncoderImpl.h:
  • pal/graphics/WebGPU/Impl/WebGPURenderPipelineImpl.h:
  • pal/graphics/WebGPU/Impl/WebGPUSamplerImpl.h:
  • pal/graphics/WebGPU/Impl/WebGPUShaderModuleImpl.h:
  • pal/graphics/WebGPU/Impl/WebGPUTextureImpl.h:
  • pal/graphics/WebGPU/Impl/WebGPUTextureViewImpl.h:

Source/WebKit:

Make classes fast allocated. Also, make the root() function recursive, instead of hardcoding
each class's distance from the root.

RemoteGPUProxy has to be in the WebKit namespace, rather than the WebKit::WebGPU namespace,
because it will be a message receiver, and our code generator doesn't know anything about the
nested namespace.

Also make sure that async functions call their callbacks in every codepath.

No new tests because there is no behavior change.

  • GPUProcess/graphics/WebGPU/RemoteAdapter.h:
  • GPUProcess/graphics/WebGPU/RemoteBindGroup.h:
  • GPUProcess/graphics/WebGPU/RemoteBindGroupLayout.h:
  • GPUProcess/graphics/WebGPU/RemoteBuffer.h:
  • GPUProcess/graphics/WebGPU/RemoteCommandBuffer.h:
  • GPUProcess/graphics/WebGPU/RemoteCommandEncoder.h:
  • GPUProcess/graphics/WebGPU/RemoteComputePassEncoder.h:
  • GPUProcess/graphics/WebGPU/RemoteComputePipeline.h:
  • GPUProcess/graphics/WebGPU/RemoteDevice.h:
  • GPUProcess/graphics/WebGPU/RemoteExternalTexture.h:
  • GPUProcess/graphics/WebGPU/RemoteGPU.h:
  • GPUProcess/graphics/WebGPU/RemotePipelineLayout.h:
  • GPUProcess/graphics/WebGPU/RemoteQuerySet.h:
  • GPUProcess/graphics/WebGPU/RemoteQueue.h:
  • GPUProcess/graphics/WebGPU/RemoteRenderBundle.h:
  • GPUProcess/graphics/WebGPU/RemoteRenderBundleEncoder.h:
  • GPUProcess/graphics/WebGPU/RemoteRenderPassEncoder.h:
  • GPUProcess/graphics/WebGPU/RemoteRenderPipeline.h:
  • GPUProcess/graphics/WebGPU/RemoteSampler.h:
  • GPUProcess/graphics/WebGPU/RemoteShaderModule.h:
  • GPUProcess/graphics/WebGPU/RemoteTexture.h:
  • GPUProcess/graphics/WebGPU/RemoteTextureView.h:
  • GPUProcess/graphics/WebGPU/WebGPUObjectHeap.h:
  • GPUProcess/graphics/WebGPU/WebGPUObjectRegistry.h:
  • WebProcess/GPU/graphics/WebGPU/RemoteAdapterProxy.h:
  • WebProcess/GPU/graphics/WebGPU/RemoteBindGroupLayoutProxy.h:
  • WebProcess/GPU/graphics/WebGPU/RemoteBindGroupProxy.h:
  • WebProcess/GPU/graphics/WebGPU/RemoteBufferProxy.h:
  • WebProcess/GPU/graphics/WebGPU/RemoteCommandBufferProxy.h:
  • WebProcess/GPU/graphics/WebGPU/RemoteCommandEncoderProxy.h:
  • WebProcess/GPU/graphics/WebGPU/RemoteComputePassEncoderProxy.h:
  • WebProcess/GPU/graphics/WebGPU/RemoteComputePipelineProxy.h:
  • WebProcess/GPU/graphics/WebGPU/RemoteDeviceProxy.h:
  • WebProcess/GPU/graphics/WebGPU/RemoteExternalTextureProxy.h:
  • WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.cpp:

(WebKit::RemoteGPUProxy::requestAdapter):
(WebKit::WebGPU::RemoteGPUProxy::RemoteGPUProxy): Deleted.
(WebKit::WebGPU::RemoteGPUProxy::~RemoteGPUProxy): Deleted.
(WebKit::WebGPU::RemoteGPUProxy::requestAdapter): Deleted.

  • WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.h:
  • WebProcess/GPU/graphics/WebGPU/RemotePipelineLayoutProxy.h:
  • WebProcess/GPU/graphics/WebGPU/RemoteQuerySetProxy.h:
  • WebProcess/GPU/graphics/WebGPU/RemoteQueueProxy.h:
  • WebProcess/GPU/graphics/WebGPU/RemoteRenderBundleEncoderProxy.h:
  • WebProcess/GPU/graphics/WebGPU/RemoteRenderBundleProxy.h:
  • WebProcess/GPU/graphics/WebGPU/RemoteRenderPassEncoderProxy.h:
  • WebProcess/GPU/graphics/WebGPU/RemoteRenderPipelineProxy.h:
  • WebProcess/GPU/graphics/WebGPU/RemoteSamplerProxy.h:
  • WebProcess/GPU/graphics/WebGPU/RemoteShaderModuleProxy.h:
  • WebProcess/GPU/graphics/WebGPU/RemoteTextureProxy.h:
  • WebProcess/GPU/graphics/WebGPU/RemoteTextureViewProxy.h:
  • WebProcess/GPU/graphics/WebGPU/WebGPUDowncastConvertToBackingContext.h:
10:17 AM Changeset in webkit [286223] by Simon Fraser
  • 8 edits in trunk

Remove some unused event names
https://bugs.webkit.org/show_bug.cgi?id=233485

Reviewed by Sam Weinig.

Source/WebCore:

'webkitspeechchange' was added in r69100 and should have been removed in r172259.

'webkitregionoversetchange' was added in r151777 and should have been removed in r222259.

'webkitwillreveal*' were added in r163092 and should have been removed in r218651.

  • dom/EventNames.h:
  • html/HTMLAttributeNames.in:
  • html/HTMLBodyElement.cpp:

(WebCore::HTMLBodyElement::createWindowEventHandlerNameMap):

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::createEventHandlerNameMap):

Source/WebInspectorUI:

  • UserInterface/Models/ScriptTimelineRecord.js:

(WI.ScriptTimelineRecord.EventType.displayName):

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

[GTK] 2.33.1 tarball fails to build on i386
https://bugs.webkit.org/show_bug.cgi?id=233564

Unreviewed.

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-11-29

  • platform/graphics/SourceBufferPrivate.h:
10:15 AM Changeset in webkit [286221] by commit-queue@webkit.org
  • 10 edits in trunk

Form payloads with text/plain enctype should have a final \r\n
https://bugs.webkit.org/show_bug.cgi?id=220783

Patch by Andreu Botella <andreu@andreubotella.com> on 2021-11-29
Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/html/semantics/forms/form-submission-0/form-data-set-empty-file.window-expected.txt:
  • web-platform-tests/html/semantics/forms/form-submission-0/form-data-set-usv-expected.txt:
  • web-platform-tests/html/semantics/forms/form-submission-0/submit-entity-body-expected.txt:
  • web-platform-tests/html/semantics/forms/form-submission-0/text-plain.window-expected.txt:

Source/WebCore:

According to the HTML specification, the text/plain form enctype should not only have
entries separated by a \r\n linebreak, but it should also have a final \r\n linebreak.
Firefox and Chrome follow this, while WebKit skips the final linebreak for non-mailto form
submissions. This change adds it in every case.

Tests: imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-data-set-empty-file.window.html

imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/submit-entity-body.html
imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/text-plain.window.html
http/tests/misc/form-post-textplain-cross-site.html
http/tests/misc/form-post-textplain.html

  • platform/network/FormDataBuilder.cpp:

(WebCore::FormDataBuilder::addKeyValuePairAsFormData): Changed to add a trailing newline.

  • loader/FormSubmission.cpp:

(WebCore::appendMailtoPostFormDataToURL): Changed to remove the extra trailing newline that
was added to text/plain mailto payloads.

LayoutTests:

  • http/tests/misc/resources/form-post-textplain.py:
10:10 AM Changeset in webkit [286220] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Only handle ident tokens in consumeWillChange
https://bugs.webkit.org/show_bug.cgi?id=233459

Patch by Rob Buis <rbuis@igalia.com> on 2021-11-29
Reviewed by Antti Koivisto.

Source/WebCore:

Only handle ident tokens in consumeWillChange.

Test: fast/css/variables/will-change-variable-resolve-crash.html

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeWillChange):

LayoutTests:

  • fast/css/variables/will-change-variable-resolve-crash-expected.txt: Added.
  • fast/css/variables/will-change-variable-resolve-crash.html: Added.
9:58 AM Changeset in webkit [286219] by Brent Fulgham
  • 4 edits
    1 add in trunk/Source/WebKit

Create a new XPC service with specific entitlements to support Captive Portal use cases
https://bugs.webkit.org/show_bug.cgi?id=233388
<rdar://problem/84481565>

Reviewed by Per Arne Vollan.

This initial patch builds a new XPC service with entitlements tailored to our Captive Portal
use case.

  • Configurations/WebContentService.CaptivePortal.xcconfig: Added.
  • Configurations/WebContentService.xcconfig:
  • Scripts/process-entitlements.sh: Add new sections for captive portal mode
  • WebKit.xcodeproj/project.pbxproj: Add new configuration file.
9:18 AM Changeset in webkit [286218] by youenn@apple.com
  • 17 edits in trunk

Apply WebPreferences on ServiceWorker settings
https://bugs.webkit.org/show_bug.cgi?id=233466
LayoutTests/imported/w3c:

<rdar://problem/85719388>

Reviewed by Chris Dumez.

  • web-platform-tests/html/cross-origin-embedder-policy/cross-origin-isolated-permission.https-expected.txt:

Source/WebCore:

Reviewed by Chris Dumez.

Migrate WebLock flag to a page setting.
Update ServiceWorkerThreadProxy to expose its method to create a service worker dummy page.
Covered by existing web lock service worker tests.

  • Modules/web-locks/NavigatorLocks.idl:
  • Modules/web-locks/WebLock.idl:
  • Modules/web-locks/WebLockManager.idl:
  • page/RuntimeEnabledFeatures.h:
  • workers/service/context/ServiceWorkerThreadProxy.cpp:
  • workers/service/context/ServiceWorkerThreadProxy.h:

Source/WebKit:

Reviewed by Chris Dumez.

Make WebPage::updateSettingsGenerated as static to reuse it in service worker code path
just after creation of the dummy Page attached to each service worker.
This allows correct initialization of the settings that are then used by the service worker.

  • Scripts/PreferencesTemplates/WebPageUpdatePreferences.cpp.erb:
  • WebProcess/Storage/WebSWContextManagerConnection.cpp:
  • WebProcess/Storage/WebSWContextManagerConnection.h:
  • WebProcess/WebPage/WebPage.cpp:
  • WebProcess/WebPage/WebPage.h:

Source/WTF:

Reviewed by Chris Dumez.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
9:14 AM Changeset in webkit [286217] by Lauro Moura
  • 2 edits in trunk/Tools

[webkitflaskpy] Make sure flask is registered before importing webkitflaskpy
https://bugs.webkit.org/show_bug.cgi?id=233561

Reviewed by Jonathan Bedard.

bug233339 moved AuthedBlueprint to webkitflaskpy, but flask needs to
be registered before being imported to make sure AutoInstall takes
care of it. This avoids ModuleNotFound: flask errors running the
tests from a clean tree.

  • Scripts/libraries/webkitflaskpy/webkitflaskpy/init.py:
8:54 AM Changeset in webkit [286216] by Russell Epstein
  • 9 edits in trunk/Source

Versioning.

WebKit-7613.1.11

8:50 AM Changeset in webkit [286215] by Russell Epstein
  • 1 copy in branches/safari-613.1.10-branch

New branch.

8:42 AM Changeset in webkit [286214] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

Make WebKitCaptivePortalModeEnabled user default work on macOS
https://bugs.webkit.org/show_bug.cgi?id=233560

Reviewed by Anders Carlsson.

Make WebKitCaptivePortalModeEnabled user default work on macOS, not just iOS. This helps with testing.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:
  • UIProcess/WebProcessPool.cpp:
8:03 AM Changeset in webkit [286213] by Angelos Oikonomopoulos
  • 2 edits in trunk/Tools

Consider Source/cmake relevant for JSC
https://bugs.webkit.org/show_bug.cgi?id=233552

Reviewed by Aakash Jain.

Changes in Source/cmake may well be relevant for JSC.

  • CISupport/ews-build/steps.py:

(CheckPatchRelevance):

7:34 AM Changeset in webkit [286212] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

[RISCV64] Populate RISCV64Assembler with instruction-generation methods
https://bugs.webkit.org/show_bug.cgi?id=233256

Patch by Zan Dobersek <zdobersek@igalia.com> on 2021-11-29
Reviewed by Yusuke Suzuki.

Sprinkle RISCV64Assembler class with helper methods for generating the
desired instruction values.

Immediate types from the RISCV64Instructions namespace are introduced
into the class for easier usage here and in the MacroAssemblerRISCV64
class. Instruction-generating methods roughly match the different
instruction types in the RISCV64Instructions namespace.

A few optimizations are done around floating-point instructions. We can
use one base method which expects the desired FP size as a template
parameter, and the appropriate RISCV64Instructions type can then be
selected based on that size value. Different combinations for FP move
and conversion instructions are also grouped behind a single method,
with thorough compile-time validation done to prevent generating
invalid instructions.

A few helper methods intended for masking, sign-extension and
zero-extension are also added. The Condition enum is fixed to list only
RISCV-viable conditions, with the values ordered so that a simple
XOR-by-one of a given value will produce the value of the inverted
condition.

  • assembler/RISCV64Assembler.h:

(JSC::RISCV64Assembler::invert):
(JSC::RISCV64Assembler::luiInsn):
(JSC::RISCV64Assembler::auipcInsn):
(JSC::RISCV64Assembler::jalInsn):
(JSC::RISCV64Assembler::jalrInsn):
(JSC::RISCV64Assembler::beqInsn):
(JSC::RISCV64Assembler::bneInsn):
(JSC::RISCV64Assembler::bltInsn):
(JSC::RISCV64Assembler::bgeInsn):
(JSC::RISCV64Assembler::bltuInsn):
(JSC::RISCV64Assembler::bgeuInsn):
(JSC::RISCV64Assembler::lbInsn):
(JSC::RISCV64Assembler::lhInsn):
(JSC::RISCV64Assembler::lwInsn):
(JSC::RISCV64Assembler::ldInsn):
(JSC::RISCV64Assembler::lbuInsn):
(JSC::RISCV64Assembler::lhuInsn):
(JSC::RISCV64Assembler::lwuInsn):
(JSC::RISCV64Assembler::sbInsn):
(JSC::RISCV64Assembler::shInsn):
(JSC::RISCV64Assembler::swInsn):
(JSC::RISCV64Assembler::sdInsn):
(JSC::RISCV64Assembler::addiInsn):
(JSC::RISCV64Assembler::sltiInsn):
(JSC::RISCV64Assembler::sltiuInsn):
(JSC::RISCV64Assembler::xoriInsn):
(JSC::RISCV64Assembler::oriInsn):
(JSC::RISCV64Assembler::andiInsn):
(JSC::RISCV64Assembler::slliInsn):
(JSC::RISCV64Assembler::srliInsn):
(JSC::RISCV64Assembler::sraiInsn):
(JSC::RISCV64Assembler::addInsn):
(JSC::RISCV64Assembler::subInsn):
(JSC::RISCV64Assembler::sllInsn):
(JSC::RISCV64Assembler::sltInsn):
(JSC::RISCV64Assembler::sltuInsn):
(JSC::RISCV64Assembler::xorInsn):
(JSC::RISCV64Assembler::srlInsn):
(JSC::RISCV64Assembler::sraInsn):
(JSC::RISCV64Assembler::orInsn):
(JSC::RISCV64Assembler::andInsn):
(JSC::RISCV64Assembler::ecallInsn):
(JSC::RISCV64Assembler::ebreakInsn):
(JSC::RISCV64Assembler::addiwInsn):
(JSC::RISCV64Assembler::slliwInsn):
(JSC::RISCV64Assembler::srliwInsn):
(JSC::RISCV64Assembler::sraiwInsn):
(JSC::RISCV64Assembler::addwInsn):
(JSC::RISCV64Assembler::subwInsn):
(JSC::RISCV64Assembler::sllwInsn):
(JSC::RISCV64Assembler::srlwInsn):
(JSC::RISCV64Assembler::srawInsn):
(JSC::RISCV64Assembler::mulInsn):
(JSC::RISCV64Assembler::mulhInsn):
(JSC::RISCV64Assembler::mulhsuInsn):
(JSC::RISCV64Assembler::mulhuInsn):
(JSC::RISCV64Assembler::divInsn):
(JSC::RISCV64Assembler::divuInsn):
(JSC::RISCV64Assembler::remInsn):
(JSC::RISCV64Assembler::remuInsn):
(JSC::RISCV64Assembler::mulwInsn):
(JSC::RISCV64Assembler::divwInsn):
(JSC::RISCV64Assembler::divuwInsn):
(JSC::RISCV64Assembler::remwInsn):
(JSC::RISCV64Assembler::remuwInsn):
(JSC::RISCV64Assembler::flwInsn):
(JSC::RISCV64Assembler::fldInsn):
(JSC::RISCV64Assembler::fswInsn):
(JSC::RISCV64Assembler::fsdInsn):
(JSC::RISCV64Assembler::fmaddInsn):
(JSC::RISCV64Assembler::fmsubInsn):
(JSC::RISCV64Assembler::fnmsubInsn):
(JSC::RISCV64Assembler::fnmaddInsn):
(JSC::RISCV64Assembler::faddInsn):
(JSC::RISCV64Assembler::fsubInsn):
(JSC::RISCV64Assembler::fmulInsn):
(JSC::RISCV64Assembler::fdivInsn):
(JSC::RISCV64Assembler::fsqrtInsn):
(JSC::RISCV64Assembler::fsgnjInsn):
(JSC::RISCV64Assembler::fsgnjnInsn):
(JSC::RISCV64Assembler::fsgnjxInsn):
(JSC::RISCV64Assembler::fminInsn):
(JSC::RISCV64Assembler::fmaxInsn):
(JSC::RISCV64Assembler::feqInsn):
(JSC::RISCV64Assembler::fltInsn):
(JSC::RISCV64Assembler::fleInsn):
(JSC::RISCV64Assembler::fclassInsn):
(JSC::RISCV64Assembler::fcvtInsn):
(JSC::RISCV64Assembler::fmvInsn):
(JSC::RISCV64Assembler::fenceInsn):
(JSC::RISCV64Assembler::lrwInsn):
(JSC::RISCV64Assembler::scwInsn):
(JSC::RISCV64Assembler::lrdInsn):
(JSC::RISCV64Assembler::scdInsn):
(JSC::RISCV64Assembler::amoswapwInsn):
(JSC::RISCV64Assembler::amoaddwInsn):
(JSC::RISCV64Assembler::amoxorwInsn):
(JSC::RISCV64Assembler::amoandwInsn):
(JSC::RISCV64Assembler::amoorwInsn):
(JSC::RISCV64Assembler::amoswapdInsn):
(JSC::RISCV64Assembler::amoadddInsn):
(JSC::RISCV64Assembler::amoxordInsn):
(JSC::RISCV64Assembler::amoanddInsn):
(JSC::RISCV64Assembler::amoordInsn):
(JSC::RISCV64Assembler::nop):
(JSC::RISCV64Assembler::maskRegister):
(JSC::RISCV64Assembler::signExtend):
(JSC::RISCV64Assembler::zeroExtend):
(JSC::RISCV64Assembler::insn):
(JSC::RISCV64Assembler::insnFP):
(JSC::RISCV64Assembler::isValidShiftAmount):

7:08 AM Changeset in webkit [286211] by mmaxfield@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

[Cocoa] Stop linking JavaScriptCore.framework with libz because it doesn't use any symbols from it
https://bugs.webkit.org/show_bug.cgi?id=233550

Reviewed by Anders Carlsson.

Every compile produces a message like:

Ld /Users/mmaxfield/Build/Products/Debug/JavaScriptCore.framework/Versions/A/JavaScriptCore normal (in target 'JavaScriptCore' from project 'JavaScriptCore')
ld: warning: linking with (/usr/lib/libz.1.dylib) but not using any symbols from it

6:32 AM Changeset in webkit [286210] by eocanha@igalia.com
  • 2 edits in trunk/Source/WebCore

[GStreamer][WPE] Control on-disk multimedia buffering via the WPE_SHELL_DISABLE_MEDIA_DISK_CACHE environment variable
https://bugs.webkit.org/show_bug.cgi?id=233492

Reviewed by Xabier Rodriguez-Calvar.

Embedded platforms often don't have a persistent storage suitable for repetitive writes (eg: caching
media files may wear out a flash drive, and RAM memory is scarce enough to use a tmpfs for caching).
Those platforms need a way to disable on-disk caching.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: Honor environment variable.
5:05 AM Changeset in webkit [286209] by commit-queue@webkit.org
  • 14 edits in trunk/Source

GPUP GraphicsContextGL creation failure cannot be detected
https://bugs.webkit.org/show_bug.cgi?id=233517

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-11-29
Reviewed by Antti Koivisto.

Source/WebCore:

Before, concrete GraphicsContextGL instance was created with GraphicsContextGL::create()
which would internally use host window as a factory if possible. If this produced null, it would
create the "default" GraphicsContextGL subclass instance.
With GPUP, it does not make sense to create "default" type, as that in-process contexts should never
be used.
It also does not make sense to create "default", as it's unclear what the "default" type is.
Instead, use the host window, i.e. the chrome client, to always create the GraphicsContextGL instance
to WebGL. If this fails, the WebGL should be unavailable.
Remove GraphicsContextGL::create() as that is not useful. The callers should either
explicitly specify what subclass to use, for example in testing, or use the polymorhpic factory
(ChromeClient) which knows the policy.

Fix a bug where GPUP WebGL would use in-process context if the lost context would be recreated.

No new tests, a refactor.

  • PlatformMac.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::create):
(WebCore::WebGLRenderingContextBase::maybeRestoreContext):

  • page/ChromeClient.h:

(WebCore::ChromeClient::createGraphicsContextGL const):

  • platform/graphics/WebProcessGraphicsContextGL.h: Added.
  • platform/graphics/cocoa/WebProcessGraphicsContextGLCocoa.mm:

(WebCore::createWebProcessGraphicsContextGL):
(WebCore::GraphicsContextGLOpenGL::create): Deleted.

  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:
  • platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp:

(WebCore::createWebProcessGraphicsContextGL):
(WebCore::GraphicsContextGLOpenGL::create): Deleted.

  • platform/xr/openxr/PlatformXROpenXR.cpp:

(PlatformXR::OpenXRDevice::initializeTrackingAndRendering):

  • testing/WebFakeXRDevice.cpp:

(WebCore::SimulatedXRDevice::initializeTrackingAndRendering):

Source/WebKit:

If GPUP GraphicsContextGL creation fails, return nullptr instead of
trying to create a in-process context.

Enable WebChromeClient::createGraphicsContextGL() call for non-GPU process
compilation, as the function is now always called. Returning nullptr signifies failure
to create the context, not a signal to retry some other type.

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::createGraphicsContextGL const):

  • WebProcess/WebCoreSupport/WebChromeClient.h:
3:21 AM Changeset in webkit [286208] by Angelos Oikonomopoulos
  • 2 edits in trunk

Fix ATOMICS_REQUIRE_LIBATOMIC testcase on 32-bits
https://bugs.webkit.org/show_bug.cgi?id=233551

Unreviewed build fix.

There's a syntax error when compiling the test program
on 32-bits. This was not an issue on ARM as atomics are
built in on that platform, but broke the MIPS build.

  • Source/cmake/WebKitCompilerFlags.cmake:
2:29 AM Changeset in webkit [286207] by svillar@igalia.com
  • 4 edits in trunk

[css-flexbox] Do not shrink tables bellow their intrinsic sizes
https://bugs.webkit.org/show_bug.cgi?id=232383

Reviewed by Manuel Rego Casasnovas.

Source/WebCore:

Flex layout algorithm uses the flex items min|max sizes to compute the hypothetical main size which
will be used to clamp the size of the items when flexed. In the case of tables as flex items, we were
using the min-size straight away whenever that was definite. However we cannot do that because tables
must not shrink bellow their intrinsic sizes. That's why we should select the maximum of the intrinsic
size and the min-size.

This fixes a WPT test covering this case.

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::computeFlexItemMinMaxSizes): Do not select a min-size smaller than the
table intrinsic size in the main axis.

LayoutTests:

  • TestExpectations: Unskip table-as-item-fixed-min-width-3.html which works fine now.
2:00 AM Changeset in webkit [286206] by svillar@igalia.com
  • 6 edits in trunk

[css-flexbox] Add support for replaced elements with intrinsic ratio and no intrinsic size
https://bugs.webkit.org/show_bug.cgi?id=231952
<rdar://problem/84662305>

Reviewed by Manuel Rego Casasnovas.

Source/WebCore:

It might be the case that replaced elements have intrinsic aspect ratio but no
intrinsic dimensions. Actually that's quite common for SVGs for example. We're
incorrectly assuming that flex items with no intrinsic dimensions didn't have
intrinsic aspect ratios which is wrong.

Added new checks that are able to detect those cases were we have an intrinsic
aspect ratio even though there are no intrinsic dimensions.

  • rendering/RenderFlexibleBox.cpp:

(WebCore::isRenderReplacedWithIntrinsicAspectRatio):
(WebCore::childHasAspectRatio):
Consider replaced elements with intrinsic ratios and no intrinsic dimensions.
(WebCore::RenderFlexibleBox::computeMainSizeFromAspectRatioUsing const):
Let replaced elements compute the aspect ratio by themselves.
(WebCore::RenderFlexibleBox::childHasComputableAspectRatio const):

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::computeIntrinsicAspectRatio const): New method that
computes the aspect ratio for replaced elements.

  • rendering/RenderReplaced.h:

LayoutTests:

1:41 AM Changeset in webkit [286205] by commit-queue@webkit.org
  • 12 edits
    1 add in trunk/Source/WebCore

GraphicsContextGLANGLE.cpp has platform specific code
https://bugs.webkit.org/show_bug.cgi?id=233515

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-11-29
Reviewed by Antti Koivisto.

GraphicsContextGLANGLE.cpp has platform specific code for modifying
the display buffer backing storage (IOSurface on Cocoa,
normal texture on TextureMapper variants).
This modification should be done through the reshapeDisplayBufferBacking
method call for all implementations, so that in the future
GraphicsContextGLOpenGL ANGLE variant can be renamed GraphicsContextGLANGLE
and still invoke that functionality.

No new tests, refactor.

  • platform/graphics/angle/GraphicsContextGLANGLE.cpp:

(WebCore::GraphicsContextGLOpenGL::reshapeFBOs):
(WebCore::GraphicsContextGLOpenGL::platformReleaseThreadResources): Deleted.

  • platform/graphics/cocoa/GraphicsContextGLCocoa.mm:

(WebCore::GraphicsContextGLOpenGL::bindDisplayBufferBacking):

  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:
  • platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp: Added.

(WebCore::GraphicsContextGLOpenGL::reshapeDisplayBufferBacking):
(WebCore::GraphicsContextGLOpenGL::platformReleaseThreadResources):

12:27 AM Changeset in webkit [286204] by commit-queue@webkit.org
  • 14 edits in trunk

[LBSE] Add runtime flag for Layer-based SVG engine (LBSE)
https://bugs.webkit.org/show_bug.cgi?id=233211
<rdar://problem/85711597>

Patch by Nikolas Zimmermann <nzimmermann@igalia.com> on 2021-11-29
Reviewed by Sam Weinig.

Add build option ('build-webkit --(no-)layer-based-svg-engine') and
runtime flag ('LayerBasedSVGEngineEnabled' in LBSE enabled builds) to
switch between the SVG engines.

The actual SVG code changes will follow in subsequent patches,
this just adds the infrastructure for LBSE.

.:

  • Source/cmake/OptionsFTW.cmake:
  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsMac.cmake:
  • Source/cmake/OptionsPlayStation.cmake:
  • Source/cmake/OptionsWPE.cmake:
  • Source/cmake/OptionsWin.cmake:
  • Source/cmake/WebKitFeatures.cmake:

Source/WTF:

  • Scripts/Preferences/WebPreferencesInternal.yaml: Add 'LayerBasedSVGEngineEnabled' option.
  • wtf/PlatformEnable.h: Disable LBSE by default. (Toggable with build settings in CMake-based builds)
  • wtf/PlatformEnableCocoa.h: Enable for PLATFORM(MAC).

Tools:

  • Scripts/webkitperl/FeatureList.pm: Add mapping from 'layer-based-svg-engine' -> 'ENABLE_LAYER_BASED_SVG_ENGINE'.

Nov 28, 2021:

10:08 PM Changeset in webkit [286203] by Said Abou-Hallawa
  • 21 edits
    1 add in trunk/Source/WebCore

[GPU Process] Apply the filter to an ImageBuffer through GraphicsContext and ImageBuffer
https://bugs.webkit.org/show_bug.cgi?id=232843

Reviewed by Cameron McCormack.

This step will allow sending the Filter to GPUProcess and applying it to
a remote ImageBuffer.

In this patch, managing the sourceImageBuffer of the CSSFilter is moved
to RenderLayerFilters. This is similar to what RenderSVGResourceFilter
does by maintaining the sourceImage for the SVGFilter.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSFilterImageValue.cpp:

(WebCore::CSSFilterImageValue::image):

  • platform/graphics/ConcreteImageBuffer.h:
  • platform/graphics/GraphicsContext.cpp:

(WebCore::GraphicsContext::drawFilteredImageBuffer):

  • platform/graphics/GraphicsContext.h:
  • platform/graphics/ImageBuffer.h:
  • platform/graphics/filters/Filter.cpp: Added.

(WebCore::Filter::Filter):
(WebCore::Filter::apply):

  • platform/graphics/filters/Filter.h:

(WebCore::Filter::renderingMode const):
(WebCore::Filter::setRenderingMode):
(WebCore::Filter::scaledByFilterScale const):
(WebCore::Filter::Filter): Deleted.

  • platform/graphics/filters/FilterImage.h:
  • platform/graphics/filters/software/FETileSoftwareApplier.cpp:
  • platform/graphics/filters/software/SourceAlphaSoftwareApplier.cpp:
  • platform/graphics/filters/software/SourceGraphicSoftwareApplier.cpp:
  • rendering/CSSFilter.cpp:

(WebCore::CSSFilter::apply):
(WebCore::CSSFilter::setSourceImageRect):
(WebCore::CSSFilter::inputContext): Deleted.
(WebCore::CSSFilter::allocateBackingStoreIfNeeded): Deleted.
(WebCore::CSSFilter::output): Deleted.
(WebCore::CSSFilter::outputRect): Deleted.

  • rendering/CSSFilter.h:
  • rendering/RenderLayerFilters.cpp:

(WebCore::RenderLayerFilters::inputContext):
(WebCore::RenderLayerFilters::allocateBackingStore):
(WebCore::RenderLayerFilters::beginFilterEffect):
(WebCore::RenderLayerFilters::applyFilterEffect):

  • rendering/RenderLayerFilters.h:
  • rendering/svg/RenderSVGResourceFilter.cpp:

(WebCore::RenderSVGResourceFilter::postApplyResource):

  • svg/graphics/filters/SVGFilter.cpp:

(WebCore::SVGFilter::apply):

  • svg/graphics/filters/SVGFilter.h:
9:11 PM Changeset in webkit [286202] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebKit

[WebGPU] Add WebKit DerivedSources to Xcode project
https://bugs.webkit.org/show_bug.cgi?id=233544

Reviewed by Simon Fraser.

This allows for things like searching from the UI to work.

No new tests because there is no behavior change.

  • WebKit.xcodeproj/project.pbxproj:
2:35 PM Changeset in webkit [286201] by commit-queue@webkit.org
  • 2 edits in trunk

Add mattwoodrow to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=233301

Patch by Matt Woodrow <matt.woodrow@gmail.com> on 2021-11-28
Reviewed by Cameron McCormack.

  • metadata/contributors.json:
2:24 PM Changeset in webkit [286200] by commit-queue@webkit.org
  • 6 edits in trunk

Serialize computed style of background shorthand with multiple layers correctly.
https://bugs.webkit.org/show_bug.cgi?id=111121

Patch by Matt Woodrow <matt.woodrow@gmail.com> on 2021-11-28
Reviewed by Cameron McCormack.

Source/WebCore:

New subtests added to getComputedStyle-background-shorthand

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::getBackgroundShorthandValue):

LayoutTests:

  • fast/css/getComputedStyle/getComputedStyle-background-shorthand-expected.txt:
  • fast/css/getComputedStyle/getComputedStyle-background-shorthand.html:
1:28 PM Changeset in webkit [286199] by mmaxfield@apple.com
  • 2 edits in trunk

[WebGPU] Add WebGPU to the "All Source" scheme in WebKit.xcworkspace
https://bugs.webkit.org/show_bug.cgi?id=233542

Reviewed by Dean Jackson.

This scheme should build WebGPU.

  • WebKit.xcworkspace/xcshareddata/xcschemes/All Source.xcscheme:
12:34 PM Changeset in webkit [286198] by sihui_liu@apple.com
  • 12 edits
    1 add in trunk/LayoutTests

Convert error to string before passing to testFailed() in FileSystemAccess layout tests
https://bugs.webkit.org/show_bug.cgi?id=233241

Reviewed by Youenn Fablet.

testFailed() in js-test.js expects string, but finishTest() may receive Error object as parameter.

  • storage/filesystemaccess/directory-handle-basics.html:
  • storage/filesystemaccess/directory-handle-iteration.html:
  • storage/filesystemaccess/file-handle-getfile.html:
  • storage/filesystemaccess/handle-move.html:
  • storage/filesystemaccess/resources/directory-handle-basics.js:

(getDirectory):
(finishTest): Deleted.

  • storage/filesystemaccess/resources/directory-handle-iteration.js:

(finishTest): Deleted.

  • storage/filesystemaccess/resources/file-handle-getfile.js:

(async read):
(async test):
(finishTest): Deleted.

  • storage/filesystemaccess/resources/handle-move.js:

(async test):
(finishTest): Deleted.

  • storage/filesystemaccess/resources/shared.js: Added. Move finishTest() function here so the code can be shared.

(finishTest):

  • storage/filesystemaccess/resources/sync-access-handle-basics.js:

(getDirectory):
(finishTest): Deleted.

  • storage/filesystemaccess/resources/sync-access-handle-close.js:

(finishTest): Deleted.

  • storage/filesystemaccess/resources/sync-access-handle-read-write.js:

(async test):
(finishTest): Deleted.

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

[WebGPU] Add derived sources to Xcode project
https://bugs.webkit.org/show_bug.cgi?id=233533

Reviewed by Simon Fraser.

This allows for things like searching within Xcode to work.

No new tests because there is no behavior change.

  • WebCore.xcodeproj/project.pbxproj:
10:55 AM Changeset in webkit [286196] by weinig@apple.com
  • 8 edits
    2 adds in trunk

[CSS Color 5] Update color-mix() to latest spec (again)
https://bugs.webkit.org/show_bug.cgi?id=233527

Reviewed by Dean Jackson.

Source/WebCore:

Updates color-mix() implementation with support for hue interpolation methods and
addresses various other spec changes (detailed below).

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

Add ColorInterpolation.h/cpp

  • css/CSSValueKeywords.in:

Add keywords need for the <color-space-interpolation> production. Separated out
from color-mix as these will be used for other CSS properties as well.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::consumeHueInterpolationMethod):
(WebCore::CSSPropertyParserHelpers::consumeColorInterpolationMethod):
(WebCore::CSSPropertyParserHelpers::consumeColorMixComponent):
(WebCore::CSSPropertyParserHelpers::normalizedMixPercentages):
(WebCore::CSSPropertyParserHelpers::makeColorTypeByNormalizingComponentsAfterMix<HWBA<float>>):
(WebCore::CSSPropertyParserHelpers::makeColorTypeByNormalizingComponentsAfterMix<HSLA<float>>):
(WebCore::CSSPropertyParserHelpers::makeColorTypeByNormalizingComponentsAfterMix<LCHA<float>>):
(WebCore::CSSPropertyParserHelpers::makeColorTypeByNormalizingComponentsAfterMix<OKLCHA<float>>):
(WebCore::CSSPropertyParserHelpers::mixColorComponentsUsingColorInterpolationMethod):
(WebCore::CSSPropertyParserHelpers::mixColorComponents):
(WebCore::CSSPropertyParserHelpers::parseColorMixFunctionParameters):
(WebCore::CSSPropertyParserHelpers::consumeColorMixColorSpaceAndComma): Deleted.
(WebCore::CSSPropertyParserHelpers::fixupHueComponentsPriorToMix): Deleted.
(WebCore::CSSPropertyParserHelpers::mixColorComponentsInColorSpace): Deleted.
Rework color-mix to support the hue interpolation method specification for polor color spaces
like lch, oklch, hsl and hwb. Also update implementation to match the current spec by restricting
mix percentages to between 0 and 100 and applying alpha multiplier when the mix percentages add
up to less than 100.

  • platform/graphics/ColorInterpolation.cpp: Added.
  • platform/graphics/ColorInterpolation.h: Added.

Add structures to represent color interpolation methods including optional hue
interpolation parameters for color spaces that require it and provides prenormalization
that fixes up hue angles depending on the method selected. Over time, more aspects of
interpolation should be moved here as we figure out what can be shared.

LayoutTests:

  • fast/css/parsing-color-mix-expected.txt:
  • fast/css/parsing-color-mix.html:

Update tests to include testing of hue interpolation methods, new
restrictions on percentage ranges and the new alpha multiplier.

10:32 AM Changeset in webkit [286195] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Visual ordering may require multiple display box instances for a single inline box
https://bugs.webkit.org/show_bug.cgi?id=233538

Reviewed by Antti Koivisto.

This patch implements the multiple display box setup for cases when the visually re-ordered content escapes
the logical inline box boundaries.

a<span>bg</span>f<span>ec</span>d -> "abgfecd"

Introduce RTL/LTR overrides:

a<span>b&#8238;g</span>f<span>e&#8237;c</span>d -> "abcdefg"

current direction: left-to-right.
take: 'a'
take: 'b'
take: RTL override (current direction: right-to-left, ie jump to the right end of the override content unless there's a nested override)
take: (nested)LTR override (current direction: left-to-right, ie jump to the left end of the override content)
take: 'c'
take: 'd' (end of nested LTR override)
take: 'e' (in RTL direction)
take: 'f'
take: 'g'

By jumping between these bidi runs, we may end up going back and forth between various inline boxes.
Each time we "leave" an inline box (e.g. going from 'b' to 'c'), we need to close the current inline box(es)
and "open" new one(s) for the content.
This patch implements the jumping logic but it does not yet compute geometry for each of these fragmented inline boxes.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::appendInlineBoxDisplayBox):
(WebCore::Layout::InlineDisplayContentBuilder::appendSpanningInlineBoxDisplayBox):
(WebCore::Layout::InlineDisplayContentBuilder::appendInlineBoxDisplayBoxForBidiBoundary):
(WebCore::Layout::InlineDisplayContentBuilder::adjustInlineBoxDisplayBoxForBidiBoundary):
(WebCore::Layout::InlineDisplayContentBuilder::processNonBidiContent): "Open" and "close" inline boxes based on the content
and not based on the [inline box start]/[inline box end] runs (ie content where logical order == visual order can use those explicit markers to
construct the associated display boxes but with re-ordering we need to rely on the content itself)

(WebCore::Layout::InlineDisplayContentBuilder::processBidiContent):

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.h:
10:19 AM Changeset in webkit [286194] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

Weird JS usage in webrtc/multi-video.html
https://bugs.webkit.org/show_bug.cgi?id=233540

Patch by Philippe Normand <pnormand@igalia.com> on 2021-11-28
Reviewed by Youenn Fablet.

  • webrtc/multi-video.html: MediaStream.getVideoTracks() accepts no argument and returns a

sequence. The MediaStream constructor needs a sequence of tracks.

Nov 27, 2021:

8:28 PM Changeset in webkit [286193] by Said Abou-Hallawa
  • 22 edits
    7 adds
    4 deletes in trunk/Source/WebCore

[GPU Process] Implement FilterEffect CoreImage appliers
https://bugs.webkit.org/show_bug.cgi?id=232831

Reviewed by Cameron McCormack.

This will allow applying the CoreImage filters through FilterEffect::apply().
It will also allow passing FilterImages to the FilterEffect CoreImage
appliers. This will require adding a CIImage as a possible result to
FilterImage.

If the CoreImage filters are enabled, the Filter will check if all the
FilterEffects supports CoreImage rendering. And if one if them does not
support it, the renderingMode will be switched to Unaccelerated.

  • Sources.txt:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/coreimage/FEColorMatrixCoreImageApplier.h: Copied from Source/WebCore/platform/graphics/filters/FilterEffectRenderer.cpp.
  • platform/graphics/coreimage/FEColorMatrixCoreImageApplier.mm: Added.

(WebCore::FEColorMatrixCoreImageApplier::FEColorMatrixCoreImageApplier):
(WebCore::FEColorMatrixCoreImageApplier::supportsCoreImageRendering):
(WebCore::FEColorMatrixCoreImageApplier::apply const):

  • platform/graphics/coreimage/FEComponentTransferCoreImageApplier.h: Renamed from Source/WebCore/platform/graphics/filters/FilterEffectRenderer.h.
  • platform/graphics/coreimage/FEComponentTransferCoreImageApplier.mm: Added.

(WebCore::FEComponentTransferCoreImageApplier::FEComponentTransferCoreImageApplier):
(WebCore::FEComponentTransferCoreImageApplier::supportsCoreImageRendering):
(WebCore::FEComponentTransferCoreImageApplier::apply const):

  • platform/graphics/coreimage/FilterEffectRendererCoreImage.h: Removed.
  • platform/graphics/coreimage/FilterEffectRendererCoreImage.mm: Removed.
  • platform/graphics/coreimage/FilterImageCoreImage.mm: Added.

(WebCore::sharedCIContext):
(WebCore::FilterImage::setCIImage):
(WebCore::FilterImage::imageBufferFromCIImage):

  • platform/graphics/coreimage/SourceGraphicCoreImageApplier.h: Copied from Source/WebCore/platform/graphics/filters/FilterEffectRenderer.cpp.
  • platform/graphics/coreimage/SourceGraphicCoreImageApplier.mm: Renamed from Source/WebCore/platform/graphics/filters/FilterEffectRenderer.cpp.

(WebCore::SourceGraphicCoreImageApplier::apply const):

  • platform/graphics/cv/CVUtilities.mm:
  • platform/graphics/filters/FEColorMatrix.cpp:

(WebCore::FEColorMatrix::supportsCoreImageRendering const):
(WebCore::FEColorMatrix::createApplier const):

  • platform/graphics/filters/FEColorMatrix.h:
  • platform/graphics/filters/FEComponentTransfer.cpp:

(WebCore::FEComponentTransfer::supportsCoreImageRendering const):
(WebCore::FEComponentTransfer::createApplier const):

  • platform/graphics/filters/FEComponentTransfer.h:
  • platform/graphics/filters/Filter.h:

(WebCore::Filter::Filter):
(): Deleted.

  • platform/graphics/filters/FilterFunction.h:

(WebCore::FilterFunction::supportsCoreImageRendering const):

  • platform/graphics/filters/FilterImage.cpp:

(WebCore::FilterImage::imageBuffer):
(WebCore::FilterImage::imageBufferFromPixelBuffer):

  • platform/graphics/filters/FilterImage.h:

(WebCore::FilterImage::ciImage const):

  • platform/graphics/filters/SourceGraphic.cpp:

(WebCore::SourceGraphic::createApplier const):

  • platform/graphics/filters/SourceGraphic.h:
  • platform/mac/ScrollingEffectsController.mm:
  • rendering/CSSFilter.cpp:

(WebCore::CSSFilter::create):
(WebCore::CSSFilter::CSSFilter):
(WebCore::createSVGFilter):
(WebCore::CSSFilter::buildFilterFunctions):
(WebCore::CSSFilter::allocateBackingStoreIfNeeded):
(WebCore::CSSFilter::supportsCoreImageRendering const):
(WebCore::CSSFilter::apply):
(WebCore::CSSFilter::output):
(WebCore::CSSFilter::outputRect):

  • rendering/CSSFilter.h:
  • rendering/svg/RenderSVGResourceFilter.cpp:

(WebCore::RenderSVGResourceFilter::applyResource):

  • rendering/svg/SVGRenderTreeAsText.cpp:

(WebCore::writeSVGResourceContainer):

  • svg/graphics/filters/SVGFilter.cpp:

(WebCore::SVGFilter::create):
(WebCore::SVGFilter::SVGFilter):
(WebCore::SVGFilter::supportsCoreImageRendering const):

  • svg/graphics/filters/SVGFilter.h:
7:43 PM Changeset in webkit [286192] by ysuzuki@apple.com
  • 2 edits in trunk

Unreviewed, update atomics detection to make libpas built on Linux

  • Source/cmake/WebKitCompilerFlags.cmake:
12:54 PM Changeset in webkit [286191] by weinig@apple.com
  • 22 edits
    32 adds in trunk

[CSS Color 4] Add support for oklab() and oklch() colors
https://bugs.webkit.org/show_bug.cgi?id=233507

Reviewed by Cameron McCormack.

LayoutTests/imported/w3c:

Add new tests for oklab() and oklch() based on the existing lab()
and lch() tests.

  • web-platform-tests/css/css-color/oklab-001-expected.html: Added.
  • web-platform-tests/css/css-color/oklab-001.html: Added.
  • web-platform-tests/css/css-color/oklab-002-expected.html: Added.
  • web-platform-tests/css/css-color/oklab-002.html: Added.
  • web-platform-tests/css/css-color/oklab-003-expected.html: Added.
  • web-platform-tests/css/css-color/oklab-003.html: Added.
  • web-platform-tests/css/css-color/oklab-004-expected.html: Added.
  • web-platform-tests/css/css-color/oklab-004.html: Added.
  • web-platform-tests/css/css-color/oklab-005-expected.html: Added.
  • web-platform-tests/css/css-color/oklab-005.html: Added.
  • web-platform-tests/css/css-color/oklab-006-expected.html: Added.
  • web-platform-tests/css/css-color/oklab-006.html: Added.
  • web-platform-tests/css/css-color/oklab-007-expected.html: Added.
  • web-platform-tests/css/css-color/oklab-007.html: Added.
  • web-platform-tests/css/css-color/oklab-008-expected.html: Added.
  • web-platform-tests/css/css-color/oklab-008.html: Added.
  • web-platform-tests/css/css-color/oklch-001-expected.html: Added.
  • web-platform-tests/css/css-color/oklch-001.html: Added.
  • web-platform-tests/css/css-color/oklch-002-expected.html: Added.
  • web-platform-tests/css/css-color/oklch-002.html: Added.
  • web-platform-tests/css/css-color/oklch-003-expected.html: Added.
  • web-platform-tests/css/css-color/oklch-003.html: Added.
  • web-platform-tests/css/css-color/oklch-004-expected.html: Added.
  • web-platform-tests/css/css-color/oklch-004.html: Added.
  • web-platform-tests/css/css-color/oklch-005-expected.html: Added.
  • web-platform-tests/css/css-color/oklch-005.html: Added.
  • web-platform-tests/css/css-color/oklch-006-expected.html: Added.
  • web-platform-tests/css/css-color/oklch-006.html: Added.
  • web-platform-tests/css/css-color/oklch-007-expected.html: Added.
  • web-platform-tests/css/css-color/oklch-007.html: Added.
  • web-platform-tests/css/css-color/oklch-008-expected.html: Added.
  • web-platform-tests/css/css-color/oklch-008.html: Added.

Source/WebCore:

Tests: imported/w3c/web-platform-tests/css/css-color/oklab-001.html

imported/w3c/web-platform-tests/css/css-color/oklab-002.html
imported/w3c/web-platform-tests/css/css-color/oklab-003.html
imported/w3c/web-platform-tests/css/css-color/oklab-004.html
imported/w3c/web-platform-tests/css/css-color/oklab-005.html
imported/w3c/web-platform-tests/css/css-color/oklab-006.html
imported/w3c/web-platform-tests/css/css-color/oklab-007.html
imported/w3c/web-platform-tests/css/css-color/oklab-008.html
imported/w3c/web-platform-tests/css/css-color/oklch-001.html
imported/w3c/web-platform-tests/css/css-color/oklch-002.html
imported/w3c/web-platform-tests/css/css-color/oklch-003.html
imported/w3c/web-platform-tests/css/css-color/oklch-004.html
imported/w3c/web-platform-tests/css/css-color/oklch-005.html
imported/w3c/web-platform-tests/css/css-color/oklch-006.html
imported/w3c/web-platform-tests/css/css-color/oklch-007.html
imported/w3c/web-platform-tests/css/css-color/oklch-008.html

Adds support for oklab() and oklch() CSS colors and as interpolation
parameters for color-mix().

OKLab (and its polar form OKLCH) is a relatively new Lab-like colorspace that aims
to be an improved (improved hue linearity, hue uniformity, and chroma uniformity)
Lab. It was create by Björn Ottosson and is documented at https://bottosson.github.io/posts/oklab/.

  • css/CSSValueKeywords.in:

Add 'oklab' and 'oklch' to the keyword list so they can be used as function
identifiers. Remove old mention of 'lab' in the color() function section,
since 'lab' is no longer a valid colorspace to use in the color() function
(rather, only lab() is supported).

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::parseLabParameters):
(WebCore::CSSPropertyParserHelpers::parseRelativeLabParameters):
(WebCore::CSSPropertyParserHelpers::parseNonRelativeLabParameters):
(WebCore::CSSPropertyParserHelpers::parseLCHParameters):
(WebCore::CSSPropertyParserHelpers::parseRelativeLCHParameters):
(WebCore::CSSPropertyParserHelpers::parseNonRelativeLCHParameters):
(WebCore::CSSPropertyParserHelpers::parseColorFunction):
Generalize lab and lch function parsing to also support the oklab and
oklch variants (they have the same parsing rules).

(WebCore::CSSPropertyParserHelpers::consumeColorMixColorSpaceAndComma):
(WebCore::CSSPropertyParserHelpers::mixColorComponents):
Add support for using oklab and oklch as the interpolation space of a color-mix().
This was already generalized so all it meant doing was adding mappings of the
new identifiers to enums and mixColorComponentsInColorSpace calls.

  • platform/graphics/ColorComponents.h:

(WebCore::ColorComponents::subset const):
Fix compile error (no one had used subset yet it seems). 'std::remove_const_t<decltype(T::Size)>'
was likely copied from mapColorComponents() where it is templatized and needs to deduce the loop
variable, but that is not needed here.

  • platform/graphics/ColorConversion.cpp:

(WebCore::convertToPolarForm):
(WebCore::convertToRectangularForm):
Move conversion to/from polar/rectangular forms from the LCHA conversion
code here, so that it can be reused for OKLCHA.

(WebCore::OKLab<float>>::convert):
Add support for converting OKLab to/from XYZ D65. Matrix values come from https://bottosson.github.io/posts/oklab/
with updates from https://github.com/w3c/csswg-drafts/issues/6642#issuecomment-943521484

(WebCore::OKLCHA<float>>::convert):
Add support for converting OKLCHA. This is identical to the LCHA code above.

(WebCore::converColorComponents):
Add cases for new colorspaces.

  • platform/graphics/ColorConversion.h:

Add converters for new colorspaces. Update diagram with them as well.

  • platform/graphics/ColorMatrix.h:

(WebCore::ColorMatrix::transformedColorComponents const):
Generalize transformedColorComponents to work with any size ColorComponents object. This allows
the OKLab conversion code to be a bit simpler as it can operate on just the non-alpha components
in a more systematic way.

  • platform/graphics/ColorModels.h:

Add new predicate template variables to help when needing to check what model a particular
color type uses.

  • platform/graphics/ColorSerialization.cpp:

(WebCore::serialization):
(WebCore::serializationForCSS):
(WebCore::serializationForHTML):
(WebCore::serializationForRenderTreeAsText):
Add serialization support for new colorspaces. Also removes unused support for serializing lab
colors using the color(lab ...) syntax which has not been supported for some time.

  • platform/graphics/ColorSpace.cpp:
  • platform/graphics/ColorSpace.h:
  • platform/graphics/cg/ColorSpaceCG.h:

Add OKLab and OKLCH to the list of enumerated colorspaces and add mappings to their
newly defined types OKLab<T> and OKLCHA<T>.

  • platform/graphics/ColorTypes.h:

(WebCore::OKLab::OKLab):
(WebCore::OKLCHA::OKLCHA):
Add new types OKLab<T> and OKLCHA<T> (it looks like at some point an earlier version of this
must have partially landed as there were existing forward declarations). Like Lab<T> and LCHA<T>,
these new types use the LabModel<T> and LCHModel<T> models, but unlike them they use a whitepoint
of D65.

  • platform/graphics/ColorUtilities.h:

Generalize isBlack and isWhite to have a variant that works with Lab, LCH, OKLab and OKLCH (as they
all are identical) using SFINAE, use the new model predicates to make this more clear.

LayoutTests:

Update existing tests for lab() and lch() to also test oklab() and oklch().
As they have the same parsing rules, this is mostly done by templatizing
the tests and running them in a loop.

  • fast/css/parsing-color-mix-expected.txt:
  • fast/css/parsing-color-mix.html:
  • fast/css/parsing-lab-colors-expected.txt:
  • fast/css/parsing-lab-colors.html:
  • fast/css/parsing-relative-color-syntax-expected.txt:
  • fast/css/parsing-relative-color-syntax.html:
9:52 AM Changeset in webkit [286190] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Decouple display box construction for bidi and non-bidi content
https://bugs.webkit.org/show_bug.cgi?id=233531

Reviewed by Antti Koivisto.

Having a common display box creation codepath for both bidi and non-bidi content worked out well this far
but the upcoming inline box visual ordering will certainly make the common codepath unnecessarily confusing
for the non-bidi case.
In this patch the newly introduced append* functions manage the display box creation and
their callers (processNonBidiContent/processBidiContent) deal with the visual ordering details.
It means that the non-bidi codepath simply loops through the line runs and calls the append* functions,
while the bidi codepath keeps track of the visual ordering and calls the append* functions accordingly.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::build):
(WebCore::Layout::InlineDisplayContentBuilder::appendTextDisplayBox):
(WebCore::Layout::InlineDisplayContentBuilder::appendSoftLineBreakDisplayBox):
(WebCore::Layout::InlineDisplayContentBuilder::appendHardLineBreakDisplayBox):
(WebCore::Layout::InlineDisplayContentBuilder::appendAtomicInlineLevelDisplayBox):
(WebCore::Layout::InlineDisplayContentBuilder::appendInlineBoxDisplayBox):
(WebCore::Layout::InlineDisplayContentBuilder::appendSpanningInlineBoxDisplayBox):
(WebCore::Layout::InlineDisplayContentBuilder::processNonBidiContent):
(WebCore::Layout::InlineDisplayContentBuilder::processBidiContent):
(WebCore::Layout::InlineDisplayContentBuilder::processOverflownRunsForEllipsis):
(WebCore::Layout::InlineDisplayContentBuilder::createBoxesAndUpdateGeometryForLineContent): Deleted.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.h:
8:41 AM Changeset in webkit [286189] by Carlos Garcia Campos
  • 5 edits in trunk

[GTK][a11y] Signal state-changed:selected is not emitted for listbox elements when building with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=233521

Reviewed by Adrian Perez de Castro.

Source/WebCore:

Post a selected change notification for option elements when the state changes.

  • accessibility/atspi/AXObjectCacheAtspi.cpp:

(WebCore::AXObjectCache::postPlatformNotification):

  • html/HTMLOptionElement.cpp:

(WebCore::HTMLOptionElement::setSelectedState):

Tools:

Add test cases to check that the signal is now emitted as expected.

  • TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:

(AccessibilityTest::isSelected):
(testAccessibleStateChanged):
(testSelectionListBox):
(testSelectionMenuList):

1:44 AM Changeset in webkit [286188] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

[:has() pseudo-class] Invalidation support for adding and removing elements
https://bugs.webkit.org/show_bug.cgi?id=233489
<rdar://problem/85754298>

Unreviewed followup.

Some unitialized bits caused us to do unnecessary work and regressed Speedometer.

  • style/RuleFeature.h:

Initialize the usedMatchElements array.

Nov 26, 2021:

6:43 PM Changeset in webkit [286187] by weinig@apple.com
  • 4 edits in trunk/Source/WebCore

Typo in ColorConversion code: converColorComponents
https://bugs.webkit.org/show_bug.cgi?id=233497

Reviewed by Ryosuke Niwa.

Fix typo in ColorConversion code. converColorComponents -> convertColorComponents

  • platform/graphics/Color.cpp:

(WebCore::Color::toColorComponentsInColorSpace const):

  • platform/graphics/ColorConversion.cpp:

(WebCore::convertColorComponents):
(WebCore::converColorComponents): Deleted.

  • platform/graphics/ColorConversion.h:
3:51 PM Changeset in webkit [286186] by Said Abou-Hallawa
  • 74 edits in trunk/Source/WebCore

[GPU Process] Make FilterEffects create FilterEffectAppliers which will be used by FilterEffect::apply()
https://bugs.webkit.org/show_bug.cgi?id=233516

Reviewed by Cameron McCormack.

This step is required to allow integrating CoreImage FilterEffect appliers
in FilterEffect::apply(). Currently applying CoreImage FilterEffect has
to go to a different code path in FilterEffectRendererCoreImage.

  • platform/graphics/filters/FEBlend.cpp:

(WebCore::FEBlend::createApplier const):
(WebCore::FEBlend::platformApplySoftware): Deleted.

  • platform/graphics/filters/FEBlend.h:
  • platform/graphics/filters/FEColorMatrix.cpp:

(WebCore::FEColorMatrix::createApplier const):
(WebCore::FEColorMatrix::platformApplySoftware): Deleted.

  • platform/graphics/filters/FEColorMatrix.h:
  • platform/graphics/filters/FEComponentTransfer.cpp:

(WebCore::FEComponentTransfer::createApplier const):
(WebCore::FEComponentTransfer::platformApplySoftware): Deleted.

  • platform/graphics/filters/FEComponentTransfer.h:
  • platform/graphics/filters/FEComposite.cpp:

(WebCore::FEComposite::createApplier const):
(WebCore::FEComposite::platformApplySoftware): Deleted.

  • platform/graphics/filters/FEComposite.h:
  • platform/graphics/filters/FEConvolveMatrix.cpp:

(WebCore::FEConvolveMatrix::createApplier const):
(WebCore::FEConvolveMatrix::platformApplySoftware): Deleted.

  • platform/graphics/filters/FEConvolveMatrix.h:
  • platform/graphics/filters/FEDisplacementMap.cpp:

(WebCore::FEDisplacementMap::createApplier const):
(WebCore::FEDisplacementMap::platformApplySoftware): Deleted.

  • platform/graphics/filters/FEDisplacementMap.h:
  • platform/graphics/filters/FEDropShadow.cpp:

(WebCore::FEDropShadow::createApplier const):
(WebCore::FEDropShadow::platformApplySoftware): Deleted.

  • platform/graphics/filters/FEDropShadow.h:
  • platform/graphics/filters/FEFlood.cpp:

(WebCore::FEFlood::createApplier const):
(WebCore::FEFlood::platformApplySoftware): Deleted.

  • platform/graphics/filters/FEFlood.h:
  • platform/graphics/filters/FEGaussianBlur.cpp:

(WebCore::FEGaussianBlur::createApplier const):
(WebCore::FEGaussianBlur::platformApplySoftware): Deleted.

  • platform/graphics/filters/FEGaussianBlur.h:
  • platform/graphics/filters/FELighting.cpp:

(WebCore::FELighting::createApplier const):
(WebCore::FELighting::platformApplySoftware): Deleted.

  • platform/graphics/filters/FELighting.h:
  • platform/graphics/filters/FEMerge.cpp:

(WebCore::FEMerge::createApplier const):
(WebCore::FEMerge::platformApplySoftware): Deleted.

  • platform/graphics/filters/FEMerge.h:
  • platform/graphics/filters/FEMorphology.cpp:

(WebCore::FEMorphology::createApplier const):
(WebCore::FEMorphology::platformApplySoftware): Deleted.

  • platform/graphics/filters/FEMorphology.h:
  • platform/graphics/filters/FEOffset.cpp:

(WebCore::FEOffset::createApplier const):
(WebCore::FEOffset::platformApplySoftware): Deleted.

  • platform/graphics/filters/FEOffset.h:
  • platform/graphics/filters/FETile.cpp:

(WebCore::FETile::createApplier const):
(WebCore::FETile::platformApplySoftware): Deleted.

  • platform/graphics/filters/FETile.h:
  • platform/graphics/filters/FETurbulence.cpp:

(WebCore::FETurbulence::createApplier const):
(WebCore::FETurbulence::platformApplySoftware): Deleted.

  • platform/graphics/filters/FETurbulence.h:
  • platform/graphics/filters/FilterEffect.cpp:

(WebCore::FilterEffect::apply):

  • platform/graphics/filters/FilterEffect.h:
  • platform/graphics/filters/FilterEffectApplier.h:

(WebCore::FilterEffectApplier::create):
(WebCore::FilterEffectConcreteApplier::FilterEffectConcreteApplier):

  • platform/graphics/filters/SourceAlpha.cpp:

(WebCore::SourceAlpha::createApplier const):
(WebCore::SourceAlpha::platformApplySoftware): Deleted.

  • platform/graphics/filters/SourceAlpha.h:
  • platform/graphics/filters/SourceGraphic.cpp:

(WebCore::SourceGraphic::createApplier const):
(WebCore::SourceGraphic::platformApplySoftware): Deleted.

  • platform/graphics/filters/SourceGraphic.h:
  • platform/graphics/filters/software/FEBlendSoftwareApplier.cpp:

(WebCore::FEBlendSoftwareApplier::apply const):
(WebCore::FEBlendSoftwareApplier::apply): Deleted.

  • platform/graphics/filters/software/FEBlendSoftwareApplier.h:
  • platform/graphics/filters/software/FEColorMatrixSoftwareApplier.cpp:

(WebCore::FEColorMatrixSoftwareApplier::FEColorMatrixSoftwareApplier):
(WebCore::FEColorMatrixSoftwareApplier::apply const):
(WebCore::FEColorMatrixSoftwareApplier::apply): Deleted.

  • platform/graphics/filters/software/FEColorMatrixSoftwareApplier.h:
  • platform/graphics/filters/software/FEComponentTransferSoftwareApplier.cpp:

(WebCore::FEComponentTransferSoftwareApplier::apply const):
(WebCore::FEComponentTransferSoftwareApplier::apply): Deleted.

  • platform/graphics/filters/software/FEComponentTransferSoftwareApplier.h:
  • platform/graphics/filters/software/FECompositeSoftwareApplier.cpp:

(WebCore::FECompositeSoftwareApplier::applyArithmetic const):
(WebCore::FECompositeSoftwareApplier::applyNonArithmetic const):
(WebCore::FECompositeSoftwareApplier::apply const):
(WebCore::FECompositeSoftwareApplier::applyArithmetic): Deleted.
(WebCore::FECompositeSoftwareApplier::applyNonArithmetic): Deleted.
(WebCore::FECompositeSoftwareApplier::apply): Deleted.

  • platform/graphics/filters/software/FECompositeSoftwareApplier.h:
  • platform/graphics/filters/software/FEConvolveMatrixSoftwareApplier.cpp:

(WebCore::FEConvolveMatrixSoftwareApplier::apply const):
(WebCore::FEConvolveMatrixSoftwareApplier::apply): Deleted.

  • platform/graphics/filters/software/FEConvolveMatrixSoftwareApplier.h:
  • platform/graphics/filters/software/FEDisplacementMapSoftwareApplier.cpp:

(WebCore::FEDisplacementMapSoftwareApplier::FEDisplacementMapSoftwareApplier):
(WebCore::FEDisplacementMapSoftwareApplier::apply const):
(WebCore::FEDisplacementMapSoftwareApplier::apply): Deleted.

  • platform/graphics/filters/software/FEDisplacementMapSoftwareApplier.h:
  • platform/graphics/filters/software/FEDropShadowSoftwareApplier.cpp:

(WebCore::FEDropShadowSoftwareApplier::apply const):
(WebCore::FEDropShadowSoftwareApplier::apply): Deleted.

  • platform/graphics/filters/software/FEDropShadowSoftwareApplier.h:
  • platform/graphics/filters/software/FEFloodSoftwareApplier.cpp:

(WebCore::FEFloodSoftwareApplier::apply const):
(WebCore::FEFloodSoftwareApplier::apply): Deleted.

  • platform/graphics/filters/software/FEFloodSoftwareApplier.h:
  • platform/graphics/filters/software/FEGaussianBlurSoftwareApplier.cpp:

(WebCore::FEGaussianBlurSoftwareApplier::apply const):
(WebCore::FEGaussianBlurSoftwareApplier::apply): Deleted.

  • platform/graphics/filters/software/FEGaussianBlurSoftwareApplier.h:
  • platform/graphics/filters/software/FELightingSoftwareApplier.cpp:

(WebCore::FELightingSoftwareApplier::apply const):
(WebCore::FELightingSoftwareApplier::apply): Deleted.

  • platform/graphics/filters/software/FELightingSoftwareApplier.h:
  • platform/graphics/filters/software/FEMergeSoftwareApplier.cpp:

(WebCore::FEMergeSoftwareApplier::apply const):
(WebCore::FEMergeSoftwareApplier::apply): Deleted.

  • platform/graphics/filters/software/FEMergeSoftwareApplier.h:
  • platform/graphics/filters/software/FEMorphologySoftwareApplier.cpp:

(WebCore::FEMorphologySoftwareApplier::apply const):
(WebCore::FEMorphologySoftwareApplier::apply): Deleted.

  • platform/graphics/filters/software/FEMorphologySoftwareApplier.h:
  • platform/graphics/filters/software/FEOffsetSoftwareApplier.cpp:

(WebCore::FEOffsetSoftwareApplier::apply const):
(WebCore::FEOffsetSoftwareApplier::apply): Deleted.

  • platform/graphics/filters/software/FEOffsetSoftwareApplier.h:
  • platform/graphics/filters/software/FETileSoftwareApplier.cpp:

(WebCore::FETileSoftwareApplier::apply const):
(WebCore::FETileSoftwareApplier::apply): Deleted.

  • platform/graphics/filters/software/FETileSoftwareApplier.h:
  • platform/graphics/filters/software/FETurbulenceSoftwareApplier.cpp:

(WebCore::FETurbulenceSoftwareApplier::apply const):
(WebCore::FETurbulenceSoftwareApplier::apply): Deleted.

  • platform/graphics/filters/software/FETurbulenceSoftwareApplier.h:
  • platform/graphics/filters/software/SourceAlphaSoftwareApplier.cpp:

(WebCore::SourceAlphaSoftwareApplier::apply const):
(WebCore::SourceAlphaSoftwareApplier::apply): Deleted.

  • platform/graphics/filters/software/SourceAlphaSoftwareApplier.h:
  • platform/graphics/filters/software/SourceGraphicSoftwareApplier.cpp:

(WebCore::SourceGraphicSoftwareApplier::apply const):
(WebCore::SourceGraphicSoftwareApplier::apply): Deleted.

  • platform/graphics/filters/software/SourceGraphicSoftwareApplier.h:
  • svg/graphics/filters/SVGFEImage.cpp:

(WebCore::FEImageSoftwareApplier::apply const):
(WebCore::FEImage::createApplier const):
(WebCore::FEImageSoftwareApplier::apply): Deleted.
(WebCore::FEImage::platformApplySoftware): Deleted.

  • svg/graphics/filters/SVGFEImage.h:
2:19 PM Changeset in webkit [286185] by Lauro Moura
  • 2 edits in trunk/Tools

[GTK] Gardening API test WebKit.OnDeviceChangedCrash as flaky timeout

Unreviewed test gardening.

Flakiness seems to have been introduced between 243131@main and
243249@main.

  • TestWebKitAPI/glib/TestExpectations.json:
2:10 PM Changeset in webkit [286184] by Adrian Perez de Castro
  • 1 copy in releases/WPE WebKit/webkit-2.35.1

WPE WebKit 2.35.1

2:09 PM Changeset in webkit [286183] by Adrian Perez de Castro
  • 4 edits in trunk

Unreviewed. Update OptionsWPE.cmake and NEWS for the 2.35.1 release

.:

  • Source/cmake/OptionsWPE.cmake: Bump version numbers.

Source/WebKit:

  • wpe/NEWS: Add release notes for 2.35.1.
1:45 PM Changeset in webkit [286182] by Adrian Perez de Castro
  • 2 edits in trunk/Source/WebCore

Unreviewed non-unified build fix.

No new tests needed.

  • css/SelectorChecker.cpp: Add missin StyleRule.h header inclusion.
11:36 AM Changeset in webkit [286181] by ntim@apple.com
  • 1 edit
    1 delete in trunk/LayoutTests

Remove focus-after-close-expected.txt for glib as it is identical as the cross-platform file

Unreviewed test gardening

  • platform/glib/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/focus-after-close-expected.txt: Removed.
7:13 AM Changeset in webkit [286180] by Antti Koivisto
  • 5 edits in trunk/Source/WebCore

[:has() pseudo-class] Don't traverse descendants during selector matching unless needed
https://bugs.webkit.org/show_bug.cgi?id=233520

Reviewed by Alan Bujtas.

It is sufficient to traverse direct children to match something like :has(> foo).

  • css/SelectorChecker.cpp:

(WebCore::SelectorChecker::checkOne const):
(WebCore::SelectorChecker::matchHasPseudoClass const):

Factor into a function.
Compute the match element for the :has() argument and use it to choose what to traverse.

  • css/SelectorChecker.h:
  • style/RuleFeature.cpp:

(WebCore::Style::computeNextMatchElement):
(WebCore::Style::computeHasPseudoClassMatchElement):
(WebCore::Style::computeSubSelectorMatchElement):

Make these free-standing functions and expose computeHasPseudoClassMatchElement.

(WebCore::Style::RuleFeatureSet::computeNextMatchElement): Deleted.
(WebCore::Style::RuleFeatureSet::computeSubSelectorMatchElement): Deleted.

  • style/RuleFeature.h:
7:01 AM Changeset in webkit [286179] by Antti Koivisto
  • 3 edits
    2 adds in trunk

REGRESSION(r286112): Style invalidation for text mutation happening after event dispatch
https://bugs.webkit.org/show_bug.cgi?id=233501
<rdar://problem/85754810>

Reviewed by Alan Bujtas.

Source/WebCore:

Test: fast/events/mutation-in-DOMCharacterDataModified.html

  • dom/CharacterData.cpp:

(WebCore::CharacterData::setDataAndUpdate):

Scope ChildChangeInvalidation more narrowly.

LayoutTests:

  • fast/events/mutation-in-DOMCharacterDataModified-expected.txt: Added.
  • fast/events/mutation-in-DOMCharacterDataModified.html: Added.
6:42 AM Changeset in webkit [286178] by Alan Bujtas
  • 8 edits in trunk/Source/WebCore

[LFC][IFC] Generate ellipsis boxes for tex-overflow: ellipsis
https://bugs.webkit.org/show_bug.cgi?id=233508

Reviewed by Antti Koivisto.

  1. Check for overflowing inline content
  2. Truncate runs to make room for the ellipsis content

(https://drafts.csswg.org/css-overflow/#text-overflow)

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::build):
(WebCore::Layout::InlineDisplayContentBuilder::processOverflownRunsForEllipsis):

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.h:
  • layout/formattingContexts/inline/InlineFormattingContext.cpp:

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

  • layout/formattingContexts/inline/InlineRect.h:

(WebCore::Layout::InlineRect::setRight):

  • layout/formattingContexts/inline/display/InlineDisplayBox.h:

(WebCore::InlineDisplay::Box::isEllipsis const):
(WebCore::InlineDisplay::Box::moveHorizontally):
(WebCore::InlineDisplay::Box::truncate):

  • layout/formattingContexts/inline/text/TextUtil.cpp:

(WebCore::Layout::TextUtil::breakWord):

  • layout/formattingContexts/inline/text/TextUtil.h:
5:35 AM Changeset in webkit [286177] by Carlos Garcia Campos
  • 6 edits in trunk

[GTK][a11y] MenuListPopup elements should implement selection interface too when building with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=233519

Reviewed by Adrian Perez de Castro.

Source/WebCore:

Add an implementation of canHaveSelectedChildren() to AccessibilityMenuListPopup that returns true for
ATSPI. Also implement selectedChildren() which is enough to share the same selection interface implementation
with list box elements. This is consistent with chromium.

  • accessibility/AccessibilityMenuListPopup.cpp:

(WebCore::AccessibilityMenuListPopup::canHaveSelectedChildren const):
(WebCore::AccessibilityMenuListPopup::selectedChildren):

  • accessibility/AccessibilityMenuListPopup.h:
  • accessibility/atspi/AXObjectCacheAtspi.cpp:

(WebCore::AXObjectCache::postPlatformNotification):

Tools:

Add a test case for menu list.

  • TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:

(testSelectionListBox):
(testSelectionMenuList):
(beforeAll):

5:17 AM Changeset in webkit [286176] by Adrian Perez de Castro
  • 14 edits in trunk/Source

Non-unified build fixes, late November 2021 edition
https://bugs.webkit.org/show_bug.cgi?id=233493

Unreviewed non-unified build fixes.

Source/JavaScriptCore:

  • jit/ThunkGenerators.h: Add missing inclusion of CallMode.h header, move header

inclusions inside the ENABLE(JIT) guard.

Source/WebCore:

No new tests needed.

  • Modules/mediastream/RTCDataChannelRemoteHandler.cpp: Add missing ProcessQualified.h and

ScriptExecutionContextIdentifier.h headers.

  • Modules/mediastream/RTCDataChannelRemoteSource.cpp: Ditto.
  • contentextensions/ContentExtensionActions.cpp: Add missing ResourceRequest.h header.
  • platform/graphics/filters/FilterImage.h: Add missing forward declarations for the Filter

and FloatRect types.

  • platform/graphics/filters/software/FEColorMatrixSoftwareApplier.h: Add missing forward

declaration for the PixelBuffer type.

  • platform/graphics/filters/software/FEComponentTransferSoftwareApplier.h: Ditto.
  • platform/graphics/filters/software/FEConvolveMatrixSoftwareApplier.h: Add missing

IntPoint.h, IntSize.h, and JavaScriptCore/TypedArrayAdaptersForwardDeclarations.h headers.

  • platform/graphics/filters/software/FEGaussianBlurSoftwareApplier.h: Add missing

IntSize.h header.

  • platform/graphics/filters/software/FELightingSoftwareApplier.h: Add missing

FilterEffect.h and FilterImageVector.h headers.

Source/WebKit:

  • WebProcess/Network/webrtc/RTCDataChannelRemoteManager.h: Add missing

WebCore/ProcessQualified.h header.

3:11 AM Changeset in webkit [286175] by commit-queue@webkit.org
  • 13 edits in trunk/Source/WebCore

GraphicsContextGLOpenGL.cpp contains OpenGL implementation specific and platform specific code
https://bugs.webkit.org/show_bug.cgi?id=233513

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-11-26
Reviewed by Antti Koivisto.

Move duplicate functionality of "context changed, context not changed" from

  • GraphicsContextGLOpenGL ANGLE variant
  • GraphicsContextGLOpenGL OpenGL, OpenGL ES variant
  • RemoteGraphicsContextGLProxyBase

to base class GraphicsContextGL. In order to do this, add few WEBCORE_EXPORTs to
GraphicsContextGL.h, since RemoteGraphicsContextGLProxyBase is in WebKit and needs to call
the base-class versions as well as use vtable.

Move ANGLE-specific functions from GraphicsContextGLOpenGL.cpp to GraphicsContextGLANGLE.cpp.
Move TextureMapper-specific functions from GraphicsContextGLOpenGL.cpp to GraphicsContextGLTextureMapper.cpp.
Move OpenGL, OpenGL ES specific functions from GraphicsContextGLOpenGL.cpp to GraphicsContextGLOpenGLCommon.cpp.

This works towards being able to separate ANGLE and OpenGL, OpenGL ES implementations to different classes,
reducing the ifdeffing in GraphicsContextGLOpenGL.h.

No new tests, refactor.

  • platform/graphics/GraphicsContextGL.cpp:

(WebCore::GraphicsContextGL::markContextChanged):
(WebCore::GraphicsContextGL::layerComposited const):
(WebCore::GraphicsContextGL::setBuffersToAutoClear):
(WebCore::GraphicsContextGL::getBuffersToAutoClear const):
(WebCore::GraphicsContextGL::markLayerComposited):

  • platform/graphics/GraphicsContextGL.h:

(WebCore::GraphicsContextGL::Client::~Client): Deleted.

  • platform/graphics/RemoteGraphicsContextGLProxyBase.cpp:

(WebCore::RemoteGraphicsContextGLProxyBase::markContextChanged):
(WebCore::RemoteGraphicsContextGLProxyBase::markLayerComposited): Deleted.
(WebCore::RemoteGraphicsContextGLProxyBase::layerComposited const): Deleted.
(WebCore::RemoteGraphicsContextGLProxyBase::setBuffersToAutoClear): Deleted.
(WebCore::RemoteGraphicsContextGLProxyBase::getBuffersToAutoClear const): Deleted.

  • platform/graphics/RemoteGraphicsContextGLProxyBase.h:
  • platform/graphics/angle/GraphicsContextGLANGLE.cpp:

(WebCore::GraphicsContextGLOpenGL::markContextChanged): Deleted.
(WebCore::GraphicsContextGLOpenGL::markLayerComposited): Deleted.
(WebCore::GraphicsContextGLOpenGL::layerComposited const): Deleted.

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

(WebCore::GraphicsContextGLCocoa::copyTextureFromMedia):

  • platform/graphics/opengl/GraphicsContextGLOpenGL.cpp:

(WebCore::GraphicsContextGLOpenGL::resetBuffersToAutoClear): Deleted.
(WebCore::GraphicsContextGLOpenGL::setBuffersToAutoClear): Deleted.
(WebCore::GraphicsContextGLOpenGL::getBuffersToAutoClear const): Deleted.
(WebCore::GraphicsContextGLOpenGL::releaseThreadResources): Deleted.
(WebCore::GraphicsContextGLOpenGL::platformReleaseThreadResources): Deleted.
(WebCore::GraphicsContextGLOpenGL::texImage2DResourceSafe): Deleted.
(WebCore::GraphicsContextGLOpenGL::setContextVisibility): Deleted.
(WebCore::GraphicsContextGLOpenGL::simulateEventForTesting): Deleted.
(WebCore::GraphicsContextGLOpenGL::prepareForDisplay): Deleted.
(WebCore::GraphicsContextGLOpenGL::paintCompositedResultsToMediaSample): Deleted.
(WebCore::GraphicsContextGLOpenGL::readCompositedResults): Deleted.
(WebCore::GraphicsContextGLOpenGL::copyTextureFromMedia): Deleted.

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

(WebCore::GraphicsContextGLOpenGL::texImage2DResourceSafe):
(WebCore::GraphicsContextGLOpenGL::markContextChanged): Deleted.
(WebCore::GraphicsContextGLOpenGL::markLayerComposited): Deleted.
(WebCore::GraphicsContextGLOpenGL::layerComposited const): Deleted.

  • platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp:

(WebCore::GraphicsContextGLOpenGL::setContextVisibility):
(WebCore::GraphicsContextGLOpenGL::simulateEventForTesting):
(WebCore::GraphicsContextGLOpenGL::prepareForDisplay):
(WebCore::GraphicsContextGLOpenGL::paintCompositedResultsToMediaSample):
(WebCore::GraphicsContextGLOpenGL::readCompositedResults):
(WebCore::GraphicsContextGLTextureMapper::copyTextureFromMedia):

  • platform/graphics/texmap/GraphicsContextGLTextureMapper.h:
1:22 AM Changeset in webkit [286174] by ntim@apple.com
  • 8 edits in trunk

Update dialog focusing steps inert/disconnected handling
https://bugs.webkit.org/show_bug.cgi?id=233514

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Updated tests to reflect new behavior.

  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-focus-shadow-expected.txt:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-focusing-steps-disconnected-expected.txt:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-focusing-steps-disconnected.html:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-focusing-steps-inert-expected.txt:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-focusing-steps-inert.html:

Source/WebCore:

After discussing with Domenic Denicola, we resolved on stopping early return in case of inert <dialog>,
and disconnected <dialog> will just do nothing at the "focus the control" step.

The focus fixup rule still applies, meaning the focus is still moved to the viewport in case of modal <dialog>,
given everything else is non-focusable.

https://github.com/whatwg/html/commit/08b4033db249ea0c63fd35f4e8fa06e85ec20a6f

https://html.spec.whatwg.org/multipage/interaction.html#focus-fixup-rule

  • html/HTMLDialogElement.cpp:

(WebCore::HTMLDialogElement::runFocusingSteps):

12:41 AM Changeset in webkit [286173] by Carlos Garcia Campos
  • 11 edits
    1 add in trunk

[GTK][a11y] Add implementation of selection interface when building with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=233494

Reviewed by Adrian Perez de Castro.

Source/WebCore:

  • SourcesGTK.txt:
  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::deferSelectedChildrenChangedIfNeeded):

  • accessibility/atspi/AXObjectCacheAtspi.cpp:

(WebCore::AXObjectCache::postPlatformNotification):

  • accessibility/atspi/AccessibilityAtspi.cpp:

(WebCore::AccessibilityAtspi::selectionChanged):

  • accessibility/atspi/AccessibilityAtspi.h:
  • accessibility/atspi/AccessibilityObjectAtspi.cpp:

(WebCore::AccessibilityObjectAtspi::interfacesForObject):
(WebCore::AccessibilityObjectAtspi::path):
(WebCore::AccessibilityObjectAtspi::name const):
(WebCore::AccessibilityObjectAtspi::buildInterfaces const):

  • accessibility/atspi/AccessibilityObjectAtspi.h:
  • accessibility/atspi/AccessibilityObjectSelectionAtspi.cpp: Added.

(WebCore::AccessibilityObjectAtspi::selectionCount const):
(WebCore::AccessibilityObjectAtspi::selectedChild const):
(WebCore::AccessibilityObjectAtspi::setChildSelected const):
(WebCore::AccessibilityObjectAtspi::deselectSelectedChild const):
(WebCore::AccessibilityObjectAtspi::isChildSelected const):
(WebCore::AccessibilityObjectAtspi::selectAll const):
(WebCore::AccessibilityObjectAtspi::clearSelection const):
(WebCore::AccessibilityObjectAtspi::selectionChanged):

Tools:

Add tests case for selection interface and WTR implementation.

  • TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:

(testSelectionListBox):
(beforeAll):

  • WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:

(WTR::AccessibilityUIElement::selectedChildAtIndex const):
(WTR::AccessibilityUIElement::selectedChildrenCount const):
(WTR::AccessibilityUIElement::setSelectedChildAtIndex const):
(WTR::AccessibilityUIElement::removeSelectionAtIndex const):
(WTR::AccessibilityUIElement::clearSelectedChildren const):

Nov 25, 2021:

11:53 PM Changeset in webkit [286172] by Said Abou-Hallawa
  • 21 edits in trunk/Source/WebCore

[GPU Process] Move FilterEffect relative absolutePaintRect calculation to FilterImage
https://bugs.webkit.org/show_bug.cgi?id=233510

Reviewed by Cameron McCormack.

drawingRegionOfInputImage() and requestedRegionOfInputPixelBuffer() will
be removed from FilterEffect and will be replaced by FilterImage::
absoluteImageRectRelativeTo(). Both of the removed function were just
getting the absolutePaintRect of a FilterEffect relative to a specified
FilterImage. Also there is o need for scaling because of clamping since
the areas of all FilterImages have to be less than MaxClampedArea.

  • platform/graphics/filters/Filter.h:

(WebCore::Filter::maxEffectRect const): Deleted.

  • platform/graphics/filters/FilterEffect.cpp:

(WebCore::FilterEffect::requestedRegionOfInputPixelBuffer const): Deleted.
(WebCore::FilterEffect::drawingRegionOfInputImage const): Deleted.

  • platform/graphics/filters/FilterEffect.h:
  • platform/graphics/filters/FilterImage.cpp:

(WebCore::FilterImage::maxEffectRect const):
(WebCore::FilterImage::absoluteImageRectRelativeTo const):

  • platform/graphics/filters/FilterImage.h:
  • platform/graphics/filters/software/FEBlendSoftwareApplier.cpp:

(WebCore::FEBlendSoftwareApplier::apply):

  • platform/graphics/filters/software/FEColorMatrixSoftwareApplier.cpp:

(WebCore::FEColorMatrixSoftwareApplier::apply):

  • platform/graphics/filters/software/FEComponentTransferSoftwareApplier.cpp:

(WebCore::FEComponentTransferSoftwareApplier::apply):

  • platform/graphics/filters/software/FECompositeSoftwareApplier.cpp:

(WebCore::FECompositeSoftwareApplier::applyArithmetic):
(WebCore::FECompositeSoftwareApplier::applyNonArithmetic):

  • platform/graphics/filters/software/FEConvolveMatrixSoftwareApplier.cpp:

(WebCore::FEConvolveMatrixSoftwareApplier::apply):

  • platform/graphics/filters/software/FEDisplacementMapSoftwareApplier.cpp:

(WebCore::FEDisplacementMapSoftwareApplier::apply):

  • platform/graphics/filters/software/FEDropShadowSoftwareApplier.cpp:

(WebCore::FEDropShadowSoftwareApplier::apply):

  • platform/graphics/filters/software/FEGaussianBlurSoftwareApplier.cpp:

(WebCore::FEGaussianBlurSoftwareApplier::apply):

  • platform/graphics/filters/software/FELightingSoftwareApplier.cpp:

(WebCore::FELightingSoftwareApplier::apply):

  • platform/graphics/filters/software/FEMergeSoftwareApplier.cpp:

(WebCore::FEMergeSoftwareApplier::apply):

  • platform/graphics/filters/software/FEMorphologySoftwareApplier.cpp:

(WebCore::FEMorphologySoftwareApplier::apply):

  • platform/graphics/filters/software/FEOffsetSoftwareApplier.cpp:

(WebCore::FEOffsetSoftwareApplier::apply):

  • platform/graphics/filters/software/FETileSoftwareApplier.cpp:

(WebCore::FETileSoftwareApplier::apply):

  • rendering/CSSFilter.cpp:

(WebCore::CSSFilter::outputRect):

  • svg/graphics/filters/SVGFEImage.cpp:

(WebCore::FEImageSoftwareApplier::apply):

9:04 PM Changeset in webkit [286171] by Jean-Yves Avenard
  • 10 edits in trunk

Avoid flattening a SharedBuffer when reading reading it through SharedBufferChunkReader.
https://bugs.webkit.org/show_bug.cgi?id=233481
rdar://problem/85733358

Source/WebCore:

Reviewed by Cameron McCormack

SharedBufferChunkReader required the SharedBuffer to be flattened which
would mutate the underlying SharedBuffer.
The peek method was also incorrect if the data read overlapped multiple
segments (it would return too many characters) and some members were used
without being initialised.

Additionally, add a similar read method in SharedBuffer that will be used
in bug 233030.

Covered in existing tests, API tests added.

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/SharedBuffer.cpp:

(WebCore::SharedBuffer::getSomeData const):
(WebCore::SharedBuffer::getSegmentForPosition const):
(WebCore::SharedBuffer::read const):

  • platform/SharedBuffer.h:
  • platform/SharedBufferChunkReader.cpp:

(WebCore::SharedBufferChunkReader::SharedBufferChunkReader):
(WebCore::SharedBufferChunkReader::nextChunk):
(WebCore::SharedBufferChunkReader::peek):

  • platform/SharedBufferChunkReader.h:

Tools:

Reviewed by Cameron McCormack.

Add API tests.
API tests original data come from the original bug that added
SharedBufferChunkReader (bug 59946) and then expanded.

  • TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp:

(TestWebKitAPI::TEST_F):
(TestWebKitAPI::readAllChunks):
(TestWebKitAPI::checkChunks):
(TestWebKitAPI::checkDataInRange):

  • TestWebKitAPI/Tests/WebCore/SharedBufferTest.h:
8:15 PM Changeset in webkit [286170] by Lauro Moura
  • 2 edits in trunk/Tools

[GTK] Gardening API test authentication-success flaky timeout

Unreviewed test gardening.

  • TestWebKitAPI/glib/TestExpectations.json:
1:14 PM Changeset in webkit [286169] by Antti Koivisto
  • 10 edits in trunk

[:has() pseudo-class] Invalidation support for adding and removing nodes
https://bugs.webkit.org/show_bug.cgi?id=233489

Reviewed by Alan Bujtas.

LayoutTests/imported/w3c:

Add some additional cases to an existing test.

  • web-platform-tests/css/selectors/invalidation/attribute-or-elemental-selectors-in-has-expected.txt:
  • web-platform-tests/css/selectors/invalidation/attribute-or-elemental-selectors-in-has.html:

Source/WebCore:

We need to invalidate style when added or removed elements match :has() arguments.

This patch adds tag name invalidation rulesets for :has() case, along with the existing class
and attribute rulesets. It is still missing support for #id invalidation.

  • style/ChildChangeInvalidation.cpp:

(WebCore::Style::ChildChangeInvalidation::ChildChangeInvalidation):

See if we need to invalidate for the elements being removed before the mutation.

(WebCore::Style::ChildChangeInvalidation::~ChildChangeInvalidation):

See if we need to invalidate for the elements being added after the mutation.

(WebCore::Style::ChildChangeInvalidation::invalidateForChangedElement):

Find the relevant invalidation rulesets for attributes, classes and tags and invalidate using them.

(WebCore::Style::needsTraversal):

We only need to do anything in the presence of :has() rules.

(WebCore::Style::needsDescendantTraversal):

Full traversal is only needed in case there are :has() rules using descendant combinator.

(WebCore::Style::ChildChangeInvalidation::traverseRemovedElements):
(WebCore::Style::ChildChangeInvalidation::traverseAddedElements):

  • style/ChildChangeInvalidation.h:
  • style/RuleFeature.cpp:

(WebCore::Style::isHasPseudoClassMatchElement):
(WebCore::Style::RuleFeatureSet::recursivelyCollectFeaturesFromSelector):
(WebCore::Style::RuleFeatureSet::collectFeatures):

Collect tag invalidation rulesets for :has case only.

(WebCore::Style::RuleFeatureSet::add):
(WebCore::Style::RuleFeatureSet::clear):
(WebCore::Style::RuleFeatureSet::shrinkToFit):

  • style/RuleFeature.h:

(WebCore::Style::RuleFeatureSet::usesMatchElement const):
(WebCore::Style::RuleFeatureSet::setUsesMatchElement):

Keep track of what sort of match elements are being used.

  • style/StyleScopeRuleSets.cpp:

(WebCore::Style::ScopeRuleSets::collectFeatures const):
(WebCore::Style::ScopeRuleSets::tagInvalidationRuleSets const):

  • style/StyleScopeRuleSets.h:
7:24 AM Changeset in webkit [286168] by weinig@apple.com
  • 25 edits
    19 copies
    9 adds in trunk

[CSS Color 4] Add support for new srgb-linear, xyz-d50 and xyz-d65 colorspaces
https://bugs.webkit.org/show_bug.cgi?id=233475

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Update existing color(xyz ...) tests for new d65 whitepoint and add new tests
for color(srgb-linear ...), color(xyz-d50 ...) and color(xyz-d65 ...).

  • web-platform-tests/css/css-color/predefined-016.html:
  • web-platform-tests/css/css-color/srgb-linear-001-expected.html: Added.
  • web-platform-tests/css/css-color/srgb-linear-001.html: Added.
  • web-platform-tests/css/css-color/srgb-linear-002-expected.html: Added.
  • web-platform-tests/css/css-color/srgb-linear-002.html: Added.
  • web-platform-tests/css/css-color/srgb-linear-003-expected.html: Added.
  • web-platform-tests/css/css-color/srgb-linear-003.html: Added.
  • web-platform-tests/css/css-color/srgb-linear-004-expected.html: Added.
  • web-platform-tests/css/css-color/srgb-linear-004.html: Added.
  • web-platform-tests/css/css-color/xyz-001.html:
  • web-platform-tests/css/css-color/xyz-003-expected.html:
  • web-platform-tests/css/css-color/xyz-003.html:
  • web-platform-tests/css/css-color/xyz-004-expected.html:
  • web-platform-tests/css/css-color/xyz-004.html:
  • web-platform-tests/css/css-color/xyz-005.html:
  • web-platform-tests/css/css-color/xyz-d50-001-expected.html: Added.
  • web-platform-tests/css/css-color/xyz-d50-001.html: Added.
  • web-platform-tests/css/css-color/xyz-d50-002-expected.html: Added.
  • web-platform-tests/css/css-color/xyz-d50-002.html: Added.
  • web-platform-tests/css/css-color/xyz-d50-003-expected.html: Added.
  • web-platform-tests/css/css-color/xyz-d50-003.html: Added.
  • web-platform-tests/css/css-color/xyz-d50-004-expected.html: Added.
  • web-platform-tests/css/css-color/xyz-d50-004.html: Added.
  • web-platform-tests/css/css-color/xyz-d50-005-expected.html: Added.
  • web-platform-tests/css/css-color/xyz-d50-005.html: Added.
  • web-platform-tests/css/css-color/xyz-d65-001-expected.html: Added.
  • web-platform-tests/css/css-color/xyz-d65-001.html: Added.
  • web-platform-tests/css/css-color/xyz-d65-002-expected.html: Added.
  • web-platform-tests/css/css-color/xyz-d65-002.html: Added.
  • web-platform-tests/css/css-color/xyz-d65-003-expected.html: Added.
  • web-platform-tests/css/css-color/xyz-d65-003.html: Added.
  • web-platform-tests/css/css-color/xyz-d65-004-expected.html: Added.
  • web-platform-tests/css/css-color/xyz-d65-004.html: Added.
  • web-platform-tests/css/css-color/xyz-d65-005-expected.html: Added.
  • web-platform-tests/css/css-color/xyz-d65-005.html: Added.

Source/WebCore:

Updates existing tests to add cases for the new colorspaces.

  • Adds support for color(srgb-linear ...), color(xyz-d50 ...) and color(xyz-d65 ...)
  • Updates color(xyz ...) to be an alias of color(xyz-d65 ...), which is a breaking change both because previously it used the d50 white point and because we now serialize it as color(xyz-d65 ...). We think this is acceptable as we just shipped the feature and no other browsers yet support it.
  • Adds support for color-mix(in xyz-d50, ...) and color-mix(in xyz-d65, ...).
  • Updates color-mix(in xyz, ...) to use the d65 white point (like above). We have not shipped color-mix enabled, so this should even less controvertial.
  • css/CSSValueKeywords.in:

Add new keywords.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::parseRelativeColorFunctionForRGBTypes):
(WebCore::CSSPropertyParserHelpers::parseColorFunctionForRGBTypes):
(WebCore::CSSPropertyParserHelpers::parseColorFunctionForXYZTypes):
(WebCore::CSSPropertyParserHelpers::parseRelativeColorFunctionForXYZTypes):
(WebCore::CSSPropertyParserHelpers::parseRelativeColorFunctionParameters):
(WebCore::CSSPropertyParserHelpers::parseNonRelativeColorFunctionParameters):
(WebCore::CSSPropertyParserHelpers::consumeColorMixColorSpaceAndComma):
(WebCore::CSSPropertyParserHelpers::mixColorComponents):
Add/update parsing support for new/updated colorspaces. parseColorFunctionForXYZTypes
is now templatized like parseColorFunctionForRGBTypes to allow reusing it for each
of the XYZ types.

  • platform/graphics/ColorSpace.h:

(WebCore::callWithColorType):

  • platform/graphics/ColorSpace.cpp:

(WebCore::operator<<):

  • platform/graphics/ColorConversion.cpp:

(WebCore::converColorComponents):
Add new "named" colorspace, XYZ_D65, so that color(xyz-d65 ...) can be piped through
and serialized correctly. We already had a name for srgb-linear (though it was not
possible to create it from css previously) so no new name was needed for it.

  • platform/graphics/ColorSerialization.cpp:

(WebCore::serialization):
(WebCore::serializationForCSS):
(WebCore::serializationForHTML):
(WebCore::serializationForRenderTreeAsText):
Add serialization specialization for xyz-d50/xyz-d65 and update name of LinearSRGBA
to "srgb-linear" to match the now defined name in css.

  • platform/graphics/cg/ColorCG.cpp:

(WebCore::Color::createAndLosslesslyConvertToSupportedColorSpace):

  • platform/graphics/cg/ColorSpaceCG.cpp:

(WebCore::xyzD50ColorSpaceRef):
(WebCore::colorSpaceForCGColorSpace):
(WebCore::xyzColorSpaceRef): Deleted.

  • platform/graphics/cg/ColorSpaceCG.h:

(WebCore::cachedNullableCGColorSpace):
Updates xyzColorSpaceRef() function to be named xyzD50ColorSpaceRef() to more accurately
state what it is. It is not yet clear how or if an xyz-d65 colorspace can be created in
CoreGraphics, so we return nullptr when requested. This does not change any rendered values
as we can convert to extended-srgb in that case (as we do with lab and lch) without any loss.

LayoutTests:

Update tests for new srgb-linear, xyz-d50 and xyz-d65 colorspaces

  • fast/css/parsing-color-function-expected.txt:
  • fast/css/parsing-color-function.html:
  • fast/css/parsing-color-mix-expected.txt:
  • fast/css/parsing-color-mix.html:
  • fast/css/parsing-relative-color-syntax-expected.txt:
  • fast/css/parsing-relative-color-syntax.html:
5:22 AM Changeset in webkit [286167] by commit-queue@webkit.org
  • 17 edits
    3 moves
    2 adds
    1 delete in trunk

GraphicsContextGL implementations should have separate class definitions
https://bugs.webkit.org/show_bug.cgi?id=233491

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-11-25
Reviewed by Antti Koivisto.

Source/WebCore:

Add new concrete classes GraphicsContextGLCocoa and
GraphicsContextGLTextureMapper.
In the future, the platform-specific functionality can be moved
to these classes, reducing the GraphicsContextGLOpenGL #ifdefs.

No new tests, a refactor.

  • Modules/webxr/WebXROpaqueFramebuffer.cpp:

(WebCore::WebXROpaqueFramebuffer::startFrame):
(WebCore::WebXROpaqueFramebuffer::endFrame):

  • PlatformMac.cmake:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/TextureMapper.cmake:
  • platform/graphics/cocoa/GraphicsContextGLCocoa.h: Added.
  • platform/graphics/cocoa/GraphicsContextGLCocoa.mm: Renamed from Source/WebCore/platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm.

(WebCore::GraphicsContextGLCocoa::create):
(WebCore::GraphicsContextGLCocoa::displayBuffer):
(WebCore::GraphicsContextGLCocoa::markDisplayBufferInUse):
(WebCore::GraphicsContextGLCocoa::GraphicsContextGLCocoa):
(WebCore::GraphicsContextGLCocoa::isValid const):
(WebCore::GraphicsContextGLCocoa::createPbufferAndAttachIOSurface):
(WebCore::GraphicsContextGLCocoa::destroyPbufferAndDetachIOSurface):
(WebCore::GraphicsContextGLCocoa::attachIOSurfaceToSharedTexture):
(WebCore::GraphicsContextGLCocoa::detachIOSurfaceFromSharedTexture):

  • platform/graphics/cocoa/WebProcessGraphicsContextGLCocoa.mm: Renamed from Source/WebCore/platform/graphics/cocoa/WebProcessGraphicsContextGLOpenGLCocoa.mm.

(WebCore::GraphicsContextGLOpenGL::create):

  • platform/graphics/opengl/GraphicsContextGLOpenGL.cpp:

(WebCore::GraphicsContextGLOpenGL::isValid const): Deleted.

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

(WebCore::GraphicsContextGLOpenGL::reshapeFBOs):

  • platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp:

(WebCore::GraphicsContextGLTextureMapper::create):
(WebCore::GraphicsContextGLTextureMapper::GraphicsContextGLTextureMapper):
(WebCore::GraphicsContextGLOpenGL::create):

  • platform/graphics/texmap/GraphicsContextGLTextureMapper.h: Added.

Source/WebKit:

Use the new concrete classes GraphicsContextGLCocoa and
GraphicsContextGLTextureMapper in GPUP WebGL implemetation.

Remove GPUProcessGraphicsContextGL as the added functionality is
now in the GraphicsContextGLCocoa.

  • GPUProcess/graphics/GPUProcessGraphicsContextGL.h: Removed.
  • GPUProcess/graphics/RemoteGraphicsContextGL.h:
  • GPUProcess/graphics/RemoteGraphicsContextGLCocoa.cpp:

(WebKit::RemoteGraphicsContextGLCocoa::platformWorkQueueInitialize):

  • GPUProcess/graphics/RemoteGraphicsContextGLWin.cpp:

(WebKit::RemoteGraphicsContextGLWin::platformWorkQueueInitialize):

  • WebKit.xcodeproj/project.pbxproj:

Tools:

Adjust TestGraphicsContextGLOpenGLCocoa to
TestGraphicsContextGLCocoa after GraphicsContextGLOpenGL
Cocoa variant rename to GraphicsContextGLCocoa.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebCore/cocoa/TestGraphicsContextGLCocoa.mm: Renamed from Tools/TestWebKitAPI/Tests/WebCore/cocoa/TestGraphicsContextGLOpenGLCocoa.mm.

(TestWebKitAPI::createDefaultTestContext):
(TestWebKitAPI::changeContextContents):
(TestWebKitAPI::TEST_F):

4:34 AM Changeset in webkit [286166] by eocanha@igalia.com
  • 2 edits in trunk/Source/WebCore

[GStreamer][WPE] Use WPE_SHELL_MEDIA_DISK_CACHE_PATH env var to customize media disk cache path
https://bugs.webkit.org/show_bug.cgi?id=233477

Reviewed by Xabier Rodriguez-Calvar.

"/var/tmp" isn't always the best place to store the media download cache generated by GstDownloadBuffer
on embedded platforms. Each of those downloads can hold up to a whole movie (Gigabytes) and "/var/tmp"
is sometimes a memory based tmpfs. Some way to control the cache path is needed.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: Honor environment variable.
4:02 AM Changeset in webkit [286165] by eocanha@igalia.com
  • 5 edits in trunk/LayoutTests

[GTK] Layout Test http/tests/media/video-play-waiting.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=142489

Reviewed by Philippe Normand.

The test was failing with a timeout even after properly calling TestRunner.notifyDone()
internally because there was still an injectedBundle.topLoadingFrame() in InjectedBundlePage,
which means that the web page hadn't completely finished to be downloaded. This was caused
by the stalled video download that the test wants to exercise.

The solution is to set the video src to empty in order to convince TestRunner that the page
has finished downloading.

  • http/tests/media/video-play-waiting.html: Set the video src to empty.
  • platform/mac/TestExpectations: The test now just fails (for reasons unrelated to this fix) on mac instead of timing out.
  • platform/glib/TestExpectations: Unskipped test.
  • platform/win/TestExpectations: Unskipped test.
3:44 AM Changeset in webkit [286164] by Said Abou-Hallawa
  • 67 edits
    1 copy in trunk/Source/WebCore

[GPU Process] Make FilterEffect appliers take FilterImages in their apply() methods
https://bugs.webkit.org/show_bug.cgi?id=233487

Reviewed by Cameron McCormack.

Eventually the FilterImage will be removed from FilterEffect. So this is
a step towards making the FilterEffect hold the effect data only. To do
his change, FilterImage needs to hold two new members: primitiveSubregion
and isAlphaImage.

FilterEffect::setIsAlphaImage() is not needed and isAlphaImage() will be
a virtual function but it will be renamed resultIsAlphaImage(). The result
of this function will be stored in the result FilterImage.

FEGaussianBlurSoftwareApplier::apply() is the only user of isAlphaImage.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/filters/FEBlend.cpp:

(WebCore::FEBlend::platformApplySoftware):

  • platform/graphics/filters/FEColorMatrix.cpp:

(WebCore::FEColorMatrix::resultIsAlphaImage const):
(WebCore::FEColorMatrix::platformApplySoftware):

  • platform/graphics/filters/FEColorMatrix.h:
  • 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/FEFlood.cpp:

(WebCore::FEFlood::platformApplySoftware):

  • platform/graphics/filters/FEGaussianBlur.cpp:

(WebCore::FEGaussianBlur::resultIsAlphaImage const):
(WebCore::FEGaussianBlur::platformApplySoftware):

  • platform/graphics/filters/FEGaussianBlur.h:
  • platform/graphics/filters/FELighting.cpp:

(WebCore::FELighting::platformApplySoftware):

  • platform/graphics/filters/FEMerge.cpp:

(WebCore::FEMerge::platformApplySoftware):

  • platform/graphics/filters/FEMorphology.cpp:

(WebCore::FEMorphology::resultIsAlphaImage const):
(WebCore::FEMorphology::platformApplySoftware):

  • platform/graphics/filters/FEMorphology.h:
  • platform/graphics/filters/FEOffset.cpp:

(WebCore::FEOffset::resultIsAlphaImage const):
(WebCore::FEOffset::platformApplySoftware):

  • platform/graphics/filters/FEOffset.h:
  • platform/graphics/filters/FETile.cpp:

(WebCore::FETile::resultIsAlphaImage const):
(WebCore::FETile::platformApplySoftware):

  • platform/graphics/filters/FETile.h:
  • platform/graphics/filters/FETurbulence.cpp:

(WebCore::FETurbulence::platformApplySoftware):

  • platform/graphics/filters/Filter.h:

(WebCore::Filter::maxEffectRect const):

  • platform/graphics/filters/FilterEffect.cpp:

(WebCore::FilterEffect::apply):
(WebCore::FilterEffect::inputFilterImages const):
(WebCore::FilterEffect::externalRepresentation const):
(WebCore::FilterEffect::createResult): Deleted.
(WebCore::FilterEffect::imageBufferResult): Deleted.
(WebCore::FilterEffect::pixelBufferResult): Deleted.
(WebCore::FilterEffect::getPixelBufferResult): Deleted.
(WebCore::FilterEffect::copyPixelBufferResult const): Deleted.

  • platform/graphics/filters/FilterEffect.h:

(WebCore::FilterEffect::filterImage const):
(WebCore::FilterEffect::resultIsAlphaImage const):
(WebCore::FilterEffect::isAlphaImage const): Deleted.
(WebCore::FilterEffect::setIsAlphaImage): Deleted.
(WebCore::FilterEffect::normalizedFloats): Deleted.

  • platform/graphics/filters/FilterEffectApplier.h:
  • platform/graphics/filters/FilterImage.cpp:

(WebCore::FilterImage::create):
(WebCore::FilterImage::FilterImage):

  • platform/graphics/filters/FilterImage.h:

(WebCore::FilterImage::primitiveSubregion const):
(WebCore::FilterImage::isAlphaImage const):

  • platform/graphics/filters/FilterImageVector.h: Copied from Source/WebCore/platform/graphics/filters/FilterEffectApplier.h.
  • platform/graphics/filters/SourceAlpha.cpp:

(WebCore::SourceAlpha::platformApplySoftware):

  • platform/graphics/filters/SourceGraphic.cpp:

(WebCore::SourceGraphic::platformApplySoftware):

  • platform/graphics/filters/software/FEBlendSoftwareApplier.cpp:

(WebCore::FEBlendSoftwareApplier::apply):

  • platform/graphics/filters/software/FEBlendSoftwareApplier.h:
  • platform/graphics/filters/software/FEColorMatrixSoftwareApplier.cpp:

(WebCore::FEColorMatrixSoftwareApplier::apply):

  • platform/graphics/filters/software/FEColorMatrixSoftwareApplier.h:
  • platform/graphics/filters/software/FEComponentTransferSoftwareApplier.cpp:

(WebCore::FEComponentTransferSoftwareApplier::apply):

  • platform/graphics/filters/software/FEComponentTransferSoftwareApplier.h:
  • platform/graphics/filters/software/FECompositeSoftwareApplier.cpp:

(WebCore::FECompositeSoftwareApplier::applyArithmetic):
(WebCore::FECompositeSoftwareApplier::applyNonArithmetic):
(WebCore::FECompositeSoftwareApplier::apply):

  • platform/graphics/filters/software/FECompositeSoftwareApplier.h:
  • platform/graphics/filters/software/FEConvolveMatrixSoftwareApplier.cpp:

(WebCore::FEConvolveMatrixSoftwareApplier::apply):

  • platform/graphics/filters/software/FEConvolveMatrixSoftwareApplier.h:
  • platform/graphics/filters/software/FEDisplacementMapSoftwareApplier.cpp:

(WebCore::FEDisplacementMapSoftwareApplier::apply):

  • platform/graphics/filters/software/FEDisplacementMapSoftwareApplier.h:
  • platform/graphics/filters/software/FEDropShadowSoftwareApplier.cpp:

(WebCore::FEDropShadowSoftwareApplier::apply):

  • platform/graphics/filters/software/FEDropShadowSoftwareApplier.h:
  • platform/graphics/filters/software/FEFloodSoftwareApplier.cpp:

(WebCore::FEFloodSoftwareApplier::apply):

  • platform/graphics/filters/software/FEFloodSoftwareApplier.h:
  • platform/graphics/filters/software/FEGaussianBlurSoftwareApplier.cpp:

(WebCore::FEGaussianBlurSoftwareApplier::apply):

  • platform/graphics/filters/software/FEGaussianBlurSoftwareApplier.h:
  • platform/graphics/filters/software/FELightingSoftwareApplier.cpp:

(WebCore::FELightingSoftwareApplier::apply):

  • platform/graphics/filters/software/FELightingSoftwareApplier.h:
  • platform/graphics/filters/software/FEMergeSoftwareApplier.cpp:

(WebCore::FEMergeSoftwareApplier::apply):

  • platform/graphics/filters/software/FEMergeSoftwareApplier.h:
  • platform/graphics/filters/software/FEMorphologySoftwareApplier.cpp:

(WebCore::FEMorphologySoftwareApplier::apply):

  • platform/graphics/filters/software/FEMorphologySoftwareApplier.h:
  • platform/graphics/filters/software/FEOffsetSoftwareApplier.cpp:

(WebCore::FEOffsetSoftwareApplier::apply):

  • platform/graphics/filters/software/FEOffsetSoftwareApplier.h:
  • platform/graphics/filters/software/FETileSoftwareApplier.cpp:

(WebCore::FETileSoftwareApplier::apply):

  • platform/graphics/filters/software/FETileSoftwareApplier.h:
  • platform/graphics/filters/software/FETurbulenceSoftwareApplier.cpp:

(WebCore::FETurbulenceSoftwareApplier::apply):

  • platform/graphics/filters/software/FETurbulenceSoftwareApplier.h:
  • platform/graphics/filters/software/SourceAlphaSoftwareApplier.cpp:

(WebCore::SourceAlphaSoftwareApplier::apply):

  • platform/graphics/filters/software/SourceAlphaSoftwareApplier.h:
  • platform/graphics/filters/software/SourceGraphicSoftwareApplier.cpp:

(WebCore::SourceGraphicSoftwareApplier::apply):

  • platform/graphics/filters/software/SourceGraphicSoftwareApplier.h:
  • rendering/CSSFilter.cpp:

(WebCore::CSSFilter::output):

  • rendering/svg/RenderSVGResourceFilter.cpp:

(WebCore::RenderSVGResourceFilter::postApplyResource):

  • svg/graphics/filters/SVGFEImage.cpp:

(WebCore::FEImageSoftwareApplier::apply):
(WebCore::FEImage::platformApplySoftware):

1:58 AM Changeset in webkit [286163] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.35.1

WebKitGTK 2.35.1

1:57 AM Changeset in webkit [286162] by Carlos Garcia Campos
  • 4 edits in trunk

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.35.1 release

.:

  • Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit:

  • gtk/NEWS: Add release notes for 2.35.1.
1:27 AM Changeset in webkit [286161] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebCore

Unreviewed. Fix GTK distcheck build

Remove platform specific file from cross-platform makefile.

  • CMakeLists.txt: Add WebCoreTestSupport_PRIVATE_HEADERS and use it in WEBKIT_COPY_FILES.
  • PlatformMac.cmake: Append testing/cocoa/WebArchiveDumpSupport.h to WebCoreTestSupport_PRIVATE_HEADERS.
1:17 AM Changeset in webkit [286160] by commit-queue@webkit.org
  • 10 edits
    2 adds in trunk

ANGLE Metal: The memory backing IOSurfaces of former client buffer pbuffers is leaked
https://bugs.webkit.org/show_bug.cgi?id=233328
<rdar://problem/85563187>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-11-25
Reviewed by Antti Koivisto.

Source/WebCore:

Fix a bug where recycling GraphicsContextGLOpenGL display buffers would
leak the spare buffer pbuffer handle. This would happen if the
display buffer was marked as "in use", so that the IOSurface reference
would be dropped immediately in order to not use it as next drawing buffer.
However, the IOSurface is still bound in ANGLE and as such, the pbuffer handle
must be returned during GraphicsContextGLIOSurfaceSwapChain::recycleBuffer`
call.

Adds API tests for testing the leak.

  • platform/graphics/cocoa/GraphicsContextGLIOSurfaceSwapChain.cpp:

(WebCore::GraphicsContextGLIOSurfaceSwapChain::recycleBuffer):
(WebCore::GraphicsContextGLIOSurfaceSwapChain::present):

Source/WebCore/PAL:

Add prototype for IOSurfaceIncrementUseCount.
Currently used for a test, in simulating CA behavior.

  • pal/spi/cocoa/IOSurfaceSPI.h:

Tools:

Add tests testing Cocoa GraphicsContextGLOpenGL drawing buffer
recycling behavior.

  • TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
  • TestWebKitAPI/Sources.txt:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebCore/ImageBufferTests.cpp:

(TestWebKitAPI::imageBufferPixelIs):
(TestWebKitAPI::memoryFootprintChangedBy): Deleted.

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

(TestWebKitAPI::createDefaultTestContext):
(TestWebKitAPI::changeContextContents):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/TestUtilities.h: Added.
  • TestWebKitAPI/TestUtilities.cpp: Added.

Add few useful functions to TestUtilities.h so that different
tests can use them.

Note: See TracTimeline for information about the timeline view.