Index: Source/core/dom/shadow/ShadowRootRareData.h |
diff --git a/Source/core/dom/shadow/ShadowRootRareData.h b/Source/core/dom/shadow/ShadowRootRareData.h |
index 4ec22d5a34195dfbd8f6a45c34a4c9d51cecd944..051579a00b2a69b19aac026eec3738d3f6f7db3a 100644 |
--- a/Source/core/dom/shadow/ShadowRootRareData.h |
+++ b/Source/core/dom/shadow/ShadowRootRareData.h |
@@ -106,9 +106,10 @@ private: |
inline void ShadowRootRareData::didAddInsertionPoint(InsertionPoint* point) |
{ |
- if (point->hasTagName(HTMLNames::shadowTag)) |
+ ASSERT(point); |
+ if (isHTMLShadowElement(*point)) |
++m_descendantShadowElementCount; |
- else if (point->hasTagName(HTMLNames::contentTag)) |
+ else if (isHTMLContentElement(*point)) |
++m_descendantContentElementCount; |
else |
ASSERT_NOT_REACHED(); |
@@ -116,9 +117,10 @@ inline void ShadowRootRareData::didAddInsertionPoint(InsertionPoint* point) |
inline void ShadowRootRareData::didRemoveInsertionPoint(InsertionPoint* point) |
{ |
- if (point->hasTagName(HTMLNames::shadowTag)) |
+ ASSERT(point); |
+ if (isHTMLShadowElement(*point)) |
--m_descendantShadowElementCount; |
- else if (point->hasTagName(HTMLNames::contentTag)) |
+ else if (isHTMLContentElement(*point)) |
--m_descendantContentElementCount; |
else |
ASSERT_NOT_REACHED(); |