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

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

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/ShadowRoot.cpp ('k') | sky/engine/core/events/EventPath.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/dom/shadow/ShadowRootRareData.h
diff --git a/sky/engine/core/dom/shadow/ShadowRootRareData.h b/sky/engine/core/dom/shadow/ShadowRootRareData.h
index 34f51048c6f590566936165f2639869a91ced156..9f56527e5e857f22cb090a3c4f98cde3f7d297a4 100644
--- a/sky/engine/core/dom/shadow/ShadowRootRareData.h
+++ b/sky/engine/core/dom/shadow/ShadowRootRareData.h
@@ -40,24 +40,17 @@ namespace blink {
class ShadowRootRareData {
public:
ShadowRootRareData()
- : m_descendantShadowElementCount(0)
- , m_descendantContentElementCount(0)
+ : m_descendantContentElementCount(0)
, m_childShadowRootCount(0)
{
}
- HTMLShadowElement* shadowInsertionPointOfYoungerShadowRoot() const { return m_shadowInsertionPointOfYoungerShadowRoot.get(); }
- void setShadowInsertionPointOfYoungerShadowRoot(PassRefPtr<HTMLShadowElement> shadowInsertionPoint) { m_shadowInsertionPointOfYoungerShadowRoot = shadowInsertionPoint; }
-
void didAddInsertionPoint(InsertionPoint*);
void didRemoveInsertionPoint(InsertionPoint*);
- bool containsShadowElements() const { return m_descendantShadowElementCount; }
bool containsContentElements() const { return m_descendantContentElementCount; }
bool containsShadowRoots() const { return m_childShadowRootCount; }
- unsigned descendantShadowElementCount() const { return m_descendantShadowElementCount; }
-
void didAddChildShadowRoot() { ++m_childShadowRootCount; }
void didRemoveChildShadowRoot() { ASSERT(m_childShadowRootCount > 0); --m_childShadowRootCount; }
@@ -70,16 +63,8 @@ public:
StyleSheetList* styleSheets() { return m_styleSheetList.get(); }
void setStyleSheets(PassRefPtr<StyleSheetList> styleSheetList) { m_styleSheetList = styleSheetList; }
- void trace(Visitor* visitor)
- {
- visitor->trace(m_shadowInsertionPointOfYoungerShadowRoot);
- visitor->trace(m_descendantInsertionPoints);
- visitor->trace(m_styleSheetList);
- }
private:
- RefPtr<HTMLShadowElement> m_shadowInsertionPointOfYoungerShadowRoot;
- unsigned m_descendantShadowElementCount;
unsigned m_descendantContentElementCount;
unsigned m_childShadowRootCount;
Vector<RefPtr<InsertionPoint> > m_descendantInsertionPoints;
@@ -89,9 +74,7 @@ private:
inline void ShadowRootRareData::didAddInsertionPoint(InsertionPoint* point)
{
ASSERT(point);
- if (isHTMLShadowElement(*point))
- ++m_descendantShadowElementCount;
- else if (isHTMLContentElement(*point))
+ if (isHTMLContentElement(*point))
++m_descendantContentElementCount;
else
ASSERT_NOT_REACHED();
@@ -100,15 +83,12 @@ inline void ShadowRootRareData::didAddInsertionPoint(InsertionPoint* point)
inline void ShadowRootRareData::didRemoveInsertionPoint(InsertionPoint* point)
{
ASSERT(point);
- if (isHTMLShadowElement(*point))
- --m_descendantShadowElementCount;
- else if (isHTMLContentElement(*point))
+ if (isHTMLContentElement(*point))
--m_descendantContentElementCount;
else
ASSERT_NOT_REACHED();
ASSERT(m_descendantContentElementCount >= 0);
- ASSERT(m_descendantShadowElementCount >= 0);
}
} // namespace blink
« no previous file with comments | « sky/engine/core/dom/shadow/ShadowRoot.cpp ('k') | sky/engine/core/events/EventPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698