diff options
Diffstat (limited to 'src/3rdparty/webkit/WebCore/rendering/InlineBox.h')
-rw-r--r-- | src/3rdparty/webkit/WebCore/rendering/InlineBox.h | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/src/3rdparty/webkit/WebCore/rendering/InlineBox.h b/src/3rdparty/webkit/WebCore/rendering/InlineBox.h index 95852783ed..0f66edd59e 100644 --- a/src/3rdparty/webkit/WebCore/rendering/InlineBox.h +++ b/src/3rdparty/webkit/WebCore/rendering/InlineBox.h @@ -49,7 +49,7 @@ public: , m_dirty(false) , m_extracted(false) #if ENABLE(SVG) - , m_isSVG(false) + , m_hasVirtualHeight(false) #endif , m_endsWithBreak(false) , m_hasSelectedChildren(false) @@ -82,7 +82,7 @@ public: , m_dirty(dirty) , m_extracted(extracted) #if ENABLE(SVG) - , m_isSVG(false) + , m_hasVirtualHeight(false) #endif , m_endsWithBreak(false) , m_hasSelectedChildren(false) @@ -129,18 +129,22 @@ public: #ifndef NDEBUG void showTreeForThis() const; #endif + + bool isText() const { return m_isText; } + void setIsText(bool b) { m_isText = b; } + virtual bool isInlineBox() { return false; } virtual bool isInlineFlowBox() const { return false; } virtual bool isInlineTextBox() { return false; } virtual bool isRootInlineBox() const { return false; } #if ENABLE(SVG) virtual bool isSVGRootInlineBox() { return false; } - bool isSVG() const { return m_isSVG; } - void setIsSVG(bool b) { m_isSVG = b; } -#endif - bool isText() const { return m_isText; } - void setIsText(bool b) { m_isText = b; } + bool hasVirtualHeight() const { return m_hasVirtualHeight; } + void setHasVirtualHeight() { m_hasVirtualHeight = true; } + virtual int virtualHeight() const { ASSERT_NOT_REACHED(); return 0; } +#endif + bool isConstructed() { return m_constructed; } virtual void setConstructed() { @@ -171,10 +175,10 @@ public: bool nextOnLineExists() const; bool prevOnLineExists() const; - virtual InlineBox* firstLeafChild(); - virtual InlineBox* lastLeafChild(); - InlineBox* nextLeafChild(); - InlineBox* prevLeafChild(); + virtual bool isLeaf() const { return true; } + + InlineBox* nextLeafChild() const; + InlineBox* prevLeafChild() const; RenderObject* renderer() const { return m_renderer; } @@ -201,6 +205,9 @@ public: int height() const; + inline int baselinePosition(bool isRootLineBox) const { return renderer()->baselinePosition(m_firstLine, isRootLineBox); } + inline int lineHeight(bool isRootLineBox) const { return renderer()->lineHeight(m_firstLine, isRootLineBox); } + virtual int topOverflow() const { return y(); } virtual int bottomOverflow() const { return y() + height(); } virtual int leftOverflow() const { return x(); } @@ -243,11 +250,6 @@ public: return 0; } -protected: -#if ENABLE(SVG) - virtual int svgBoxHeight() const { return 0; } -#endif - private: InlineBox* m_next; // The next element on the same line as us. InlineBox* m_prev; // The previous element on the same line as us. @@ -272,10 +274,7 @@ private: protected: bool m_dirty : 1; bool m_extracted : 1; - -#if ENABLE(SVG) - bool m_isSVG : 1; -#endif + bool m_hasVirtualHeight : 1; // for RootInlineBox bool m_endsWithBreak : 1; // Whether the line ends with a <br>. |