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 22 matching lines...) Expand all Loading... |
33 public: | 33 public: |
34 RenderCounter(Document*, const CounterContent&); | 34 RenderCounter(Document*, const CounterContent&); |
35 | 35 |
36 // Removes the reference to the CounterNode associated with this renderer | 36 // Removes the reference to the CounterNode associated with this renderer |
37 // if its identifier matches the argument. | 37 // if its identifier matches the argument. |
38 // This is used to cause a counter display update when the CounterNode | 38 // This is used to cause a counter display update when the CounterNode |
39 // tree for identifier changes. | 39 // tree for identifier changes. |
40 void invalidate(const AtomicString& identifier); | 40 void invalidate(const AtomicString& identifier); |
41 | 41 |
42 static void destroyCounterNodes(RenderObject*); | 42 static void destroyCounterNodes(RenderObject*); |
| 43 static void rendererStyleChanged(RenderObject*, const RenderStyle* oldStyle,
const RenderStyle* newStyle); |
43 | 44 |
44 private: | 45 private: |
45 virtual const char* renderName() const; | 46 virtual const char* renderName() const; |
46 virtual bool isCounter() const; | 47 virtual bool isCounter() const; |
47 virtual PassRefPtr<StringImpl> originalText() const; | 48 virtual PassRefPtr<StringImpl> originalText() const; |
48 | 49 |
49 virtual void calcPrefWidths(int leadWidth); | 50 virtual void calcPrefWidths(int leadWidth); |
50 | 51 |
51 CounterContent m_counter; | 52 CounterContent m_counter; |
52 mutable CounterNode* m_counterNode; | 53 mutable CounterNode* m_counterNode; |
53 }; | 54 }; |
54 | 55 |
55 inline RenderCounter* toRenderCounter(RenderObject* object) | 56 inline RenderCounter* toRenderCounter(RenderObject* object) |
56 { | 57 { |
57 ASSERT(!object || object->isCounter()); | 58 ASSERT(!object || object->isCounter()); |
58 return static_cast<RenderCounter*>(object); | 59 return static_cast<RenderCounter*>(object); |
59 } | 60 } |
60 | 61 |
61 // This will catch anyone doing an unnecessary cast. | 62 // This will catch anyone doing an unnecessary cast. |
62 void toRenderCounter(const RenderCounter*); | 63 void toRenderCounter(const RenderCounter*); |
63 | 64 |
64 } // namespace WebCore | 65 } // namespace WebCore |
65 | 66 |
66 #endif // RenderCounter_h | 67 #endif // RenderCounter_h |
OLD | NEW |