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

Unified Diff: sky/engine/core/dom/shadow/ShadowRoot.h

Issue 862183003: Merge ShadowRootRareData into ShadowRoot. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 | « sky/engine/core/dom/shadow/InsertionPoint.cpp ('k') | sky/engine/core/dom/shadow/ShadowRoot.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/dom/shadow/ShadowRoot.h
diff --git a/sky/engine/core/dom/shadow/ShadowRoot.h b/sky/engine/core/dom/shadow/ShadowRoot.h
index abec4950bdcf19dc09ed6a7daa644145b5d8fa1d..d8981034e721a2cf25df99886c77a3fc4b905493 100644
--- a/sky/engine/core/dom/shadow/ShadowRoot.h
+++ b/sky/engine/core/dom/shadow/ShadowRoot.h
@@ -38,8 +38,6 @@ class Document;
class ElementShadow;
class ExceptionState;
class InsertionPoint;
-class ShadowRootRareData;
-class StyleSheetList;
class ShadowRoot final : public DocumentFragment, public TreeScope {
DEFINE_WRAPPERTYPEINFO();
@@ -63,44 +61,36 @@ public:
virtual void removedFrom(ContainerNode*) override;
bool containsContentElements() const;
- bool containsInsertionPoints() const { return containsContentElements(); }
bool containsShadowRoots() const;
- // For Internals, don't use this.
- unsigned childShadowRootCount() const;
-
- void didAddInsertionPoint(InsertionPoint*);
- void didRemoveInsertionPoint(InsertionPoint*);
+ void didAddInsertionPoint();
+ void didRemoveInsertionPoint();
const Vector<RefPtr<InsertionPoint> >& descendantInsertionPoints();
// Make protected methods from base class public here.
using TreeScope::setDocument;
using TreeScope::setParentTreeScope;
-public:
Element* activeElement() const;
PassRefPtr<Node> cloneNode(bool, ExceptionState&);
- PassRefPtr<Node> cloneNode(ExceptionState& exceptionState) { return cloneNode(true, exceptionState); }
+ PassRefPtr<Node> cloneNode(ExceptionState& exceptionState);
private:
- ShadowRoot(Document&);
+ explicit ShadowRoot(Document&);
virtual ~ShadowRoot();
-#if !ENABLE(OILPAN)
virtual void dispose() override;
-#endif
-
- ShadowRootRareData* ensureShadowRootRareData();
void addChildShadowRoot();
void removeChildShadowRoot();
void invalidateDescendantInsertionPoints();
- // ShadowRoots should never be cloned.
- virtual PassRefPtr<Node> cloneNode(bool) override { return nullptr; }
+ virtual PassRefPtr<Node> cloneNode(bool) override;
- OwnPtr<ShadowRootRareData> m_shadowRootRareData;
+ Vector<RefPtr<InsertionPoint> > m_descendantInsertionPoints;
+ unsigned m_descendantContentElementCount;
+ unsigned m_childShadowRootCount;
unsigned m_descendantInsertionPointsIsValid : 1;
};
« no previous file with comments | « sky/engine/core/dom/shadow/InsertionPoint.cpp ('k') | sky/engine/core/dom/shadow/ShadowRoot.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698