summaryrefslogtreecommitdiff
path: root/Source/WebCore/rendering/RenderCounter.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/rendering/RenderCounter.h')
-rw-r--r--Source/WebCore/rendering/RenderCounter.h47
1 files changed, 19 insertions, 28 deletions
diff --git a/Source/WebCore/rendering/RenderCounter.h b/Source/WebCore/rendering/RenderCounter.h
index b21db05a6..8e4276470 100644
--- a/Source/WebCore/rendering/RenderCounter.h
+++ b/Source/WebCore/rendering/RenderCounter.h
@@ -19,8 +19,7 @@
*
*/
-#ifndef RenderCounter_h
-#define RenderCounter_h
+#pragma once
#include "CounterContent.h"
#include "RenderText.h"
@@ -34,42 +33,34 @@ public:
RenderCounter(Document&, const CounterContent&);
virtual ~RenderCounter();
- static void destroyCounterNodes(RenderObject*);
- static void destroyCounterNode(RenderObject*, const AtomicString& identifier);
- static void rendererSubtreeAttached(RenderObject*);
- static void rendererRemovedFromTree(RenderObject&);
- static void rendererStyleChanged(RenderObject*, const RenderStyle* oldStyle, const RenderStyle* newStyle);
+ static void destroyCounterNodes(RenderElement&);
+ static void destroyCounterNode(RenderElement&, const AtomicString& identifier);
+ static void rendererSubtreeAttached(RenderElement&);
+ static void rendererRemovedFromTree(RenderElement&);
+ static void rendererStyleChanged(RenderElement&, const RenderStyle* oldStyle, const RenderStyle* newStyle);
void updateCounter();
-protected:
- virtual void willBeDestroyed();
-
private:
- virtual const char* renderName() const;
- virtual bool isCounter() const;
- virtual String originalText() const;
+ void willBeDestroyed() override;
- virtual void computePreferredLogicalWidths(float leadWidth) override;
-
- // Removes the reference to the CounterNode associated with this renderer.
- // This is used to cause a counter display update when the CounterNode tree changes.
- void invalidate();
+ const char* renderName() const override;
+ bool isCounter() const override;
+ String originalText() const override;
+
+ void computePreferredLogicalWidths(float leadWidth) override;
CounterContent m_counter;
- CounterNode* m_counterNode;
- RenderCounter* m_nextForSameCounter;
+ CounterNode* m_counterNode { nullptr };
+ RenderCounter* m_nextForSameCounter { nullptr };
friend class CounterNode;
};
-template<> inline bool isRendererOfType<const RenderCounter>(const RenderObject& renderer) { return renderer.isCounter(); }
-RENDER_OBJECT_TYPE_CASTS(RenderCounter, isCounter())
-
} // namespace WebCore
-#ifndef NDEBUG
-// Outside the WebCore namespace for ease of invocation from gdb.
-void showCounterRendererTree(const WebCore::RenderObject*, const char* counterName = 0);
-#endif
+SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderCounter, isCounter())
-#endif // RenderCounter_h
+#if ENABLE(TREE_DEBUGGING)
+// Outside the WebCore namespace for ease of invocation from the debugger.
+void showCounterRendererTree(const WebCore::RenderObject*, const char* counterName = nullptr);
+#endif