Index: Source/core/dom/PseudoElement.h |
diff --git a/Source/core/dom/PseudoElement.h b/Source/core/dom/PseudoElement.h |
index db6671fa6fd5cd9b3088f8f2cead7ebca09c9ec1..6bc5111ede93a3d575a4ecb5c0376c038c35896b 100644 |
--- a/Source/core/dom/PseudoElement.h |
+++ b/Source/core/dom/PseudoElement.h |
@@ -32,12 +32,11 @@ |
namespace blink { |
-class PseudoElement final : public Element { |
+class RenderTextFragment; |
+ |
+class PseudoElement : public Element { |
public: |
- static PassRefPtrWillBeRawPtr<PseudoElement> create(Element* parent, PseudoId pseudoId) |
- { |
- return adoptRefWillBeNoop(new PseudoElement(parent, pseudoId)); |
- } |
+ static PassRefPtrWillBeRawPtr<PseudoElement> create(Element* parent, PseudoId); |
virtual PassRefPtr<RenderStyle> customStyleForRenderer() override; |
virtual void attach(const AttachContext& = AttachContext()) override; |
@@ -49,11 +48,12 @@ public: |
static String pseudoElementNameForEvents(PseudoId); |
- void dispose(); |
+ virtual void dispose(); |
-private: |
+protected: |
PseudoElement(Element*, PseudoId); |
+private: |
virtual void didRecalcStyle(StyleRecalcChange) override; |
PseudoId m_pseudoId; |
@@ -63,7 +63,19 @@ const QualifiedName& pseudoElementTagName(); |
inline bool pseudoElementRendererIsNeeded(const RenderStyle* style) |
{ |
- return style && style->display() != NONE && (style->styleType() == BACKDROP || style->contentData()); |
+ if (!style) |
+ return false; |
+ if (style->display() == NONE) |
+ return false; |
+ |
+ switch (style->styleType()) { |
+ case FIRST_LETTER: |
+ return true; |
+ case BACKDROP: |
+ return true; |
+ default: |
Julien - ping for review
2014/10/09 18:24:48
Let's avoid having a default case as it would allo
dsinclair
2014/10/09 21:14:22
There are a lot of these we don't actually care ab
Julien - ping for review
2014/10/10 14:47:07
We looked at this with Dan and having a default wi
dsinclair
2014/10/10 18:06:52
Done.
|
+ return style->contentData(); |
+ } |
} |
DEFINE_ELEMENT_TYPE_CASTS(PseudoElement, isPseudoElement()); |