diff options
Diffstat (limited to 'WebCore/rendering/CounterNode.h')
| -rw-r--r-- | WebCore/rendering/CounterNode.h | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/WebCore/rendering/CounterNode.h b/WebCore/rendering/CounterNode.h index b432e1d..15f2eb8 100644 --- a/WebCore/rendering/CounterNode.h +++ b/WebCore/rendering/CounterNode.h @@ -35,13 +35,15 @@ namespace WebCore { +class AtomicString; class RenderObject; class CounterNode : public Noncopyable { public: CounterNode(RenderObject*, bool isReset, int value); - bool isReset() const { return m_isReset; } + 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; } @@ -51,15 +53,30 @@ public: CounterNode* nextSibling() const { return m_nextSibling; } CounterNode* firstChild() const { return m_firstChild; } CounterNode* lastChild() const { return m_lastChild; } + CounterNode* lastDescendant() const; + CounterNode* previousInPreOrder() const; + CounterNode* nextInPreOrder(const CounterNode* stayWithin = 0) const; + CounterNode* nextInPreOrderAfterChildren(const CounterNode* stayWithin = 0) const; - void insertAfter(CounterNode* newChild, CounterNode* beforeChild); - void removeChild(CounterNode*); + void insertAfter(CounterNode* newChild, CounterNode* beforeChild, const AtomicString& identifier); + + // identifier must match the identifier of this counter. + void removeChild(CounterNode*, const AtomicString& identifier); private: int computeCountInParent() const; - void recount(); + 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; - bool m_isReset; + bool m_hasResetType; int m_value; int m_countInParent; RenderObject* m_renderer; |
