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

Unified Diff: Source/core/dom/shadow/InsertionPoint.cpp

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/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)

Powered by Google App Engine
This is Rietveld 408576698