From fc9a8f1d8c5c578db312e1dcf7b975efd57c0fe9 Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Tue, 21 Nov 2023 12:19:36 +0000 Subject: [PATCH] Bug 1861654 [wpt PR 42806] - Cannot skip style recalc for container if there are whitespace changes., a=testonly Automatic update from web-platform-tests Cannot skip style recalc for container if there are whitespace changes. (#42806) We cannot skip style recalc for a container query container if WhitespaceChildrenMayChange() has been set. This flag may be set when a DOM node is removed, and the subsequent style recalc is expected to take care of it and clear it. It is too late to do anything about it when we get to layout of the container query node, since the node cannot reattach itself at that point. Bug: 1494659 Change-Id: I8d150c56470259c80f9d8536c79c2aefeaf2b116 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4982289 Commit-Queue: Morten Stenshorne Reviewed-by: Rune Lillesveen Cr-Commit-Position: refs/heads/main{#1216904} Co-authored-by: Morten Stenshorne -- wpt-commits: 8d8824fdb894a09489f103d8717b5d25b700c75a wpt-pr: 42806 UltraBlame original commit: a403dbbea2f9aa7c4f73bfaabb2672987c371d4b --- .../remove-dom-child-change-style.html | 149 ++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 testing/web-platform/tests/css/css-contain/container-queries/crashtests/remove-dom-child-change-style.html diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/remove-dom-child-change-style.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/remove-dom-child-change-style.html new file mode 100644 index 0000000000000..f2f66c50c7782 --- /dev/null +++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/remove-dom-child-change-style.html @@ -0,0 +1,149 @@ +< +! +DOCTYPE +html +> +< +link +rel += +" +author +" +title += +" +Morten +Stenshorne +" +href += +" +mailto +: +mstensho +chromium +. +org +" +> +< +link +rel += +" +help +" +href += +" +https +: +/ +/ +bugs +. +chromium +. +org +/ +p +/ +chromium +/ +issues +/ +detail +? +id += +1494659 +" +> +< +div +id += +" +container +" +style += +" +container +- +type +: +inline +- +size +; +" +> +< +div +id += +" +other +" +> +< +/ +div +> +< +div +id += +" +foo +" +> +< +/ +div +> +< +/ +div +> +< +script +> +document +. +body +. +offsetTop +; +container +. +style +. +width += +" +100px +" +; +other +. +style +. +color += +" +pink +" +; +foo +. +remove +( +) +; +< +/ +script +>