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

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

Issue 2318973003: Test cl (Closed)
Patch Set: Replaced LayoutObject check for attachLayoutTree and removed check from recalcStyle 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/ElementRareData.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1e9ac996a103133d46428a7536e41ccbf27841a7..f700da982f18721c604bc5e07461e27f4384b8fc 100644
--- a/third_party/WebKit/Source/core/dom/Element.cpp
+++ b/third_party/WebKit/Source/core/dom/Element.cpp
@@ -1556,7 +1556,8 @@ 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();
+ if (!data->layoutObject())
+ data->clearComputedStyle();
}
if (!isSlotOrActiveInsertionPoint())
@@ -1601,7 +1602,7 @@ void Element::detachLayoutTree(const AttachContext& context)
data->clearPseudoElements();
// attachLayoutTree() will clear the computed style for us when inside recalcStyle.
- if (!document().inStyleRecalc())
+ if (!document().inStyleRecalc() && !data->layoutObject())
data->clearComputedStyle();
if (ElementAnimations* elementAnimations = data->elementAnimations()) {
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/ElementRareData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698