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

Unified Diff: sky/engine/core/dom/Element.h

Issue 759663003: Only allow one shadowRoot. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: rebase 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
Index: sky/engine/core/dom/Element.h
diff --git a/sky/engine/core/dom/Element.h b/sky/engine/core/dom/Element.h
index 432a886b00d2773d0b784ed96fe7a500529810eb..3696001913870d763d3b66b6abfd9972860148f2 100644
--- a/sky/engine/core/dom/Element.h
+++ b/sky/engine/core/dom/Element.h
@@ -211,7 +211,6 @@ public:
ElementShadow& ensureShadow();
PassRefPtr<ShadowRoot> createShadowRoot(ExceptionState&);
ShadowRoot* shadowRoot() const;
- ShadowRoot* youngestShadowRoot() const;
bool hasAuthorShadowRoot() const { return shadowRoot(); }
@@ -547,6 +546,13 @@ inline void Node::removedFrom(ContainerNode* insertionPoint)
clearFlag(IsInShadowTreeFlag);
}
+inline ShadowRoot* Node::shadowRoot() const
+{
+ if (!isElementNode())
+ return 0;
+ return toElement(this)->shadowRoot();
+}
+
inline void Element::invalidateStyleAttribute()
{
ASSERT(elementData());

Powered by Google App Engine
This is Rietveld 408576698