commit 56524c69e429bf4651d9a5efb7111389c1f58030 parent f36ec831e69399b80eb824441079ddb3e87b813a Author: Rune Lillesveen <futhark@chromium.org> Date: Thu, 9 Oct 2025 20:37:43 +0000 Bug 1992460 [wpt PR 55230] - UpdatePseudoElement for ::interest-hint incorrectly guarded, a=testonly Automatic update from web-platform-tests UpdatePseudoElement for ::interest-hint incorrectly guarded UpdatePseudoElement was never called for ::interest-hint if the originating element did not have an InterestForElement(). That meant it was never removed. In addition to the rendering issue, this also caused a crash for anchor positioning since OOF style recalcs were not guarded by this check and was able to nuke its box during layout. Instead, check whether the pseudo element should be generated in CanGeneratePseudoElement(). Bug: 448916168, 448092423 Change-Id: Iab54985512a00d969fa73f404a766a9c4ae48209 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7003242 Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org> Commit-Queue: Rune Lillesveen <futhark@chromium.org> Cr-Commit-Position: refs/heads/main@{#1524754} -- wpt-commits: ced0afdf646b9a37f88c06eed97f2670aa961cc2 wpt-pr: 55230 Diffstat:
2 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/testing/web-platform/tests/html/semantics/interestfor/interestfor-pseudo-element-dynamic-ref.html b/testing/web-platform/tests/html/semantics/interestfor/interestfor-pseudo-element-dynamic-ref.html @@ -0,0 +1,3 @@ +<!DOCTYPE html> +<p>You should see a button with the text PASS below.</p> +<button>PASS</button> diff --git a/testing/web-platform/tests/html/semantics/interestfor/interestfor-pseudo-element-dynamic.tentative.html b/testing/web-platform/tests/html/semantics/interestfor/interestfor-pseudo-element-dynamic.tentative.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<link rel="help" href="https://open-ui.org/components/interest-invokers.explainer"> +<link rel="match" href="interestfor-pseudo-element-dynamic-ref.html"> +<p>You should see a button with the text PASS below.</p> +<button id="interest" interestfor="target">PASS</button> +<div id="target"></div> +<style> + ::interest-hint { content: "FAIL"; } +</style> +<script> + interest.offsetTop; + interest.removeAttribute("interestfor"); +</script>