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

Unified Diff: sky/engine/core/dom/shadow/InsertionPoint.cpp

Issue 704413007: Remove HTMLShadowElement. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/engine/core/dom/shadow/InsertionPoint.h ('k') | sky/engine/core/dom/shadow/ShadowRoot.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/dom/shadow/InsertionPoint.cpp
diff --git a/sky/engine/core/dom/shadow/InsertionPoint.cpp b/sky/engine/core/dom/shadow/InsertionPoint.cpp
index 51403a4064407c56339cfb5695c4c0d3c12f2cfb..26549bc51fab0096f29a41ec419f7bc8d17f7251 100644
--- a/sky/engine/core/dom/shadow/InsertionPoint.cpp
+++ b/sky/engine/core/dom/shadow/InsertionPoint.cpp
@@ -136,27 +136,8 @@ bool InsertionPoint::canBeActive() const
bool InsertionPoint::isActive() const
{
- if (!canBeActive())
- return false;
- ShadowRoot* shadowRoot = containingShadowRoot();
- if (!shadowRoot)
- return false;
- 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 (isHTMLShadowElement(*point))
- return point == this;
- }
- return true;
-}
-
-bool InsertionPoint::isShadowInsertionPoint() const
-{
- return isHTMLShadowElement(*this) && isActive();
+ // FIXME(sky): Remove this.
+ return canBeActive();
}
bool InsertionPoint::isContentInsertionPoint() const
« no previous file with comments | « sky/engine/core/dom/shadow/InsertionPoint.h ('k') | sky/engine/core/dom/shadow/ShadowRoot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698