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

Unified Diff: Source/core/dom/ElementRareData.h

Issue 778003003: List marker pseudo elements. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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
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:

Powered by Google App Engine
This is Rietveld 408576698