Chromium Code Reviews| Index: Source/core/rendering/RenderTextFragment.h |
| diff --git a/Source/core/rendering/RenderTextFragment.h b/Source/core/rendering/RenderTextFragment.h |
| index 4f70b4293d4849c91f2a5fb9e1eb84b595671699..f1e1d50425fc1bf7777f7f34b58e9e0ffafe6f41 100644 |
| --- a/Source/core/rendering/RenderTextFragment.h |
| +++ b/Source/core/rendering/RenderTextFragment.h |
| @@ -27,6 +27,8 @@ |
| namespace blink { |
| +class FirstLetterPseudoElement; |
| + |
| // Used to represent a text substring of an element, e.g., for text runs that are split because of |
| // first letter and that must therefore have different styles (and positions in the render tree). |
| // We cache offsets so that text transformations can be applied in such a way that we can recover |
| @@ -36,7 +38,6 @@ public: |
| RenderTextFragment(Node*, StringImpl*, int startOffset, int length); |
| RenderTextFragment(Node*, StringImpl*); |
| virtual ~RenderTextFragment(); |
| - virtual void trace(Visitor*) OVERRIDE; |
| virtual bool isTextFragment() const OVERRIDE { return true; } |
| @@ -46,11 +47,8 @@ public: |
| unsigned end() const { return m_end; } |
| virtual unsigned textStartOffset() const OVERRIDE { return start(); } |
| - RenderBoxModelObject* firstLetter() const { return m_firstLetter; } |
| - void setFirstLetter(RenderBoxModelObject* firstLetter) { m_firstLetter = firstLetter; } |
| - RenderText* firstRenderTextInFirstLetter() const; |
| - |
| StringImpl* contentString() const { return m_contentString.get(); } |
| + PassRefPtr<StringImpl> completeText() const; |
| virtual PassRefPtr<StringImpl> originalText() const OVERRIDE; |
| virtual void setText(PassRefPtr<StringImpl>, bool force = false) OVERRIDE; |
| @@ -59,20 +57,19 @@ public: |
| virtual const char* renderName() const OVERRIDE FINAL { return "RenderTextFragment"; } |
| -protected: |
| - virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OVERRIDE; |
| + void setFirstLetterPseudoElement(FirstLetterPseudoElement* element) { m_firstLetterPseudoElement = element; } |
| + FirstLetterPseudoElement* firstLetterPseudoElement() const { return m_firstLetterPseudoElement; } |
| private: |
| - virtual void willBeDestroyed() OVERRIDE; |
| - |
| virtual UChar previousCharacter() const OVERRIDE; |
| - RenderBlock* blockForAccompanyingFirstLetter() const; |
| virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&) OVERRIDE; |
| + Text* associatedTextNode() const; |
| + |
| unsigned m_start; |
| unsigned m_end; |
| RefPtr<StringImpl> m_contentString; |
| - RawPtrWillBeMember<RenderBoxModelObject> m_firstLetter; |
| + FirstLetterPseudoElement* m_firstLetterPseudoElement; |
|
Julien - ping for review
2014/10/06 20:11:45
Shouldn't this be a RawPtrWillBeMember<FirstLetter
dsinclair
2014/10/07 19:36:21
Done.
|
| }; |
| DEFINE_TYPE_CASTS(RenderTextFragment, RenderObject, object, toRenderText(object)->isTextFragment(), toRenderText(object).isTextFragment()); |