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

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

Issue 476273004: Use Traversal<>::firstAncestor() API more in the code base (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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
« no previous file with comments | « Source/core/accessibility/AXNodeObject.cpp ('k') | Source/core/html/HTMLAreaElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/shadow/InsertionPoint.cpp
diff --git a/Source/core/dom/shadow/InsertionPoint.cpp b/Source/core/dom/shadow/InsertionPoint.cpp
index 9bb7c0c225ed53fd006ed29b17ae1f54c210c348..fb1029415a385788b478bfd5a132380aac8fae29 100644
--- a/Source/core/dom/shadow/InsertionPoint.cpp
+++ b/Source/core/dom/shadow/InsertionPoint.cpp
@@ -135,11 +135,7 @@ bool InsertionPoint::canBeActive() const
{
if (!isInShadowTree())
return false;
- for (Node* node = parentNode(); node; node = node->parentNode()) {
- if (node->isInsertionPoint())
- return false;
- }
- return true;
+ return !Traversal<InsertionPoint>::firstAncestor(*this);
}
bool InsertionPoint::isActive() const
« no previous file with comments | « Source/core/accessibility/AXNodeObject.cpp ('k') | Source/core/html/HTMLAreaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698