Skip to content

Fire error events for invalid speculation rules tags#53822

Merged
jcscottiii merged 1 commit into
masterfrom
chromium-export-8a2757c24d
Jul 21, 2025
Merged

Fire error events for invalid speculation rules tags#53822
jcscottiii merged 1 commit into
masterfrom
chromium-export-8a2757c24d

Conversation

@chromium-wpt-export-bot

Copy link
Copy Markdown
Collaborator

This CL introduces error handling for <script type=speculationrules>
with invalid ruleset-level tags. This changes the behavior: previously
we would ignore such tags and preload with the null tag. But now, we
error the entire <script type=speculationrules>, since it is better to
avoid preloading if the web developer is expecting it to get a certain
tag and we cannot fulfill that request.

This matches the spec update at
whatwg/html#11426.

Bug: None
Change-Id: I5d2211510bd4e3a3ecce15010325b411f18fde3a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6746174
Commit-Queue: Domenic Denicola <domenic@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1488633}

@wpt-pr-bot wpt-pr-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

This CL introduces error handling for <script type=speculationrules>
with invalid ruleset-level tags. This changes the behavior: previously
we would ignore such tags and preload with the null tag. But now, we
error the entire <script type=speculationrules>, since it is better to
avoid preloading if the web developer is expecting it to get a certain
tag and we cannot fulfill that request.

This matches the spec update at
whatwg/html#11426.

Bug: None
Change-Id: I5d2211510bd4e3a3ecce15010325b411f18fde3a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6746174
Commit-Queue: Domenic Denicola <domenic@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1488633}
@jonathan-j-lee

Copy link
Copy Markdown
Contributor

Same problem as #53821 (comment). @jcscottiii Should we try merging? Thanks!

@jcscottiii jcscottiii merged commit 8c89451 into master Jul 21, 2025
13 of 14 checks passed
@jcscottiii jcscottiii deleted the chromium-export-8a2757c24d branch July 21, 2025 20:45
jcscottiii added a commit that referenced this pull request Jul 21, 2025
jcscottiii added a commit that referenced this pull request Jul 21, 2025
jonathan-j-lee pushed a commit to jonathan-j-lee/wpt that referenced this pull request Jul 22, 2025
…sts#53822)

This CL introduces error handling for <script type=speculationrules>
with invalid ruleset-level tags. This changes the behavior: previously
we would ignore such tags and preload with the null tag. But now, we
error the entire <script type=speculationrules>, since it is better to
avoid preloading if the web developer is expecting it to get a certain
tag and we cannot fulfill that request.

This matches the spec update at
whatwg/html#11426.

Bug: None
Change-Id: I5d2211510bd4e3a3ecce15010325b411f18fde3a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6746174
Commit-Queue: Domenic Denicola <domenic@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1488633}

Co-authored-by: Domenic Denicola <domenic@chromium.org>
jonathan-j-lee pushed a commit to jonathan-j-lee/wpt that referenced this pull request Jul 22, 2025
…sts#53822)

This CL introduces error handling for <script type=speculationrules>
with invalid ruleset-level tags. This changes the behavior: previously
we would ignore such tags and preload with the null tag. But now, we
error the entire <script type=speculationrules>, since it is better to
avoid preloading if the web developer is expecting it to get a certain
tag and we cannot fulfill that request.

This matches the spec update at
whatwg/html#11426.

Bug: None
Change-Id: I5d2211510bd4e3a3ecce15010325b411f18fde3a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6746174
Commit-Queue: Domenic Denicola <domenic@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1488633}
chromium-wpt-export-bot pushed a commit that referenced this pull request Jul 22, 2025
This CL introduces error handling for <script type=speculationrules>
with invalid ruleset-level tags. This changes the behavior: previously
we would ignore such tags and preload with the null tag. But now, we
error the entire <script type=speculationrules>, since it is better to
avoid preloading if the web developer is expecting it to get a certain
tag and we cannot fulfill that request.

This matches the spec update at
whatwg/html#11426.

Bug: None
Change-Id: I5d2211510bd4e3a3ecce15010325b411f18fde3a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6746174
Commit-Queue: Domenic Denicola <domenic@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1488633}
foolip pushed a commit that referenced this pull request Aug 13, 2025
This CL introduces error handling for <script type=speculationrules>
with invalid ruleset-level tags. This changes the behavior: previously
we would ignore such tags and preload with the null tag. But now, we
error the entire <script type=speculationrules>, since it is better to
avoid preloading if the web developer is expecting it to get a certain
tag and we cannot fulfill that request.

This matches the spec update at
whatwg/html#11426.

Bug: None
Change-Id: I5d2211510bd4e3a3ecce15010325b411f18fde3a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6746174
Commit-Queue: Domenic Denicola <domenic@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1488633}

Co-authored-by: Domenic Denicola <domenic@chromium.org>
foolip pushed a commit that referenced this pull request Aug 13, 2025
foolip pushed a commit that referenced this pull request Aug 13, 2025
This CL introduces error handling for <script type=speculationrules>
with invalid ruleset-level tags. This changes the behavior: previously
we would ignore such tags and preload with the null tag. But now, we
error the entire <script type=speculationrules>, since it is better to
avoid preloading if the web developer is expecting it to get a certain
tag and we cannot fulfill that request.

This matches the spec update at
whatwg/html#11426.

Bug: None
Change-Id: I5d2211510bd4e3a3ecce15010325b411f18fde3a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6746174
Commit-Queue: Domenic Denicola <domenic@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1488633}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants