| Index: Source/core/dom/shadow/InsertionPoint.cpp
|
| diff --git a/Source/core/dom/shadow/InsertionPoint.cpp b/Source/core/dom/shadow/InsertionPoint.cpp
|
| index 7d05daaf2b336d464a6778eca6fd33cef156edba..ac11cfd01f057ac7284fbd8f7e30236ab59dc0b6 100644
|
| --- a/Source/core/dom/shadow/InsertionPoint.cpp
|
| +++ b/Source/core/dom/shadow/InsertionPoint.cpp
|
| @@ -56,7 +56,7 @@ void InsertionPoint::setDistribution(ContentDistribution& distribution)
|
| {
|
| if (shouldUseFallbackElements()) {
|
| for (Node* child = firstChild(); child; child = child->nextSibling())
|
| - child->lazyReattachIfAttached();
|
| + child->scheduleRenderTreeRecreationIfAttached();
|
| }
|
|
|
| // Attempt not to reattach nodes that would be distributed to the exact same
|
| @@ -70,49 +70,49 @@ void InsertionPoint::setDistribution(ContentDistribution& distribution)
|
| // If the new distribution is larger than the old one, reattach all nodes in
|
| // the new distribution that were inserted.
|
| for ( ; j < distribution.size() && m_distribution.at(i) != distribution.at(j); ++j)
|
| - distribution.at(j)->lazyReattachIfAttached();
|
| + distribution.at(j)->scheduleRenderTreeRecreationIfAttached();
|
| } else if (m_distribution.size() > distribution.size()) {
|
| // If the old distribution is larger than the new one, reattach all nodes in
|
| // the old distribution that were removed.
|
| for ( ; i < m_distribution.size() && m_distribution.at(i) != distribution.at(j); ++i)
|
| - m_distribution.at(i)->lazyReattachIfAttached();
|
| + m_distribution.at(i)->scheduleRenderTreeRecreationIfAttached();
|
| } else if (m_distribution.at(i) != distribution.at(j)) {
|
| // If both distributions are the same length reattach both old and new.
|
| - m_distribution.at(i)->lazyReattachIfAttached();
|
| - distribution.at(j)->lazyReattachIfAttached();
|
| + m_distribution.at(i)->scheduleRenderTreeRecreationIfAttached();
|
| + distribution.at(j)->scheduleRenderTreeRecreationIfAttached();
|
| }
|
| }
|
|
|
| // If we hit the end of either list above we need to reattach all remaining nodes.
|
|
|
| for ( ; i < m_distribution.size(); ++i)
|
| - m_distribution.at(i)->lazyReattachIfAttached();
|
| + m_distribution.at(i)->scheduleRenderTreeRecreationIfAttached();
|
|
|
| for ( ; j < distribution.size(); ++j)
|
| - distribution.at(j)->lazyReattachIfAttached();
|
| + distribution.at(j)->scheduleRenderTreeRecreationIfAttached();
|
|
|
| m_distribution.swap(distribution);
|
| m_distribution.shrinkToFit();
|
| }
|
|
|
| -void InsertionPoint::attach(const AttachContext& context)
|
| +void InsertionPoint::createRenderTree(const AttachContext& context)
|
| {
|
| // FIXME: This loop shouldn't be needed since the distributed nodes should
|
| // never be detached, we can probably remove it.
|
| for (size_t i = 0; i < m_distribution.size(); ++i) {
|
| if (!m_distribution.at(i)->attached())
|
| - m_distribution.at(i)->attach(context);
|
| + m_distribution.at(i)->createRenderTree(context);
|
| }
|
|
|
| - HTMLElement::attach(context);
|
| + HTMLElement::createRenderTree(context);
|
| }
|
|
|
| -void InsertionPoint::detach(const AttachContext& context)
|
| +void InsertionPoint::destroyRenderTree(const AttachContext& context)
|
| {
|
| for (size_t i = 0; i < m_distribution.size(); ++i)
|
| - m_distribution.at(i)->lazyReattachIfAttached();
|
| + m_distribution.at(i)->scheduleRenderTreeRecreationIfAttached();
|
|
|
| - HTMLElement::detach(context);
|
| + HTMLElement::destroyRenderTree(context);
|
| }
|
|
|
| void InsertionPoint::willRecalcStyle(StyleRecalcChange change)
|
|
|