Index: Source/core/dom/ElementRareData.h |
diff --git a/Source/core/dom/ElementRareData.h b/Source/core/dom/ElementRareData.h |
index f687588e85b4527cb2fb0605146e7385fdb41fb0..11ed9d9f9918dda92f6d72a6339bb5a5217bf302 100644 |
--- a/Source/core/dom/ElementRareData.h |
+++ b/Source/core/dom/ElementRareData.h |
@@ -160,6 +160,7 @@ private: |
RefPtr<ComputedStyle> m_computedStyle; |
RefPtrWillBeMember<CustomElementDefinition> m_customElementDefinition; |
+ RefPtrWillBeMember<PseudoElement> m_marker; |
esprehn
2015/04/22 07:45:45
We really probably need to introduce a PseudoEleme
dsinclair
2015/04/22 20:00:38
File crbug.com/479745 to move this to a PseudoElem
|
RefPtrWillBeMember<PseudoElement> m_generatedBefore; |
RefPtrWillBeMember<PseudoElement> m_generatedAfter; |
RefPtrWillBeMember<PseudoElement> m_generatedFirstLetter; |
@@ -188,6 +189,7 @@ inline ElementRareData::~ElementRareData() |
#if !ENABLE(OILPAN) |
ASSERT(!m_shadow); |
#endif |
+ ASSERT(!m_marker); |
ASSERT(!m_generatedBefore); |
ASSERT(!m_generatedAfter); |
ASSERT(!m_generatedFirstLetter); |
@@ -196,7 +198,7 @@ inline ElementRareData::~ElementRareData() |
inline bool ElementRareData::hasPseudoElements() const |
{ |
- return m_generatedBefore || m_generatedAfter || m_backdrop || m_generatedFirstLetter; |
+ return m_generatedBefore || m_generatedAfter || m_backdrop || m_generatedFirstLetter || m_marker; |
} |
inline void ElementRareData::clearPseudoElements() |
@@ -204,12 +206,18 @@ inline void ElementRareData::clearPseudoElements() |
setPseudoElement(BEFORE, nullptr); |
setPseudoElement(AFTER, nullptr); |
setPseudoElement(BACKDROP, nullptr); |
+ setPseudoElement(MARKER, nullptr); |
setPseudoElement(FIRST_LETTER, nullptr); |
} |
inline void ElementRareData::setPseudoElement(PseudoId pseudoId, PassRefPtrWillBeRawPtr<PseudoElement> element) |
{ |
switch (pseudoId) { |
+ case MARKER: |
+ if (m_marker) |
+ m_marker->dispose(); |
+ m_marker = element; |
+ break; |
case BEFORE: |
if (m_generatedBefore) |
m_generatedBefore->dispose(); |
@@ -238,6 +246,8 @@ inline void ElementRareData::setPseudoElement(PseudoId pseudoId, PassRefPtrWillB |
inline PseudoElement* ElementRareData::pseudoElement(PseudoId pseudoId) const |
{ |
switch (pseudoId) { |
+ case MARKER: |
+ return m_marker.get(); |
case BEFORE: |
return m_generatedBefore.get(); |
case AFTER: |