| Index: Source/core/dom/Element.cpp
|
| diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
|
| index a63bdcd3c8cbeac1ccf82cb3f5152f2dfd8e26ca..f0f867f6916875c969b6113e78f66845a651d0eb 100644
|
| --- a/Source/core/dom/Element.cpp
|
| +++ b/Source/core/dom/Element.cpp
|
| @@ -1311,15 +1311,15 @@ void Element::removedFrom(ContainerNode* insertionPoint)
|
| elementRareData()->setIsInCanvasSubtree(false);
|
| }
|
|
|
| -void Element::attach(const AttachContext& context)
|
| +void Element::createRenderTree(const AttachContext& context)
|
| {
|
| ASSERT(document().inStyleRecalc());
|
|
|
| StyleResolverParentPusher parentPusher(this);
|
|
|
| - // We've already been through detach when doing a lazyAttach, but we might
|
| + // We've already been through detach when doing a scheduleRenderTreeCreation, but we might
|
| // need to clear any state that's been added since then.
|
| - if (hasRareData() && styleChangeType() == LazyAttachStyleChange) {
|
| + if (hasRareData() && styleChangeType() == DeferredRenderTreeCreationStyleChange) {
|
| ElementRareData* data = elementRareData();
|
| data->clearComputedStyle();
|
| data->resetDynamicRestyleObservations();
|
| @@ -1334,11 +1334,11 @@ void Element::attach(const AttachContext& context)
|
| // When a shadow root exists, it does the work of attaching the children.
|
| if (ElementShadow* shadow = this->shadow()) {
|
| parentPusher.push();
|
| - shadow->attach(context);
|
| + shadow->createRenderTree(context);
|
| } else if (firstChild())
|
| parentPusher.push();
|
|
|
| - ContainerNode::attach(context);
|
| + ContainerNode::createRenderTree(context);
|
|
|
| createPseudoElementIfNeeded(AFTER);
|
| createPseudoElementIfNeeded(BACKDROP);
|
| @@ -1361,7 +1361,7 @@ void Element::unregisterNamedFlowContentNode()
|
| document().renderView()->flowThreadController()->unregisterNamedFlowContentNode(this);
|
| }
|
|
|
| -void Element::detach(const AttachContext& context)
|
| +void Element::destroyRenderTree(const AttachContext& context)
|
| {
|
| WidgetHierarchyUpdatesSuspensionScope suspendWidgetHierarchyUpdates;
|
| unregisterNamedFlowContentNode();
|
| @@ -1379,14 +1379,14 @@ void Element::detach(const AttachContext& context)
|
| if (!context.resolvedStyle)
|
| data->resetStyleState();
|
|
|
| - if (RuntimeEnabledFeatures::webAnimationsCSSEnabled() && !context.performingReattach) {
|
| + if (RuntimeEnabledFeatures::webAnimationsCSSEnabled() && !context.reconstructingRenderTree) {
|
| if (ActiveAnimations* activeAnimations = data->activeAnimations())
|
| activeAnimations->cssAnimations()->cancel();
|
| }
|
| }
|
| if (ElementShadow* shadow = this->shadow())
|
| - shadow->detach(context);
|
| - ContainerNode::detach(context);
|
| + shadow->destroyRenderTree(context);
|
| + ContainerNode::destroyRenderTree(context);
|
| }
|
|
|
| bool Element::pseudoStyleCacheIsInvalid(const RenderStyle* currentStyle, RenderStyle* newStyle)
|
| @@ -1484,7 +1484,7 @@ StyleRecalcChange Element::recalcOwnStyle(StyleRecalcChange change)
|
| if (localChange == Reattach) {
|
| AttachContext reattachContext;
|
| reattachContext.resolvedStyle = newStyle.get();
|
| - reattach(reattachContext);
|
| + recreateRenderTree(reattachContext);
|
| return Reattach;
|
| }
|
|
|
| @@ -1546,7 +1546,7 @@ void Element::recalcChildStyle(StyleRecalcChange change)
|
|
|
| if (child->isTextNode()) {
|
| if (forceReattachOfAnyWhitespaceSibling && toText(child)->containsOnlyWhitespace())
|
| - child->reattach();
|
| + child->recreateRenderTree();
|
| else
|
| didReattach = toText(child)->recalcTextStyle(change);
|
| } else if (child->isElementNode()) {
|
| @@ -2486,7 +2486,7 @@ void Element::createPseudoElement(PseudoId pseudoId)
|
| RefPtr<PseudoElement> element = PseudoElement::create(this, pseudoId);
|
| if (pseudoId == BACKDROP)
|
| document().addToTopLayer(element.get(), this);
|
| - element->attach();
|
| + element->createRenderTree();
|
|
|
| ensureElementRareData()->setPseudoElement(pseudoId, element.release());
|
| }
|
| @@ -2635,7 +2635,7 @@ void Element::setIsInTopLayer(bool inTopLayer)
|
|
|
| // We must ensure a reattach occurs so the renderer is inserted in the correct sibling order under RenderView according to its
|
| // top layer position, or in its usual place if not in the top layer.
|
| - lazyReattachIfAttached();
|
| + scheduleRenderTreeRecreationIfAttached();
|
| }
|
|
|
| void Element::webkitRequestPointerLock()
|
|
|