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 24 matching lines...) Expand all Loading... |
35 // We cache offsets so that text transformations can be applied in such a way th
at we can recover | 35 // We cache offsets so that text transformations can be applied in such a way th
at we can recover |
36 // the original unaltered string from our corresponding DOM node. | 36 // the original unaltered string from our corresponding DOM node. |
37 class LayoutTextFragment final : public LayoutText { | 37 class LayoutTextFragment final : public LayoutText { |
38 public: | 38 public: |
39 LayoutTextFragment(Node*, StringImpl*, int startOffset, int length); | 39 LayoutTextFragment(Node*, StringImpl*, int startOffset, int length); |
40 LayoutTextFragment(Node*, StringImpl*); | 40 LayoutTextFragment(Node*, StringImpl*); |
41 ~LayoutTextFragment() override; | 41 ~LayoutTextFragment() override; |
42 | 42 |
43 bool isTextFragment() const override { return true; } | 43 bool isTextFragment() const override { return true; } |
44 | 44 |
45 bool canBeSelectionLeaf() const override { return node() && node()->hasEdita
bleStyle(); } | 45 bool canBeSelectionLeaf() const override { return node() && hasEditableStyle
(*node()); } |
46 | 46 |
47 unsigned start() const { return m_start; } | 47 unsigned start() const { return m_start; } |
48 unsigned fragmentLength() const { return m_fragmentLength; } | 48 unsigned fragmentLength() const { return m_fragmentLength; } |
49 | 49 |
50 unsigned textStartOffset() const override { return start(); } | 50 unsigned textStartOffset() const override { return start(); } |
51 | 51 |
52 void setContentString(StringImpl*); | 52 void setContentString(StringImpl*); |
53 StringImpl* contentString() const { return m_contentString.get(); } | 53 StringImpl* contentString() const { return m_contentString.get(); } |
54 // The complete text is all of the text in the associated DOM text node. | 54 // The complete text is all of the text in the associated DOM text node. |
55 PassRefPtr<StringImpl> completeText() const; | 55 PassRefPtr<StringImpl> completeText() const; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 // Reference back to FirstLetterPseudoElement; cleared by FirstLetterPseudoE
lement::detach() if | 90 // Reference back to FirstLetterPseudoElement; cleared by FirstLetterPseudoE
lement::detach() if |
91 // it goes away first. | 91 // it goes away first. |
92 UntracedMember<FirstLetterPseudoElement> m_firstLetterPseudoElement; | 92 UntracedMember<FirstLetterPseudoElement> m_firstLetterPseudoElement; |
93 }; | 93 }; |
94 | 94 |
95 DEFINE_TYPE_CASTS(LayoutTextFragment, LayoutObject, object, toLayoutText(object)
->isTextFragment(), toLayoutText(object).isTextFragment()); | 95 DEFINE_TYPE_CASTS(LayoutTextFragment, LayoutObject, object, toLayoutText(object)
->isTextFragment(), toLayoutText(object).isTextFragment()); |
96 | 96 |
97 } // namespace blink | 97 } // namespace blink |
98 | 98 |
99 #endif // LayoutTextFragment_h | 99 #endif // LayoutTextFragment_h |
OLD | NEW |