| OLD | NEW |
| 1 /* | 1 /* |
| 2 * (C) 1999 Lars Knoll (knoll@kde.org) | 2 * (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Dirk Mueller (mueller@kde.org) | 3 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 unsigned start() const { return m_start; } | 42 unsigned start() const { return m_start; } |
| 43 unsigned end() const { return m_end; } | 43 unsigned end() const { return m_end; } |
| 44 | 44 |
| 45 RenderObject* firstLetter() const { return m_firstLetter; } | 45 RenderObject* firstLetter() const { return m_firstLetter; } |
| 46 void setFirstLetter(RenderObject* firstLetter) { m_firstLetter = firstLetter
; } | 46 void setFirstLetter(RenderObject* firstLetter) { m_firstLetter = firstLetter
; } |
| 47 | 47 |
| 48 StringImpl* contentString() const { return m_contentString.get(); } | 48 StringImpl* contentString() const { return m_contentString.get(); } |
| 49 virtual PassRefPtr<StringImpl> originalText() const; | 49 virtual PassRefPtr<StringImpl> originalText() const; |
| 50 | 50 |
| 51 virtual void setText(PassRefPtr<StringImpl>, bool force = false) OVERRIDE; |
| 52 |
| 53 virtual void transformText() OVERRIDE; |
| 54 |
| 51 protected: | 55 protected: |
| 52 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle); | 56 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle); |
| 53 | 57 |
| 54 private: | 58 private: |
| 55 virtual void willBeDestroyed(); | 59 virtual void willBeDestroyed(); |
| 56 | 60 |
| 57 virtual void setTextInternal(PassRefPtr<StringImpl>); | |
| 58 virtual UChar previousCharacter() const; | 61 virtual UChar previousCharacter() const; |
| 59 RenderBlock* blockForAccompanyingFirstLetter() const; | 62 RenderBlock* blockForAccompanyingFirstLetter() const; |
| 60 | 63 |
| 61 unsigned m_start; | 64 unsigned m_start; |
| 62 unsigned m_end; | 65 unsigned m_end; |
| 63 RefPtr<StringImpl> m_contentString; | 66 RefPtr<StringImpl> m_contentString; |
| 64 RenderObject* m_firstLetter; | 67 RenderObject* m_firstLetter; |
| 65 bool m_allowFragmentReset; | |
| 66 }; | 68 }; |
| 67 | 69 |
| 68 inline RenderTextFragment* toRenderTextFragment(RenderObject* object) | 70 inline RenderTextFragment* toRenderTextFragment(RenderObject* object) |
| 69 { | 71 { |
| 70 ASSERT(!object || toRenderText(object)->isTextFragment()); | 72 ASSERT(!object || toRenderText(object)->isTextFragment()); |
| 71 return static_cast<RenderTextFragment*>(object); | 73 return static_cast<RenderTextFragment*>(object); |
| 72 } | 74 } |
| 73 | 75 |
| 74 inline const RenderTextFragment* toRenderTextFragment(const RenderObject* object
) | 76 inline const RenderTextFragment* toRenderTextFragment(const RenderObject* object
) |
| 75 { | 77 { |
| 76 ASSERT(!object || toRenderText(object)->isTextFragment()); | 78 ASSERT(!object || toRenderText(object)->isTextFragment()); |
| 77 return static_cast<const RenderTextFragment*>(object); | 79 return static_cast<const RenderTextFragment*>(object); |
| 78 } | 80 } |
| 79 | 81 |
| 80 // This will catch anyone doing an unnecessary cast. | 82 // This will catch anyone doing an unnecessary cast. |
| 81 void toRenderTextFragment(const RenderTextFragment*); | 83 void toRenderTextFragment(const RenderTextFragment*); |
| 82 | 84 |
| 83 } // namespace WebCore | 85 } // namespace WebCore |
| 84 | 86 |
| 85 #endif // RenderTextFragment_h | 87 #endif // RenderTextFragment_h |
| OLD | NEW |