| 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 26 matching lines...) Expand all  Loading... | 
| 37 public: | 37 public: | 
| 38     LayoutTextFragment(Node*, StringImpl*, int startOffset, int length); | 38     LayoutTextFragment(Node*, StringImpl*, int startOffset, int length); | 
| 39     LayoutTextFragment(Node*, StringImpl*); | 39     LayoutTextFragment(Node*, StringImpl*); | 
| 40     ~LayoutTextFragment() override; | 40     ~LayoutTextFragment() override; | 
| 41 | 41 | 
| 42     bool isTextFragment() const override { return true; } | 42     bool isTextFragment() const override { return true; } | 
| 43 | 43 | 
| 44     bool canBeSelectionLeaf() const override { return node() && node()->hasEdita
    bleStyle(); } | 44     bool canBeSelectionLeaf() const override { return node() && node()->hasEdita
    bleStyle(); } | 
| 45 | 45 | 
| 46     unsigned start() const { return m_start; } | 46     unsigned start() const { return m_start; } | 
|  | 47     unsigned fragmentLength() const { return m_fragmentLength; } | 
| 47 | 48 | 
| 48     unsigned textStartOffset() const override { return start(); } | 49     unsigned textStartOffset() const override { return start(); } | 
| 49 | 50 | 
| 50     void setContentString(StringImpl*); | 51     void setContentString(StringImpl*); | 
| 51     StringImpl* contentString() const { return m_contentString.get(); } | 52     StringImpl* contentString() const { return m_contentString.get(); } | 
| 52     // The complete text is all of the text in the associated DOM text node. | 53     // The complete text is all of the text in the associated DOM text node. | 
| 53     PassRefPtr<StringImpl> completeText() const; | 54     PassRefPtr<StringImpl> completeText() const; | 
| 54     // The fragment text is the text which will be used by this LayoutTextFragme
    nt. For | 55     // The fragment text is the text which will be used by this LayoutTextFragme
    nt. For | 
| 55     // things like first-letter this may differ from the completeText as we mayb
    e using | 56     // things like first-letter this may differ from the completeText as we mayb
    e using | 
| 56     // only a portion of the text nodes content. | 57     // only a portion of the text nodes content. | 
| (...skipping 16 matching lines...) Expand all  Loading... | 
| 73 | 74 | 
| 74 protected: | 75 protected: | 
| 75     void willBeDestroyed() override; | 76     void willBeDestroyed() override; | 
| 76 | 77 | 
| 77 private: | 78 private: | 
| 78     LayoutBlock* blockForAccompanyingFirstLetter() const; | 79     LayoutBlock* blockForAccompanyingFirstLetter() const; | 
| 79     UChar previousCharacter() const override; | 80     UChar previousCharacter() const override; | 
| 80 | 81 | 
| 81     Text* associatedTextNode() const; | 82     Text* associatedTextNode() const; | 
| 82     void updateHitTestResult(HitTestResult&, const LayoutPoint&) override; | 83     void updateHitTestResult(HitTestResult&, const LayoutPoint&) override; | 
| 83     unsigned fragmentLength() const { return m_fragmentLength; } |  | 
| 84 | 84 | 
| 85     unsigned m_start; | 85     unsigned m_start; | 
| 86     unsigned m_fragmentLength; | 86     unsigned m_fragmentLength; | 
| 87     bool m_isRemainingTextLayoutObject; | 87     bool m_isRemainingTextLayoutObject; | 
| 88     RefPtr<StringImpl> m_contentString; | 88     RefPtr<StringImpl> m_contentString; | 
| 89     // Reference back to FirstLetterPseudoElement; cleared by FirstLetterPseudoE
    lement::detach() if | 89     // Reference back to FirstLetterPseudoElement; cleared by FirstLetterPseudoE
    lement::detach() if | 
| 90     // it goes away first. | 90     // it goes away first. | 
| 91     GC_PLUGIN_IGNORE("http://crbug.com/509911") | 91     GC_PLUGIN_IGNORE("http://crbug.com/509911") | 
| 92     FirstLetterPseudoElement* m_firstLetterPseudoElement; | 92     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 | 
|---|