| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2007 David Smith (catfish.man@gmail.com) | 4 * (C) 2007 David Smith (catfish.man@gmail.com) |
| 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. |
| 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 class FirstLetterPseudoElement final : public PseudoElement { | 37 class FirstLetterPseudoElement final : public PseudoElement { |
| 38 WTF_MAKE_NONCOPYABLE(FirstLetterPseudoElement); | 38 WTF_MAKE_NONCOPYABLE(FirstLetterPseudoElement); |
| 39 public: | 39 public: |
| 40 static PassRefPtrWillBeRawPtr<FirstLetterPseudoElement> create(Element* pare
nt) | 40 static PassRefPtrWillBeRawPtr<FirstLetterPseudoElement> create(Element* pare
nt) |
| 41 { | 41 { |
| 42 return adoptRefWillBeNoop(new FirstLetterPseudoElement(parent)); | 42 return adoptRefWillBeNoop(new FirstLetterPseudoElement(parent)); |
| 43 } | 43 } |
| 44 | 44 |
| 45 virtual ~FirstLetterPseudoElement(); | 45 virtual ~FirstLetterPseudoElement(); |
| 46 virtual void trace(Visitor*) override; | |
| 47 | 46 |
| 48 static RenderObject* firstLetterTextRenderer(const Element&); | 47 static RenderObject* firstLetterTextRenderer(const Element&); |
| 49 static unsigned firstLetterLength(const String&); | 48 static unsigned firstLetterLength(const String&); |
| 50 | 49 |
| 51 void setRemainingTextRenderer(RenderTextFragment*); | 50 void setRemainingTextRenderer(RenderTextFragment*); |
| 52 RenderTextFragment* remainingTextRenderer() const { return m_remainingTextRe
nderer; } | 51 RenderTextFragment* remainingTextRenderer() const { return m_remainingTextRe
nderer; } |
| 53 | 52 |
| 54 void updateTextFragments(); | 53 void updateTextFragments(); |
| 55 | 54 |
| 56 virtual void attach(const AttachContext& = AttachContext()) override; | 55 virtual void attach(const AttachContext& = AttachContext()) override; |
| 57 virtual void detach(const AttachContext& = AttachContext()) override; | 56 virtual void detach(const AttachContext& = AttachContext()) override; |
| 58 | 57 |
| 59 private: | 58 private: |
| 60 explicit FirstLetterPseudoElement(Element*); | 59 explicit FirstLetterPseudoElement(Element*); |
| 61 | 60 |
| 62 virtual void didRecalcStyle(StyleRecalcChange) override; | 61 virtual void didRecalcStyle(StyleRecalcChange) override; |
| 63 | 62 |
| 64 void attachFirstLetterTextRenderers(); | 63 void attachFirstLetterTextRenderers(); |
| 65 RenderStyle* styleForFirstLetter(RenderObject*); | 64 RenderStyle* styleForFirstLetter(RenderObject*); |
| 66 | 65 |
| 67 RawPtrWillBeMember<RenderTextFragment> m_remainingTextRenderer; | 66 RenderTextFragment* m_remainingTextRenderer; |
| 68 }; | 67 }; |
| 69 | 68 |
| 70 DEFINE_ELEMENT_TYPE_CASTS(FirstLetterPseudoElement, isFirstLetterPseudoElement()
); | 69 DEFINE_ELEMENT_TYPE_CASTS(FirstLetterPseudoElement, isFirstLetterPseudoElement()
); |
| 71 | 70 |
| 72 } // namespace blink | 71 } // namespace blink |
| 73 | 72 |
| 74 #endif // FirstLetterPseudoElement_h | 73 #endif // FirstLetterPseudoElement_h |
| OLD | NEW |