Title: [282502] releases/WebKitGTK/webkit-2.32/Source/WebCore
Revision
282502
Author
[email protected]
Date
2021-09-16 01:12:36 -0700 (Thu, 16 Sep 2021)

Log Message

Merge r275938 - Do not reset computed style for element children with display contents style
https://bugs.webkit.org/show_bug.cgi?id=223794

Patch by Carlos Garcia Campos <[email protected]> on 2021-04-14
Reviewed by Antti Koivisto.

We were checking hasDisplayContents() was false before calling resetComputedStyle() on the parent, but we don't
check it when iterating the children.

* dom/Element.cpp:
(WebCore::Element::resetComputedStyle):
* style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::resolveComposedTree):

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.32/Source/WebCore/ChangeLog (282501 => 282502)


--- releases/WebKitGTK/webkit-2.32/Source/WebCore/ChangeLog	2021-09-16 08:09:11 UTC (rev 282501)
+++ releases/WebKitGTK/webkit-2.32/Source/WebCore/ChangeLog	2021-09-16 08:12:36 UTC (rev 282502)
@@ -1,3 +1,18 @@
+2021-04-14  Carlos Garcia Campos  <[email protected]>
+
+        Do not reset computed style for element children with display contents style
+        https://bugs.webkit.org/show_bug.cgi?id=223794
+
+        Reviewed by Antti Koivisto.
+
+        We were checking hasDisplayContents() was false before calling resetComputedStyle() on the parent, but we don't
+        check it when iterating the children.
+
+        * dom/Element.cpp:
+        (WebCore::Element::resetComputedStyle):
+        * style/StyleTreeResolver.cpp:
+        (WebCore::Style::TreeResolver::resolveComposedTree):
+
 2021-04-13  Rob Buis  <[email protected]>
 
         Skip style update

Modified: releases/WebKitGTK/webkit-2.32/Source/WebCore/dom/Element.cpp (282501 => 282502)


--- releases/WebKitGTK/webkit-2.32/Source/WebCore/dom/Element.cpp	2021-09-16 08:09:11 UTC (rev 282501)
+++ releases/WebKitGTK/webkit-2.32/Source/WebCore/dom/Element.cpp	2021-09-16 08:12:36 UTC (rev 282502)
@@ -4217,15 +4217,16 @@
         return;
 
     auto reset = [](Element& element) {
-        if (!element.hasRareData() || !element.elementRareData()->computedStyle())
-            return;
         if (element.hasCustomStyleResolveCallbacks())
             element.willResetComputedStyle();
         element.elementRareData()->resetComputedStyle();
     };
     reset(*this);
-    for (auto& child : descendantsOfType<Element>(*this))
+    for (auto& child : descendantsOfType<Element>(*this)) {
+        if (!child.hasRareData() || !child.elementRareData()->computedStyle() || child.hasDisplayContents())
+            continue;
         reset(child);
+    }
 }
 
 void Element::resetStyleRelations()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to