diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/rendering/RenderCounter.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/rendering/RenderCounter.h')
-rw-r--r-- | Source/WebCore/rendering/RenderCounter.h | 47 |
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 |