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 30 matching lines...) Expand all Loading... |
41 static void rendererStyleChanged(RenderObject*, const RenderStyle* oldStyle,
const RenderStyle* newStyle); | 41 static void rendererStyleChanged(RenderObject*, const RenderStyle* oldStyle,
const RenderStyle* newStyle); |
42 | 42 |
43 protected: | 43 protected: |
44 virtual void willBeDestroyed(); | 44 virtual void willBeDestroyed(); |
45 | 45 |
46 private: | 46 private: |
47 virtual const char* renderName() const; | 47 virtual const char* renderName() const; |
48 virtual bool isCounter() const; | 48 virtual bool isCounter() const; |
49 virtual PassRefPtr<StringImpl> originalText() const; | 49 virtual PassRefPtr<StringImpl> originalText() const; |
50 | 50 |
| 51 virtual void updateText() OVERRIDE; |
51 virtual void computePreferredLogicalWidths(float leadWidth); | 52 virtual void computePreferredLogicalWidths(float leadWidth); |
52 | 53 |
53 // Removes the reference to the CounterNode associated with this renderer. | 54 // Removes the reference to the CounterNode associated with this renderer. |
54 // This is used to cause a counter display update when the CounterNode tree
changes. | 55 // This is used to cause a counter display update when the CounterNode tree
changes. |
55 void invalidate(); | 56 void invalidate(); |
56 | 57 |
57 CounterContent m_counter; | 58 CounterContent m_counter; |
58 CounterNode* m_counterNode; | 59 CounterNode* m_counterNode; |
59 RenderCounter* m_nextForSameCounter; | 60 RenderCounter* m_nextForSameCounter; |
60 friend class CounterNode; | 61 friend class CounterNode; |
61 }; | 62 }; |
62 | 63 |
63 inline RenderCounter* toRenderCounter(RenderObject* object) | 64 inline RenderCounter* toRenderCounter(RenderObject* object) |
64 { | 65 { |
65 ASSERT(!object || object->isCounter()); | 66 ASSERT(!object || object->isCounter()); |
66 return static_cast<RenderCounter*>(object); | 67 return static_cast<RenderCounter*>(object); |
67 } | 68 } |
68 | 69 |
69 // This will catch anyone doing an unnecessary cast. | 70 // This will catch anyone doing an unnecessary cast. |
70 void toRenderCounter(const RenderCounter*); | 71 void toRenderCounter(const RenderCounter*); |
71 | 72 |
72 } // namespace WebCore | 73 } // namespace WebCore |
73 | 74 |
74 #ifndef NDEBUG | 75 #ifndef NDEBUG |
75 // Outside the WebCore namespace for ease of invocation from gdb. | 76 // Outside the WebCore namespace for ease of invocation from gdb. |
76 void showCounterRendererTree(const WebCore::RenderObject*, const char* counterNa
me = 0); | 77 void showCounterRendererTree(const WebCore::RenderObject*, const char* counterNa
me = 0); |
77 #endif | 78 #endif |
78 | 79 |
79 #endif // RenderCounter_h | 80 #endif // RenderCounter_h |
OLD | NEW |