From 2bde8e466a4451c7319e3a072d118917957d6554 Mon Sep 17 00:00:00 2001 From: Steve Block Date: Wed, 25 May 2011 19:08:45 +0100 Subject: Merge WebKit at r82507: Initial merge by git Change-Id: I60ce9d780725b58b45e54165733a8ffee23b683e --- Source/WebCore/rendering/CounterNode.h | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'Source/WebCore/rendering/CounterNode.h') 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 { public: static PassRefPtr 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; -- cgit v1.1