Title: [219138] trunk/Source/WebCore
- Revision
- 219138
- Author
- commit-qu...@webkit.org
- Date
- 2017-07-05 11:01:45 -0700 (Wed, 05 Jul 2017)
Log Message
Don't resolve an extra computed style for getComputedStyle in a display: none subtree.
https://bugs.webkit.org/show_bug.cgi?id=174145
Before this, we were also resolving the first ancestor's style as
inheriting from itself, which felt pretty wrong (though I think it's
not observable).
Patch by Emilio Cobos Álvarez <eco...@igalia.com> on 2017-07-05
Reviewed by Antti Koivisto.
No new tests (non-observable behavior).
* dom/Element.cpp:
(WebCore::Element::resolveComputedStyle):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (219137 => 219138)
--- trunk/Source/WebCore/ChangeLog 2017-07-05 17:56:11 UTC (rev 219137)
+++ trunk/Source/WebCore/ChangeLog 2017-07-05 18:01:45 UTC (rev 219138)
@@ -1,3 +1,19 @@
+2017-07-05 Emilio Cobos Álvarez <eco...@igalia.com>
+
+ Don't resolve an extra computed style for getComputedStyle in a display: none subtree.
+ https://bugs.webkit.org/show_bug.cgi?id=174145
+
+ Before this, we were also resolving the first ancestor's style as
+ inheriting from itself, which felt pretty wrong (though I think it's
+ not observable).
+
+ Reviewed by Antti Koivisto.
+
+ No new tests (non-observable behavior).
+
+ * dom/Element.cpp:
+ (WebCore::Element::resolveComputedStyle):
+
2017-07-05 Frederic Wang <fw...@igalia.com>
Move ScrolledContentsLayer property to ScrollingStateScrollingNode
Modified: trunk/Source/WebCore/dom/Element.cpp (219137 => 219138)
--- trunk/Source/WebCore/dom/Element.cpp 2017-07-05 17:56:11 UTC (rev 219137)
+++ trunk/Source/WebCore/dom/Element.cpp 2017-07-05 18:01:45 UTC (rev 219138)
@@ -2690,11 +2690,11 @@
// Collect ancestors until we find one that has style.
auto composedAncestors = composedTreeAncestors(*this);
for (auto& ancestor : composedAncestors) {
- elementsRequiringComputedStyle.prepend(&ancestor);
if (auto* existingStyle = ancestor.existingComputedStyle()) {
computedStyle = existingStyle;
break;
}
+ elementsRequiringComputedStyle.prepend(&ancestor);
}
// Resolve and cache styles starting from the most distant ancestor.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes