summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/rendering/CounterNode.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/rendering/CounterNode.h')
-rw-r--r--Source/WebCore/rendering/CounterNode.h25
1 files changed, 13 insertions, 12 deletions
diff --git a/Source/WebCore/rendering/CounterNode.h b/Source/WebCore/rendering/CounterNode.h
index 639946c..7d6def8 100644
--- a/Source/WebCore/rendering/CounterNode.h
+++ b/Source/WebCore/rendering/CounterNode.h
@@ -38,16 +38,22 @@
namespace WebCore {
class RenderObject;
+class RenderCounter;
class CounterNode : public RefCounted<CounterNode> {
public:
static PassRefPtr<CounterNode> create(RenderObject*, bool isReset, int value);
-
+ ~CounterNode();
bool actsAsReset() const { return m_hasResetType || !m_parent; }
bool hasResetType() const { return m_hasResetType; }
int value() const { return m_value; }
int countInParent() const { return m_countInParent; }
- RenderObject* renderer() const { return m_renderer; }
+ RenderObject* owner() const { return m_owner; }
+ void addRenderer(RenderCounter*);
+ void removeRenderer(RenderCounter*);
+
+ // Invalidates the text in the renderers of this counter, if any.
+ void resetRenderers();
CounterNode* parent() const { return m_parent; }
CounterNode* previousSibling() const { return m_previousSibling; }
@@ -62,26 +68,21 @@ public:
void insertAfter(CounterNode* newChild, CounterNode* beforeChild, const AtomicString& identifier);
// identifier must match the identifier of this counter.
- void removeChild(CounterNode*, const AtomicString& identifier);
+ void removeChild(CounterNode*);
private:
CounterNode(RenderObject*, bool isReset, int value);
int computeCountInParent() const;
- void recount(const AtomicString& identifier);
-
- // Invalidates the text in the renderer of this counter, if any.
- // identifier must match the identifier of this counter.
- void resetRenderer(const AtomicString& identifier) const;
-
// Invalidates the text in the renderer of this counter, if any,
// and in the renderers of all descendants of this counter, if any.
- // identifier must match the identifier of this counter.
- void resetRenderers(const AtomicString& identifier) const;
+ void resetThisAndDescendantsRenderers();
+ void recount();
bool m_hasResetType;
int m_value;
int m_countInParent;
- RenderObject* m_renderer;
+ RenderObject* m_owner;
+ RenderCounter* m_rootRenderer;
CounterNode* m_parent;
CounterNode* m_previousSibling;