Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Unified Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 2293713002: Made ElementRareData store ComputedStyle on LayoutObject if possible. (Closed)
Patch Set: Added CORE_EXPORT to NodeRareDataBase Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/Element.cpp
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp
index 71773b8257082eb9f7765e35561721991944fdc1..1076c4d49b475122b794af88f1c25977bf6b189f 100644
--- a/third_party/WebKit/Source/core/dom/Element.cpp
+++ b/third_party/WebKit/Source/core/dom/Element.cpp
@@ -1556,7 +1556,7 @@ void Element::attachLayoutTree(const AttachContext& context)
// need to clear any state that's been added since then.
if (hasRareData() && getStyleChangeType() == NeedsReattachStyleChange) {
ElementRareData* data = elementRareData();
- data->clearComputedStyle();
+ data->clearComputedStyleIfNoLayoutObject();
}
if (!isSlotOrActiveInsertionPoint())
@@ -1602,7 +1602,7 @@ void Element::detachLayoutTree(const AttachContext& context)
// attachLayoutTree() will clear the computed style for us when inside recalcStyle.
if (!document().inStyleRecalc())
- data->clearComputedStyle();
+ data->clearComputedStyleIfNoLayoutObject();
if (ElementAnimations* elementAnimations = data->elementAnimations()) {
if (context.performingReattach) {
@@ -1732,7 +1732,7 @@ void Element::recalcStyle(StyleRecalcChange change, Text* nextTextSibling)
if (hasRareData()) {
ElementRareData* data = elementRareData();
if (change != IndependentInherit)
- data->clearComputedStyle();
+ data->clearComputedStyleIfNoLayoutObject();
if (change >= IndependentInherit) {
if (ElementAnimations* elementAnimations = data->elementAnimations())

Powered by Google App Engine
This is Rietveld 408576698