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

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

Issue 1173283002: Move some Element specific code from Node::detach to Element::detach. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | « Source/core/dom/Document.cpp ('k') | Source/core/dom/Node.cpp » ('j') | 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 d46c3733e5e6d7cae08c11b749ad60b93d48d4e9..41728e49b6bd6b0d788e8ce01e7e2b43cc4e8618 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -1503,9 +1503,20 @@ void Element::detach(const AttachContext& context)
ContainerNode::detach(context);
- ASSERT(needsAttach());
+ if (!context.performingReattach && isUserActionElement()) {
+ if (hovered())
+ document().hoveredNodeDetached(*this);
+ if (inActiveChain())
+ document().activeChainNodeDetached(*this);
+ document().userActionElements().didDetach(*this);
+ }
+
+ document().styleEngine().styleInvalidator().clearInvalidation(*this);
+
if (svgFilterNeedsLayerUpdate())
document().unscheduleSVGFilterLayerUpdateHack(*this);
+
+ ASSERT(needsAttach());
}
bool Element::pseudoStyleCacheIsInvalid(const ComputedStyle* currentStyle, ComputedStyle* newStyle)
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698