Title: [275938] trunk/Source/WebCore
- Revision
- 275938
- Author
- [email protected]
- Date
- 2021-04-14 02:42:27 -0700 (Wed, 14 Apr 2021)
Log Message
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: trunk/Source/WebCore/ChangeLog (275937 => 275938)
--- trunk/Source/WebCore/ChangeLog 2021-04-14 08:20:52 UTC (rev 275937)
+++ trunk/Source/WebCore/ChangeLog 2021-04-14 09:42:27 UTC (rev 275938)
@@ -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]>
Make SVGElement::getBoundingBox retrieve bbox from RenderObject
Modified: trunk/Source/WebCore/dom/Element.cpp (275937 => 275938)
--- trunk/Source/WebCore/dom/Element.cpp 2021-04-14 08:20:52 UTC (rev 275937)
+++ trunk/Source/WebCore/dom/Element.cpp 2021-04-14 09:42:27 UTC (rev 275938)
@@ -4241,15 +4241,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