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

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: ojan review. 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/ContainerNode.cpp ('k') | sky/engine/core/dom/Element.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..4f5a234c1a13f153fd368509f777d5e275f99138 100644
--- a/sky/engine/core/dom/Element.h
+++ b/sky/engine/core/dom/Element.h
@@ -209,9 +209,8 @@ public:
ElementShadow* shadow() const;
ElementShadow& ensureShadow();
- PassRefPtr<ShadowRoot> createShadowRoot(ExceptionState&);
+ PassRefPtr<ShadowRoot> ensureShadowRoot(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());
« no previous file with comments | « sky/engine/core/dom/ContainerNode.cpp ('k') | sky/engine/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698