| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 LayoutTextFragment(Node*, StringImpl*); | 43 LayoutTextFragment(Node*, StringImpl*); |
| 44 ~LayoutTextFragment() override; | 44 ~LayoutTextFragment() override; |
| 45 | 45 |
| 46 static LayoutTextFragment* createAnonymous(PseudoElement&, StringImpl*); | 46 static LayoutTextFragment* createAnonymous(PseudoElement&, StringImpl*); |
| 47 static LayoutTextFragment* createAnonymous(PseudoElement&, | 47 static LayoutTextFragment* createAnonymous(PseudoElement&, |
| 48 StringImpl*, | 48 StringImpl*, |
| 49 unsigned start, | 49 unsigned start, |
| 50 unsigned length); | 50 unsigned length); |
| 51 | 51 |
| 52 bool isTextFragment() const override { return true; } | 52 bool isTextFragment() const override { return true; } |
| 53 char objectSize() const override { return sizeof(this); } |
| 54 char approximateHeapMemoryUsage() const override { |
| 55 int memory = LayoutText::approximateHeapMemoryUsage(); |
| 56 // TODO(pdr): Include memory from m_contentString? |
| 57 return memory; |
| 58 } |
| 53 | 59 |
| 54 bool canBeSelectionLeaf() const override { | 60 bool canBeSelectionLeaf() const override { |
| 55 return node() && hasEditableStyle(*node()); | 61 return node() && hasEditableStyle(*node()); |
| 56 } | 62 } |
| 57 | 63 |
| 58 unsigned start() const { return m_start; } | 64 unsigned start() const { return m_start; } |
| 59 unsigned fragmentLength() const { return m_fragmentLength; } | 65 unsigned fragmentLength() const { return m_fragmentLength; } |
| 60 | 66 |
| 61 unsigned textStartOffset() const override { return start(); } | 67 unsigned textStartOffset() const override { return start(); } |
| 62 | 68 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 | 119 |
| 114 DEFINE_TYPE_CASTS(LayoutTextFragment, | 120 DEFINE_TYPE_CASTS(LayoutTextFragment, |
| 115 LayoutObject, | 121 LayoutObject, |
| 116 object, | 122 object, |
| 117 toLayoutText(object)->isTextFragment(), | 123 toLayoutText(object)->isTextFragment(), |
| 118 toLayoutText(object).isTextFragment()); | 124 toLayoutText(object).isTextFragment()); |
| 119 | 125 |
| 120 } // namespace blink | 126 } // namespace blink |
| 121 | 127 |
| 122 #endif // LayoutTextFragment_h | 128 #endif // LayoutTextFragment_h |
| OLD | NEW |