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

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

Issue 24430002: Rename attach and detach to createRenderTree/destroyRenderTree (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
Index: Source/core/dom/Node.h
diff --git a/Source/core/dom/Node.h b/Source/core/dom/Node.h
index 612111edf4b6dd97198ca1f739da9e8a177cef16..21d4156f1c03ecc845d1055915c59de3277a88c5 100644
--- a/Source/core/dom/Node.h
+++ b/Source/core/dom/Node.h
@@ -90,7 +90,7 @@ enum StyleChangeType {
NoStyleChange = 0,
LocalStyleChange = 1 << nodeStyleChangeShift,
SubtreeStyleChange = 2 << nodeStyleChangeShift,
- LazyAttachStyleChange = 3 << nodeStyleChangeShift,
+ DeferredRenderTreeCreationStyleChange = 3 << nodeStyleChangeShift,
};
// If the style change is from the renderer then we'll call setStyle on the
@@ -407,8 +407,8 @@ public:
bool isV8CollectableDuringMinorGC() const { return getFlag(V8CollectableDuringMinorGCFlag); }
void setV8CollectableDuringMinorGC(bool flag) { setFlag(flag, V8CollectableDuringMinorGCFlag); }
- void lazyAttach();
- void lazyReattach();
+ void scheduleRenderTreeCreation();
+ void scheduleRenderTreeReconstruction();
ojan 2013/09/24 22:41:24 How about scheduleRenderTreeRecreation?
virtual void setFocus(bool flag);
virtual void setActive(bool flag = true, bool pause = false);
@@ -538,26 +538,26 @@ public:
struct AttachContext {
RenderStyle* resolvedStyle;
- bool performingReattach;
+ bool reconstructingRenderTree;
ojan 2013/09/24 22:41:24 Ditto...recreatingRenderTree.
- AttachContext() : resolvedStyle(0), performingReattach(false) { }
+ AttachContext() : resolvedStyle(0), reconstructingRenderTree(false) { }
};
// Attaches this node to the rendering tree. This calculates the style to be applied to the node and creates an
// appropriate RenderObject which will be inserted into the tree (except when the style has display: none). This
// makes the node visible in the FrameView.
- virtual void attach(const AttachContext& = AttachContext());
+ virtual void createRenderTree(const AttachContext& = AttachContext());
// Detaches the node from the rendering tree, making it invisible in the rendered view. This method will remove
// the node's rendering object from the rendering tree and delete it.
- virtual void detach(const AttachContext& = AttachContext());
+ virtual void destroyRenderTree(const AttachContext& = AttachContext());
#ifndef NDEBUG
bool inDetach() const;
#endif
- void reattach(const AttachContext& = AttachContext());
- void lazyReattachIfAttached();
+ void recreateRenderTree(const AttachContext& = AttachContext());
+ void scheduleRenderTreeRecreationIfAttached();
// Wrapper for nodes that don't have a renderer, but still cache the style (like HTMLOptionElement).
RenderStyle* renderStyle() const;
@@ -831,10 +831,10 @@ private:
void setStyleChange(StyleChangeType);
- void detachNode(Node*, const AttachContext&);
+ void destroyRenderTreeForNode(Node*, const AttachContext&);
void clearAttached() { clearFlag(IsAttachedFlag); }
- // Used to share code between lazyAttach and setNeedsStyleRecalc.
+ // Used to share code between scheduleRenderTreeCreation and setNeedsStyleRecalc.
void markAncestorsWithChildNeedsStyleRecalc();
virtual void refEventTarget();
@@ -903,23 +903,23 @@ inline ContainerNode* Node::parentNodeGuaranteedHostFree() const
return parentOrShadowHostNode();
}
-inline void Node::lazyReattachIfAttached()
+inline void Node::scheduleRenderTreeRecreationIfAttached()
{
if (attached())
- lazyReattach();
+ scheduleRenderTreeReconstruction();
}
-inline void Node::lazyReattach()
+inline void Node::scheduleRenderTreeReconstruction()
{
- if (styleChangeType() == LazyAttachStyleChange)
+ if (styleChangeType() == DeferredRenderTreeCreationStyleChange)
return;
AttachContext context;
- context.performingReattach = true;
+ context.reconstructingRenderTree = true;
if (attached())
- detach(context);
- lazyAttach();
+ destroyRenderTree(context);
+ scheduleRenderTreeCreation();
}
inline bool shouldRecalcStyle(StyleRecalcChange change, const Node* node)

Powered by Google App Engine
This is Rietveld 408576698