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

Unified Diff: Source/core/dom/Node.h

Issue 23528005: Revert "Remove ShouldSetAttached flag to lazyAttach" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | 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/Node.h
diff --git a/Source/core/dom/Node.h b/Source/core/dom/Node.h
index 896e5edfac677cecb1d1b8603e71360ebdede6cc..1cea9f19d631990c417efed6d1cd5127c968a9df 100644
--- a/Source/core/dom/Node.h
+++ b/Source/core/dom/Node.h
@@ -407,8 +407,12 @@ public:
bool isV8CollectableDuringMinorGC() const { return getFlag(V8CollectableDuringMinorGCFlag); }
void setV8CollectableDuringMinorGC(bool flag) { setFlag(flag, V8CollectableDuringMinorGCFlag); }
- void lazyAttach();
- void lazyReattach();
+ enum ShouldSetAttached {
+ SetAttached,
+ DoNotSetAttached
+ };
+ void lazyAttach(ShouldSetAttached = SetAttached);
+ void lazyReattach(ShouldSetAttached = SetAttached);
virtual void setFocus(bool flag);
virtual void setActive(bool flag = true, bool pause = false);
@@ -909,7 +913,7 @@ inline void Node::lazyReattachIfAttached()
lazyReattach();
}
-inline void Node::lazyReattach()
+inline void Node::lazyReattach(ShouldSetAttached shouldSetAttached)
{
if (styleChangeType() == LazyAttachStyleChange)
return;
@@ -919,7 +923,7 @@ inline void Node::lazyReattach()
if (attached())
detach(context);
- lazyAttach();
+ lazyAttach(shouldSetAttached);
}
inline bool shouldRecalcStyle(StyleRecalcChange change, const Node* node)
« no previous file with comments | « no previous file | Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698