diff options
Diffstat (limited to 'WebCore/rendering/RenderBR.h')
-rw-r--r-- | WebCore/rendering/RenderBR.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/WebCore/rendering/RenderBR.h b/WebCore/rendering/RenderBR.h index 8850d46..7216b5a 100644 --- a/WebCore/rendering/RenderBR.h +++ b/WebCore/rendering/RenderBR.h @@ -43,8 +43,7 @@ public: virtual unsigned width(unsigned /*from*/, unsigned /*len*/, const Font&, int /*xpos*/) const { return 0; } virtual unsigned width(unsigned /*from*/, unsigned /*len*/, int /*xpos*/, bool /*firstLine = false*/) const { return 0; } - virtual int lineHeight(bool firstLine, bool isRootLineBox = false) const; - virtual int baselinePosition(bool firstLine, bool isRootLineBox = false) const; + int lineHeight(bool firstLine) const; // overrides virtual bool isBR() const { return true; } @@ -62,6 +61,22 @@ private: mutable int m_lineHeight; }; + +inline RenderBR* toRenderBR(RenderObject* object) +{ + ASSERT(!object || object->isBR()); + return static_cast<RenderBR*>(object); +} + +inline const RenderBR* toRenderBR(const RenderObject* object) +{ + ASSERT(!object || object->isBR()); + return static_cast<const RenderBR*>(object); +} + +// This will catch anyone doing an unnecessary cast. +void toRenderBR(const RenderBR*); + } // namespace WebCore #endif // RenderBR_h |