WebKit-https.git
7 min agoSupport more CSS properties for ::marker master
graouts@webkit.org [Wed, 20 Oct 2021 06:41:27 +0000 (06:41 +0000)]
Support more CSS properties for ::marker
https://bugs.webkit.org/show_bug.cgi?id=231972

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Mark WPT progressions.

* web-platform-tests/css/css-pseudo/marker-computed-content-expected.txt:
* web-platform-tests/css/css-pseudo/marker-default-styles-expected.txt:
* web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-expected.txt:
* web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-in-animation-expected.txt:

Source/WebCore:

Support additional text properties for ::marker.

* style/PropertyAllowlist.cpp:
(WebCore::Style::isValidMarkerStyleProperty):

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

92 min agoAdd NetworkProcess stubs for push subscriptions
nham@apple.com [Wed, 20 Oct 2021 05:16:30 +0000 (05:16 +0000)]
Add NetworkProcess stubs for push subscriptions
https://bugs.webkit.org/show_bug.cgi?id=231922

Reviewed by Youenn Fablet.

Source/WebCore:

Both PushManager and PushSubscription now send their subscription requests to NetworkProcess
via ServiceWorkerRegistration => ServiceWorkerContainer => SWClientConnection.

* Headers.cmake:
* Modules/push-api/PushManager.cpp:
(WebCore::PushManager::subscribe):
(WebCore::PushManager::getSubscription):
(WebCore::PushManager::permissionState):
* Modules/push-api/PushPermissionState.h:
* Modules/push-api/PushSubscription.cpp:
(WebCore::PushSubscription::PushSubscription):
(WebCore::PushSubscription::unsubscribe):
* Modules/push-api/PushSubscription.h:
* Modules/push-api/PushSubscriptionData.cpp:
(WebCore::PushSubscriptionData::isolatedCopy const):
* Modules/push-api/PushSubscriptionData.h:
(WebCore::PushSubscriptionData::encode const):
(WebCore::PushSubscriptionData::decode):
* Modules/push-api/PushSubscriptionOptions.cpp:
(WebCore::PushSubscriptionOptions::PushSubscriptionOptions):
(WebCore::PushSubscriptionOptions::userVisibleOnly const):
* Modules/push-api/PushSubscriptionOptions.h:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* testing/Internals.cpp:
(WebCore::Internals::createPushSubscription):
* testing/Internals.h:
* testing/Internals.idl:
* workers/service/SWClientConnection.h:
* workers/service/ServiceWorkerContainer.cpp:
(WebCore::createPushSubscriptionFromData):
(WebCore::ServiceWorkerContainer::subscribeToPushService):
(WebCore::ServiceWorkerContainer::unsubscribeFromPushService):
(WebCore::ServiceWorkerContainer::getPushSubscription):
(WebCore::ServiceWorkerContainer::getPushPermissionState):
* workers/service/ServiceWorkerContainer.h:
* workers/service/ServiceWorkerRegistration.cpp:
(WebCore::ServiceWorkerRegistration::subscribeToPushService):
(WebCore::ServiceWorkerRegistration::unsubscribeFromPushService):
(WebCore::ServiceWorkerRegistration::getPushSubscription):
(WebCore::ServiceWorkerRegistration::getPushPermissionState):
* workers/service/ServiceWorkerRegistration.h:
* workers/service/ServiceWorkerRegistration.idl:
* workers/service/WorkerSWClientConnection.cpp:
(WebCore::WorkerSWClientConnection::~WorkerSWClientConnection):
(WebCore::WorkerSWClientConnection::subscribeToPushService):
(WebCore::WorkerSWClientConnection::unsubscribeFromPushService):
(WebCore::WorkerSWClientConnection::getPushSubscription):
(WebCore::WorkerSWClientConnection::getPushPermissionState):
* workers/service/WorkerSWClientConnection.h:

Source/WebKit:

Added stubs in NetworkProcess for push subscription-related IPC. Currently the stubs return
that subscribing is unsupported and that there are no active push subscriptions.

* NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
(WebKit::WebSWServerConnection::subscribeToPushService):
(WebKit::WebSWServerConnection::unsubscribeFromPushService):
(WebKit::WebSWServerConnection::getPushSubscription):
(WebKit::WebSWServerConnection::getPushPermissionState):
* NetworkProcess/ServiceWorker/WebSWServerConnection.h:
* NetworkProcess/ServiceWorker/WebSWServerConnection.messages.in:
* WebProcess/Storage/WebSWClientConnection.cpp:
(WebKit::WebSWClientConnection::subscribeToPushService):
(WebKit::WebSWClientConnection::unsubscribeFromPushService):
(WebKit::WebSWClientConnection::getPushSubscription):
(WebKit::WebSWClientConnection::getPushPermissionState):
* WebProcess/Storage/WebSWClientConnection.h:

LayoutTests:

Modify PushSubscription tests to pass in a ServiceWorkerRegistration.

* http/wpt/push-api/emptyWorker.js: Renamed from LayoutTests/http/wpt/push-api/pushManager-worker.js.
* http/wpt/push-api/pushManager.any.js:
(else.promise_test.async test):
* http/wpt/push-api/pushSubscription.https.any-expected.txt:
* http/wpt/push-api/pushSubscription.https.any.js:
(promise_test.async test):
(promise_test):
(test): Deleted.

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

119 min agoFix build break after r284406 if ENABLE_SERVICE_WORKER=OFF
commit-queue@webkit.org [Wed, 20 Oct 2021 04:49:28 +0000 (04:49 +0000)]
Fix build break after r284406 if ENABLE_SERVICE_WORKER=OFF
https://bugs.webkit.org/show_bug.cgi?id=231968

Patch by Jigen Zhou <jigen.zhou@sony.com> on 2021-10-19
Reviewed by Don Olmstead.

r284406 made m_isServiceWorkerPage of WebPageProxy not available if !ENABLE(SERVICE_WORKER),
but the change was incomplete and can cause build failure if ENABLE_SERVICE_WORKER=OFF.
This patch avoids accessing m_isServiceWorkerPage if !ENABLE(SERVICE_WORKER) in WebPageProxy
methods isServiceWorkerPage, loadDataWithNavigationShared, and resetStateAfterProcessExited.

* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:

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

3 hours agoNon-unified build fixes, mid October 2021 edition
don.olmstead@sony.com [Wed, 20 Oct 2021 03:25:35 +0000 (03:25 +0000)]
Non-unified build fixes, mid October 2021 edition
https://bugs.webkit.org/show_bug.cgi?id=231915

Unreviewed non-unified build fixes.

Source/WebCore:

* animation/KeyframeEffectStack.cpp:
* bindings/js/JSDOMWindowBase.cpp:
* dom/ActiveDOMObject.cpp:
* html/DOMFormData.cpp:
* html/HTMLDialogElement.cpp:
* html/HTMLOutputElement.cpp:
* html/ResetInputType.cpp:
* page/DragController.cpp:
* page/EventHandler.cpp:
* rendering/updating/RenderTreeBuilderFirstLetter.cpp:

Source/WebKit:

* NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementConnection.cpp:
* WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:

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

3 hours agor284315 can cause build break.
commit-queue@webkit.org [Wed, 20 Oct 2021 03:03:58 +0000 (03:03 +0000)]
r284315 can cause build break.
https://bugs.webkit.org/show_bug.cgi?id=231923

Patch by Jigen Zhou <jigen.zhou@sony.com> on 2021-10-19
Reviewed by Michael Catanzaro.

Class 'WebCore::RenderBlockFlow' was forward declared in header file
InlineIteratorLogicalOrderTraversal.h, but template
leafBoxesInLogicalOrder that was added by r284315 has access to RenderBlockFLow's method
style() and can cause build break in our local webkit build.

The build can be fixed when the concreate declaration of class
RenderBlockFlow is included in InlineIteratorLogicalOrderTraversal.h.

* layout/integration/InlineIteratorLogicalOrderTraversal.h:

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

6 hours agoAddress post-landing feedback to wasm exceptions
tzagallo@apple.com [Wed, 20 Oct 2021 00:40:19 +0000 (00:40 +0000)]
Address post-landing feedback to wasm exceptions
https://bugs.webkit.org/show_bug.cgi?id=231973

Reviewed by Saam Barati.

Address comments left by Saam in https://bugs.webkit.org/show_bug.cgi?id=229681
after the patch landed. This includes deleting some unused code, and renaming a
couple variables and methods, but the biggest change is copying the callee saves
to VMEntry in the llint rethrow.

* interpreter/Interpreter.cpp:
(JSC::CatchInfo::CatchInfo):
(JSC::UnwindFunctor::operator() const):
* interpreter/Interpreter.h:
(JSC::CatchInfo::CatchInfo): Deleted.
* jit/JSInterfaceJIT.h:
(JSC::JSInterfaceJIT::convertCalleeToVM): Deleted.
* llint/WebAssembly.asm:
* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::ControlData::ControlData):
(JSC::Wasm::B3IRGenerator::ControlData::tryDepth const):
(JSC::Wasm::B3IRGenerator::connectControlAtEntrypoint):
(JSC::Wasm::B3IRGenerator::addLoop):
(JSC::Wasm::B3IRGenerator::addTry):
(JSC::Wasm::B3IRGenerator::preparePatchpointForExceptions):
(JSC::Wasm::B3IRGenerator::emitCatchImpl):
(JSC::Wasm::B3IRGenerator::addDelegateToUnreachable):
(JSC::Wasm::B3IRGenerator::addThrow):
(JSC::Wasm::B3IRGenerator::addRethrow):
(JSC::Wasm::B3IRGenerator::addEndToUnreachable):
(JSC::Wasm::B3IRGenerator::connectControlEntry): Deleted.
* wasm/WasmCallee.h:
(JSC::Wasm::Callee::llintFunctionCodeBlock const):
(JSC::Wasm::Callee::functionCodeBlock const): Deleted.
* wasm/WasmLLIntGenerator.cpp:
(JSC::Wasm::LLIntGenerator::unifyValuesWithBlock):
(JSC::Wasm::LLIntGenerator::addTry):
(JSC::Wasm::LLIntGenerator::addThrow):
(JSC::Wasm::LLIntGenerator::repatch): Deleted.
* wasm/WasmOperations.cpp:
(JSC::Wasm::JSC_DEFINE_JIT_OPERATION):
* wasm/WasmOperations.h:

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

6 hours ago[CMake] Align OptionsMac with Xcode build
ross.kirsling@sony.com [Wed, 20 Oct 2021 00:30:31 +0000 (00:30 +0000)]
[CMake] Align OptionsMac with Xcode build
https://bugs.webkit.org/show_bug.cgi?id=231982

Reviewed by Don Olmstead.

.:

* Source/cmake/OptionsMac.cmake:
Ensure that the listed options (1) are not redundant with the defaults in WebKitFeatures.cmake and
(2) match the options for the Xcode build as closely as possible.

* Source/cmake/WebKitFeatures.cmake:
Remove an outdated feature, ENABLE_APPLE_PAY_SESSION_V9,
and let ENABLE_MAC_GESTURE_EVENTS be handled by PlatformEnable, since it depends on USE_APPLE_INTERNAL_SDK.

Source/WebCore:

* PlatformMac.cmake:
Add support for new files.

* platform/mediastream/cocoa/DisplayCaptureSourceCocoa.cpp:
Fix for r284295 -- ReplayKit is iOS and its headers shouldn't be included on Mac.

Source/WebKit:

* CMakeLists.txt:
Enable -fobjc-weak to support r284329.

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

6 hours agoUnreviewed build fix for non-unified build.
nham@apple.com [Wed, 20 Oct 2021 00:16:38 +0000 (00:16 +0000)]
Unreviewed build fix for non-unified build.

* Modules/webaudio/RealtimeAnalyser.h:

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

6 hours agoResync COOP /COEP WPT tests from upstream WPT
cdumez@apple.com [Tue, 19 Oct 2021 23:56:15 +0000 (23:56 +0000)]
Resync COOP /COEP WPT tests from upstream WPT
https://bugs.webkit.org/show_bug.cgi?id=231746

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Resync COOP /COEP WPT tests from upstream WPT 207e223d74fdc1f1.

* web-platform-tests/html/cross-origin-embedder-policy/*: Updated.
* web-platform-tests/html/cross-origin-opener-policy/*: Updated.

LayoutTests:

Resync COOP /COEP WPT tests from upstream WPT 6ccfe6fafab233e.

* TestExpectations:
* tests-options.json:

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

7 hours agoEagerly resolve python3 path in Makefiles
ap@apple.com [Tue, 19 Oct 2021 23:14:19 +0000 (23:14 +0000)]
Eagerly resolve python3 path in Makefiles
https://bugs.webkit.org/show_bug.cgi?id=231979

Reviewed by Jonathan Bedard.

* DerivedSources.make:

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

8 hours agocanDoFastSpread should also check that the Structure is from the global object we...
sbarati@apple.com [Tue, 19 Oct 2021 22:48:26 +0000 (22:48 +0000)]
canDoFastSpread should also check that the Structure is from the global object we're watching
https://bugs.webkit.org/show_bug.cgi?id=231976
<rdar://84340372>

Reviewed by Keith Miller.

* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::canDoFastSpread):

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

8 hours agoRemove old GCC workaround for Allocator
ysuzuki@apple.com [Tue, 19 Oct 2021 21:53:27 +0000 (21:53 +0000)]
Remove old GCC workaround for Allocator
https://bugs.webkit.org/show_bug.cgi?id=231978

Reviewed by Darin Adler.

This is for old GCC. Since our GCC baseline is 8.3.0, this is no longer necessary.

* wtf/FastMalloc.h:
(WTF::FastAllocator::deallocate):
(WTF::FastAllocator::construct): Deleted.
(WTF::FastAllocator::destroy): Deleted.
(WTF::FastAllocator::max_size const): Deleted.
(WTF::FastAllocator::select_on_container_copy_construction const): Deleted.

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

9 hours ago[webkitscmpy] Override http url with ssh url
jbedard@apple.com [Tue, 19 Oct 2021 21:44:07 +0000 (21:44 +0000)]
[webkitscmpy] Override http url with ssh url
https://bugs.webkit.org/show_bug.cgi?id=231965
<rdar://problem/84422393>

Reviewed by Ryan Haddad.

* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git): Exclude / from hostname.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:
(Setup.git): Prompt user to switch to ssh checkout.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_unittest.py:
link: https://commits.webkit.org/243250@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@284498 268f45cc-cd09-0410-ab3c-d52691b4dbfc

9 hours agoUnreviewed, reverting r284099.
commit-queue@webkit.org [Tue, 19 Oct 2021 21:37:49 +0000 (21:37 +0000)]
Unreviewed, reverting r284099.
https://bugs.webkit.org/show_bug.cgi?id=231984

Introduced build failure

Reverted changeset:

"[iOS] Stop including 'util.sb' in the WebContent process'
sandbox"
https://bugs.webkit.org/show_bug.cgi?id=231570
https://commits.webkit.org/r284099

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

9 hours agoREGRESSION (r284220): [PAL] TCCSPI.h should be a project header, not a private header
ddkilzer@apple.com [Tue, 19 Oct 2021 21:10:39 +0000 (21:10 +0000)]
REGRESSION (r284220): [PAL] TCCSPI.h should be a project header, not a private header
<https://webkit.org/b/231977>
<rdar://problem/84425384>

Reviewed by Wenson Hsieh.

* PAL.xcodeproj/project.pbxproj:
- Change TCCSPI.h from a private header to a project header.
  PAL uses a build phase script to install its headers.

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

9 hours agoRegression(r283935 - r283938): [ macOS wk1 ] imported/w3c/web-platform-tests/html...
ayumi_kojima@apple.com [Tue, 19 Oct 2021 20:58:44 +0000 (20:58 +0000)]
Regression(r283935 - r283938): [ macOS wk1 ] imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-autofocus-multiple-times.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=231918

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

10 hours ago[EWS] Move EWS bots to iOS 15 / watchOS 8 / tvOS 15
ryanhaddad@apple.com [Tue, 19 Oct 2021 20:46:30 +0000 (20:46 +0000)]
[EWS] Move EWS bots to iOS 15 / watchOS 8 / tvOS 15
https://bugs.webkit.org/show_bug.cgi?id=231925

Reviewed by Jonathan Bedard.

* CISupport/ews-build/config.json:
* CISupport/ews-build/factories_unittest.py:
(TestExpectedBuildSteps):

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

10 hours ago[webkitscmpy] Generate commit message template (Follow-up fix)
jbedard@apple.com [Tue, 19 Oct 2021 20:36:29 +0000 (20:36 +0000)]
[webkitscmpy] Generate commit message template (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=231023
<rdar://problem/83722871>

Unreviewed follow-up fix.

* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: MarkupSafe is imported as markupsafe.

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

10 hours agoRegression(r284336): [ iOS 15 ] system-preview/badge.html is image failing
simon.fraser@apple.com [Tue, 19 Oct 2021 20:34:23 +0000 (20:34 +0000)]
Regression(r284336): [ iOS 15 ] system-preview/badge.html is image failing
https://bugs.webkit.org/show_bug.cgi?id=231916

Reviewed by Antti Koivisto.
Source/WebCore:

In r284336 I made clip-path not apply to non-RenderBoxes, which disabled it on inlines,
breaking the system-preview/badge.html test.

The spec says it applies to all elements, so this behavior change was incorrect.

Revert back to using calculateLayerBounds() as the fallback rect to use for inlines, and add
tests for this. This rectangle is obviously incorrect (for example, it's affected by text
shadow), but leave it for now until https://github.com/w3c/csswg-drafts/issues/6383 is
resolved.

I also failed to see that computeClipPath() was already computing the reference box
internally, so clean up the code with some comments to make it more clear that the result of
calculateLayerBounds() is used only as the fallback for inlines, as well as for the buffer
bounds for the applyClippingToContext() code path.

Tests: css3/masking/clip-path-on-inline.html
       css3/masking/clip-path-on-split-inline.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::computeClipPath const):
(WebCore::RenderLayer::setupClipPath):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateMaskingLayerGeometry):

LayoutTests:

Tests for clip-path on a single-box inline, and a split inline.

* css3/masking/clip-path-on-inline-expected.html: Added.
* css3/masking/clip-path-on-inline.html: Added.
* css3/masking/clip-path-on-split-inline-expected.html: Added.
* css3/masking/clip-path-on-split-inline.html: Added.

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

10 hours agoWebAuthn Platform UI callbacks are not guaranteed to happen on the main thread
commit-queue@webkit.org [Tue, 19 Oct 2021 20:32:40 +0000 (20:32 +0000)]
WebAuthn Platform UI callbacks are not guaranteed to happen on the main thread
https://bugs.webkit.org/show_bug.cgi?id=231963
<rdar://84420452>

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

- The clearanceHandler is not guaranteed to happen on the main thread, but
weakThis.get() needs to happen there.

- `proxy` needs to stay alive for the whole transaction, otherwise it will tear
down the connection and cancel the request, so explicitly capture it everywhere.

- Start logging if we get an error from clearanceHandler.

Covered by existing tests.

* UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm:
(WebKit::WebAuthenticatorCoordinatorProxy::performRequest):

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

10 hours ago[webkitscmpy] Generate commit message template
jbedard@apple.com [Tue, 19 Oct 2021 20:07:43 +0000 (20:07 +0000)]
[webkitscmpy] Generate commit message template
https://bugs.webkit.org/show_bug.cgi?id=231023
<rdar://problem/83722871>

Reviewed by Dewei Zhu.

* Tools/Scripts/git-webkit: Use prepare-ChangeLog to generate commit messages.
* Tools/Scripts/hooks/prepare-commit-msg: Added.
* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version, add jinja.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
(Git.__init__): Add unbound status mock.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py:
(main): Pass hooks to sub-programs.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:
(Setup.git): iterate through the directory of provided hooks and render with jinja2.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/hooks/prepare-commit-msg: Added.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_unittest.py:
(TestSetup.test_commit_message):
link: https://commits.webkit.org/243242@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@284485 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10 hours agoLayoutTests/imported/w3c:
cdumez@apple.com [Tue, 19 Oct 2021 20:00:44 +0000 (20:00 +0000)]
LayoutTests/imported/w3c:
Origin of opaque blob: URLs ends up as empty string
https://bugs.webkit.org/show_bug.cgi?id=231942

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

* web-platform-tests/url/a-element-expected.txt:
* web-platform-tests/url/a-element-origin-expected.txt:
* web-platform-tests/url/a-element-origin-xhtml-expected.txt:
* web-platform-tests/url/a-element-xhtml-expected.txt:
* web-platform-tests/url/resources/urltestdata.json:
* web-platform-tests/url/url-constructor.any-expected.txt:
* web-platform-tests/url/url-constructor.any.worker-expected.txt:
* web-platform-tests/url/url-origin.any-expected.txt:
* web-platform-tests/url/url-origin.any.worker-expected.txt:

Source/WebCore:
Fix leak of CGColorSpaceRef in FilterEffectRendererCoreImage::sharedCIContext()
<https://webkit.org/b/231902>
<rdar://problem/84375203>

Patch by David Kilzer <ddkilzer@apple.com> on 2021-10-19
Reviewed by Wenson Hsieh.

* platform/graphics/coreimage/FilterEffectRendererCoreImage.mm:
(WebCore::FilterEffectRendererCoreImage::sharedCIContext):
- Use adoptCF() to fix the leak.

Source/WebKit:
REGRESSION (r284079): fast/canvas/gradient-with-clip.html and fast/canvas/gradient-text-with-shadow.html are flaky failures
https://bugs.webkit.org/show_bug.cgi?id=231681
rdar://84202478

Patch by Wenson Hsieh <wenson_hsieh@apple.com> on 2021-10-19
Reviewed by Kimmo Kinnunen.

These tests occasionally fail when we time out while waiting for the pixel buffer to be populated underneath
`RemoteImageBufferProxy::getPixelBuffer`; this happens because the GPU process sometimes halts (and never
resumes) while processing stream messages, and consequently never ends up processing the GetPixelBuffer IPC
stream message that's necessary to populate the shared memory buffer for GetPixelBuffer.

This, in turn, happens when the IPC stream buffer is about to exhaust all available capacity (i.e. the write
cursor is nearing the end of the 2MB buffer), and as a result, we send messages that would normally be encoded
in the IPC stream as out-of-line IPC messages instead, which are received in the GPU process on the IPC thread
and appended to the receive queue corresponding to the destination ID in `Connection::processIncomingMessage()`.

If we happen to have sent `RemoteRenderingBackend::CreateImageBuffer(a)` right before exhausting capacity and
sending out-of-line messages targeting the RemoteDisplayListRecorder corresponding to the newly created image
buffer `a`, we'll end up with a race condition where the IPC thread may receive the out-of-line messages meant
for the new remote display list destination *before* the new remote display list has added itself as an IPC
receive queue by calling into `StreamServerConnection::startReceivingMessages()`.

In this particular scenario (where we "lose" the race), `Connection::processIncomingMessage` will skip past the
early return where it would normally find its corresponding receive queue via `m_receiveQueues.get(*message)`,
and instead falls through to `Connection::SyncMessageState::processIncomingMessage()`, which will attempt to
dispatch the incoming message to the Connection's client (GPUConnectionToWebProcess). Of course, the
GPUConnectionToWebProcess isn't aware of how to process this incoming message, so it simply gets dropped. By the
time the receive queue is added for the new RemoteDisplayListRecorder, we'll observe a ProcessOutOfStreamMessage
and end up waiting forever for this out-of-line message to be added to the receive queue, but this never ends up
happening because it has already been received and dropped by GPUConnectionToWebProcess.

To address the flaky tests in the short term, we work around this issue by making `CreateImageBuffer` a sync
message, so we guarantee that any subsequent messages sent to the image buffer's RemoteDisplayListRecorder will
not be dropped. In the (slightly) longer term, we should turn this back into an async stream message, and add a
mechanism to redirect all receiver-less RemoteDisplayListRecorder messages to a separate queue.

* GPUProcess/graphics/RemoteRenderingBackend.cpp:
(WebKit::RemoteRenderingBackend::createImageBuffer):
* GPUProcess/graphics/RemoteRenderingBackend.h:
* GPUProcess/graphics/RemoteRenderingBackend.messages.in:

Make `CreateImageBuffer` a synchronous stream message for now.

* WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:
(WebKit::RemoteRenderingBackendProxy::createRemoteImageBuffer):

LayoutTests:
Resync web-platform-tests/reporting from upstream
https://bugs.webkit.org/show_bug.cgi?id=231957

Reviewed by Alex Christensen.

Resync web-platform-tests/reporting from upstream 207e223d74fdc1f1.

* TestExpectations:

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

10 hours agoFix leak of CGColorSpaceRef in FilterEffectRendererCoreImage::sharedCIContext()
ddkilzer@apple.com [Tue, 19 Oct 2021 19:56:12 +0000 (19:56 +0000)]
Fix leak of CGColorSpaceRef in FilterEffectRendererCoreImage::sharedCIContext()
<https://webkit.org/b/231902>
<rdar://problem/84375203>

Reviewed by Wenson Hsieh.

* platform/graphics/coreimage/FilterEffectRendererCoreImage.mm:
(WebCore::FilterEffectRendererCoreImage::sharedCIContext):
- Use adoptCF() to fix the leak.

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

10 hours ago[clang 13] Suppress sign comparison warnings
cdumez@apple.com [Tue, 19 Oct 2021 19:49:50 +0000 (19:49 +0000)]
[clang 13] Suppress sign comparison warnings
https://bugs.webkit.org/show_bug.cgi?id=231188
<rdar://problem/84110570>

Reviewed by Alex Christensen.

* inspector/remote/socket/RemoteInspectorSocket.cpp:
(Inspector::RemoteInspector::backendCommands const):

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

11 hours ago[webkitscmpy] Filter approvers by status
jbedard@apple.com [Tue, 19 Oct 2021 19:39:26 +0000 (19:39 +0000)]
[webkitscmpy] Filter approvers by status
https://bugs.webkit.org/show_bug.cgi?id=231843
<rdar://problem/84320934>

Reviewed by Dewei Zhu.

If a project defines statuses for it's contributors, we only want
to allow reviewers to approve changes.

* Scripts/libraries/webkitscmpy/webkitscmpy/contributor.py:
(Contributor): Add reviewer status.
(Contributor.Mapping.load): Keep track of possible statuses.
(Contributor.Mapping.__init__): Ditto.
(Contributor.Mapping.add): Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/remote/bitbucket.py:
(BitBucket.PRGenerator.PullRequest): If a project defines a reviewer status, enforce it.
* Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:
(GitHub.PRGenerator._contributor): Handle case where no name is defined.
(GitHub.PRGenerator.reviewers): If a project defines a reviewer status, enforce it.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:

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

11 hours agoOrigin of opaque blob: URLs ends up as empty string
commit-queue@webkit.org [Tue, 19 Oct 2021 19:28:40 +0000 (19:28 +0000)]
Origin of opaque blob: URLs ends up as empty string
https://bugs.webkit.org/show_bug.cgi?id=231942

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

LayoutTests/imported/w3c:

* web-platform-tests/url/a-element-expected.txt:
* web-platform-tests/url/a-element-origin-expected.txt:
* web-platform-tests/url/a-element-origin-xhtml-expected.txt:
* web-platform-tests/url/a-element-xhtml-expected.txt:
* web-platform-tests/url/resources/urltestdata.json:
* web-platform-tests/url/url-constructor.any-expected.txt:
* web-platform-tests/url/url-constructor.any.worker-expected.txt:
* web-platform-tests/url/url-origin.any-expected.txt:
* web-platform-tests/url/url-origin.any.worker-expected.txt:

Source/WebCore:

It should be "null" instead of "".
This matches Chrome and Firefox.
Covered by a PR to WPT included in this patch.

* page/SecurityOrigin.cpp:
(WebCore::shouldTreatAsUniqueOrigin):

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

11 hours agoResync web-platform-tests/reporting from upstream
cdumez@apple.com [Tue, 19 Oct 2021 19:16:51 +0000 (19:16 +0000)]
Resync web-platform-tests/reporting from upstream
https://bugs.webkit.org/show_bug.cgi?id=231957

Reviewed by Alex Christensen.

Resync web-platform-tests/reporting from upstream 207e223d74fdc1f1.

LayoutTests/imported/w3c:

* web-platform-tests/reporting/*: Updated.

LayoutTests:

* TestExpectations:

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

11 hours agoREGRESSION (r284079): fast/canvas/gradient-with-clip.html and fast/canvas/gradient...
wenson_hsieh@apple.com [Tue, 19 Oct 2021 19:09:41 +0000 (19:09 +0000)]
REGRESSION (r284079): fast/canvas/gradient-with-clip.html and fast/canvas/gradient-text-with-shadow.html are flaky failures
https://bugs.webkit.org/show_bug.cgi?id=231681
rdar://84202478

Reviewed by Kimmo Kinnunen.

Source/WebKit:

These tests occasionally fail when we time out while waiting for the pixel buffer to be populated underneath
`RemoteImageBufferProxy::getPixelBuffer`; this happens because the GPU process sometimes halts (and never
resumes) while processing stream messages, and consequently never ends up processing the GetPixelBuffer IPC
stream message that's necessary to populate the shared memory buffer for GetPixelBuffer.

This, in turn, happens when the IPC stream buffer is about to exhaust all available capacity (i.e. the write
cursor is nearing the end of the 2MB buffer), and as a result, we send messages that would normally be encoded
in the IPC stream as out-of-line IPC messages instead, which are received in the GPU process on the IPC thread
and appended to the receive queue corresponding to the destination ID in `Connection::processIncomingMessage()`.

If we happen to have sent `RemoteRenderingBackend::CreateImageBuffer(a)` right before exhausting capacity and
sending out-of-line messages targeting the RemoteDisplayListRecorder corresponding to the newly created image
buffer `a`, we'll end up with a race condition where the IPC thread may receive the out-of-line messages meant
for the new remote display list destination *before* the new remote display list has added itself as an IPC
receive queue by calling into `StreamServerConnection::startReceivingMessages()`.

In this particular scenario (where we "lose" the race), `Connection::processIncomingMessage` will skip past the
early return where it would normally find its corresponding receive queue via `m_receiveQueues.get(*message)`,
and instead falls through to `Connection::SyncMessageState::processIncomingMessage()`, which will attempt to
dispatch the incoming message to the Connection's client (GPUConnectionToWebProcess). Of course, the
GPUConnectionToWebProcess isn't aware of how to process this incoming message, so it simply gets dropped. By the
time the receive queue is added for the new RemoteDisplayListRecorder, we'll observe a ProcessOutOfStreamMessage
and end up waiting forever for this out-of-line message to be added to the receive queue, but this never ends up
happening because it has already been received and dropped by GPUConnectionToWebProcess.

To address the flaky tests in the short term, we work around this issue by making `CreateImageBuffer` a sync
message, so we guarantee that any subsequent messages sent to the image buffer's RemoteDisplayListRecorder will
not be dropped. In the (slightly) longer term, we should turn this back into an async stream message, and add a
mechanism to redirect all receiver-less RemoteDisplayListRecorder messages to a separate queue.

* GPUProcess/graphics/RemoteRenderingBackend.cpp:
(WebKit::RemoteRenderingBackend::createImageBuffer):
* GPUProcess/graphics/RemoteRenderingBackend.h:
* GPUProcess/graphics/RemoteRenderingBackend.messages.in:

Make `CreateImageBuffer` a synchronous stream message for now.

* WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:
(WebKit::RemoteRenderingBackendProxy::createRemoteImageBuffer):

LayoutTests:

Remove the flaky failure entries in test expectations. See WebKit2 ChangeLog for more details.

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

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

11 hours ago[GTK] Update test expectations for still-failing CSS web platform tests
commit-queue@webkit.org [Tue, 19 Oct 2021 18:56:47 +0000 (18:56 +0000)]
[GTK] Update test expectations for still-failing CSS web platform tests
https://bugs.webkit.org/show_bug.cgi?id=231964

Unreviewed test gardening.

Patch by Arcady Goldmints-Orlov <agoldmints@igalia.com> on 2021-10-19

* platform/gtk/TestExpectations:

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

11 hours agoFix iOS API tests after r284304
achristensen@apple.com [Tue, 19 Oct 2021 18:54:25 +0000 (18:54 +0000)]
Fix iOS API tests after r284304
https://bugs.webkit.org/show_bug.cgi?id=231829

Part of the original commit that told the tests to continue doing what they were doing before was omitted.
This commits that.

* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm:
(webViewWithResourceLoadStatisticsEnabledInNetworkProcess):

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

12 hours agohttp/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe...
wilander@apple.com [Tue, 19 Oct 2021 18:43:20 +0000 (18:43 +0000)]
http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=231379
<rdar://problem/83991245>

Reviewed by Chris Dumez.

* http/tests/resourceLoadStatistics/resources/redirect.py:
    Added the response header 'Cache-Control: no-cache, no-store'.
    Historically, we've had problems with redirects getting cached
    so that they don't hit the network. In this particular case,
    the same redirect is being done in different orders and might
    fall into the cache trap.
* platform/mac-wk2/TestExpectations:
    Removed [Pass Failure] expectation for sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html.

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

12 hours agoGuarantee order of WebSocket events in case of being resumed
youenn@apple.com [Tue, 19 Oct 2021 18:41:13 +0000 (18:41 +0000)]
Guarantee order of WebSocket events in case of being resumed
https://bugs.webkit.org/show_bug.cgi?id=231664

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

* web-platform-tests/websockets/interfaces/WebSocket/close/close-nested-expected.txt:
* web-platform-tests/websockets/interfaces/WebSocket/readyState/003-expected.txt:

Source/WebCore:

Introduce a WebSocket task source as per spec.
This aligns with https://html.spec.whatwg.org/multipage/web-sockets.html where the user agent is expected to a queue task
when closing handshake is started and so on.

By queuing an event loop task to fire WebSocket events, we ensure ordering of events even in case of resuming, while simplifying the implementation.
This makes it use the event loop which is extra nice if we resolve promises in event listeners.

A follow-up patch should refactor code so that WebSocket::didReceiveMessageError can directly fire the close event without having to wait for a didClose call.

Covered by existing tests.

* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::WebSocket):
(WebCore::WebSocket::suspend):
(WebCore::WebSocket::resume):
(WebCore::WebSocket::stop):
(WebCore::WebSocket::dispatchOrQueueEvent):
(WebCore::WebSocket::resumeTimerFired): Deleted.
* Modules/websockets/WebSocket.h:
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::send):
* dom/TaskSource.h:

Source/WebKit:

We no longer need to handle resume/suspend in WebSocketChannel layer since WebSocket will deal with itself by enqueuing a task in the event loop.

* WebProcess/Network/WebSocketChannel.cpp:
(WebKit::WebSocketChannel::disconnect):
(WebKit::WebSocketChannel::didConnect):
(WebKit::WebSocketChannel::didReceiveText):
(WebKit::WebSocketChannel::didReceiveBinaryData):
(WebKit::WebSocketChannel::didClose):
(WebKit::WebSocketChannel::didReceiveMessageError):
(WebKit::WebSocketChannel::suspend):
(WebKit::WebSocketChannel::resume):
(WebKit::WebSocketChannel::didSendHandshakeRequest):
(WebKit::WebSocketChannel::didReceiveHandshakeResponse):
(WebKit::WebSocketChannel::enqueueTask): Deleted.
* WebProcess/Network/WebSocketChannel.h:

LayoutTests:

* http/tests/websocket/tests/hybi/inspector/send-and-receive.html:
The WebSocket server was racing to close the connection with the User Agent.
The patch queueing a task to fire events is further amplifying this race.
To make the test non flaky, we use an echo server that waits for User Agent to close the connection.

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

12 hours agoAdd AX team GitHub usernames to contributors.json
commit-queue@webkit.org [Tue, 19 Oct 2021 18:40:20 +0000 (18:40 +0000)]
Add AX team GitHub usernames to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=231966

Patch by Tyler Wilcock <tyler_w@apple.com> on 2021-10-19
Reviewed by Chris Fleizach.

* metadata/contributors.json:
Add Chris Fleizach's and Andres Gonzalez's GitHub usernames. Add Tyler
Wilcock as a contributor. Run validate-committer-lists --canonicalize
to fix some style issues.

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

12 hours ago[ iOS ] http/tests/cache/disk-cache/redirect-chain-limits.html is a flaky timeout.
ayumi_kojima@apple.com [Tue, 19 Oct 2021 18:04:29 +0000 (18:04 +0000)]
[ iOS ] http/tests/cache/disk-cache/redirect-chain-limits.html is a flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=231630

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:

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

12 hours ago[ iOS ] imported/w3c/web-platform-tests/html/canvas/element/manual tests, fast/canvas...
ayumi_kojima@apple.com [Tue, 19 Oct 2021 18:00:02 +0000 (18:00 +0000)]
[ iOS ] imported/w3c/web-platform-tests/html/canvas/element/manual tests, fast/canvas/canvas-createPattern-video-modify.html and media/video-canvas-createPattern.html are failing.
https://bugs.webkit.org/show_bug.cgi?id=231959

Unreviewed test gardening.

* platform/ipad/TestExpectations:
* platform/mac/TestExpectations:

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

13 hours agoWasm Table can take arbitrary default value
ysuzuki@apple.com [Tue, 19 Oct 2021 17:36:49 +0000 (17:36 +0000)]
Wasm Table can take arbitrary default value
https://bugs.webkit.org/show_bug.cgi?id=231933
rdar://84327812

Reviewed by Robin Morisset.

* wasm/WasmTable.cpp:
(JSC::Wasm::Table::grow):

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

13 hours agoREGRESSION(r284313): ::marker accelerated animations are broken
graouts@webkit.org [Tue, 19 Oct 2021 17:18:05 +0000 (17:18 +0000)]
REGRESSION(r284313): ::marker accelerated animations are broken
https://bugs.webkit.org/show_bug.cgi?id=231906
<rdar://problem/84383279>

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

WPT now reflect that we correctly do not animate the opacity property and correctly account for
other ineffective properties on ::marker, such as line-height.

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

Source/WebCore:

Test: webanimations/marker-opacity-animation-no-effect.html

We incorrectly supported animations for all known CSS properties on a ::marker since we added
support for animation of ::marker, and with r284313 we started returning the correct renderer
for ::marker pseudo-elements which meant that accelerated opacity animations started running
for the first time.

We now correctly ignore disallowed properties for ::marker when animating with those changes.

First, in Style::Resolver::styleForKeyframe(), we pass the relevant allowlist to the MatchResult's
authorDeclarations when adding the keyframe properties.

Then, in KeyframeEffect::isCurrentlyAffectingProperty() we call isValidMarkerStyleProperty() in
case we're being called for a ::marker pseudo-element.

To be able to obtain the allowlist and call isValidMarkerStyleProperty() in those two questions,
we had to refactor the related code into a dedicated PropertyAllowlist file and enum.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::isCurrentlyAffectingProperty const):
* style/ElementRuleCollector.cpp:
(WebCore::Style::ElementRuleCollector::transferMatchedRules):
* style/ElementRuleCollector.h:
* style/PropertyAllowlist.cpp: Added.
(WebCore::Style::propertyAllowlistForPseudoId):
(WebCore::Style::isValidMarkerStyleProperty):
(WebCore::Style::isValidCueStyleProperty):
* style/PropertyAllowlist.h: Added.
* style/PropertyCascade.cpp:
(WebCore::Style::PropertyCascade::addMatch):
(WebCore::Style::isValidMarkerStyleProperty): Deleted.
(WebCore::Style::isValidCueStyleProperty): Deleted.
* style/RuleData.cpp:
(WebCore::Style::determinePropertyAllowlist):
(WebCore::Style::RuleData::RuleData):
(WebCore::Style::determinePropertyAllowlistType): Deleted.
* style/RuleData.h:
(WebCore::Style::RuleData::propertyAllowlist const):
(): Deleted.
(WebCore::Style::RuleData::propertyAllowlistType const): Deleted.
* style/StyleResolver.cpp:
(WebCore::Style::Resolver::styleForKeyframe):

LayoutTests:

Add a new test that checks we do not visually account for an opacity animation on a ::marker
pseudo-element.

* webanimations/marker-opacity-animation-no-effect-expected.html: Added.
* webanimations/marker-opacity-animation-no-effect.html: Added.

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

13 hours agoUse JSONValues instead of a JSC::VM to parse WKContentRuleLists
commit-queue@webkit.org [Tue, 19 Oct 2021 17:01:48 +0000 (17:01 +0000)]
Use JSONValues instead of a JSC::VM to parse WKContentRuleLists
https://bugs.webkit.org/show_bug.cgi?id=231704

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

Source/WebCore:

This makes the parser much simpler and easier to see what is going on.
It probably also saves some memory because we don't need to make a VM just to parse JSON.
Covered by existing tests.  There are extensive tests for invalid input, and there is only
one change in the error reported: we used to say the top level has to be an object, then
we would say that it has to be an array.  JavaScript arrays are objects, but JSON arrays aren't.
Valid input continues to parse the same, and invalid input continues to fail to parse, but the
error is more accurate now.

* contentextensions/ContentExtensionError.cpp:
(WebCore::ContentExtensions::contentExtensionErrorCategory):
* contentextensions/ContentExtensionError.h:
* contentextensions/ContentExtensionParser.cpp:
(WebCore::ContentExtensions::getStringList):
(WebCore::ContentExtensions::getDomainList):
(WebCore::ContentExtensions::getTypeFlags):
(WebCore::ContentExtensions::loadTrigger):
(WebCore::ContentExtensions::loadAction):
(WebCore::ContentExtensions::loadRule):
(WebCore::ContentExtensions::loadEncodedRules):
(WebCore::ContentExtensions::parseRuleList):

Tools:

* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::TEST_F):

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

13 hours ago[ iOS Win ] editing/selection/modal-dialog-select-paragraph.html is failing.
ayumi_kojima@apple.com [Tue, 19 Oct 2021 16:54:10 +0000 (16:54 +0000)]
[ iOS Win ] editing/selection/modal-dialog-select-paragraph.html is failing.
https://bugs.webkit.org/show_bug.cgi?id=231962

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:
* platform/win/TestExpectations:

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

14 hours agoRe-disable WebKit.HTTPSProxy API test on iOS
achristensen@apple.com [Tue, 19 Oct 2021 16:44:19 +0000 (16:44 +0000)]
Re-disable WebKit.HTTPSProxy API test on iOS
https://bugs.webkit.org/show_bug.cgi?id=231396

Yesterday's attempt at making it not time out does not appear to have worked.

* TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm:

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

14 hours agoDumpRenderTree should not use WK methods
ysuzuki@apple.com [Tue, 19 Oct 2021 16:41:31 +0000 (16:41 +0000)]
DumpRenderTree should not use WK methods
https://bugs.webkit.org/show_bug.cgi?id=231910

Reviewed by Alex Christensen.

DumpRenderTree functions can be called on WebThread if ios simulator is used.
If we first use WK functions on that, it causes WebKit initialization on non
main thread. We should not mix WK functions with DumpRenderTree.

* DumpRenderTree/mac/DumpRenderTree.mm:
(dumpFramesAsText):

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

14 hours ago[ iOS ] fast/inline/inline-background-clip-text-multiline.html is image failing.
ayumi_kojima@apple.com [Tue, 19 Oct 2021 16:39:41 +0000 (16:39 +0000)]
[ iOS ] fast/inline/inline-background-clip-text-multiline.html is image failing.
https://bugs.webkit.org/show_bug.cgi?id=231961

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:

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

14 hours agoUnreviewed build fix.
cdumez@apple.com [Tue, 19 Oct 2021 16:37:42 +0000 (16:37 +0000)]
Unreviewed build fix.

* DerivedSources-input.xcfilelist:

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

14 hours agoDrop assertion in RegistrationDatabase::importRecords()
cdumez@apple.com [Tue, 19 Oct 2021 16:30:14 +0000 (16:30 +0000)]
Drop assertion in RegistrationDatabase::importRecords()
https://bugs.webkit.org/show_bug.cgi?id=231960

Reviewed by Alex Christensen.

Drop assertion in RegistrationDatabase::importRecords(). This can happen when deleting service
worker scripts on disk but not clearing the service worker database.
The code properly deal with this so there is no need to crash in debug builds.

* workers/service/server/RegistrationDatabase.cpp:
(WebCore::RegistrationDatabase::importRecords):

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

14 hours agoFollow-up #2: WebKit::LocalConnection::createCredentialPrivateKey leaks an NSMutableD...
ddkilzer@apple.com [Tue, 19 Oct 2021 16:24:46 +0000 (16:24 +0000)]
Follow-up #2: WebKit::LocalConnection::createCredentialPrivateKey leaks an NSMutableDictionary
<https://webkit.org/b/231814>
<rdar://problem/84307054>

Unreviewed follow-up to address Darin's comment.

* UIProcess/WebAuthentication/Cocoa/LocalConnection.mm:
(WebKit::LocalConnection::createCredentialPrivateKey const):
- Use WTFMove() to avoid ref count churn.

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

14 hours ago[ iOS ] imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas...
ayumi_kojima@apple.com [Tue, 19 Oct 2021 16:23:46 +0000 (16:23 +0000)]
[ iOS ] imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage- tests are failing.
https://bugs.webkit.org/show_bug.cgi?id=231959

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:

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

14 hours agoStringBuffer should really know that strings might be 8-bit
fpizlo@apple.com [Tue, 19 Oct 2021 16:00:19 +0000 (16:00 +0000)]
StringBuffer should really know that strings might be 8-bit
https://bugs.webkit.org/show_bug.cgi?id=231937

Reviewed by Yusuke Suzuki.

We somehow forgot to change this to use CharType instead of UChar.

* wtf/text/StringBuffer.h:
(WTF::StringBuffer::resize):

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

15 hours agoAX: Fix broken spec links in AccessibilityObject.cpp and AccessibilityTree.cpp
commit-queue@webkit.org [Tue, 19 Oct 2021 15:38:03 +0000 (15:38 +0000)]
AX: Fix broken spec links in AccessibilityObject.cpp and AccessibilityTree.cpp
https://bugs.webkit.org/show_bug.cgi?id=231932

Patch by Tyler Wilcock <tyler_w@apple.com> on 2021-10-19
Reviewed by Chris Fleizach.

Fix broken spec links.

* accessibility/AccessibilityObject.cpp:
(WebCore::initializeRoleMap):
(WebCore::AccessibilityObject::buttonRoleType const):
* accessibility/AccessibilityTree.cpp:
(WebCore::AccessibilityTree::isTreeValid const):

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

15 hours agoFix leak of object returned from MTLCreateSystemDefaultDevice()
ddkilzer@apple.com [Tue, 19 Oct 2021 15:17:01 +0000 (15:17 +0000)]
Fix leak of object returned from MTLCreateSystemDefaultDevice()
<https://webkit.org/b/231899>
<rdar://problem/84373621>

Reviewed by Anders Carlsson.

* platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:
(WebCore::platformSupportsMetal):
* testing/Internals.mm:
(WebCore::Internals::platformSupportsMetal):
- Use adoptNS() to fix the leak.

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

15 hours agocachedCGColor() and nsColor() should return smart pointers
cdumez@apple.com [Tue, 19 Oct 2021 14:51:23 +0000 (14:51 +0000)]
cachedCGColor() and nsColor() should return smart pointers
https://bugs.webkit.org/show_bug.cgi?id=231909

Reviewed by Tim Horton.

r276283 attempted to make cachedCGColor() and nsColor() thread-safe but the fix was incomplete
since those functions return unretained objects that can be released from the cache on any
other thread. This patch updates cachedCGColor() and nsColor() to return a RetainPtr to address
the issue.

Source/WebCore:

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(AXAttributeStringSetStyle):
* editing/cocoa/FontAttributesCocoa.mm:
(WebCore::FontAttributes::createDictionary const):
* editing/cocoa/FontShadowCocoa.mm:
(WebCore::FontShadow::createShadow const):
* editing/cocoa/HTMLConverter.mm:
(HTMLConverter::convert):
(HTMLConverter::_colorForElement):
(HTMLConverter::computedAttributesForElement):
(HTMLConverter::_fillInBlock):
(HTMLConverter::_processElement):
(WebCore::editingAttributedString):
* platform/graphics/Color.h:
* platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm:
(WebCore::LocalSampleBufferDisplayLayer::initialize):
* platform/graphics/ca/PlatformCALayer.cpp:
(WebCore::PlatformCALayer::drawTextAtPoint const):
* platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm:
(WebCore::PlatformCAFilters::setFiltersOnLayer):
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
(WebCore::PlatformCALayerCocoa::setBackgroundColor):
(WebCore::PlatformCALayerCocoa::setBorderColor):
* platform/graphics/cg/ColorCG.cpp:
(WebCore::cachedCGColor):
* platform/graphics/cg/GradientCG.cpp:
(WebCore::Gradient::createCGGradient):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::setCGFillColor):
(WebCore::setCGShadow):
(WebCore::GraphicsContextCG::didUpdateState):
* platform/graphics/cocoa/ColorCocoa.h:
* platform/graphics/cocoa/ColorCocoa.mm:
(WebCore::platformColor):
* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::addAttributesForCustomFontPalettes):
* platform/graphics/cocoa/GraphicsContextCocoa.mm:
(WebCore::drawFocusRingAtTime):
(WebCore::colorForMarkerLineStyle):
(WebCore::GraphicsContextCG::drawDotsForDocumentMarker):
* platform/graphics/mac/ColorMac.h:
* platform/graphics/mac/ColorMac.mm:
(WTF::RetainPtr<NSColor>>::createValueForKey):
(WebCore::nsColor):
* platform/mac/LocalDefaultSystemAppearance.mm:
(WebCore::LocalDefaultSystemAppearance::LocalDefaultSystemAppearance):
* platform/mac/PlatformPasteboardMac.mm:
(WebCore::PlatformPasteboard::setColor):
* platform/mac/ScrollbarThemeMac.mm:
(WebCore::ScrollbarThemeMac::setUpOverhangAreaBackground):
* platform/mac/ThemeMac.mm:
(WebCore::drawCellFocusRingWithFrameAtTime):
* rendering/RenderThemeMac.mm:
(WebCore::AttachmentLayout::layOutTitle):
(WebCore::AttachmentLayout::layOutSubtitle):
* testing/cocoa/WebViewVisualIdentificationOverlay.mm:
(-[WebViewVisualIdentificationOverlay initWithWebView:kind:deprecated:]):
(drawPattern):

Source/WebKit:

* Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
(WebKit::cgColorFromColor):
(WebKit::RemoteLayerTreePropertyApplier::applyPropertiesToLayer):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView themeColor]):
(-[WKWebView underPageBackgroundColor]):
(-[WKWebView _pageExtendedBackgroundColor]):
(-[WKWebView _sampledPageTopColor]):
* UIProcess/API/Cocoa/_WKApplicationManifest.mm:
(-[_WKApplicationManifest themeColor]):
* UIProcess/API/mac/WKView.mm:
(-[WKView underlayColor]):
(-[WKView _pageExtendedBackgroundColor]):
* UIProcess/API/mac/WKWebViewMac.mm:
(-[WKWebView _underlayColor]):
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::updateTextTouchBar):
(WebKit::WebViewImpl::underlayColor const):
(WebKit::WebViewImpl::pageExtendedBackgroundColor const):
* UIProcess/PDF/WKPDFHUDView.mm:
(-[WKPDFHUDView _setupLayer:]):
* UIProcess/mac/WebColorPickerMac.mm:
(WebKit::WebColorPickerMac::setSelectedColor):
(WebKit::WebColorPickerMac::showColorPicker):
(-[WKColorPopoverMac setAndShowPicker:withColor:suggestions:]):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::setAccentColor):
* WebProcess/cocoa/VideoFullscreenManager.mm:
(WebKit::VideoFullscreenManager::enterVideoFullscreenForVideoElement):

Source/WebKitLegacy/mac:

* DOM/DOMRGBColor.mm:
(-[DOMRGBColor color]):
* WebView/WebFrame.mm:
(-[WebFrame _bodyBackgroundColor]):
* WebView/WebView.mm:
(-[WebView updateTextTouchBar]):

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

16 hours ago[LFC][IFC] Rename Line::removeCollapsibleContent to removeTrimmableContent
zalan@apple.com [Tue, 19 Oct 2021 14:45:58 +0000 (14:45 +0000)]
[LFC][IFC] Rename Line::removeCollapsibleContent to removeTrimmableContent
https://bugs.webkit.org/show_bug.cgi?id=231930

Reviewed by Antti Koivisto.

"Trimming" is closer to spec language.

* layout/formattingContexts/inline/InlineLine.cpp:
(WebCore::Layout::Line::removeTrimmableContent):
(WebCore::Layout::Line::removeCollapsibleContent): Deleted.
* layout/formattingContexts/inline/InlineLine.h:
* layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::close):

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

16 hours agoUpdate seccomp filters with latest changes from flatpak
commit-queue@webkit.org [Tue, 19 Oct 2021 14:27:17 +0000 (14:27 +0000)]
Update seccomp filters with latest changes from flatpak
https://bugs.webkit.org/show_bug.cgi?id=231479

Patch by Michael Catanzaro <mcatanzaro@gnome.org> on 2021-10-19
Reviewed by Adrian Perez de Castro.

Additionally, let's fix a minor inconsistency in our error-handling code: all but one of
our codepaths carefully free and close resources, but the process is about to crash so
there's not really any reason to do so. The code is slightly simpler if we don't bother.

The seemingly-extraneous include order changes are required to placate the style checker.

* UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
(WebKit::seccompStrerror):
(WebKit::setupSeccomp):
* UIProcess/Launcher/glib/Syscalls.h: Added.

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

16 hours agoUnskip passing flex-basis: content + aspect ratio WPT tests
commit-queue@webkit.org [Tue, 19 Oct 2021 14:25:29 +0000 (14:25 +0000)]
Unskip passing flex-basis: content + aspect ratio WPT tests
https://bugs.webkit.org/show_bug.cgi?id=231947

Patch by Rob Buis <rbuis@igalia.com> on 2021-10-19
Reviewed by Sergio Villar Senin.

Unskip passing flex-basis: content + aspect ratio WPT tests. These test cases did not work
before because there was no support for flex-basis: content, but since r284440 they pass.

* TestExpectations:

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

16 hours ago[ wk2 ] 2 page-cache layout-tests are flakey crashing
youenn@apple.com [Tue, 19 Oct 2021 14:17:27 +0000 (14:17 +0000)]
[ wk2 ] 2 page-cache layout-tests are flakey crashing
https://bugs.webkit.org/show_bug.cgi?id=224558
<rdar://problem/76652825>

Reviewed by Eric Carlson.

Source/WebCore:

Covered by updated test.

* Modules/mediastream/PeerConnectionBackend.cpp:
srflx candidates can be exposed even in case of filtering enabled.
* testing/MockLibWebRTCPeerConnection.cpp:
Backend should now handle the mDNS filtering itself.

LayoutTests:

* fast/mediastream/RTCPeerConnection-icecandidate-event-expected.txt: Rebasing after mock changes.
* platform/mac-wk2/TestExpectations:
* webrtc/peerconnection-new-candidate-page-cache.html:

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

17 hours ago[css-scroll-snap] Triggering a layout during scroll causes jittery scrolling on iOS
commit-queue@webkit.org [Tue, 19 Oct 2021 13:46:40 +0000 (13:46 +0000)]
[css-scroll-snap] Triggering a layout during scroll causes jittery scrolling on iOS
https://bugs.webkit.org/show_bug.cgi?id=173887
<rdar://problem/67153673>

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

Source/WebKit:

Tests: fast/scrolling/ios/scroll-snap-with-relayouts-horizontal.html
       fast/scrolling/ios/scroll-snap-with-relayouts-vertical.html

Ensure that when the root node is scrolling, it is added to the list of nodes
with an active user scroll. This prevents the web process from resnapping during
layout when the user is actively scrolling.

* UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView scrollViewWillBeginDragging:]): Call RemoteScrollingCoordinatorProxy::setRootNodeIsInUserScroll
when a scdroll starts and ends.
* UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h: Added method declaration.
* UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxy::setRootNodeIsInUserScroll): Added setRootNodeIsInUserScroll method.

LayoutTests:

* fast/scrolling/ios/scroll-snap-with-relayouts-horizontal-expected.txt: Added.
* fast/scrolling/ios/scroll-snap-with-relayouts-horizontal.html: Added.
* fast/scrolling/ios/scroll-snap-with-relayouts-vertical-expected.txt: Added.
* fast/scrolling/ios/scroll-snap-with-relayouts-vertical.html: Added.

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

17 hours agoRemove support for some SVG properties
commit-queue@webkit.org [Tue, 19 Oct 2021 13:40:40 +0000 (13:40 +0000)]
Remove support for some SVG properties
https://bugs.webkit.org/show_bug.cgi?id=227897

Patch by Rob Buis <rbuis@igalia.com> on 2021-10-19
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Adjust test expectations to removed properties.

* web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
* web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
* web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:

Source/WebCore:

Remove support for the SVG properties color-profile, color-rendering
and enable-background. We never had support for these apart from parsing
them and they are removed from the SVG2 specification.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
* css/CSSProperties.json:
* css/SVGCSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::svgPropertyValue):
* css/SVGCSSValueKeywords.in:
* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::CSSParserFastPaths::isKeywordPropertyID):
* rendering/style/SVGRenderStyle.cpp:
(WebCore::SVGRenderStyle::diff const):
* rendering/style/SVGRenderStyle.h:
(WebCore::SVGRenderStyle::setColorInterpolationFilters):
(WebCore::SVGRenderStyle::colorInterpolationFilters const):
(WebCore::SVGRenderStyle::setBitDefaults):
(WebCore::SVGRenderStyle::InheritedFlags::operator== const):
(WebCore::SVGRenderStyle::setColorRendering): Deleted.
(WebCore::SVGRenderStyle::colorRendering const): Deleted.
* svg/SVGElement.cpp:
(WebCore::createAttributeNameToCSSPropertyIDMap):
* svg/properties/SVGPropertyAnimatorFactory.h:
(WebCore::SVGPropertyAnimatorFactory::attributeAnimatorCreator):
* svg/svgattrs.in:

LayoutTests:

Adjust test expectations to removed properties.

* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/glib/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/glib/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/glib/svg/css/getComputedStyle-basic-expected.txt:
* platform/gtk/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
* platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
* platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
* platform/ios/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/ios/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/ios/svg/css/getComputedStyle-basic-expected.txt:
* platform/mac/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/mac/svg/css/getComputedStyle-basic-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
* svg/css/getComputedStyle-basic-expected.txt:

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

18 hours agogetDisplayMedia MediaStreamTrack.applyConstraints behavior regressed in Safari 15
youenn@apple.com [Tue, 19 Oct 2021 11:52:22 +0000 (11:52 +0000)]
getDisplayMedia MediaStreamTrack.applyConstraints behavior regressed in Safari 15
https://bugs.webkit.org/show_bug.cgi?id=231286
<rdar://problem/83930865>

Reviewed by Eric Carlson.

Source/WebKit:

Display tracks are different in that they do not have presets.
Revert back to directly linking the WebProcess track with the remote display source without going through RealtimeVideoSource.
This restores past behavior.
Refactoring of UserMediaCaptureManager to use a single map.
We do not yet support cloning tracks to get different sizes, this should be done as a follow-up.

Covered by fast/mediastream/getDisplayMedia-size.html.

* SourcesCocoa.txt:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/cocoa/RemoteCaptureSampleManager.cpp:
* WebProcess/cocoa/RemoteCaptureSampleManager.h:
* WebProcess/cocoa/RemoteRealtimeAudioSource.cpp:
* WebProcess/cocoa/RemoteRealtimeAudioSource.h:
* WebProcess/cocoa/RemoteRealtimeDisplaySource.cpp: Added.
* WebProcess/cocoa/RemoteRealtimeDisplaySource.h: Added.
* WebProcess/cocoa/RemoteRealtimeVideoSource.cpp:
* WebProcess/cocoa/UserMediaCaptureManager.cpp:
* WebProcess/cocoa/UserMediaCaptureManager.h:

LayoutTests:

* fast/mediastream/getDisplayMedia-size-expected.txt: Added.
* fast/mediastream/getDisplayMedia-size.html: Added.
* platform/ios/TestExpectations: Added.

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

19 hours agoExpose MediaCapabilities to Workers
youenn@apple.com [Tue, 19 Oct 2021 11:05:19 +0000 (11:05 +0000)]
Expose MediaCapabilities to Workers
https://bugs.webkit.org/show_bug.cgi?id=231574

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

Allow running encoding tests in workers as well as in window.

* web-platform-tests/media-capabilities/decodingInfo.any.worker-expected.txt:
* web-platform-tests/media-capabilities/encodingInfo.any-expected.txt: Added.
* web-platform-tests/media-capabilities/encodingInfo.any.html: Added.
* web-platform-tests/media-capabilities/encodingInfo.any.js: Added.
* web-platform-tests/media-capabilities/encodingInfo.any.worker-expected.txt: Added.
* web-platform-tests/media-capabilities/encodingInfo.any.worker.html: Added.
* web-platform-tests/media-capabilities/encodingInfo-expected: Removed.
* web-platform-tests/media-capabilities/encodingInfo.html: Removed.
* web-platform-tests/media-capabilities/idlharness.any.worker-expected.txt:

Source/WebCore:

Expose Media Capabilities to workers by hopping to main thread and using worker responsible document for gathering Media Capabilities, then hopping back to worker.
MediaCapabilities will store the promises when waiting for media capabilities gathering by document.

We remove CustomEnabled since it is not supported in Workers and we are now exposing encoding info for WebRTC anyway.

Tests: imported/w3c/web-platform-tests/media-capabilities/encodingInfo.any.html
       imported/w3c/web-platform-tests/media-capabilities/encodingInfo.any.worker.html

* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Modules/mediacapabilities/MediaCapabilities.cpp:
* Modules/mediacapabilities/MediaCapabilities.h:
* Modules/mediacapabilities/MediaCapabilities.idl:
* Modules/mediacapabilities/NavigatorMediaCapabilities.cpp:
* Modules/mediacapabilities/NavigatorMediaCapabilities.h:
* Modules/mediacapabilities/WorkerNavigator+MediaCapabilities.idl: Added.
* Modules/mediacapabilities/WorkerNavigatorMediaCapabilities.cpp: Added.
* Modules/mediacapabilities/WorkerNavigatorMediaCapabilities.h: Added.
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* dom/ScriptExecutionContext.cpp:
* dom/ScriptExecutionContext.h:
* platform/MediaCapabilitiesDecodingInfo.h:
* platform/MediaCapabilitiesEncodingInfo.h:
* platform/MediaCapabilitiesInfo.h:
* platform/mediacapabilities/AudioConfiguration.h:
* platform/mediacapabilities/MediaConfiguration.h:
* platform/mediacapabilities/MediaDecodingConfiguration.h:
* platform/mediacapabilities/MediaEncodingConfiguration.h:
* platform/mediacapabilities/VideoConfiguration.h:

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

19 hours agoClose peer connection sockets when entering page cache
youenn@apple.com [Tue, 19 Oct 2021 11:03:15 +0000 (11:03 +0000)]
Close peer connection sockets when entering page cache
https://bugs.webkit.org/show_bug.cgi?id=231890

Reviewed by Eric Carlson.

Source/WebKit:

We proactively close all peer connection sockets when entering page cache.
This makes peer connection go to disconnected and then failed state.
Covered by updated tests.

* WebProcess/Network/webrtc/LibWebRTCSocket.cpp:

LayoutTests:

* webrtc/peerconnection-page-cache-long.html:
* webrtc/peerconnection-page-cache.html:

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

20 hours agoAdd my github username to contributors.json
svillar@igalia.com [Tue, 19 Oct 2021 10:21:36 +0000 (10:21 +0000)]
Add my github username to contributors.json

Unreviewed.

* metadata/contributors.json:

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

20 hours ago[css-flexbox] Add flex-basis: content support
svillar@igalia.com [Tue, 19 Oct 2021 10:14:40 +0000 (10:14 +0000)]
[css-flexbox] Add flex-basis: content support
https://bugs.webkit.org/show_bug.cgi?id=221479
LayoutTests/imported/w3c:

Reviewed by Javier Fernandez.

Fixed 6 subtest expectations. All of them working fine now.

* web-platform-tests/css/css-flexbox/parsing/flex-basis-computed-expected.txt:
* web-platform-tests/css/css-flexbox/parsing/flex-basis-valid-expected.txt:
* web-platform-tests/css/css-flexbox/parsing/flex-shorthand-expected.txt:

Source/WebCore:

Reviewed by Javier Fernandez.

Add support for the content keyword as a valid value for the flex-basis property.
It indicates an automated size based on the contents of the flex item. It's typically
equivalent to the max-content size but it has some adjustments for aspect ratios,
orthogonal flows and intrinsic sizing constraints.

Apart from adding the parsing support, it required very little adjustments in the
flexbox code after the refactoring in r284359.

This makes WebKit pass all of the flex-basis:content tests in WPT. We're talking
about 6 tests testing the feature and 6 subtests related to parsing.

* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Handle Content in switch.
(WebCore::CSSPrimitiveValue::init): Initialization for content CSS value.
* css/CSSProperties.json:
* css/LengthFunctions.cpp: Replaced LengthOrAuto by LengthSizing.
(WebCore::valueForLength): Handle Content in switch.
(WebCore::floatValueForLength): Ditto.
* css/LengthFunctions.h:
(WebCore::minimumValueForLength): Ditto.
* css/calc/CSSCalcValue.cpp:
(WebCore::createCSS): Ditto.
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeFlexBasis): Consume CSSValueContent.
(WebCore::CSSPropertyParser::consumeFlex): Ditto.
* platform/Length.cpp:
(WebCore::operator<<): Added printing support for content.
* platform/Length.h:
(WebCore::Length::initialize): Added enum for content.
(WebCore::Length::isContent const): New method.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeReplacedLogicalWidthUsing const): Handle content in switch.
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::childMainSizeIsDefinite): Treat content as indefinite lenght.
(WebCore::RenderFlexibleBox::childHasComputableAspectRatioAndCrossSizeIsConsideredDefinite):
Flex basis must be either auto or content.
(WebCore::RenderFlexibleBox::computeFlexBaseSizeForChild): Compute flex-basis using max-content
if flex-basis:content is specified.
* style/StyleBuilderConverter.h:
(WebCore::Style::BuilderConverter::convertLengthSizing): Handle content in switch.

Source/WebKit:

<rdar://problem/74279369>

Reviewed by Javier Fernandez.

Handle LengthType::Content in encode/decode functions.

* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<Length>::encode):
(IPC::ArgumentCoder<Length>::decode):

LayoutTests:

Reviewed by Javier Fernandez.

* TestExpectations: Unskipped 6 tests that are now passing.

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

22 hours agoEnsure CanvasRenderingContext2D.drawImage(video) uses the right color space
heycam@apple.com [Tue, 19 Oct 2021 08:35:40 +0000 (08:35 +0000)]
Ensure CanvasRenderingContext2D.drawImage(video) uses the right color space
https://bugs.webkit.org/show_bug.cgi?id=229025
<rdar://problem/81828490>

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Add some new WPTs for drawImage(video).

* web-platform-tests/html/canvas/element/manual/imagebitmap/createImageBitmap-drawImage.html:
* web-platform-tests/html/canvas/element/manual/imagebitmap/createImageBitmap-flipY.html:
Updated tests to check that video color space conversion is done
correctly.

* web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-video-expected.txt: Added.
* web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-video.html: Added.
* web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-video-expected.txt: Added.
* web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-video.html: Added.
* web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3.js:
(pixelsApproximatelyEqual): Tweaked threshold to pass video tests on iOS.
* web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-222000000.mp4: Added.
* web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-222000000.webm: Added.
* web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-3FF000000.mp4: Added.
* web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-3FF000000.webm: Added.
* web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BB0000.mp4: Added.
* web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BB0000.webm: Added.
* web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0100.mp4: Added.
* web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0100.webm: Added.

Source/WebCore:

When GPU process media handling is disabled (and in the GPU process
when it is handling a NativeImageForCurrentTime message),
MediaPlayer::nativeImageForCurrentTime is used to get the video frame
image. We make this return an image with the right color space on
Apple platforms in PixelBufferConformerCV::createImageFromPixelBuffer.

For now, we avoid using the correct color space when passing
HTMLVideoElements to WebGLRenderingContext.texImage2D. The
specification is unclear about what color space the texture data
should be in, and implementations are currently interoperable in not
converting the RGB color space of the video (such as Rec.601, Rec.709,
etc.) into sRGB. To avoid the conversion, and effectively reinterpret
the video RGB colors as sRGB, we make the ImageBuffer the video is
drawn into have a matching color space, as it's the raw RGB values
from the ImageBuffer that are uploade as the texture.

(An alternative to this could be passing an argument through
nativeImageForCurrentTime and paintCurrentFrameInContext, which says
to avoid doing the conversion from video RGB to sRGB, but that needs a
fair amount of plumbing.)

If https://github.com/KhronosGroup/WebGL/issues/2165 is resolved, the
changes to LRUImageBufferCache in this commit can be reverted, so that
video frames are drawn into sRGB ImageBuffers again. (We'd also need
something to make the copyToPlatformTexture() call in
texImageSourceHelper do the correct color conversion somehow.)

The now differing behavior between CanvasRenderingContext2D.drawImage
and WebGLRenderingContext.texImage2D means that the WebGL conformance
suite textures/misc/texture-corner-case-videos.html test fails, since
it checks for incorrect 2D canvas video frame color conversion.

Tests: imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-video.html
       imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-video.html

* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::colorSpace const): New function that
exposes the color space of the current frame of the video.
* html/HTMLVideoElement.h:
* html/ImageBitmap.cpp:
(WebCore::ImageBitmap::createPromise): Create the ImageBuffer in a
color space that matches the video, not always sRGB.
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::drawImageIntoBuffer):
(WebCore::WebGLRenderingContextBase::videoFrameToImage): Use an
ImageBuffer whose color space matches the video frame's color space.
(WebCore::WebGLRenderingContextBase::LRUImageBufferCache::imageBuffer):
Add a DestinationColorSpace argument, so that the LRU cache is keyed
off both size and color space.
* html/canvas/WebGLRenderingContextBase.h:
* platform/cocoa/CoreVideoSoftLink.cpp:
* platform/cocoa/CoreVideoSoftLink.h: Add SPIs that let us get or
compute a CGColorSpace from a CVPixelBuffer. Remove
CVImageBufferGetColorSpace, which is unsused.
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::colorSpace):
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::colorSpace):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::colorSpace):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::colorSpace): Expose the
color space of the current image. While we strictly only need the pixel
buffer to be up to date, we call updateLastImage() since it has the
UpdateSynchronously behavior, and the caller to colorSpace() will use
the image soon anyway.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::colorSpace):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::colorSpace):
* platform/graphics/cg/ColorSpaceCG.h:
* platform/graphics/cv/CVUtilities.h:
* platform/graphics/cv/CVUtilities.mm:
(WebCore::createCGColorSpaceForCVPixelBuffer): New function to produce
a CGColorSpace for a CVPixelBuffer. On macOS, this is stored as an
attachment on the CVPixelBuffer. On iOS, we must call SPI to create a
CGColorSpace based on the other color space information in the
attachments. (It's possible we should cache the results of this
function for a given set of color space attachments, since
CVImageBufferCreateColorSpaceFromAttachments can end up creating a new
CGColorSpace object every time it's called.)
* platform/graphics/cv/PixelBufferConformerCV.cpp:
(WebCore::PixelBufferConformerCV::createImageFromPixelBuffer): Create
the CGImage in a color space matching the CVPixelBuffer.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::colorSpace):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
* platform/graphics/holepunch/MediaPlayerPrivateHolePunch.h:
* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::MediaPlayerPrivateMediaFoundation::colorSpace):
* platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
* platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
(WebCore::MockMediaPlayerMediaSource::colorSpace):
* platform/mock/mediasource/MockMediaPlayerMediaSource.h:
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::drawInternal):

Source/WebKit:

When GPU process media handling is enabled, ctx.drawImage(video)
calls work by sending a NativeImageForCurrentTime message to the GPU
process, which returns an IOSurface around which a CGImage is created.
There's no good way to get the color space off the IOSurface, so we
add a second return argument to NativeImageForCurrentTime to indicate
the color space used.

ImageBitmap creates an ImageBuffer for that image to be painted into,
and for that we also need to know the color space of the video. The
code that sends NativeImageForCurrentTime and then paints the
resulting image into the GraphicsContext is further down. So we add
a separate IPC message that gets the color space of the video's
current frame. (It would be better if we could avoid a second
synchronous IPC message call, but either ImageBitmap's scaling and
cropping code, or the ImageBuffer creation call, would need to be moved
down into MediaPlayerPrivateRemote::paintCurrentFrameInContext, which
doesn't seem like the right place for it.)

* GPUProcess/media/RemoteImageDecoderAVFProxy.cpp:
(WebKit::RemoteImageDecoderAVFProxy::createFrameImageAtIndex):
* GPUProcess/media/RemoteImageDecoderAVFProxy.h:
* GPUProcess/media/RemoteMediaPlayerProxy.h:
* GPUProcess/media/RemoteMediaPlayerProxy.messages.in:
* GPUProcess/media/cocoa/RemoteMediaPlayerProxyCocoa.mm:
(WebKit::RemoteMediaPlayerProxy::nativeImageForCurrentTime):
(WebKit::RemoteMediaPlayerProxy::colorSpace):
* WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
(WebKit::MediaPlayerPrivateRemote::colorSpace):
* WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
* WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm:
(WebKit::MediaPlayerPrivateRemote::nativeImageForCurrentTime): Add a
second return argument to NativeImageForCurrentTime to indicate the
color space of the returned IOSurface.
(WebKit::MediaPlayerPrivateRemote::colorSpace): Add a new IPC message to
get the color space of a video's current frame.

Source/WTF:

* wtf/PlatformHave.h: Add HAVE_CVBUFFERCOPYATTACHMENTS.

LayoutTests:

* TestExpectations:
texture-corner-case-videos.html relies on incorrect color space handling
with drawImage() on a 2D canvas and so now fails.

* platform/glib/TestExpectations:
* platform/ios-14/TestExpectations:
* platform/ios-device/TestExpectations:
* platform/ios/TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:
New tests pass only on macOS Monterey+ and iOS 15+.

* fast/canvas/canvas-createPattern-video-loading-expected.txt:
* fast/canvas/canvas-createPattern-video-loading.html:
* fast/canvas/canvas-createPattern-video-modify-expected.txt:
* fast/canvas/canvas-createPattern-video-modify.html:
* media/video-canvas-createPattern-expected.txt:
* media/video-canvas-createPattern.html:
* media/video-canvas-drawing-output-expected.txt:
* media/video-canvas-drawing-output.html:
* media/video-orientation-canvas-expected.txt:
* media/video-orientation-canvas.html:
Update some tests to check for correctly converted color values.

* platform/mac/media/video-canvas-createPattern-expected.png: Removed.
* platform/wpe/media/video-canvas-createPattern-expected.png: Removed.

* platform/mac-wk1/imported/w3c/web-platform-tests/html/canvas/element/manual/imagebitmap/createImageBitmap-flipY-expected.txt:
An existing failure that changed a bit. This is
https://bugs.webkit.org/show_bug.cgi?id=231001.

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

22 hours agoQuery EGL_BIND_TO_TEXTURE_TARGET_ANGLE to determine 2D/rectangular texture usage
kpiddington@apple.com [Tue, 19 Oct 2021 08:06:43 +0000 (08:06 +0000)]
Query EGL_BIND_TO_TEXTURE_TARGET_ANGLE to determine 2D/rectangular texture usage
https://bugs.webkit.org/show_bug.cgi?id=231468

Refactor GraphicsContextGLCocoa to hold a reference to
BIND_TO_TEXTURE_TARGET. This refactor is neccesary to support dropping
TEXTURE_RECT support from the Metal backend, as support is incomplete, and unnecessary

Reviewed by Kenneth Russell.

* Modules/webxr/WebXROpaqueFramebuffer.cpp:
(WebCore::WebXROpaqueFramebuffer::startFrame):
* platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:
(WebCore::GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL):
(WebCore::GraphicsContextGLOpenGL::drawingBufferTextureTarget):
(WebCore::GraphicsContextGLOpenGL::drawingBufferTextureTargetQueryForDrawingTarget):
(WebCore::GraphicsContextGLOpenGL::EGLDrawingBufferTextureTargetForDrawingTarget):
(WebCore::GraphicsContextGLOpenGL::allocateAndBindDisplayBufferBacking):
(WebCore::GraphicsContextGLOpenGL::bindDisplayBufferBacking):
(WebCore::GraphicsContextGLOpenGL::readCompositedResults):
(WebCore::GraphicsContextGLOpenGL::drawingBufferTextureTargetQuery): Deleted.
(WebCore::GraphicsContextGLOpenGL::EGLDrawingBufferTextureTarget): Deleted.
* platform/graphics/cv/GraphicsContextGLCVANGLE.cpp:
(WebCore::GraphicsContextGLCVANGLE::GraphicsContextGLCVANGLE):
(WebCore::GraphicsContextGLCVANGLE::copyPixelBufferToTexture):
* platform/graphics/opengl/GraphicsContextGLOpenGL.h:

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

24 hours agobox-shadow and text-shadow do not yield float values while interpolating
graouts@webkit.org [Tue, 19 Oct 2021 06:45:59 +0000 (06:45 +0000)]
box-shadow and text-shadow do not yield float values while interpolating
https://bugs.webkit.org/show_bug.cgi?id=230347
<rdar://problem/83319111>

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Add some new WPT tests for float and calc() values for box-shadow and text-shadow while
interpolating and update output for still-failing composite operations tests. The new tests
have already landed in WPT with https://github.com/web-platform-tests/wpt/pull/30823.

* web-platform-tests/css/css-backgrounds/animations/box-shadow-composition-expected.txt:
* web-platform-tests/css/css-backgrounds/animations/box-shadow-interpolation-expected.txt:
* web-platform-tests/css/css-backgrounds/animations/box-shadow-interpolation.html:
* web-platform-tests/css/css-backgrounds/box-shadow-calc-expected.html: Added.
* web-platform-tests/css/css-backgrounds/box-shadow-calc.html: Added.
* web-platform-tests/css/css-transitions/animations/text-shadow-composition-expected.txt:
* web-platform-tests/css/css-transitions/animations/text-shadow-interpolation-expected.txt:
* web-platform-tests/css/css-transitions/animations/text-shadow-interpolation.html:

Source/WebCore:

ShadowData members used integer values rather than floats and thus could not represent
float values while interpolating. We now use float values.

Test: imported/w3c/web-platform-tests/css/css-backgrounds/box-shadow-calc.html

* animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
(WebCore::shadowForBlending):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::valueForFilter):
* display/css/DisplayBoxDecorationPainter.cpp:
(WebCore::Display::BoxDecorationPainter::paintBoxShadow const):
* editing/Editor.cpp:
(WebCore::Editor::fontAttributesAtSelectionStart):
* platform/LengthPoint.h:
(WebCore::LengthPoint::isZero const):
* platform/mac/WebCoreNSFontManagerExtras.mm:
(WebCore::computedFontAttributeChanges):
* rendering/LegacyEllipsisBox.cpp:
(WebCore::LegacyEllipsisBox::paint):
* rendering/RenderBoxModelObject.cpp:
(WebCore::applyBoxShadowForBackground):
(WebCore::RenderBoxModelObject::boxShadowShouldBeAppliedToBackground const):
(WebCore::RenderBoxModelObject::paintBoxShadow):
* rendering/TextBoxPainter.cpp:
(WebCore::TextBoxPainter::debugTextShadow const):
* rendering/TextDecorationPainter.cpp:
(WebCore::TextDecorationPainter::paintTextDecoration):
* rendering/TextPainter.cpp:
(WebCore::ShadowApplier::shadowIsCompletelyCoveredByText):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::setTextShadow):
(WebCore::RenderStyle::shadowExtent):
(WebCore::RenderStyle::shadowInsetExtent):
(WebCore::RenderStyle::getShadowHorizontalExtent):
(WebCore::RenderStyle::getShadowVerticalExtent):
* rendering/style/ShadowData.cpp:
(WebCore::ShadowData::ShadowData):
(WebCore::calculateShadowExtent):
* rendering/style/ShadowData.h:
(WebCore::ShadowData::ShadowData):
(WebCore::ShadowData::x const):
(WebCore::ShadowData::y const):
(WebCore::ShadowData::location const):
(WebCore::ShadowData::radius const):
(WebCore::ShadowData::paintingExtent const):
(WebCore::ShadowData::spread const):
* style/StyleBuilderCustom.h:
(WebCore::Style::BuilderCustom::applyTextOrBoxShadowValue):

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

24 hours agoMake createImageBitmap() take EXIF orientation into account correctly
heycam@apple.com [Tue, 19 Oct 2021 06:32:24 +0000 (06:32 +0000)]
Make createImageBitmap() take EXIF orientation into account correctly
https://bugs.webkit.org/show_bug.cgi?id=231063
<rdar://problem/83753956>

Reviewed by Myles Maxfield and Said Abou-Hallawa.

LayoutTests/imported/w3c:

* web-platform-tests/html/canvas/element/manual/imagebitmap/createImageBitmap-exif-orientation-expected.txt: Added.
* web-platform-tests/html/canvas/element/manual/imagebitmap/createImageBitmap-exif-orientation.html: Added.
* web-platform-tests/html/canvas/element/manual/imagebitmap/resources/squares.jpg: Added.

Source/WebCore:

Test: imported/w3c/web-platform-tests/html/canvas/element/manual/imagebitmap/createImageBitmap-exif-orientation.html

This makes us treat {imageOrientation:"none"} as meaning "apply EXIF
orientation without any additional transformation", and
{imageOrientation:"flipY"} as meaning "apply EXIF orientation and then
apply an additional vertical flip". This behavior matches Firefox;
https://github.com/whatwg/html/issues/7210 is open on clarifying this
behavior in the HTML spec.

* html/ImageBitmap.cpp:
(WebCore::ImageBitmap::createPromise):
(WebCore::ImageBitmap::createFromBuffer):
(WebCore::imageOrientationForOrientation): Deleted.
* html/ImageBitmapOptions.h:
(WebCore::ImageBitmapOptions::resolvedImageOrientation const):
* html/ImageBitmapOptions.idl:
* platform/graphics/ImageOrientation.h:
(WebCore::ImageOrientation::withFlippedY const):

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

26 hours agoJSTests:
commit-queue@webkit.org [Tue, 19 Oct 2021 04:07:22 +0000 (04:07 +0000)]
JSTests:
Test coverage for JSC shadow realms implementation
https://bugs.webkit.org/show_bug.cgi?id=230602

Patch by Phillip Mates <pmates@igalia.com> on 2021-10-18
Reviewed by Yusuke Suzuki.

* modules/import-meta-syntax.js:
(shouldThrow):
* stress/eval-indirect.js: Added.
(shouldBe):
(shouldThrow):
* stress/import-syntax.js:
* stress/resources/shadow-realm-example-module.js: Added.
(putInGlobal):
(getFromGlobal):
(getAnObject):
(getCallCount):
* stress/shadow-realm-evaluate.js: Added.
(shouldBe):
(shouldThrow):
(assertionFn):
(shouldBe.String):
(shouldBe.globalObjectFor.doEval):
(shouldBe.globalObjectFor):
* stress/shadow-realm-import-value.js: Added.
(shouldBe):
(shouldThrow):
(async shouldThrowAsync):
(async const):
(doImport):
* stress/shadow-realm.js: Added.
(shouldBe):
(throw.new.Error):
* test262/config.yaml:

Source/JavaScriptCore:
shadow realms implementation
https://bugs.webkit.org/show_bug.cgi?id=230602

Patch by Phillip Mates <pmates@igalia.com> on 2021-10-18
Reviewed by Yusuke Suzuki.

Implementation of the Shadow Realms proposal (stage 3 in TC39) [1]

Main APIs added are
 - `new ShadowRealm()`
   creates an object that has its own global object and module graph.
 - ShadowRealm.prototype.evaluate(sourceText)
   this allows for evaluating code in the context of the realm, which
   has its own module graph and global object.
 - ShadowRealm.prototype.importValue(specifier, exportName)
   this allows importing module exports in the the context of the
   realm, which has its own module graph and global object.

The main detail of the Shadow Realm implementation is that values
passed between realms must be either primitives or wrapped callables.
Wrapped callables themselves are callables that check that their
arguments and return values are also either primitives or wrapped
callables. This detail is implemented via JS builtins + a few new
intrinsics.

Can be enabled using `--useShadowRealm=true`

[1]: https://github.com/tc39/proposal-shadowrealm

* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Sources.txt:
* builtins/BuiltinNames.h:
* builtins/ShadowRealmPrototype.js: Added.
(globalPrivate.wrap.wrapped):
(globalPrivate.wrap):
(evaluate):
(importValue):
* bytecode/BytecodeIntrinsicRegistry.h:
* bytecode/LinkTimeConstant.h:
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::emitIsShadowRealm):
* bytecompiler/NodesCodegen.cpp:
* jsc.cpp:
(JSC_DEFINE_HOST_FUNCTION):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseMemberExpression):
* runtime/CommonIdentifiers.h:
* runtime/IndirectEvalExecutable.cpp:
(JSC::IndirectEvalExecutable::createImpl):
(JSC::IndirectEvalExecutable::create):
(JSC::IndirectEvalExecutable::tryCreate):
* runtime/IndirectEvalExecutable.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildrenImpl):
(JSC::JSGlobalObject::createWithCustomMethodTable):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::shadowRealmPrototype const):
(JSC::JSGlobalObject::shadowRealmStructure const):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
* runtime/JSType.cpp:
(WTF::printInternal):
* runtime/JSType.h:
* runtime/OptionsList.h:
* runtime/ShadowRealmConstructor.cpp: Added.
(JSC::ShadowRealmConstructor::ShadowRealmConstructor):
(JSC::ShadowRealmConstructor::finishCreation):
(JSC::JSC_DEFINE_HOST_FUNCTION):
* runtime/ShadowRealmConstructor.h: Added.
* runtime/ShadowRealmObject.cpp: Added.
(JSC::ShadowRealmObject::ShadowRealmObject):
(JSC::ShadowRealmObject::visitChildrenImpl):
(JSC::ShadowRealmObject::create):
(JSC::ShadowRealmObject::finishCreation):
* runtime/ShadowRealmObject.h: Added.
* runtime/ShadowRealmPrototype.cpp: Added.
(JSC::ShadowRealmPrototype::ShadowRealmPrototype):
(JSC::ShadowRealmPrototype::finishCreation):
(JSC::JSC_DEFINE_HOST_FUNCTION):
* runtime/ShadowRealmPrototype.h: Added.
* runtime/VM.cpp:
* runtime/VM.h:

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

26 hours agoWebM with invalid size should fail to load with error
jya@apple.com [Tue, 19 Oct 2021 03:51:56 +0000 (03:51 +0000)]
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

27 hours agoAlways set color space for incoming H.264/265 streams
heycam@apple.com [Tue, 19 Oct 2021 03:43:17 +0000 (03:43 +0000)]
Always set color space for incoming H.264/265 streams
https://bugs.webkit.org/show_bug.cgi?id=231881
<rdar://problem/84350707>

Reviewed by Youenn Fablet.

Followup from https://bugs.webkit.org/show_bug.cgi?id=231353. In some
configurations, the "ColorInfoGuessedBy" attachment is not set on the
CVPixelBuffers coming out of the VTDecompressionSession, but the
guessed, incorrect color space attachments are still there. Since we
currently always have an sRGB stream, don't bother looking for
"ColorInfoGuessedBy".

* Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderH264.mm:
(overrideColorSpaceAttachments):
(decompressionOutputCallback):
(overrideColorSpaceAttachmentsIfNeeded): Deleted.
* Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderH265.mm:
(overrideColorSpaceAttachments):
(h265DecompressionOutputCallback):
(overrideColorSpaceAttachmentsIfNeeded): Deleted.

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

27 hours ago[LFC][IFC] Adjust the logical right side of the line when box-decoration-break: clone...
zalan@apple.com [Tue, 19 Oct 2021 03:36:06 +0000 (03:36 +0000)]
[LFC][IFC] Adjust the logical right side of the line when box-decoration-break: clone is present
https://bugs.webkit.org/show_bug.cgi?id=231873

Reviewed by Antti Koivisto.

This patch adds support for "box-decoration-break: clone" cases when the inline box is either not line spanning or
it shows up first on the line.

* layout/formattingContexts/inline/InlineLine.cpp:
(WebCore::Layout::Line::initialize):
(WebCore::Layout::Line::appendInlineBoxStart):
(WebCore::Layout::Line::appendInlineBoxEnd):
(WebCore::Layout::Line::appendTextContent):
* layout/formattingContexts/inline/InlineLine.h:
(WebCore::Layout::Line::contentLogicalRight const):
(WebCore::Layout::Line::inlineBoxListWithClonedDecorationEnd const):
(WebCore::Layout::Line::lineSpanningInlineBoxRunEnds const): Deleted.
* layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:
(WebCore::Layout::LineBoxBuilder::constructAndAlignInlineLevelBoxes):
* layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::handleInlineContent):

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

27 hours agoUnreviewed, reverting r284413.
commit-queue@webkit.org [Tue, 19 Oct 2021 03:16:17 +0000 (03:16 +0000)]
Unreviewed, reverting r284413.
https://bugs.webkit.org/show_bug.cgi?id=231936

BrokeSafariBuildByAddingANewEnum

Reverted changeset:

"[WebAuthn] Obtain consent to create new credential when
platform authenticator in excludedCredentials"
https://bugs.webkit.org/show_bug.cgi?id=219813
https://commits.webkit.org/r284413

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

27 hours agoUnreviewed, reverting r284240.
commit-queue@webkit.org [Tue, 19 Oct 2021 02:55:05 +0000 (02:55 +0000)]
Unreviewed, reverting r284240.
https://bugs.webkit.org/show_bug.cgi?id=231931

NeedDifferentArchitectureToWorkWithWebpushd

Reverted changeset:

"WebKit Managed Notifications: Skeleton NotificationProvider."
https://bugs.webkit.org/show_bug.cgi?id=231786
https://commits.webkit.org/r284240

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

28 hours agoGPU process occasionally crashes under `StreamConnectionWorkQueue::processStreams...
wenson_hsieh@apple.com [Tue, 19 Oct 2021 02:44:48 +0000 (02:44 +0000)]
GPU process occasionally crashes under `StreamConnectionWorkQueue::processStreams()` in layout tests
https://bugs.webkit.org/show_bug.cgi?id=231897

Reviewed by Simon Fraser.

Certain layout tests (e.g. in `LayoutTests/compositing`) currently cause the GPU process to crash on the remote
rendering backend thread ("RemoteRenderingBackend work queue") in `StreamConnectionWorkQueue::processStreams()`.
This happens because the `dispatch()` call to delete cached resources underneath `~RemoteRenderingBackend()`
may fire after the destructor is finished running (thereby destroying `m_workQueue` itself). This leaves the
stream work queue in a bad state and causes various crashes when the function is eventually dispatched.

Since StreamConnectionWorkQueue is already ThreadSafeRefCounted, it doesn't make sense to directly store
StreamConnectionWorkQueue as a member of RemoteRenderingBackend; to fix these crashes, we make `m_workQueue` on
RemoteRenderingBackend a strong Ref, and additionally make `StreamConnectionWorkQueue::processStreams()` protect
itself to avoid destroying the work queue in the middle of processing.

* GPUProcess/graphics/RemoteRenderingBackend.cpp:

Drive-by fix: remove an unnecessary header include.

(WebKit::RemoteRenderingBackend::RemoteRenderingBackend):
(WebKit::RemoteRenderingBackend::~RemoteRenderingBackend):

Ensure that the work queue is protected through the final dispatch call that deletes cached resources, and also
explicitly `stop()` the work queue when this is done to ensure that the thread permanently stops waiting for
additional work.

(WebKit::RemoteRenderingBackend::dispatch):
* GPUProcess/graphics/RemoteRenderingBackend.h:

Replace the IPC::StreamConnectionWorkQueue member with a Ref instead, so that it isn't immediately destroyed
when the rendering backend is destroyed, and can instead be protected by strong references on the stack.

* Platform/IPC/StreamConnectionWorkQueue.cpp:
(IPC::StreamConnectionWorkQueue::processStreams):
* Platform/IPC/StreamConnectionWorkQueue.h:

Add a boilerplate `StreamConnectionWorkQueue::create()` function that returns a Ref.

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

29 hours agoWeb Inspector: Remove Source/WebInspectorUI/UserInterface/Controllers/WebInspectorExt...
ddkilzer@apple.com [Tue, 19 Oct 2021 01:43:01 +0000 (01:43 +0000)]
Web Inspector: Remove Source/WebInspectorUI/UserInterface/Controllers/WebInspectorExtensionController.js.orig
<https://webkit.org/b/231896>

Reviewed by BJ Burg.

* UserInterface/Controllers/WebInspectorExtensionController.js.orig: Remove.

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

29 hours ago[macOS] Refactor CGDisplayStreamCaptureSource::createDisplayStream
eric.carlson@apple.com [Tue, 19 Oct 2021 00:51:45 +0000 (00:51 +0000)]
[macOS] Refactor CGDisplayStreamCaptureSource::createDisplayStream
https://bugs.webkit.org/show_bug.cgi?id=231920
<rdar://problem/84393654>

Reviewed by Jer Noble.

No new tests, no functional change.

* platform/mediastream/mac/CGDisplayStreamCaptureSource.cpp:
(WebCore::CGDisplayStreamCaptureSource::startDisplayStream): Don't pass the frame
available handler or capture queue to createDisplayStream.
(WebCore::CGDisplayStreamCaptureSource::frameAvailableHandler): Remove a blank line.
(WebCore::CGDisplayStreamCaptureSource::captureQueue): New accessor.
* platform/mediastream/mac/CGDisplayStreamCaptureSource.h:

* platform/mediastream/mac/CGDisplayStreamScreenCaptureSource.h:
* platform/mediastream/mac/CGDisplayStreamScreenCaptureSource.mm:
(WebCore::CGDisplayStreamScreenCaptureSource::createDisplayStream): Parameters removed.

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

29 hours agoRemove "using namespace XPath;" from XPathGrammar.cpp
achristensen@apple.com [Tue, 19 Oct 2021 00:49:27 +0000 (00:49 +0000)]
Remove "using namespace XPath;" from XPathGrammar.cpp
https://bugs.webkit.org/show_bug.cgi?id=231318

Reviewed by Chris Dumez.

I did this by editing XPathGrammar.y and re-running bison.
We have the output of bison checked in to our repo to not have bison as a build dependency of WebKit.

* xml/XPathGrammar.cpp:
(xpathyylex):
(xpathyyerror):
(yysyntax_error):
* xml/XPathGrammar.y:
* xml/XPathResult.cpp:
(WebCore::XPathResult::XPathResult):

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

30 hours agoUnreviewed, reverting r284399.
jbedard@apple.com [Tue, 19 Oct 2021 00:48:12 +0000 (00:48 +0000)]
Unreviewed, reverting r284399.

Breaks commit message generation

Reverted changeset:

"[webkitperl] Stop using LoadAsModule.pm"
https://bugs.webkit.org/show_bug.cgi?id=231868
https://commits.webkit.org/r284399

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

30 hours agoRemove TCPServer
achristensen@apple.com [Tue, 19 Oct 2021 00:44:15 +0000 (00:44 +0000)]
Remove TCPServer
https://bugs.webkit.org/show_bug.cgi?id=231912

Reviewed by Chris Dumez.

Source/WTF:

* wtf/PlatformHave.h:

Tools:

It has been replaced by HTTPServer, which doesn't time out in its destructor when not everything is perfect,
and which does its logic on the main thread.  It also doesn't use boringssl directly, so we can compile it on watchOS and tvOS.

* TestWebKitAPI/Sources.txt:
* TestWebKitAPI/TCPServer.cpp: Removed.
* TestWebKitAPI/TCPServer.h: Removed.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:
(testCertificate):
(testIdentity):
* TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/HSTS.mm:
(TestWebKitAPI::hstsWebViewAndDelegate):
(TestWebKitAPI::hstsServer):
(TestWebKitAPI::TEST):
(TestWebKitAPI::hasRadar80550123): Deleted.
* TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm:
* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerTCPServer.h:
(ServiceWorkerTCPServer::respondToRequests):
* TestWebKitAPI/cocoa/HTTPServer.h:
* TestWebKitAPI/cocoa/HTTPServer.mm:
(TestWebKitAPI::HTTPServer::testCertificate):
(TestWebKitAPI::HTTPServer::testPrivateKey):

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

30 hours ago[Python-3] Invoke webkit-patch with Python 3 by default (Revert)
jbedard@apple.com [Tue, 19 Oct 2021 00:35:22 +0000 (00:35 +0000)]
[Python-3] Invoke webkit-patch with Python 3 by default (Revert)
https://bugs.webkit.org/show_bug.cgi?id=231591
<rdar://problem/84153640>

Reverted to fix webkitbot.

* Scripts/webkit-patch:

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

30 hours ago[ Mac ] inspector/css/modify-css-property.html is a flaky failure.
ehutchison@apple.com [Tue, 19 Oct 2021 00:14:04 +0000 (00:14 +0000)]
[ Mac ] inspector/css/modify-css-property.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=231924.

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

30 hours agoRegression(r283935 - r283938): [ macOS wk1 ] imported/w3c/web-platform-tests/html...
ayumi_kojima@apple.com [Tue, 19 Oct 2021 00:12:13 +0000 (00:12 +0000)]
Regression(r283935 - r283938): [ macOS wk1 ] imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-autofocus-multiple-times.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=231918

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

30 hours ago[WebAuthn] Obtain consent to create new credential when platform authenticator in...
commit-queue@webkit.org [Tue, 19 Oct 2021 00:07:29 +0000 (00:07 +0000)]
[WebAuthn] Obtain consent to create new credential when platform authenticator in excludedCredentials
https://bugs.webkit.org/show_bug.cgi?id=219813
<rdar://problem/72484635>

Currently, whenever the platform authenticator is within excludedCredentials during makeCredential we
always return NotAllowedError and merely flash a consent screen. This does not match the spec per Step 3.1
of makeCredential (https://w3c.github.io/webauthn/#sctn-op-make-cred). Instead, we should always obtain consent
and return a different error depending on consent was obtained.

Source/WebKit:

A fixme to add this was inadvertently removed in  https://bugs.webkit.org/attachment.cgi?id=393180&action=prettypatch

Patch by John Pascoe <j_pascoe@apple.com> on 2021-10-18
Reviewed by Brent Fulgham.

Added api test TestWebKitAPI.WebAuthenticationPanel.LADuplicateCredentialWithConsent

* UIProcess/API/Cocoa/_WKWebAuthenticationPanel.h:
* UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:
(WebKit::LocalAuthenticator::makeCredential):
* UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.mm:
(WebKit::wkWebAuthenticationPanelUpdate):
* UIProcess/WebAuthentication/WebAuthenticationFlags.h:

Tools:

This adds a test to confirm a different path is taken whenever consent is obtained.

Patch by John Pascoe <j_pascoe@apple.com> on 2021-10-18
Reviewed by Brent Fulgham.

* TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
(-[TestWebAuthenticationPanelDelegate panel:updateWebAuthenticationPanel:]):
(TestWebKitAPI::TEST):

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

30 hours ago[ Windows EWS ] http/wpt/webxr/xrHandInput_gc.html is failing.
ehutchison@apple.com [Mon, 18 Oct 2021 23:54:14 +0000 (23:54 +0000)]
[ Windows EWS ] http/wpt/webxr/xrHandInput_gc.html is failing.
https://bugs.webkit.org/show_bug.cgi?id=231921.

Unreviewed test gardening.

* platform/win/TestExpectations:

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

30 hours ago[ iOS15 ] TestWebKitAPI.WebKit.HTTPSProxy is a flaky, but frequent, timeout
commit-queue@webkit.org [Mon, 18 Oct 2021 23:53:57 +0000 (23:53 +0000)]
[ iOS15 ] TestWebKitAPI.WebKit.HTTPSProxy is a flaky, but frequent, timeout
https://bugs.webkit.org/show_bug.cgi?id=231396

Patch by Alex Christensen <achristensen@webkit.org> on 2021-10-18
Reviewed by Chris Dumez.

Something was happening that was very timing dependent that was causing this test to time out.
I think it was because the proxy framer was receiving an incomplete HTTP request.
To fix this, I look at the bytes received and if it wasn't a complete HTTP request, wait for the rest of the message.
I was unable to reproduce the timeout after this change and only rarely reproduced the timeout without this change.

* TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/cocoa/HTTPServer.mm:
(TestWebKitAPI::proxyDefinition):

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

32 hours agoAdd a callback to know when the service worker loads via -[WKWebView _loadServiceWorker:]
cdumez@apple.com [Mon, 18 Oct 2021 22:21:40 +0000 (22:21 +0000)]
Add a callback to know when the service worker loads via -[WKWebView _loadServiceWorker:]
https://bugs.webkit.org/show_bug.cgi?id=231771
<rdar://problem/84274364>

Reviewed by Alex Christensen.

Source/WebCore:

* loader/FrameLoaderClient.h:
* workers/service/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::willSettleRegistrationPromise):
(WebCore::ServiceWorkerContainer::jobFailedWithException):
(WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):
(WebCore::ServiceWorkerContainer::jobFailedLoadingScript):
* workers/service/ServiceWorkerContainer.h:

Source/WebKit:

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _loadServiceWorker:completionHandler:]):
(-[WKWebView _loadServiceWorker:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::didFinishServiceWorkerPageRegistration):
(WebKit::WebPageProxy::didFailLoadForFrame):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
(WebKit::WebPageProxy::loadServiceWorker):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::didFinishServiceWorkerPageRegistration):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

Tools:

Add API test coverage.

* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:

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

32 hours ago[webkitperl] Fix webkitperl on Windows
commit-queue@webkit.org [Mon, 18 Oct 2021 22:21:05 +0000 (22:21 +0000)]
[webkitperl] Fix webkitperl on Windows
https://bugs.webkit.org/show_bug.cgi?id=231374

Patch by Basuke Suzuki <basuke@mac.com> on 2021-10-18
Reviewed by Fujii Hironori.

Set WEBKIT_LIBRARIES environment variable before run if it is not defined.
Shell-style environment variables settings are not available on Windows. Replace them by setting
%ENV directly.

* Scripts/test-webkitperl:
* Scripts/webkitperl/auto-version_unittest/autoVersionTests.pl:
* Scripts/webkitperl/auto-version_unittest/versionStampTests.pl:

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

32 hours agoResync web-platform-tests/tools from upstream
cdumez@apple.com [Mon, 18 Oct 2021 22:20:07 +0000 (22:20 +0000)]
Resync web-platform-tests/tools from upstream
https://bugs.webkit.org/show_bug.cgi?id=231907

Reviewed by Alex Christensen.

Resync web-platform-tests/tools from upstream 4250f160c0cb9ef2caba63.

* web-platform-tests/tools/*: Updated.

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

33 hours agoResync web-platform-tests/common from upstream
cdumez@apple.com [Mon, 18 Oct 2021 21:42:33 +0000 (21:42 +0000)]
Resync web-platform-tests/common from upstream
https://bugs.webkit.org/show_bug.cgi?id=231908

Reviewed by Alex Christensen.

Resync web-platform-tests/common from upstream 4250f160c0cb9ef2caba63.

* web-platform-tests/common/*: Updated.

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

33 hours ago[webkitperl] Stop using LoadAsModule.pm
basuke.suzuki@sony.com [Mon, 18 Oct 2021 21:17:02 +0000 (21:17 +0000)]
[webkitperl] Stop using LoadAsModule.pm
https://bugs.webkit.org/show_bug.cgi?id=231868

Reviewed by Jonathan Bedard.

This module load a script file as module with a bit tricky way. It prevents the proper
usage of package after all. The purpose of this module is to test routines defined in the
script. It just be wrong with such way. If you have something to test, it should be separated
as a module and be imported to the script. Then unit test can load the module and can test
without any sort of trouble.

* Scripts/filter-build-webkit:
(setOutputFormatOption):
(shouldShowSubsequentLine): Moved to webkitperl/build/output.pm.
(shouldIgnoreLine): Ditto.
* Scripts/prepare-ChangeLog:
(generateFunctionLists):
(fetchBugXMLData):
(openChangeLogs):
(method_decl_to_selector):
(diffCommand):
(statusCommand):
(propertyChangeDescription):
(normalizeLineEndings):
(actuallyGenerateFunctionLists): Moved to webkitperl/changelog.
(computeModifiedFunctions): Ditto.
(fetchBugDescriptionFromBugXMLData): Ditto.
(fetchRadarURLFromBugXMLData): Ditto.
(get_function_line_ranges): Ditto.
(get_function_line_ranges_for_cpp): Ditto.
(delete_namespaces_from_ranges_for_cpp): Ditto.
(is_function_in_namespace): Ditto.
(get_function_line_ranges_for_java): Ditto.
(get_function_line_ranges_for_javascript): Ditto.
(get_function_line_ranges_for_perl): Ditto.
(get_function_line_ranges_for_python): Ditto.
(get_selector_line_ranges_for_css): Ditto.
(get_function_line_ranges_for_swift): Ditto.
(parseSwiftFunctionArgs): Ditto.
(attributeCommand): Ditto.
(extractLineRangeAfterChange): Ditto.
(extractLineRangeBeforeChange): Ditto.
(decodeEntities): Ditto.
* Scripts/run-leaks:
(main):
(removeMatchingRecords):
(runLeaks): Moved to webkitperl/leaks.pm.
(parseLeaksOutput): Ditto.
(reportError): Deleted. Use Carp::croak instead.
* Scripts/webkitdirs.pm:
(determineBaseProductDir):
(determineCurrentSVNRevision):
(chdirWebKit):
(determineSourceDir): Moved to webkitperl/dirs.pm.
(setSourceDir): Ditto.
(sourceDir): Ditto.
* Scripts/webkitperl/LoadAsModule.pm: Removed.
* Scripts/webkitperl/build/output.pm: Extracted from Tools/Scripts/filter-build-webkit.
(shouldShowSubsequentLine):
(shouldIgnoreLine):
* Scripts/webkitperl/changelog.pm: Extracted from Tools/Scripts/prepare-ChangeLog.
(actuallyGenerateFunctionLists):
(extractLineRangeAfterChange):
(extractLineRangeBeforeChange):
(attributeCommand):
(fetchBugDescriptionFromBugXMLData):
(fetchRadarURLFromBugXMLData):
(computeModifiedFunctions):
(get_function_line_ranges):
(get_function_line_ranges_for_cpp):
(delete_namespaces_from_ranges_for_cpp):
(is_function_in_namespace):
(get_function_line_ranges_for_java):
(get_function_line_ranges_for_javascript):
(get_function_line_ranges_for_perl):
(get_function_line_ranges_for_python):
(get_selector_line_ranges_for_css):
(get_function_line_ranges_for_swift):
(parseSwiftFunctionArgs):
(decodeEntities):
* Scripts/webkitperl/dirs.pm: Extracted from Tools/Scripts/webkitdirs.
(sourceDir):
(setSourceDir):
(determineSourceDir):
* Scripts/webkitperl/filter-build-webkit_unittest/shouldIgnoreLine_unittests.pl:
* Scripts/webkitperl/leaks.pm: Copied from Tools/Scripts/run-leaks.
(runLeaks):
(parseLeaksOutput):
* Scripts/webkitperl/prepare-ChangeLog_unittest/extractLineRangeBeforeAndAfterChange.pl:
* Scripts/webkitperl/prepare-ChangeLog_unittest/fetchRadarURLFromBugXMLData.pl:
* Scripts/webkitperl/prepare-ChangeLog_unittest/filenameWithParentheses.pl:
* Scripts/webkitperl/prepare-ChangeLog_unittest/generateFunctionLists.pl:
* Scripts/webkitperl/prepare-ChangeLog_unittest/parser_unittests.pl:
(convertAbsolutePathToRelativeUnixPath):
* Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v1.0.pl:
* Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v2.0-new.pl:
* Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v2.0-old.pl:

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

33 hours ago[run-api-tests] Use temporary symlink when listing tests
jbedard@apple.com [Mon, 18 Oct 2021 20:51:23 +0000 (20:51 +0000)]
[run-api-tests] Use temporary symlink when listing tests
https://bugs.webkit.org/show_bug.cgi?id=230560

Reviewed by Dewei Zhu.

* Scripts/webkitpy/api_tests/manager.py:
(Manager._collect_tests): Copy binary when listing tests to make debuging easier.
* Scripts/webkitpy/common/system/filesystem.py:
(FileSystem.copyfile): Return copyfile result.
(FileSystem.copymode): Invoke shutil.copymode.
* Scripts/webkitpy/common/system/filesystem_mock.py:
(MockFileSystem.copymode):

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

33 hours ago[css-flexbox] Do not clamp flex base size with {min|max}-{height|width}
svillar@igalia.com [Mon, 18 Oct 2021 20:50:56 +0000 (20:50 +0000)]
[css-flexbox] Do not clamp flex base size with {min|max}-{height|width}
https://bugs.webkit.org/show_bug.cgi?id=225590
<rdar://problem/78100329>

Reviewed by Manuel Rego Casasnovas.

Source/WebCore:

When computing flex base size we should not clamp it with neither min-{height|width}
nor max-{height|width}. That would be done later and will be called the hypothetical
main size.

For most of the cases we were already doing it, however there are some particular cases
in which we have to call the generic layout code which does clamp the sizes using min
and max sizes. In order to make those code paths work, we reset the min|max values to
their initial ones (so they effectively become inactive) and then we set the original
values back after computing the base size.

This is a reland of r279271 which was pretty similar but caused a visual regression in
GMail. After r284359 this is no longer a problem of this patch.

This fixes 3 WPT flexbox tests.

* rendering/RenderFlexibleBox.cpp:
(WebCore::ScopedUnboundedBoxWithFlexBasisAsChildMainSize::ScopedUnboundedBoxWithFlexBasisAsChildMainSize):
renamed from ScopedFlexBasisAsChildMainSize. Resets min|max-size to their initial values.
(WebCore::ScopedUnboundedBoxWithFlexBasisAsChildMainSize::~ScopedUnboundedBoxWithFlexBasisAsChildMainSize):
ditto. Restores min|max-size original values.
(WebCore::RenderFlexibleBox::computeFlexBaseSizeForChild):
(WebCore::ScopedFlexBasisAsChildMainSize::ScopedFlexBasisAsChildMainSize): Deleted.
(WebCore::ScopedFlexBasisAsChildMainSize::~ScopedFlexBasisAsChildMainSize): Deleted.

LayoutTests:

* TestExpectations: Unskipped 3 tests that are now passing.

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

34 hours agoDon't load metadata base pointer in EXTRA_CTI_THUNKS
sbarati@apple.com [Mon, 18 Oct 2021 20:41:50 +0000 (20:41 +0000)]
Don't load metadata base pointer in EXTRA_CTI_THUNKS
https://bugs.webkit.org/show_bug.cgi?id=231850

Reviewed by Yusuke Suzuki.

We were loading the metadata table base pointer dynamically. But in
unlinked baseline JIT, it's already pinned in a register. Let's just
use the register instead of recomputing what's already there. This is
a small speedup in throughput of unlinked baseline JIT code for scope
operations.

* jit/JITPropertyAccess.cpp:
(JSC::JIT::generateOpResolveScopeThunk):
(JSC::JIT::generateOpGetFromScopeThunk):

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

34 hours agoSet isolated tree mode to secondary AX thread in LayoutTests.
andresg_22@apple.com [Mon, 18 Oct 2021 20:34:22 +0000 (20:34 +0000)]
Set isolated tree mode to secondary AX thread in LayoutTests.
https://bugs.webkit.org/show_bug.cgi?id=231763

Reviewed by Chris Fleizach.

Isolated tree mode was enabled for LayoutTests but set to run on the
main thread. Change it to run on the AX thread.

* WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm:
(WTR::AccessibilityController::updateIsolatedTreeMode):

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

35 hours ago[ iOS15 Monterey ] TestWTF.WTF_URLExtras.URLExtras is a constant failure
commit-queue@webkit.org [Mon, 18 Oct 2021 19:29:51 +0000 (19:29 +0000)]
[ iOS15 Monterey ] TestWTF.WTF_URLExtras.URLExtras is a constant failure
https://bugs.webkit.org/show_bug.cgi?id=231454

Patch by Alex Christensen <achristensen@webkit.org> on 2021-10-18
Reviewed by Chris Dumez.

Source/WTF:

* wtf/PlatformHave.h:

Tools:

The behavior of NSURL changed to disallow empty punycode in the host.
This is fine, but we need to update our test expectations.

* TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm:
(TestWebKitAPI::TEST):

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

35 hours agoAX: Return AXEmptyGroup subrole for groups with no accessible content
commit-queue@webkit.org [Mon, 18 Oct 2021 18:55:28 +0000 (18:55 +0000)]
AX: Return AXEmptyGroup subrole for groups with no accessible content
https://bugs.webkit.org/show_bug.cgi?id=231528

Patch by Tyler Wilcock <tyler_w@apple.com> on 2021-10-18
Reviewed by Andres Gonzalez.

Source/WebCore:

Return a subrole of "AXEmptyGroup" for groups without any exposed
children. WebKit can calculate this more efficiently than AX clients,
so it makes more sense to do here.

Test: accessibility/mac/empty-group-computation.html

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper subrole]):

LayoutTests:

* accessibility/mac/aria-divs-not-ignored-expected.txt:
* accessibility/mac/aria-divs-not-ignored.html:
Expect a subrole of AXEmptyGroup because this group has no content.

* accessibility/roles-exposed.html:
Changed some math testcases to use valid MathML markup. Otherwise
they'd be considered to have no children, and therefore be given
a subrole of AXEmptyGroup, which is not what this test is intended
to exercise.

* accessibility/mac/empty-group-computation-expected.txt: Added.
* accessibility/mac/empty-group-computation.html: Added.

* platform/mac/accessibility/lists-expected.txt: Added.
* platform/mac/accessibility/plugin-expected.txt: Added.
Add these Mac-specific expectations for these tests because this patch
only causes Mac to expose the AXEmptyGroup subrole.

* platform/mac/accessibility/svg-element-with-aria-role-expected.txt:
Add an expected subrole of AXEmptyGroup.

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

36 hours ago[ iOS 15 ] Rebaselining 4 fast tests.
ayumi_kojima@apple.com [Mon, 18 Oct 2021 17:53:48 +0000 (17:53 +0000)]
[ iOS 15 ] Rebaselining 4 fast tests.
https://bugs.webkit.org/show_bug.cgi?id=231901

Unreviewed test gardening.

* platform/ios/fast/backgrounds/border-radius-split-background-expected.txt:
* platform/ios/fast/backgrounds/border-radius-split-background-image-expected.txt:
* platform/ios/fast/borders/border-styles-split-expected.txt:
* platform/ios/fast/text/basic/015-expected.txt:

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

37 hours agoUnreviewed, reverting r284377.
ayumi_kojima@apple.com [Mon, 18 Oct 2021 17:29:13 +0000 (17:29 +0000)]
Unreviewed, reverting r284377.

Reverting because the expected.txt files are in the wrong
folders for rebaselining

Reverted changeset:

"[ iOS 15 ] Rebaselining 4 fast tests."
https://bugs.webkit.org/show_bug.cgi?id=231901
https://commits.webkit.org/r284377

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

37 hours agoRevert r284216
achristensen@apple.com [Mon, 18 Oct 2021 17:25:29 +0000 (17:25 +0000)]
Revert r284216
https://webkit.org/b/231523
<rdar://84342878>

Source/WebCore:

* CMakeLists.txt:
* Configurations/WebCore.xcconfig:
* Sources.txt:
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:

Source/WebKit:

There is an internal build configuration that doesn't know how to find libWebCoreStatic.a
and I have reason to believe that this is not necessary anyways.

* Configurations/adattributiond.xcconfig:
* Shared/API/Cocoa/WKMain.h:
* Shared/API/Cocoa/WKMain.mm:
(WKAdAttributionDaemonMain):
* Sources.txt:
* SourcesCocoa.txt:
* WebKit.xcodeproj/project.pbxproj:

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

37 hours agoWeb process occasionally crashes under `RemoteDisplayListRecorderProxy::recordRestore()`
wenson_hsieh@apple.com [Mon, 18 Oct 2021 17:19:02 +0000 (17:19 +0000)]
Web process occasionally crashes under `RemoteDisplayListRecorderProxy::recordRestore()`
https://bugs.webkit.org/show_bug.cgi?id=231900

Reviewed by Tim Horton.

It's apparently possible for a RemoteImageBufferProxy in the web process to outlive RemoteRenderingBackendProxy.
Before the IPC stream refactoring in r284079, we were robust against this possibility because
RemoteImageBufferProxy checked for a null rendering backend in `canAppendItemOfType` and returned `false`, which
prevented us from trying to call into the rendering backend. However, I accidentally omitted this null check
in the new RemoteDisplayListRecorderProxy, which currently assumes that `m_renderingBackend` is always non-null
when sending any IPC stream messages.

Fix this crash by restoring the null check for the weak `m_renderingBackend` pointer. I only observed this crash
once locally and, unfortunately, haven't been able to come up with a test case that consistently reproduces it.

* WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:
(WebKit::RemoteDisplayListRecorderProxy::send):

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

37 hours agobackground-clip:text doesn't paint correctly for inline box spanning multiple lines
antti@apple.com [Mon, 18 Oct 2021 17:17:56 +0000 (17:17 +0000)]
background-clip:text doesn't paint correctly for inline box spanning multiple lines
https://bugs.webkit.org/show_bug.cgi?id=231891

Reviewed by Alan Bujtas.

Source/WebCore:

'background-clip: text' paints to a wrong position if the inline box spans multiple lines.

Test: fast/inline/inline-background-clip-text-multiline.html

* rendering/InlineBoxPainter.cpp:
(WebCore::InlineBoxPainter::paintFillLayer):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintFillLayer):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::getBackgroundRoundedRect const):
(WebCore::RenderBoxModelObject::backgroundRoundedRectAdjustedForBleedAvoidance const):

No need to pass box size separately as it now always matches the passed in border rect.

(WebCore::RenderBoxModelObject::paintFillLayerExtended):

The 'rect' parameter used to be either the border box rect of the box being painted or,
in the case of multiline inline box background image, the image strip being painted.

Make the 'rect' parameter to always be the border box and pass the background image strip
separately.

Use the background image strip only during background image painting.

* rendering/RenderBoxModelObject.h:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):

LayoutTests:

* fast/inline/inline-background-clip-text-multiline-expected.html: Added.
* fast/inline/inline-background-clip-text-multiline.html: Added.

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

37 hours agoVersioning.
repstein@apple.com [Mon, 18 Oct 2021 17:16:46 +0000 (17:16 +0000)]
Versioning.

WebKit-7613.1.7

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