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

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

Issue 192293002: Use new is*Element() helper functions in DOM code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add is*Element(PassRefPtr) helper Created 6 years, 9 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 4099b88c53d59141e59f9a39956cce45839a37e4..690cb8e0e09d3b0ff3a7a1b9a470adf76d815a05 100644
--- a/Source/core/dom/shadow/InsertionPoint.cpp
+++ b/Source/core/dom/shadow/InsertionPoint.cpp
@@ -148,14 +148,14 @@ bool InsertionPoint::isActive() const
ShadowRoot* shadowRoot = containingShadowRoot();
if (!shadowRoot)
return false;
- if (!hasTagName(shadowTag) || shadowRoot->descendantShadowElementCount() <= 1)
+ if (!isHTMLShadowElement(*this) || shadowRoot->descendantShadowElementCount() <= 1)
return true;
// Slow path only when there are more than one shadow elements in a shadow tree. That should be a rare case.
const Vector<RefPtr<InsertionPoint> >& insertionPoints = shadowRoot->descendantInsertionPoints();
for (size_t i = 0; i < insertionPoints.size(); ++i) {
InsertionPoint* point = insertionPoints[i].get();
- if (point->hasTagName(shadowTag))
+ if (isHTMLShadowElement(*point))
return point == this;
}
return true;
@@ -163,12 +163,12 @@ bool InsertionPoint::isActive() const
bool InsertionPoint::isShadowInsertionPoint() const
{
- return hasTagName(shadowTag) && isActive();
+ return isHTMLShadowElement(*this) && isActive();
}
bool InsertionPoint::isContentInsertionPoint() const
{
- return hasTagName(contentTag) && isActive();
+ return isHTMLContentElement(*this) && isActive();
}
PassRefPtr<NodeList> InsertionPoint::getDistributedNodes()

Powered by Google App Engine
This is Rietveld 408576698