| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 2 * Copyright (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
| 3 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 | 69 |
| 70 const char* name() const override { return "LayoutCounter"; } | 70 const char* name() const override { return "LayoutCounter"; } |
| 71 | 71 |
| 72 protected: | 72 protected: |
| 73 void willBeDestroyed() override; | 73 void willBeDestroyed() override; |
| 74 | 74 |
| 75 private: | 75 private: |
| 76 bool isOfType(LayoutObjectType type) const override { | 76 bool isOfType(LayoutObjectType type) const override { |
| 77 return type == LayoutObjectCounter || LayoutText::isOfType(type); | 77 return type == LayoutObjectCounter || LayoutText::isOfType(type); |
| 78 } | 78 } |
| 79 |
| 80 char objectSize() const override { return sizeof(this); } |
| 81 |
| 79 PassRefPtr<StringImpl> originalText() const override; | 82 PassRefPtr<StringImpl> originalText() const override; |
| 80 | 83 |
| 81 // Removes the reference to the CounterNode associated with this layoutObject. | 84 // Removes the reference to the CounterNode associated with this layoutObject. |
| 82 // This is used to cause a counter display update when the CounterNode tree | 85 // This is used to cause a counter display update when the CounterNode tree |
| 83 // changes. | 86 // changes. |
| 84 void invalidate(); | 87 void invalidate(); |
| 85 | 88 |
| 86 CounterContent m_counter; | 89 CounterContent m_counter; |
| 87 CounterNode* m_counterNode; | 90 CounterNode* m_counterNode; |
| 88 LayoutCounter* m_nextForSameCounter; | 91 LayoutCounter* m_nextForSameCounter; |
| 89 friend class CounterNode; | 92 friend class CounterNode; |
| 90 }; | 93 }; |
| 91 | 94 |
| 92 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutCounter, isCounter()); | 95 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutCounter, isCounter()); |
| 93 | 96 |
| 94 } // namespace blink | 97 } // namespace blink |
| 95 | 98 |
| 96 #ifndef NDEBUG | 99 #ifndef NDEBUG |
| 97 // Outside the WebCore namespace for ease of invocation from gdb. | 100 // Outside the WebCore namespace for ease of invocation from gdb. |
| 98 void showCounterLayoutTree(const blink::LayoutObject*, | 101 void showCounterLayoutTree(const blink::LayoutObject*, |
| 99 const char* counterName = nullptr); | 102 const char* counterName = nullptr); |
| 100 #endif | 103 #endif |
| 101 | 104 |
| 102 #endif // LayoutCounter_h | 105 #endif // LayoutCounter_h |
| OLD | NEW |