diff --git a/Libraries/LibWeb/DOM/Document.cpp b/Libraries/LibWeb/DOM/Document.cpp index 9ced87a381..ed70b7905a 100644 --- a/Libraries/LibWeb/DOM/Document.cpp +++ b/Libraries/LibWeb/DOM/Document.cpp @@ -1903,7 +1903,12 @@ void Document::update_layout(UpdateLayoutReason reason) } } - if (!needs_style_update_after_layout()) + if (needs_style_update_after_layout()) + continue; + + // The pass cap above bounds repeated container query style/layout cycles. + // Layout-only invalidations still need to be flushed before we can exit. + if (layout_is_up_to_date()) break; } diff --git a/Tests/LibWeb/Crash/CSS/deep-container-query-client-height.html b/Tests/LibWeb/Crash/CSS/deep-container-query-client-height.html new file mode 100644 index 0000000000..feb249b772 --- /dev/null +++ b/Tests/LibWeb/Crash/CSS/deep-container-query-client-height.html @@ -0,0 +1,64 @@ + + + +
+