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

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

Issue 304183009: Reset RestyleFlags when Element is removed. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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 | « LayoutTests/fast/dynamic/hover-sibling-reattach-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Element.cpp
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index 5d886fa4d6f12b01ebfc27af468349eaa6fbd69b..b790cb88df6e5715a88491bbf44aa7d2d9395b05 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -1366,6 +1366,9 @@ void Element::removedFrom(ContainerNode* insertionPoint)
document().removeFromTopLayer(this);
clearElementFlag(IsInCanvasSubtree);
+
+ if (hasRareData())
+ elementRareData()->clearRestyleFlags();
}
void Element::attach(const AttachContext& context)
@@ -1377,7 +1380,6 @@ void Element::attach(const AttachContext& context)
if (hasRareData() && styleChangeType() == NeedsReattachStyleChange) {
ElementRareData* data = elementRareData();
data->clearComputedStyle();
- data->clearRestyleFlags();
esprehn 2014/05/30 17:46:18 This doesn't make sense, when you're inserted into
// Only clear the style state if we're not going to reuse the style from recalcStyle.
if (!context.resolvedStyle)
data->resetStyleState();
@@ -1423,7 +1425,6 @@ void Element::detach(const AttachContext& context)
if (!document().inStyleRecalc()) {
data->resetStyleState();
data->clearComputedStyle();
- data->clearRestyleFlags();
esprehn 2014/05/30 17:46:18 We only execute this line when you remove a child,
}
if (ActiveAnimations* activeAnimations = data->activeAnimations()) {
« no previous file with comments | « LayoutTests/fast/dynamic/hover-sibling-reattach-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698