Skip to content

fix: use InvalidStateError for non-fully-active document checks#1056

Open
marcoscaceres wants to merge 3 commits intogh-pagesfrom
fix-non-fully-active-error-type
Open

fix: use InvalidStateError for non-fully-active document checks#1056
marcoscaceres wants to merge 3 commits intogh-pagesfrom
fix-non-fully-active-error-type

Conversation

@marcoscaceres
Copy link
Member

@marcoscaceres marcoscaceres commented Mar 2, 2026

Per TAG Design Principles §3.2.2, InvalidStateError should be used for document state issues, while AbortError is reserved for user-initiated and developer-initiated aborts (e.g., navigating or removing a traversable).

See: https://www.w3.org/TR/design-principles/#handle-non-fully-active-documents

part of #1040

The following tasks have been completed:

Implementation commitment:

Optional, impact on Payment Handler spec?


Preview | Diff

Per TAG Design Principles §3.2.2, InvalidStateError should be used
for document state issues, while AbortError is reserved for
user-initiated aborts.

See: https://www.w3.org/TR/design-principles/#handle-non-fully-active-documents
@ianbjacobs
Copy link
Collaborator

I don't have any comments on this and defer to @stephenmcgruer

@stephenmcgruer
Copy link
Collaborator

LGTM; can you file implementation bugs against the various browsers, and also file an issue (or even update?) the relevant WPTs (if any exist) ?

@marcoscaceres
Copy link
Member Author

Filed WebKit bug and will update the tests. However, unfortunately I'm having issues filing the Chromium bug :(

@marcoscaceres
Copy link
Member Author

Tests - web-platform-tests/wpt#58210

@stephenmcgruer
Copy link
Collaborator

Chrome bug filed - https://crbug.com/489361935

marcoscaceres added a commit to marcoscaceres/WebKit that referenced this pull request Mar 4, 2026
…ully active

rdar://171593464
https://bugs.webkit.org/show_bug.cgi?id=309027

Reviewed by NOBODY (OOPS!).

Uses InvalidStateError for when the API is called from a detatched document,
and AbortError if script itself destroyed the script execution context/document.

Spec change:
w3c/payment-request#1056

Upstream WPT commit: web-platform-tests/wpt@c1c52b4

Test: imported/w3c/web-platform-tests/payment-request/rejects_if_not_active.https.html

* LayoutTests/TestExpectations:
* LayoutTests/http/tests/paymentrequest/page-cache-created-payment-response.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/page-cache-created-payment-response.https.html:
* LayoutTests/http/tests/paymentrequest/page-cache-retried-payment-response.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/page-cache-retried-payment-response.https.html:
* LayoutTests/http/tests/paymentrequest/payment-response-rejects-if-not-active.https.html:
* LayoutTests/http/tests/paymentrequest/rejects_if_not_active.https.html:
* LayoutTests/imported/w3c/resources/resource-files.json:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-allowed-by-feature-policy-attribute-redirect-on-load.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-allowed-by-feature-policy-attribute.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-allowed-by-feature-policy.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-default-feature-policy.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-disabled-by-feature-policy.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/META.yml:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/WEB_FEATURES.yml: Added.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/payment-is-showing.https-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/payment-is-showing.https.html:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/payment-request-abort-method.https-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/payment-request-show-method.https-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/rejects_if_not_active.https-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/rejects_if_not_active.https.html:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/w3c-import.log:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-allowed-by-permissions-policy.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-allowed-by-permissions-policy.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-disabled-by-permissions-policy.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-disabled-by-permissions-policy.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-extension-allowed-by-permissions-policy-attribute.https.sub.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-supported-by-permissions-policy.tentative.html:
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac-wk2/TestExpectations:
* LayoutTests/tests-options.json:
* Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp:
(WebCore::PaymentRequest::show):
(WebCore::PaymentRequest::canMakePayment):
* Source/WebCore/Modules/paymentrequest/PaymentResponse.cpp:
(WebCore::PaymentResponse::complete):
(WebCore::PaymentResponse::retry):
* Source/WebCore/Modules/paymentrequest/PaymentResponse.h:
* Source/WebCore/Modules/paymentrequest/PaymentResponse.idl:
@marcoscaceres
Copy link
Member Author

Sent a PR to patch WebKit ... and fixed a bunch of WPTs!!! web-platform-tests/wpt#58210

Worthwhile change. 🕺

marcoscaceres added a commit to marcoscaceres/WebKit that referenced this pull request Mar 4, 2026
…ully active

rdar://171593464
https://bugs.webkit.org/show_bug.cgi?id=309027

Reviewed by NOBODY (OOPS!).

Uses InvalidStateError for when the API is called from a detatched document,
and AbortError if script itself destroyed the script execution context/document.

Spec change:
w3c/payment-request#1056

Upstream WPT commit: web-platform-tests/wpt@c1c52b4

Test: imported/w3c/web-platform-tests/payment-request/rejects_if_not_active.https.html

* LayoutTests/TestExpectations:
* LayoutTests/http/tests/paymentrequest/page-cache-created-payment-response.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/page-cache-created-payment-response.https.html:
* LayoutTests/http/tests/paymentrequest/page-cache-retried-payment-response.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/page-cache-retried-payment-response.https.html:
* LayoutTests/http/tests/paymentrequest/payment-response-rejects-if-not-active.https.html:
* LayoutTests/http/tests/paymentrequest/rejects_if_not_active.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/rejects_if_not_active.https.html:
* LayoutTests/imported/w3c/resources/resource-files.json:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-allowed-by-feature-policy-attribute-redirect-on-load.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-allowed-by-feature-policy-attribute.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-allowed-by-feature-policy.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-default-feature-policy.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-disabled-by-feature-policy.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/META.yml:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/WEB_FEATURES.yml: Added.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/payment-is-showing.https-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/payment-is-showing.https.html:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/payment-request-abort-method.https-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/payment-request-show-method.https-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/rejects_if_not_active.https-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/payment-request/rejects_if_not_active.https.html:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/w3c-import.log:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-allowed-by-permissions-policy.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-allowed-by-permissions-policy.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-disabled-by-permissions-policy.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-disabled-by-permissions-policy.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-extension-allowed-by-permissions-policy-attribute.https.sub.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-supported-by-permissions-policy.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-supported-by-permissions-policy.tentative.html:
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac-wk2/TestExpectations:
* LayoutTests/tests-options.json:
* Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp:
(WebCore::PaymentRequest::show):
(WebCore::PaymentRequest::canMakePayment):
* Source/WebCore/Modules/paymentrequest/PaymentResponse.cpp:
(WebCore::PaymentResponse::complete):
(WebCore::PaymentResponse::retry):
* Source/WebCore/Modules/paymentrequest/PaymentResponse.h:
* Source/WebCore/Modules/paymentrequest/PaymentResponse.idl:
marcoscaceres added a commit to marcoscaceres/WebKit that referenced this pull request Mar 6, 2026
…ully active

rdar://171593464
https://bugs.webkit.org/show_bug.cgi?id=309027

Reviewed by NOBODY (OOPS!).

Uses InvalidStateError for when the API is called from a detatched document,
and AbortError if script itself destroyed the script execution context/document.

Spec change:
w3c/payment-request#1056

Upstream WPT commit: web-platform-tests/wpt@05fdf81

Test: imported/w3c/web-platform-tests/payment-request/rejects_if_not_active.https.html

* LayoutTests/TestExpectations:
* LayoutTests/http/tests/paymentrequest/page-cache-created-payment-response.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/page-cache-created-payment-response.https.html:
* LayoutTests/http/tests/paymentrequest/page-cache-retried-payment-response.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/page-cache-retried-payment-response.https.html:
* LayoutTests/http/tests/paymentrequest/payment-response-rejects-if-not-active.https.html:
* LayoutTests/http/tests/paymentrequest/rejects_if_not_active.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/rejects_if_not_active.https.html:
* LayoutTests/imported/w3c/resources/resource-files.json:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/README.md:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/experimental-features/focus-without-user-activation-enabled-tentative.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/experimental-features/trust-token-redemption-supported-by-feature-policy.tentative.html:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/feature-policy-frame-policy-timing-iframe-camera.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/feature-policy-frame-policy-timing.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/feature-policy-header-policy-allowed-for-all.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/feature-policy-header-policy-allowed-for-self.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/feature-policy-header-policy-allowed-for-some.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/feature-policy-header-policy-declined.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/feature-policy-header-policy-disallowed-for-all.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-allowed-by-feature-policy-attribute-redirect-on-load.https.sub-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-allowed-by-feature-policy-attribute.https.sub-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-allowed-by-feature-policy-attribute.https.sub.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-allowed-by-feature-policy.https.sub-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-allowed-by-feature-policy.https.sub.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-allowed-by-feature-policy.https.sub.html.headers: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-default-feature-policy.https.sub-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-default-feature-policy.https.sub.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-disabled-by-feature-policy.https.sub-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-disabled-by-feature-policy.https.sub.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-disabled-by-feature-policy.https.sub.html.headers: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-supported-by-feature-policy.tentative-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-supported-by-feature-policy.tentative.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/permissions-policy-feature-policy-coexist.https-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/permissions-policy-feature-policy-coexist.https.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/permissions-policy-feature-policy-coexist.https.html.headers:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/permissions-policy-header-policy-allowed-for-self.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/reporting/payment-reporting.https-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/reporting/payment-reporting.https.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/reporting/payment-reporting.https.html.headers: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/reporting/screen-wake-lock-reporting.https-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/reporting/screen-wake-lock-reporting.https.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/reporting/screen-wake-lock-reporting.https.html.headers: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/reporting/w3c-import.log:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-battery.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-idle-detection-worker.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-idle-detection-worker.js: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-idle-detection.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-payment.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-screen-wakelock.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-serial-worker.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-serial-worker.js: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-serial.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-usb-worker.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-usb-worker.js: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-usb.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/featurepolicy.js:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/w3c-import.log:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/w3c-import.log:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/rejects_if_not_active.https-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-allowed-by-permissions-policy.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-allowed-by-permissions-policy.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-disabled-by-permissions-policy.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-disabled-by-permissions-policy.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-extension-allowed-by-permissions-policy-attribute.https.sub-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-extension-allowed-by-permissions-policy-attribute.https.sub.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-supported-by-permissions-policy.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-supported-by-permissions-policy.tentative.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/resources/permissions-policy-payment-extension.html: Added.
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac-wk2/TestExpectations:
* LayoutTests/tests-options.json:
* Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp:
(WebCore::PaymentRequest::show):
(WebCore::PaymentRequest::canMakePayment):
* Source/WebCore/Modules/paymentrequest/PaymentResponse.cpp:
(WebCore::PaymentResponse::complete):
(WebCore::PaymentResponse::retry):
* Source/WebCore/Modules/paymentrequest/PaymentResponse.h:
* Source/WebCore/Modules/paymentrequest/PaymentResponse.idl:
marcoscaceres added a commit to marcoscaceres/WebKit that referenced this pull request Mar 6, 2026
…ully active

rdar://171593464
https://bugs.webkit.org/show_bug.cgi?id=309027

Reviewed by NOBODY (OOPS!).

Uses InvalidStateError for when the API is called from a detatched document,
and AbortError if script itself destroyed the script execution context/document.

Spec change:
w3c/payment-request#1056

Upstream WPT commit: web-platform-tests/wpt@05fdf81

Test: imported/w3c/web-platform-tests/payment-request/rejects_if_not_active.https.html

* LayoutTests/TestExpectations:
* LayoutTests/http/tests/paymentrequest/page-cache-created-payment-response.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/page-cache-created-payment-response.https.html:
* LayoutTests/http/tests/paymentrequest/page-cache-retried-payment-response.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/page-cache-retried-payment-response.https.html:
* LayoutTests/http/tests/paymentrequest/payment-response-rejects-if-not-active.https.html:
* LayoutTests/http/tests/paymentrequest/rejects_if_not_active.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/rejects_if_not_active.https.html:
* LayoutTests/imported/w3c/resources/resource-files.json:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/README.md:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/experimental-features/focus-without-user-activation-enabled-tentative.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/experimental-features/trust-token-redemption-supported-by-feature-policy.tentative.html:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/feature-policy-frame-policy-timing-iframe-camera.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/feature-policy-frame-policy-timing.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/feature-policy-header-policy-allowed-for-all.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/feature-policy-header-policy-allowed-for-self.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/feature-policy-header-policy-allowed-for-some.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/feature-policy-header-policy-declined.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/feature-policy-header-policy-disallowed-for-all.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-allowed-by-feature-policy-attribute-redirect-on-load.https.sub-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-allowed-by-feature-policy-attribute.https.sub-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-allowed-by-feature-policy-attribute.https.sub.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-allowed-by-feature-policy.https.sub-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-allowed-by-feature-policy.https.sub.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-allowed-by-feature-policy.https.sub.html.headers: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-default-feature-policy.https.sub-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-default-feature-policy.https.sub.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-disabled-by-feature-policy.https.sub-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-disabled-by-feature-policy.https.sub.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-disabled-by-feature-policy.https.sub.html.headers: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-supported-by-feature-policy.tentative-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-supported-by-feature-policy.tentative.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/permissions-policy-feature-policy-coexist.https-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/permissions-policy-feature-policy-coexist.https.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/permissions-policy-feature-policy-coexist.https.html.headers:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/permissions-policy-header-policy-allowed-for-self.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/reporting/payment-reporting.https-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/reporting/payment-reporting.https.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/reporting/payment-reporting.https.html.headers: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/reporting/screen-wake-lock-reporting.https-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/reporting/screen-wake-lock-reporting.https.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/reporting/screen-wake-lock-reporting.https.html.headers: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/reporting/w3c-import.log:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-battery.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-idle-detection-worker.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-idle-detection-worker.js: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-idle-detection.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-payment.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-screen-wakelock.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-serial-worker.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-serial-worker.js: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-serial.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-usb-worker.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-usb-worker.js: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-usb.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/featurepolicy.js:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/w3c-import.log:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/w3c-import.log:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/rejects_if_not_active.https-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-allowed-by-permissions-policy.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-allowed-by-permissions-policy.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-disabled-by-permissions-policy.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-disabled-by-permissions-policy.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-extension-allowed-by-permissions-policy-attribute.https.sub-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-extension-allowed-by-permissions-policy-attribute.https.sub.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-supported-by-permissions-policy.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-supported-by-permissions-policy.tentative.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/resources/permissions-policy-payment-extension.html: Added.
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac-wk2/TestExpectations:
* Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp:
(WebCore::PaymentRequest::show):
(WebCore::PaymentRequest::canMakePayment):
* Source/WebCore/Modules/paymentrequest/PaymentResponse.cpp:
(WebCore::PaymentResponse::complete):
(WebCore::PaymentResponse::retry):
* Source/WebCore/Modules/paymentrequest/PaymentResponse.h:
* Source/WebCore/Modules/paymentrequest/PaymentResponse.idl:
marcoscaceres added a commit to marcoscaceres/WebKit that referenced this pull request Mar 7, 2026
…ully active

rdar://171593464
https://bugs.webkit.org/show_bug.cgi?id=309027

Reviewed by NOBODY (OOPS!).

Uses InvalidStateError for when the API is called from a detatched document,
and AbortError if script itself destroyed the script execution context/document.

Spec change:
w3c/payment-request#1056

Upstream WPT commit: web-platform-tests/wpt@05fdf81

Test: imported/w3c/web-platform-tests/payment-request/rejects_if_not_active.https.html

* LayoutTests/TestExpectations:
* LayoutTests/http/tests/paymentrequest/page-cache-created-payment-response.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/page-cache-created-payment-response.https.html:
* LayoutTests/http/tests/paymentrequest/page-cache-retried-payment-response.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/page-cache-retried-payment-response.https.html:
* LayoutTests/http/tests/paymentrequest/payment-response-rejects-if-not-active.https.html:
* LayoutTests/http/tests/paymentrequest/rejects_if_not_active.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/rejects_if_not_active.https.html:
* LayoutTests/imported/w3c/resources/resource-files.json:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/README.md:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/experimental-features/focus-without-user-activation-enabled-tentative.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/experimental-features/focus-without-user-activation-enabled-tentative.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/experimental-features/trust-token-redemption-supported-by-feature-policy.tentative.html:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/feature-policy-frame-policy-timing-iframe-camera.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/feature-policy-frame-policy-timing.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/feature-policy-header-policy-allowed-for-all.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/feature-policy-header-policy-allowed-for-all.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/feature-policy-header-policy-allowed-for-self.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/feature-policy-header-policy-allowed-for-self.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/feature-policy-header-policy-allowed-for-some.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/feature-policy-header-policy-allowed-for-some.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/feature-policy-header-policy-declined.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/feature-policy-header-policy-declined.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/feature-policy-header-policy-disallowed-for-all.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-allowed-by-feature-policy-attribute-redirect-on-load.https.sub-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-allowed-by-feature-policy-attribute.https.sub-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-allowed-by-feature-policy-attribute.https.sub.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-allowed-by-feature-policy.https.sub-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-allowed-by-feature-policy.https.sub.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-allowed-by-feature-policy.https.sub.html.headers: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-default-feature-policy.https.sub-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-default-feature-policy.https.sub.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-disabled-by-feature-policy.https.sub-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-disabled-by-feature-policy.https.sub.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-disabled-by-feature-policy.https.sub.html.headers: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-supported-by-feature-policy.tentative-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/payment-supported-by-feature-policy.tentative.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/permissions-policy-feature-policy-coexist.https-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/permissions-policy-feature-policy-coexist.https.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/permissions-policy-feature-policy-coexist.https.html.headers:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/permissions-policy-header-policy-allowed-for-self.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/permissions-policy-header-policy-allowed-for-self.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/reporting/payment-reporting.https-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/reporting/payment-reporting.https.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/reporting/payment-reporting.https.html.headers: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/reporting/screen-wake-lock-reporting.https-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/reporting/screen-wake-lock-reporting.https.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/reporting/screen-wake-lock-reporting.https.html.headers: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/reporting/w3c-import.log:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-battery.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-idle-detection-worker.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-idle-detection-worker.js: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-idle-detection.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-payment.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-screen-wakelock.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-serial-worker.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-serial-worker.js: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-serial.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-usb-worker.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-usb-worker.js: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/feature-policy-usb.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/featurepolicy.js:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/resources/w3c-import.log:
* LayoutTests/imported/w3c/web-platform-tests/feature-policy/w3c-import.log:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/rejects_if_not_active.https-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-allowed-by-permissions-policy.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-allowed-by-permissions-policy.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-disabled-by-permissions-policy.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-disabled-by-permissions-policy.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-extension-allowed-by-permissions-policy-attribute.https.sub-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-extension-allowed-by-permissions-policy-attribute.https.sub.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-supported-by-permissions-policy.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-supported-by-permissions-policy.tentative.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/resources/permissions-policy-payment-extension.html: Added.
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac-wk2/TestExpectations:
* LayoutTests/platform/mac/TestExpectations:
* Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp:
(WebCore::PaymentRequest::show):
(WebCore::PaymentRequest::canMakePayment):
* Source/WebCore/Modules/paymentrequest/PaymentResponse.cpp:
(WebCore::PaymentResponse::complete):
(WebCore::PaymentResponse::retry):
* Source/WebCore/Modules/paymentrequest/PaymentResponse.h:
* Source/WebCore/Modules/paymentrequest/PaymentResponse.idl:
marcoscaceres added a commit to marcoscaceres/WebKit that referenced this pull request Mar 11, 2026
…ully active

rdar://171593464
https://bugs.webkit.org/show_bug.cgi?id=309027

Reviewed by NOBODY (OOPS!).

Uses InvalidStateError for when the API is called from a detatched document,
and AbortError if script itself destroyed the script execution context/document.

Spec change:
w3c/payment-request#1056

Upstream WPT commit: web-platform-tests/wpt@05fdf81

Test: imported/w3c/web-platform-tests/payment-request/rejects_if_not_active.https.html

* LayoutTests/TestExpectations:
* LayoutTests/http/tests/paymentrequest/page-cache-created-payment-response.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/page-cache-created-payment-response.https.html:
* LayoutTests/http/tests/paymentrequest/page-cache-retried-payment-response.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/page-cache-retried-payment-response.https.html:
* LayoutTests/http/tests/paymentrequest/payment-response-rejects-if-not-active.https.html:
* LayoutTests/http/tests/paymentrequest/rejects_if_not_active.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/rejects_if_not_active.https.html:
* LayoutTests/imported/w3c/resources/resource-files.json:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/rejects_if_not_active.https-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-allowed-by-permissions-policy.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-allowed-by-permissions-policy.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-disabled-by-permissions-policy.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-disabled-by-permissions-policy.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-extension-allowed-by-permissions-policy-attribute.https.sub-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-extension-allowed-by-permissions-policy-attribute.https.sub.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-supported-by-permissions-policy.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-supported-by-permissions-policy.tentative.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/resources/permissions-policy-payment-extension.html: Added.
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac-wk2/TestExpectations:
* LayoutTests/platform/mac/TestExpectations:
* Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp:
(WebCore::PaymentRequest::show):
(WebCore::PaymentRequest::canMakePayment):
* Source/WebCore/Modules/paymentrequest/PaymentResponse.cpp:
(WebCore::PaymentResponse::complete):
(WebCore::PaymentResponse::retry):
* Source/WebCore/Modules/paymentrequest/PaymentResponse.h:
* Source/WebCore/Modules/paymentrequest/PaymentResponse.idl:
marcoscaceres added a commit to marcoscaceres/WebKit that referenced this pull request Mar 12, 2026
…ully active

rdar://171593464
https://bugs.webkit.org/show_bug.cgi?id=309027

Reviewed by NOBODY (OOPS!).

Uses InvalidStateError for when the API is called from a detatched document,
and AbortError if script itself destroyed the script execution context/document.

Spec change:
w3c/payment-request#1056

Upstream WPT commit: web-platform-tests/wpt@05fdf81

Test: imported/w3c/web-platform-tests/payment-request/rejects_if_not_active.https.html

* LayoutTests/TestExpectations:
* LayoutTests/http/tests/paymentrequest/page-cache-created-payment-response.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/page-cache-created-payment-response.https.html:
* LayoutTests/http/tests/paymentrequest/page-cache-retried-payment-response.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/page-cache-retried-payment-response.https.html:
* LayoutTests/http/tests/paymentrequest/payment-response-rejects-if-not-active.https.html:
* LayoutTests/http/tests/paymentrequest/rejects_if_not_active.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/rejects_if_not_active.https.html:
* LayoutTests/imported/w3c/resources/resource-files.json:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/rejects_if_not_active.https-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-allowed-by-permissions-policy.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-allowed-by-permissions-policy.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-disabled-by-permissions-policy.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-disabled-by-permissions-policy.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-extension-allowed-by-permissions-policy-attribute.https.sub-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-extension-allowed-by-permissions-policy-attribute.https.sub.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-supported-by-permissions-policy.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-supported-by-permissions-policy.tentative.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/resources/permissions-policy-payment-extension.html: Added.
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac-wk2/TestExpectations:
* LayoutTests/platform/mac/TestExpectations:
* Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp:
(WebCore::PaymentRequest::show):
(WebCore::PaymentRequest::canMakePayment):
* Source/WebCore/Modules/paymentrequest/PaymentResponse.cpp:
(WebCore::PaymentResponse::complete):
(WebCore::PaymentResponse::retry):
* Source/WebCore/Modules/paymentrequest/PaymentResponse.h:
* Source/WebCore/Modules/paymentrequest/PaymentResponse.idl:
marcoscaceres added a commit to marcoscaceres/WebKit that referenced this pull request Mar 12, 2026
…ully active

rdar://171593464
https://bugs.webkit.org/show_bug.cgi?id=309027

Reviewed by NOBODY (OOPS!).

Uses InvalidStateError for when the API is called from a detached document,
and AbortError if script itself destroyed the script execution context/document.

Spec change:
w3c/payment-request#1056

Upstream WPT commit: web-platform-tests/wpt@05fdf81

Test: imported/w3c/web-platform-tests/payment-request/rejects_if_not_active.https.html

* LayoutTests/TestExpectations:
* LayoutTests/http/tests/paymentrequest/page-cache-created-payment-response.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/page-cache-created-payment-response.https.html:
* LayoutTests/http/tests/paymentrequest/page-cache-retried-payment-response.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/page-cache-retried-payment-response.https.html:
* LayoutTests/http/tests/paymentrequest/payment-response-rejects-if-not-active.https.html:
* LayoutTests/http/tests/paymentrequest/rejects_if_not_active.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/rejects_if_not_active.https.html:
* LayoutTests/imported/w3c/resources/resource-files.json:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/rejects_if_not_active.https-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-allowed-by-permissions-policy.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-allowed-by-permissions-policy.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-disabled-by-permissions-policy.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-disabled-by-permissions-policy.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-extension-allowed-by-permissions-policy-attribute.https.sub-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-extension-allowed-by-permissions-policy-attribute.https.sub.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-supported-by-permissions-policy.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-supported-by-permissions-policy.tentative.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/resources/permissions-policy-payment-extension.html: Added.
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac-wk2/TestExpectations:
* LayoutTests/platform/mac/TestExpectations:
* Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp:
(WebCore::PaymentRequest::show):
(WebCore::PaymentRequest::canMakePayment):
* Source/WebCore/Modules/paymentrequest/PaymentResponse.cpp:
(WebCore::PaymentResponse::complete):
(WebCore::PaymentResponse::retry):
* Source/WebCore/Modules/paymentrequest/PaymentResponse.h:
* Source/WebCore/Modules/paymentrequest/PaymentResponse.idl:
webkit-commit-queue pushed a commit to marcoscaceres/WebKit that referenced this pull request Mar 12, 2026
…ully active

rdar://171593464
https://bugs.webkit.org/show_bug.cgi?id=309027

Reviewed by Abrar Rahman Protyasha and Anne van Kesteren.

Uses InvalidStateError for when the API is called from a detached document,
and AbortError if script itself destroyed the script execution context/document.

Spec change:
w3c/payment-request#1056

Upstream WPT commit: web-platform-tests/wpt@05fdf81

Test: imported/w3c/web-platform-tests/payment-request/rejects_if_not_active.https.html

* LayoutTests/TestExpectations:
* LayoutTests/http/tests/paymentrequest/page-cache-created-payment-response.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/page-cache-created-payment-response.https.html:
* LayoutTests/http/tests/paymentrequest/page-cache-retried-payment-response.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/page-cache-retried-payment-response.https.html:
* LayoutTests/http/tests/paymentrequest/payment-response-rejects-if-not-active.https.html:
* LayoutTests/http/tests/paymentrequest/rejects_if_not_active.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/rejects_if_not_active.https.html:
* LayoutTests/imported/w3c/resources/resource-files.json:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/rejects_if_not_active.https-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-allowed-by-permissions-policy.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-allowed-by-permissions-policy.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-disabled-by-permissions-policy.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-disabled-by-permissions-policy.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-extension-allowed-by-permissions-policy-attribute.https.sub-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-extension-allowed-by-permissions-policy-attribute.https.sub.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-supported-by-permissions-policy.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-supported-by-permissions-policy.tentative.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/resources/permissions-policy-payment-extension.html: Added.
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac-wk2/TestExpectations:
* LayoutTests/platform/mac/TestExpectations:
* Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp:
(WebCore::PaymentRequest::show):
(WebCore::PaymentRequest::canMakePayment):
* Source/WebCore/Modules/paymentrequest/PaymentResponse.cpp:
(WebCore::PaymentResponse::complete):
(WebCore::PaymentResponse::retry):
* Source/WebCore/Modules/paymentrequest/PaymentResponse.h:
* Source/WebCore/Modules/paymentrequest/PaymentResponse.idl:

Canonical link: https://commits.webkit.org/309150@main
kristentr pushed a commit to kristentr/WebKit that referenced this pull request Mar 12, 2026
…ully active

rdar://171593464
https://bugs.webkit.org/show_bug.cgi?id=309027

Reviewed by Abrar Rahman Protyasha and Anne van Kesteren.

Uses InvalidStateError for when the API is called from a detached document,
and AbortError if script itself destroyed the script execution context/document.

Spec change:
w3c/payment-request#1056

Upstream WPT commit: web-platform-tests/wpt@05fdf81

Test: imported/w3c/web-platform-tests/payment-request/rejects_if_not_active.https.html

* LayoutTests/TestExpectations:
* LayoutTests/http/tests/paymentrequest/page-cache-created-payment-response.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/page-cache-created-payment-response.https.html:
* LayoutTests/http/tests/paymentrequest/page-cache-retried-payment-response.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/page-cache-retried-payment-response.https.html:
* LayoutTests/http/tests/paymentrequest/payment-response-rejects-if-not-active.https.html:
* LayoutTests/http/tests/paymentrequest/rejects_if_not_active.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/rejects_if_not_active.https.html:
* LayoutTests/imported/w3c/resources/resource-files.json:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/rejects_if_not_active.https-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-allowed-by-permissions-policy.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-allowed-by-permissions-policy.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-disabled-by-permissions-policy.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-disabled-by-permissions-policy.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-extension-allowed-by-permissions-policy-attribute.https.sub-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-extension-allowed-by-permissions-policy-attribute.https.sub.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-supported-by-permissions-policy.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-supported-by-permissions-policy.tentative.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/resources/permissions-policy-payment-extension.html: Added.
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac-wk2/TestExpectations:
* LayoutTests/platform/mac/TestExpectations:
* Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp:
(WebCore::PaymentRequest::show):
(WebCore::PaymentRequest::canMakePayment):
* Source/WebCore/Modules/paymentrequest/PaymentResponse.cpp:
(WebCore::PaymentResponse::complete):
(WebCore::PaymentResponse::retry):
* Source/WebCore/Modules/paymentrequest/PaymentResponse.h:
* Source/WebCore/Modules/paymentrequest/PaymentResponse.idl:

Canonical link: https://commits.webkit.org/309150@main
kristentr pushed a commit to kristentr/WebKit that referenced this pull request Mar 12, 2026
…ully active

rdar://171593464
https://bugs.webkit.org/show_bug.cgi?id=309027

Reviewed by Abrar Rahman Protyasha and Anne van Kesteren.

Uses InvalidStateError for when the API is called from a detached document,
and AbortError if script itself destroyed the script execution context/document.

Spec change:
w3c/payment-request#1056

Upstream WPT commit: web-platform-tests/wpt@05fdf81

Test: imported/w3c/web-platform-tests/payment-request/rejects_if_not_active.https.html

* LayoutTests/TestExpectations:
* LayoutTests/http/tests/paymentrequest/page-cache-created-payment-response.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/page-cache-created-payment-response.https.html:
* LayoutTests/http/tests/paymentrequest/page-cache-retried-payment-response.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/page-cache-retried-payment-response.https.html:
* LayoutTests/http/tests/paymentrequest/payment-response-rejects-if-not-active.https.html:
* LayoutTests/http/tests/paymentrequest/rejects_if_not_active.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/rejects_if_not_active.https.html:
* LayoutTests/imported/w3c/resources/resource-files.json:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/rejects_if_not_active.https-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-allowed-by-permissions-policy.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-allowed-by-permissions-policy.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-disabled-by-permissions-policy.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-disabled-by-permissions-policy.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-extension-allowed-by-permissions-policy-attribute.https.sub-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-extension-allowed-by-permissions-policy-attribute.https.sub.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-supported-by-permissions-policy.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-supported-by-permissions-policy.tentative.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/resources/permissions-policy-payment-extension.html: Added.
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac-wk2/TestExpectations:
* LayoutTests/platform/mac/TestExpectations:
* Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp:
(WebCore::PaymentRequest::show):
(WebCore::PaymentRequest::canMakePayment):
* Source/WebCore/Modules/paymentrequest/PaymentResponse.cpp:
(WebCore::PaymentResponse::complete):
(WebCore::PaymentResponse::retry):
* Source/WebCore/Modules/paymentrequest/PaymentResponse.h:
* Source/WebCore/Modules/paymentrequest/PaymentResponse.idl:

Canonical link: https://commits.webkit.org/309150@main
kristentr added a commit to kristentr/WebKit that referenced this pull request Mar 18, 2026
* Create cmake-multi-platform.yml

* Create blank.yml

* Kristentr webkit/blank (#89)

* [Gardening][macOS iOS] imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/select-base-appearance-computed-style.html is a constant text failure
rdar://171830921
https://bugs.webkit.org/show_bug.cgi?id=309283

Unreviewed test gardening.

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

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

* Make 'hidden' attribute play nicely with TextManipulationController observing
rdar://169931473
https://bugs.webkit.org/show_bug.cgi?id=309226

Reviewed by Ryosuke Niwa.

When a TextManipulationController starts observing a Document, parts of the DOM that are not visible are skipped.
If they later become visible, they are then processed.

This is currently handled by the existence of a renderer. When an element without a renderer has something change
(such as its CSS "display" property) that causes a renderer to be created, the TextManipulationController is told.

However some elements can already have a renderer even though they will never display.
This is related to the HTML "hidden" attribute - which is entirely distinct from a hidden style - being removed.

Since they already have a renderer, the TextManipulationController was never told about a renderer being created,
and therefore their newfound visibility went unnoticed.

This patch adds explicit logic around this case. Whenever the `hidden` attribute on an `Element` changes, the
element is flagged for one-time special processing in style recalc so it can be passed to TextManipulationController.

Test: Tools/TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm

* Source/WebCore/dom/Element.cpp:
(WebCore::Element::shouldNotifyTextManipulationControllerIfDisplayed const):
(WebCore::Element::clearShouldNotifyTextManipulationControllerIfDisplayed):
(WebCore::Element::willModifyAttribute):
* Source/WebCore/dom/Element.h:
* Source/WebCore/dom/Node.h:
* Source/WebCore/rendering/RenderElement.cpp:
(WebCore::RenderElement::styleDidChange):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm:
(TestWebKitAPI::TEST(TextManipulation, StartTextManipulationFindNewlyDisplayedParagraph)):

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

* [webkit-bot] Add support for making reverts with git-webkit pr
https://bugs.webkit.org/show_bug.cgi?id=309015
rdar://171562627

Reviewed by Aakash Jain.

Add a revert-with-pr command to webkit-bot.
This is currently locked behind the USE_GIT_WEBKIT_REVERT env variable.

* Tools/WebKitBot/src/WebKitBot.mjs:
    - Add parsePRUrl function to find the url within command output
    - Handle PR flow in revertCommand and dryRevertCommand
    - Add revertWithPRCommand that calls revertCommand with usePR = True
    - Add generateRevertingPatchWithGitWebKit
          -> This sets up the environment and calls git-webkit revert

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

---------

Co-authored-by: Diego De La Toba <d_delatoba@apple.com>
Co-authored-by: Brady Eidson <beidson@apple.com>
Co-authored-by: Brianna Fan <bfan2@apple.com>

* Create nextjs.yml

* Create nextjs.yml (#96)

* Create c-cpp.yml

* Style: split isStretch() from isIntrinsic()
https://bugs.webkit.org/show_bug.cgi?id=309686

Reviewed by Elika Etemad.

This is a purely mechanical change to ease review and blame for
subsequent changes.

-webkit-fill-available is not an intrinsic size and should not be
classified as such.

The following changes are made:

- isFillAvailable() is renamed to isStretch() as that is what it will
  eventually become.
- isIntrinsic() has isStretch() removed.
- isIntrinsicOrStretch() takes over the old definition of isIntrinsic()
  and for now that is what all callers are switched to, to keep this a
  mechanical change.
- In RenderBox we remove two isIntrinsic() checks that are redundant
  with !isKnownZero(). (We keep a leading isAuto() check that is also
  redundant, but possibly cheaper.)
- We inline isLegacyIntrinsic() into its one caller in
  RenderBlock::availableLogicalHeightForPercentageComputation() so we
  can get rid of it.

This results in awkward code such as ElementBox::hasIntrinsicWidth()
containing an isIntrinsicOrStretch() check, but it seems better to be
explicit about such errors in the interim than try to address them as
part of this change.

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

* REGRESSION(297346@main): Cookie dialog on hillsprofeeding.com is misplaced
https://bugs.webkit.org/show_bug.cgi?id=309729
rdar://171393860

Reviewed by Simon Fraser.

The sticky overlap extent added in 297346@main used computeStickyExtent which covers the full
containing block range regardless of whether the page scrolls. This caused false overlap, forcing
multicol content to composite. It also returned early, skipping the normal overlapBounds()
computation.

Intersect the scroll-range inflation with the sticky extent so the result is bounded by both how far
the page can scroll and how far the element can travel in the containing block.

Test: fast/multicol/fixed-inside-columns-with-sticky-sibling.html
* LayoutTests/compositing/layer-creation/sticky-overlap-extent-expected.txt:
* LayoutTests/fast/multicol/fixed-inside-columns-with-sticky-sibling-expected.html: Added.
* LayoutTests/fast/multicol/fixed-inside-columns-with-sticky-sibling.html: Added.
* LayoutTests/platform/mac-sequoia-wk2/compositing/layer-creation/sticky-overlap-extent-expected.txt:
* LayoutTests/platform/mac-sonoma-wk2/compositing/layer-creation/sticky-overlap-extent-expected.txt:
* LayoutTests/platform/mac-wk2/compositing/layer-creation/sticky-overlap-extent-expected.txt:
Update these test expectations to account for the tighter extent.

* Source/WebCore/rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::computeExtent const):

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

* Update mac-tahoe-wk2-pixel pixel test baseline
https://bugs.webkit.org/show_bug.cgi?id=309790

Unreviewed gardening.

Update some results that changed in the legacy SVG engine.

* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/W3C-SVG-1.1/filters-color-01-b-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/W3C-SVG-1.1/filters-comptran-01-b-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/W3C-SVG-1.1/filters-felem-01-b-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/css/path-gradient-stroke-shadow-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/css/rect-gradient-stroke-shadow-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/custom/feComponentTransfer-Discrete-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/custom/feComponentTransfer-Gamma-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/custom/feComponentTransfer-Linear-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/custom/feComponentTransfer-Table-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/custom/focus-ring-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/custom/grayscale-gradient-mask-2-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/custom/polyline-invalid-points-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/dynamic-updates/SVGFEBlendElement-dom-in-attr-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/dynamic-updates/SVGFEBlendElement-dom-in2-attr-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/dynamic-updates/SVGFEBlendElement-dom-mode-attr-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/dynamic-updates/SVGFEBlendElement-svgdom-mode-prop-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/filters/feColorMatrix-saturate-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/filters/feTile-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/zoom/page/zoom-background-images-expected.png:

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

* [Site Isolation] mime/html-with-html.html is failing
https://bugs.webkit.org/show_bug.cgi?id=309735
rdar://172326195

Reviewed by Charlie Wolfe.

With site isolation on, neither the expected resource response or console log are
printed out.

This is because when setting the onerror callback, testRunner.notifyDone() is being
called immediately rather than being assigned as a callback. Site isolation likely
introduces some overhead that causes the resource response and console log to take
longer than with site isolation off. The test finishes before they can be printed.

* LayoutTests/http/tests/mime/html-with-html.html:
* LayoutTests/platform/mac-site-isolation/TestExpectations:

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

* Payment Request: reject with InvalidStateError when document is not fully active
rdar://171593464
https://bugs.webkit.org/show_bug.cgi?id=309027

Reviewed by Abrar Rahman Protyasha and Anne van Kesteren.

Uses InvalidStateError for when the API is called from a detached document,
and AbortError if script itself destroyed the script execution context/document.

Spec change:
w3c/payment-request#1056

Upstream WPT commit: web-platform-tests/wpt@05fdf81

Test: imported/w3c/web-platform-tests/payment-request/rejects_if_not_active.https.html

* LayoutTests/TestExpectations:
* LayoutTests/http/tests/paymentrequest/page-cache-created-payment-response.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/page-cache-created-payment-response.https.html:
* LayoutTests/http/tests/paymentrequest/page-cache-retried-payment-response.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/page-cache-retried-payment-response.https.html:
* LayoutTests/http/tests/paymentrequest/payment-response-rejects-if-not-active.https.html:
* LayoutTests/http/tests/paymentrequest/rejects_if_not_active.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/rejects_if_not_active.https.html:
* LayoutTests/imported/w3c/resources/resource-files.json:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/rejects_if_not_active.https-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-allowed-by-permissions-policy.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-allowed-by-permissions-policy.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-disabled-by-permissions-policy.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-disabled-by-permissions-policy.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-extension-allowed-by-permissions-policy-attribute.https.sub-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-extension-allowed-by-permissions-policy-attribute.https.sub.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-supported-by-permissions-policy.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-supported-by-permissions-policy.tentative.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/resources/permissions-policy-payment-extension.html: Added.
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac-wk2/TestExpectations:
* LayoutTests/platform/mac/TestExpectations:
* Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp:
(WebCore::PaymentRequest::show):
(WebCore::PaymentRequest::canMakePayment):
* Source/WebCore/Modules/paymentrequest/PaymentResponse.cpp:
(WebCore::PaymentResponse::complete):
(WebCore::PaymentResponse::retry):
* Source/WebCore/Modules/paymentrequest/PaymentResponse.h:
* Source/WebCore/Modules/paymentrequest/PaymentResponse.idl:

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

* Create c-cpp.yml

* Style: split isStretch() from isIntrinsic()
https://bugs.webkit.org/show_bug.cgi?id=309686

Reviewed by Elika Etemad.

This is a purely mechanical change to ease review and blame for
subsequent changes.

-webkit-fill-available is not an intrinsic size and should not be
classified as such.

The following changes are made:

- isFillAvailable() is renamed to isStretch() as that is what it will
  eventually become.
- isIntrinsic() has isStretch() removed.
- isIntrinsicOrStretch() takes over the old definition of isIntrinsic()
  and for now that is what all callers are switched to, to keep this a
  mechanical change.
- In RenderBox we remove two isIntrinsic() checks that are redundant
  with !isKnownZero(). (We keep a leading isAuto() check that is also
  redundant, but possibly cheaper.)
- We inline isLegacyIntrinsic() into its one caller in
  RenderBlock::availableLogicalHeightForPercentageComputation() so we
  can get rid of it.

This results in awkward code such as ElementBox::hasIntrinsicWidth()
containing an isIntrinsicOrStretch() check, but it seems better to be
explicit about such errors in the interim than try to address them as
part of this change.

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

* REGRESSION(297346@main): Cookie dialog on hillsprofeeding.com is misplaced
https://bugs.webkit.org/show_bug.cgi?id=309729
rdar://171393860

Reviewed by Simon Fraser.

The sticky overlap extent added in 297346@main used computeStickyExtent which covers the full
containing block range regardless of whether the page scrolls. This caused false overlap, forcing
multicol content to composite. It also returned early, skipping the normal overlapBounds()
computation.

Intersect the scroll-range inflation with the sticky extent so the result is bounded by both how far
the page can scroll and how far the element can travel in the containing block.

Test: fast/multicol/fixed-inside-columns-with-sticky-sibling.html
* LayoutTests/compositing/layer-creation/sticky-overlap-extent-expected.txt:
* LayoutTests/fast/multicol/fixed-inside-columns-with-sticky-sibling-expected.html: Added.
* LayoutTests/fast/multicol/fixed-inside-columns-with-sticky-sibling.html: Added.
* LayoutTests/platform/mac-sequoia-wk2/compositing/layer-creation/sticky-overlap-extent-expected.txt:
* LayoutTests/platform/mac-sonoma-wk2/compositing/layer-creation/sticky-overlap-extent-expected.txt:
* LayoutTests/platform/mac-wk2/compositing/layer-creation/sticky-overlap-extent-expected.txt:
Update these test expectations to account for the tighter extent.

* Source/WebCore/rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::computeExtent const):

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

* Update mac-tahoe-wk2-pixel pixel test baseline
https://bugs.webkit.org/show_bug.cgi?id=309790

Unreviewed gardening.

Update some results that changed in the legacy SVG engine.

* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/W3C-SVG-1.1/filters-color-01-b-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/W3C-SVG-1.1/filters-comptran-01-b-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/W3C-SVG-1.1/filters-felem-01-b-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/css/path-gradient-stroke-shadow-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/css/rect-gradient-stroke-shadow-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/custom/feComponentTransfer-Discrete-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/custom/feComponentTransfer-Gamma-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/custom/feComponentTransfer-Linear-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/custom/feComponentTransfer-Table-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/custom/focus-ring-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/custom/grayscale-gradient-mask-2-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/custom/polyline-invalid-points-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/dynamic-updates/SVGFEBlendElement-dom-in-attr-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/dynamic-updates/SVGFEBlendElement-dom-in2-attr-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/dynamic-updates/SVGFEBlendElement-dom-mode-attr-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/dynamic-updates/SVGFEBlendElement-svgdom-mode-prop-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/filters/feColorMatrix-saturate-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/filters/feTile-expected.png:
* LayoutTests/platform/mac-tahoe-wk2-pixel/svg/zoom/page/zoom-background-images-expected.png:

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

* [Site Isolation] mime/html-with-html.html is failing
https://bugs.webkit.org/show_bug.cgi?id=309735
rdar://172326195

Reviewed by Charlie Wolfe.

With site isolation on, neither the expected resource response or console log are
printed out.

This is because when setting the onerror callback, testRunner.notifyDone() is being
called immediately rather than being assigned as a callback. Site isolation likely
introduces some overhead that causes the resource response and console log to take
longer than with site isolation off. The test finishes before they can be printed.

* LayoutTests/http/tests/mime/html-with-html.html:
* LayoutTests/platform/mac-site-isolation/TestExpectations:

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

* Payment Request: reject with InvalidStateError when document is not fully active
rdar://171593464
https://bugs.webkit.org/show_bug.cgi?id=309027

Reviewed by Abrar Rahman Protyasha and Anne van Kesteren.

Uses InvalidStateError for when the API is called from a detached document,
and AbortError if script itself destroyed the script execution context/document.

Spec change:
w3c/payment-request#1056

Upstream WPT commit: web-platform-tests/wpt@05fdf81

Test: imported/w3c/web-platform-tests/payment-request/rejects_if_not_active.https.html

* LayoutTests/TestExpectations:
* LayoutTests/http/tests/paymentrequest/page-cache-created-payment-response.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/page-cache-created-payment-response.https.html:
* LayoutTests/http/tests/paymentrequest/page-cache-retried-payment-response.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/page-cache-retried-payment-response.https.html:
* LayoutTests/http/tests/paymentrequest/payment-response-rejects-if-not-active.https.html:
* LayoutTests/http/tests/paymentrequest/rejects_if_not_active.https-expected.txt:
* LayoutTests/http/tests/paymentrequest/rejects_if_not_active.https.html:
* LayoutTests/imported/w3c/resources/resource-files.json:
* LayoutTests/imported/w3c/web-platform-tests/payment-request/rejects_if_not_active.https-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-allowed-by-permissions-policy.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-allowed-by-permissions-policy.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-disabled-by-permissions-policy.https.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-disabled-by-permissions-policy.https.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-extension-allowed-by-permissions-policy-attribute.https.sub-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-extension-allowed-by-permissions-policy-attribute.https.sub.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-supported-by-permissions-policy.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/payment-supported-by-permissions-policy.tentative.html:
* LayoutTests/imported/w3c/web-platform-tests/permissions-policy/resources/permissions-policy-payment-extension.html: Added.
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac-wk2/TestExpectations:
* LayoutTests/platform/mac/TestExpectations:
* Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp:
(WebCore::PaymentRequest::show):
(WebCore::PaymentRequest::canMakePayment):
* Source/WebCore/Modules/paymentrequest/PaymentResponse.cpp:
(WebCore::PaymentResponse::complete):
(WebCore::PaymentResponse::retry):
* Source/WebCore/Modules/paymentrequest/PaymentResponse.h:
* Source/WebCore/Modules/paymentrequest/PaymentResponse.idl:

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

* Add onend EventHandler to SVGAnimationElement and fix event name mapping for onbegin/onend/onrepeat
https://bugs.webkit.org/show_bug.cgi?id=309941
rdar://172533070

Reviewed by Chris Dumez and Anne van Kesteren.

The SVG spec [1] defines onbegin, onend, and onrepeat IDL attributes on
SVGAnimationElement that should map to beginEvent, endEvent, and
repeatEvent respectively. onend was missing entirely, and onbegin/onrepeat
were silently mapping to the wrong event names due to a naming collision
in the codegen.

The IDL code generator strips "on" and appends "Event" to produce the
C++ accessor (e.g. onend -> endEvent). But make-event-names.py also
appends "Event" to every EventNames.json entry to create accessors, so
eventNames().endEvent refers to the "end" event, not "endEvent". The
correct accessor for the "endEvent" event is eventNames().endEventEvent.

Using [ImplementedAs=onendEvent] makes the codegen strip "on" to get
"endEvent", then append "Event" to get "endEventEvent", producing the
correct eventNames().endEventEvent accessor.

[1] https://svgwg.org/specs/animations/#InterfaceSVGAnimationElement

* Source/WebCore/svg/SVGAnimationElement.idl:

> Progressions:
* LayoutTests/imported/w3c/web-platform-tests/svg/animations/custom-events-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/svg/animations/event-listeners-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/svg/idlharness.window-expected.txt:

> Additional Coverage:
* LayoutTests/imported/w3c/web-platform-tests/svg/animations/event-listeners.html: `onbegin` and `onrepeat` special case testing

> Rebaselines:
* LayoutTests/imported/w3c/web-platform-tests/trusted-types/TrustedTypePolicyFactory-getAttributeType-event-handler-content-attributes.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/trusted-types/set-event-handlers-content-attributes.tentative-expected.txt:

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

* <model> should be HDR by default
https://bugs.webkit.org/show_bug.cgi?id=309748
rdar://172338408

Reviewed by Etienne Segonzac.

Patch largely from Etienne Segonzac, I just added one line in WebKitMesh.mm

Use rgba16Float instead of bgra8unorm_srgb as environment map highlights
look a lot better when initial colors don't get clamped to 8bpc.

* Source/WebKit/GPUProcess/graphics/Model/ModelRenderer.swift:
(Renderer.createMaterialCompiler(_:rasterSampleCount:colorSpace:)):
* Source/WebKit/GPUProcess/graphics/Model/USDModel.swift:
(WKBridgeUSDConfiguration.createMaterialCompiler):
* Source/WebKit/GPUProcess/graphics/Model/WebKitMesh.mm:
(WebKit::WebMesh::WebMesh):
* Source/WebKit/GPUProcess/graphics/WebGPU/RemoteGPU.cpp:
(WebKit::createIOSurfaces):
* Source/WebKit/WebProcess/Model/WebModelPlayer.mm:

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

* [Build Speed] Reduce includes of JSDOMPromiseDeferred.h and make it cheaper
rdar://164123237
https://bugs.webkit.org/show_bug.cgi?id=302045

Reviewed by Brent Fulgham and BJ Burg.

Reduce the number of times JSDOMPromiseDeferred.h is included during a build, and for those times
when including that header is unavoidable, reduce the cost of including that header.

For the first part, remove JSDOMPromiseDeferred.h from (almost all) non-Inlines.h headers by
converting those headers to use JSDOMPromiseDeferredForward.h. This also requires any class that
stores a JSDOMPromiseDeferred to use a std::unique_ptr instead of a std::optional. It also required
some classes to have inline methods move to the implementation file (or have implementation files
added where none previously existed). These include SimpleWritableStreamSink, ModuleScriptLoader,
NavigationAPIMethodTracker, NavigationTransition, and WorkletPendingTasks.

For the second part, remove JSDOMConvert.h from JSDOMPromiseDeferred.h. JSDOMConvert.h pulls in
every different mechanism to convert a c++ object to an IDLType, which is very expensive. Instead,
the users of JSDOMPromiseDeferred.h should include only the specific JSDOMConvert*.h header needed
to call resolve() or reject().

Before this change, JSDOMPromiseDeferred.h was the 11th most expensive header in the WebCore Unified
build. It was included 184 times, at an average cost on this machine of 880ms of CPU time, for a total
cost of 2.7m of CPU time spent parsing this header.

After this change, JSDOMPromiseDeferred.h is the 67th most expensive header in the WebCore Unified
build. It is included 120 times, at an average cost on this machine of 430ms of CPU time, for a total
cost of 53s of CPU time spent parsing this header.

All told, frontend parsing time decreased from 8122s to 7876s, a reduction of 3%.

* Source/WebCore/Modules/WebGPU/GPUBuffer.cpp:
(WebCore::GPUBuffer::mapAsync):
(WebCore::GPUBuffer::internalUnmap):
* Source/WebCore/Modules/WebGPU/GPUBuffer.h:
* Source/WebCore/Modules/WebGPU/GPUQueue.h:
* Source/WebCore/Modules/WebGPU/GPUShaderModule.cpp:
* Source/WebCore/Modules/applepay/ApplePaySession.cpp:
* Source/WebCore/Modules/applepay/ApplePaySetup.cpp:
(WebCore::ApplePaySetup::getSetupFeatures):
(WebCore::ApplePaySetup::begin):
(WebCore::ApplePaySetup::stop):
* Source/WebCore/Modules/applepay/ApplePaySetupWebCore.h:
* Source/WebCore/Modules/cache/DOMCache.cpp:
* Source/WebCore/Modules/cache/DOMCacheStorage.cpp:
* Source/WebCore/Modules/contact-picker/ContactsManager.cpp:
* Source/WebCore/Modules/cookie-consent/NavigatorCookieConsent.cpp:
* Source/WebCore/Modules/cookie-store/CookieStore.cpp:
* Source/WebCore/Modules/credentialmanagement/CredentialsContainer.cpp:
* Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp:
* Source/WebCore/Modules/encryptedmedia/MediaKeySystemAccess.cpp:
* Source/WebCore/Modules/encryptedmedia/MediaKeys.cpp:
* Source/WebCore/Modules/encryptedmedia/NavigatorEME.cpp:
* Source/WebCore/Modules/fetch/FetchBody.cpp:
* Source/WebCore/Modules/fetch/FetchBodyConsumer.cpp:
* Source/WebCore/Modules/fetch/WindowOrWorkerGlobalScopeFetch.cpp:
* Source/WebCore/Modules/filesystem/FileSystemDirectoryHandle.cpp:
* Source/WebCore/Modules/filesystem/FileSystemWritableFileStreamSink.cpp:
* Source/WebCore/Modules/gamepad/GamepadHapticActuator.cpp:
* Source/WebCore/Modules/identity/CredentialRequestCoordinator.cpp:
(WebCore::CredentialRequestCoordinator::setCurrentPromise):
(WebCore::CredentialRequestCoordinator::currentPromise):
* Source/WebCore/Modules/identity/CredentialRequestCoordinator.h:
* Source/WebCore/Modules/identity/DigitalCredential.cpp:
* Source/WebCore/Modules/identity/DigitalCredential.h:
* Source/WebCore/Modules/indexeddb/IDBFactory.cpp:
* Source/WebCore/Modules/mediastream/ImageCapture.cpp:
* Source/WebCore/Modules/mediastream/ImageCapture.h:
* Source/WebCore/Modules/mediastream/MediaDevices.cpp:
* Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp:
* Source/WebCore/Modules/mediastream/MediaStreamTrack.h:
* Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp:
* Source/WebCore/Modules/mediastream/RTCEncodedStreamProducer.cpp:
* Source/WebCore/Modules/mediastream/RTCRtpSFrameTransform.cpp:
* Source/WebCore/Modules/mediastream/RTCRtpScriptTransformer.cpp:
* Source/WebCore/Modules/mediastream/UserMediaRequest.cpp:
* Source/WebCore/Modules/mediastream/VideoTrackGenerator.cpp:
* Source/WebCore/Modules/mediastream/VideoTrackGenerator.h:
* Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
* Source/WebCore/Modules/notifications/Notification.cpp:
* Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp:
* Source/WebCore/Modules/permissions/Permissions.cpp:
* Source/WebCore/Modules/pictureinpicture/DocumentPictureInPicture.cpp:
* Source/WebCore/Modules/pictureinpicture/HTMLVideoElementPictureInPicture.cpp:
* Source/WebCore/Modules/push-api/PushSubscription.cpp:
* Source/WebCore/Modules/remoteplayback/RemotePlayback.cpp:
* Source/WebCore/Modules/screen-wake-lock/WakeLock.cpp:
* Source/WebCore/Modules/storage/StorageManager.cpp:
* Source/WebCore/Modules/streams/StreamPipeToUtilities.cpp:
* Source/WebCore/Modules/streams/WritableStreamSink.cpp: Copied from Source/WebCore/Modules/WebGPU/GPUShaderModule.cpp.
(WebCore::SimpleWritableStreamSink::SimpleWritableStreamSink):
(WebCore::SimpleWritableStreamSink::write):
* Source/WebCore/Modules/streams/WritableStreamSink.h:
(WebCore::SimpleWritableStreamSink::SimpleWritableStreamSink): Deleted.
(WebCore::SimpleWritableStreamSink::write): Deleted.
* Source/WebCore/Modules/web-locks/WebLockManager.cpp:
* Source/WebCore/Modules/webaudio/OfflineAudioContext.cpp:
* Source/WebCore/Modules/webauthn/AuthenticatorCoordinator.cpp:
* Source/WebCore/Modules/webcodecs/WebCodecsVideoFrame.cpp:
* Source/WebCore/Modules/webtransport/DatagramSink.cpp:
* Source/WebCore/Modules/webtransport/WebTransport.cpp:
* Source/WebCore/Modules/webtransport/WebTransportSendStreamSink.cpp:
* Source/WebCore/Modules/webtransport/WorkerWebTransportSession.cpp:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/animation/WebAnimation.cpp:
* Source/WebCore/bindings/js/DOMPromiseProxy.h:
* Source/WebCore/bindings/js/JSDOMConvertEnumeration.h:
* Source/WebCore/bindings/js/JSDOMGuardedObject.h:
* Source/WebCore/bindings/js/JSDOMPromiseDeferred.h:
* Source/WebCore/bindings/js/ModuleScriptLoader.cpp: Copied from Source/WebCore/Modules/WebGPU/GPUShaderModule.cpp.
(WebCore::ModuleScriptLoader::ModuleScriptLoader):
* Source/WebCore/bindings/js/ModuleScriptLoader.h:
(WebCore::ModuleScriptLoader::ModuleScriptLoader): Deleted.
* Source/WebCore/crypto/SubtleCrypto.cpp:
* Source/WebCore/css/DOMCSSPaintWorklet.cpp:
(WebCore::PaintWorklet::addModule):
* Source/WebCore/css/DOMCSSPaintWorklet.h:
* Source/WebCore/css/FontFace.cpp:
* Source/WebCore/css/FontFaceSet.cpp:
* Source/WebCore/dom/DocumentStorageAccess.cpp:
* Source/WebCore/dom/InternalObserverEvery.cpp:
* Source/WebCore/dom/InternalObserverFind.cpp:
* Source/WebCore/dom/InternalObserverFirst.cpp:
* Source/WebCore/dom/InternalObserverForEach.cpp:
* Source/WebCore/dom/InternalObserverSome.cpp:
* Source/WebCore/fileapi/Blob.cpp:
* Source/WebCore/html/OffscreenCanvas.cpp:
* Source/WebCore/inspector/InspectorFrontendHost.cpp:
* Source/WebCore/page/Navigation.cpp:
(WebCore::NavigationAPIMethodTracker::NavigationAPIMethodTracker):
* Source/WebCore/page/Navigation.h:
(WebCore::NavigationAPIMethodTracker::NavigationAPIMethodTracker): Deleted.
* Source/WebCore/page/NavigationTransition.cpp:
(WebCore::NavigationTransition::create):
* Source/WebCore/page/NavigationTransition.h:
* Source/WebCore/page/NavigatorLoginStatus.cpp:
* Source/WebCore/page/NavigatorUAData.cpp:
(WebCore::NavigatorUAData::createArbitraryVersion): Deleted.
(WebCore::NavigatorUAData::createArbitraryBrand): Deleted.
* Source/WebCore/page/NavigatorUAData.h:
(): Deleted.
* Source/WebCore/page/Quirks.cpp:
(WebCore::handleVimeoQuirks):
* Source/WebCore/page/UserMessageHandler.cpp:
* Source/WebCore/testing/ServiceWorkerInternals.cpp:
* Source/WebCore/workers/service/ServiceWorkerClients.cpp:
* Source/WebCore/workers/service/ServiceWorkerContainer.cpp:
* Source/WebCore/workers/service/ServiceWorkerWindowClient.cpp:
* Source/WebCore/workers/service/background-fetch/BackgroundFetchManager.cpp:
* Source/WebCore/workers/service/background-fetch/BackgroundFetchManager.h:
* Source/WebCore/workers/service/background-fetch/BackgroundFetchRecord.cpp:
* Source/WebCore/workers/service/background-fetch/BackgroundFetchRegistration.cpp:
* Source/WebCore/workers/service/background-fetch/BackgroundFetchRegistration.h:
* Source/WebCore/workers/service/background-fetch/BackgroundFetchUpdateUIEvent.h:
* Source/WebCore/worklets/Worklet.cpp:
(WebCore::Worklet::addModule):
* Source/WebCore/worklets/Worklet.h:
* Source/WebCore/worklets/WorkletPendingTasks.cpp:
(WebCore::WorkletPendingTasks::create):
(WebCore::WorkletPendingTasks::WorkletPendingTasks):
(WebCore::WorkletPendingTasks::abort):
(WebCore::WorkletPendingTasks::decrementCounter):
* Source/WebCore/worklets/WorkletPendingTasks.h:
(WebCore::WorkletPendingTasks::create): Deleted.

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

* Videos inside shadow DOM not detected as children of element fullscreen, preventing docking on visionOS
https://bugs.webkit.org/show_bug.cgi?id=309602
rdar://168093378

Reviewed by Ryosuke Niwa.

The ancestor walk in documentFullscreenChanged() used parentNode(), which returns nullptr at shadow
root boundaries. Videos inside web components (e.g. Reddit's <shreddit-player>) were never marked
as isChildOfElementFullscreen, so bestVideoForElementFullscreen() returned nullptr and the dock
button was not shown.

Replace the manual parentNode() walk with isShadowIncludingDescendantOf(), which crosses shadow
root boundaries by walking up through shadow hosts.

* Source/WebCore/platform/cocoa/VideoPresentationModelVideoElement.mm:
(WebCore::VideoPresentationModelVideoElement::documentFullscreenChanged):

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

* [threaded-animations] remote timeline is not preserved in update for animation targeting primary and backdrop layers
https://bugs.webkit.org/show_bug.cgi?id=309962
rdar://171248927

Reviewed by Cameron McCormack.

If we create an accelerated animation that animates properties affecting both the primary and backdrop
layers, such as an animation animating both `opacity` (primary) and `backdrop-filter` (backdrop), we end
up slicing the list of animation effects in two in `AcceleratedEffectStack::setEffects()`. To do this, we
use the `AccelerateEffect::copyWithProperties()` method which makes a copy of the effect and filters only
the properties relevant to the layer type.

But a bad error was made in 301942@main when we added support for different timeline types and only copied
`m_timelineIdentifier` in the `AcceleratedEffect(const AcceleratedEffect&, OptionSet<AcceleratedEffectProperty>&)`
constructor variant, and forgot to also copy `m_timeline`. This meant that the `AcceleratedTimeline` created
for the effect was immediately destroyed following the initial animation commit to the remote layer tree.

As such, if that animation needs an update, a new version of it will be created in a remote layer tree commit
but the timeline update in that same commit will list that timeline for deletion since it will no longer exist.
For additional details, see 308011@main.

We fix this by simply ensuring we preserve `m_timeline` when `AccelerateEffect::copyWithProperties()` is called.

Test: webanimations/threaded-animations/accelerated-timeline-preservation-during-update-for-primary-and-backdrop-layer-effects.html

* LayoutTests/webanimations/threaded-animations/accelerated-timeline-preservation-during-update-for-primary-and-backdrop-layer-effects-expected.txt: Added.
* LayoutTests/webanimations/threaded-animations/accelerated-timeline-preservation-during-update-for-primary-and-backdrop-layer-effects.html: Added.
* Source/WebCore/platform/animation/AcceleratedEffect.cpp:
(WebCore::AcceleratedEffect::AcceleratedEffect):

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

* Use `const Ref` for IntersectionObserver::m_callback
https://bugs.webkit.org/show_bug.cgi?id=309955

Reviewed by Geoffrey Garen and Anne van Kesteren.

Mark the data member as const as the code in JSIntersectionObserver::visitAdditionalChildrenInGCThread()
would not be safe if this member was ever modified. Also use Ref instead
of RefPtr since it can never be null.

* Source/WebCore/SaferCPPExpectations/UncountedLocalVarsCheckerExpectations:
* Source/WebCore/bindings/js/JSIntersectionObserverCustom.cpp:
(WebCore::JSIntersectionObserver::visitAdditionalChildrenInGCThread):
* Source/WebCore/page/IntersectionObserver.cpp:
(WebCore::IntersectionObserver::observe):
(WebCore::IntersectionObserver::nowTimestamp const):
* Source/WebCore/page/IntersectionObserver.h:
(WebCore::IntersectionObserver::callbackConcurrently):

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

* Fix alphabetical ordering in EventNames.json post 309273@main
https://bugs.webkit.org/show_bug.cgi?id=309969
rdar://problem/172580305

Reviewed by Brent Fulgham.

Thanks to Brent for spotting this.

* Source/WebCore/dom/EventNames.json:

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

* Create add-nextjs.yml

* Mark ResizeObserver::m_JSOrNativeCallback as const
https://bugs.webkit.org/show_bug.cgi?id=309954

Reviewed by Ryosuke Niwa and Anne van Kesteren.

The logic in JSResizeObserver::visitAdditionalChildrenInGCThread() would
not be safe if m_JSOrNativeCallback was ever modified.

* Source/WebCore/page/ResizeObserver.h:

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

* Simplify visitAdditionalChildrenInGCThread() for TrustedTypePolicy
https://bugs.webkit.org/show_bug.cgi?id=309948

Reviewed by Geoffrey Garen and Ryosuke Niwa.

Remove Lock used when accessing m_options and mark m_options as const
instead. Since m_options is const, its smart pointers cannot be modified
on the main thread while the GC thread is accessing them.

Note that even though there was a lock, it was not doing much since the
GC thread was holding raw pointers to those main thread objects outside
the lock's scope.

* Source/WebCore/bindings/js/JSTrustedTypePolicyCustom.cpp:
(WebCore::JSTrustedTypePolicy::visitAdditionalChildrenInGCThread):
* Source/WebCore/dom/TrustedTypePolicy.cpp:
(WebCore::TrustedTypePolicy::getPolicyValue):
(WebCore::TrustedTypePolicy::visitAdditionalChildrenInGCThread):
* Source/WebCore/dom/TrustedTypePolicy.h:
(WebCore::TrustedTypePolicy::name const):
(WebCore::TrustedTypePolicy::options const): Deleted.
(WebCore::TrustedTypePolicy::WTF_RETURNS_LOCK): Deleted.
* Source/WebCore/dom/TrustedTypePolicyOptions.h:

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

---------

Co-authored-by: Diego De La Toba <d_delatoba@apple.com>
Co-authored-by: Brady Eidson <beidson@apple.com>
Co-authored-by: Brianna Fan <bfan2@apple.com>
Co-authored-by: Anne van Kesteren <annevk@annevk.nl>
Co-authored-by: Charlie Wolfe <charliew@apple.com>
Co-authored-by: Nikolas Zimmermann <nzimmermann@igalia.com>
Co-authored-by: Rupin Mittal <rupin@apple.com>
Co-authored-by: Marcos Caceres <marcosc@apple.com>
Co-authored-by: Ahmad Saleem <ahmad.saleem792+github@gmail.com>
Co-authored-by: Mike Wyrzykowski <mwyrzykowski@apple.com>
Co-authored-by: Jer Noble <jer.noble@apple.com>
Co-authored-by: Phinehas Fuachie <pfuachie2@apple.com>
Co-authored-by: Antoine Quint <graouts@webkit.org>
Co-authored-by: Chris Dumez <cdumez@apple.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants