| Index: Source/core/dom/Node.cpp | 
| diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp | 
| index b635846b71fe51452a63d60ae865090401635d0f..99c7c5a3e1940b30c24023b14d6a2a89f330842f 100644 | 
| --- a/Source/core/dom/Node.cpp | 
| +++ b/Source/core/dom/Node.cpp | 
| @@ -745,16 +745,16 @@ void Node::setNeedsStyleRecalc(StyleChangeType changeType, StyleChangeSource sou | 
| markAncestorsWithChildNeedsStyleRecalc(); | 
| } | 
|  | 
| -void Node::lazyAttach() | 
| +void Node::scheduleRenderTreeCreation() | 
| { | 
| markAncestorsWithChildNeedsStyleRecalc(); | 
| for (Node* node = this; node; node = NodeTraversal::next(node, this)) { | 
| node->setAttached(); | 
| -        node->setStyleChange(LazyAttachStyleChange); | 
| +        node->setStyleChange(DeferredRenderTreeCreationStyleChange); | 
| if (node->isContainerNode()) | 
| node->setChildNeedsStyleRecalc(); | 
| for (ShadowRoot* root = node->youngestShadowRoot(); root; root = root->olderShadowRoot()) | 
| -            root->lazyAttach(); | 
| +            root->scheduleRenderTreeCreation(); | 
| } | 
| } | 
|  | 
| @@ -943,40 +943,40 @@ bool Node::containsIncludingHostElements(const Node* node) const | 
| return false; | 
| } | 
|  | 
| -inline void Node::detachNode(Node* root, const AttachContext& context) | 
| +inline void Node::destroyRenderTreeForNode(Node* root, const AttachContext& context) | 
| { | 
| Node* node = root; | 
| while (node) { | 
| -        if (node->styleChangeType() == LazyAttachStyleChange) { | 
| -            // FIXME: This is needed because Node::lazyAttach marks nodes as being attached even | 
| +        if (node->styleChangeType() == DeferredRenderTreeCreationStyleChange) { | 
| +            // FIXME: This is needed because Node::scheduleRenderTreeCreation marks nodes as being attached even | 
| // though they've never been through attach(). This allows us to avoid doing all the | 
| // virtual calls to detach() and other associated work. | 
| node->clearAttached(); | 
| node->clearChildNeedsStyleRecalc(); | 
|  | 
| for (ShadowRoot* shadowRoot = node->youngestShadowRoot(); shadowRoot; shadowRoot = shadowRoot->olderShadowRoot()) | 
| -                detachNode(shadowRoot, context); | 
| +                destroyRenderTreeForNode(shadowRoot, context); | 
|  | 
| node = NodeTraversal::next(node, root); | 
| continue; | 
| } | 
| // Handle normal reattaches from style recalc (ex. display type changes) | 
| if (node->attached()) | 
| -            node->detach(context); | 
| +            node->destroyRenderTree(context); | 
| node = NodeTraversal::nextSkippingChildren(node, root); | 
| } | 
| } | 
|  | 
| -void Node::reattach(const AttachContext& context) | 
| +void Node::recreateRenderTree(const AttachContext& context) | 
| { | 
| AttachContext reattachContext(context); | 
| -    reattachContext.performingReattach = true; | 
| +    reattachContext.reconstructingRenderTree = true; | 
|  | 
| -    detachNode(this, reattachContext); | 
| -    attach(reattachContext); | 
| +    destroyRenderTreeForNode(this, reattachContext); | 
| +    createRenderTree(reattachContext); | 
| } | 
|  | 
| -void Node::attach(const AttachContext&) | 
| +void Node::createRenderTree(const AttachContext&) | 
| { | 
| ASSERT(document().inStyleRecalc() || isDocumentNode()); | 
| ASSERT(!attached()); | 
| @@ -1000,7 +1000,7 @@ bool Node::inDetach() const | 
| } | 
| #endif | 
|  | 
| -void Node::detach(const AttachContext& context) | 
| +void Node::destroyRenderTree(const AttachContext& context) | 
| { | 
| #ifndef NDEBUG | 
| ASSERT(!detachingNode); | 
| @@ -1013,7 +1013,7 @@ void Node::detach(const AttachContext& context) | 
|  | 
| // Do not remove the element's hovered and active status | 
| // if performing a reattach. | 
| -    if (!context.performingReattach) { | 
| +    if (!context.reconstructingRenderTree) { | 
| Document& doc = document(); | 
| if (isUserActionElement()) { | 
| if (hovered()) | 
|  |