diff options
Diffstat (limited to 'WebCore/rendering/RenderBlock.h')
-rw-r--r-- | WebCore/rendering/RenderBlock.h | 52 |
1 files changed, 18 insertions, 34 deletions
diff --git a/WebCore/rendering/RenderBlock.h b/WebCore/rendering/RenderBlock.h index 839be16..09e76ee 100644 --- a/WebCore/rendering/RenderBlock.h +++ b/WebCore/rendering/RenderBlock.h @@ -67,17 +67,6 @@ public: void deleteLineBoxTree(); - // The height (and width) of a block when you include overflow spillage out of the bottom - // of the block (e.g., a <div style="height:25px"> that has a 100px tall image inside - // it would have an overflow height of borderTop() + paddingTop() + 100px. - virtual int overflowHeight(bool includeInterior = true) const; - virtual int overflowWidth(bool includeInterior = true) const; - virtual int overflowLeft(bool includeInterior = true) const; - virtual int overflowTop(bool includeInterior = true) const; - virtual IntRect overflowRect(bool includeInterior = true) const; - - void addVisualOverflow(const IntRect&); - virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0); virtual void removeChild(RenderObject*); @@ -104,6 +93,7 @@ public: IntRect floatRect() const; int lineWidth(int y, bool firstLine) const; + virtual int lowestPosition(bool includeOverflowInterior = true, bool includeSelf = true) const; virtual int rightmostPosition(bool includeOverflowInterior = true, bool includeSelf = true) const; virtual int leftmostPosition(bool includeOverflowInterior = true, bool includeSelf = true) const; @@ -147,15 +137,9 @@ public: // This function is a convenience helper for creating an anonymous block that inherits its // style from this RenderBlock. - RenderBlock* createAnonymousBlock() const; - - Vector<IntRect>* columnRects() const; - int columnGap() const; + RenderBlock* createAnonymousBlock(bool isFlexibleBox = false) const; protected: - virtual void setOverflowHeight(int h) { m_overflowHeight = h; } - virtual void setOverflowWidth(int w) { m_overflowWidth = w; } - int maxTopPosMargin() const { return m_maxMargin ? m_maxMargin->m_topPos : MaxMargin::topPosDefault(this); } int maxTopNegMargin() const { return m_maxMargin ? m_maxMargin->m_topNeg : MaxMargin::topNegDefault(this); } int maxBottomPosMargin() const { return m_maxMargin ? m_maxMargin->m_bottomPos : MaxMargin::bottomPosDefault(this); } @@ -207,7 +191,7 @@ protected: virtual bool hasLineIfEmpty() const; bool layoutOnlyPositionedObjects(); - + private: virtual RenderObjectChildList* virtualChildren() { return children(); } virtual const RenderObjectChildList* virtualChildren() const { return children(); } @@ -275,11 +259,14 @@ private: InlineFlowBox* createLineBoxes(RenderObject*, bool firstLine); void computeHorizontalPositionsForLine(RootInlineBox*, bool firstLine, BidiRun* firstRun, BidiRun* trailingSpaceRun, bool reachedEnd); void computeVerticalPositionsForLine(RootInlineBox*, BidiRun*); - void checkLinesForOverflow(); void deleteEllipsisLineBoxes(); void checkLinesForTextOverflow(); + void addOverflowFromInlineChildren(); // End of functions defined in RenderBlockLineLayout.cpp. + void addOverflowFromBlockChildren(); + void addOverflowFromFloats(); + void paintFloats(PaintInfo&, int tx, int ty, bool preservePhase = false); void paintContents(PaintInfo&, int tx, int ty); void paintColumnContents(PaintInfo&, int tx, int ty, bool paintFloats = false); @@ -353,7 +340,17 @@ private: int desiredColumnWidth() const; unsigned desiredColumnCount() const; +#if PLATFORM(ANDROID) +public: + Vector<IntRect>* columnRects() const; +private: +#endif void setDesiredColumnCountAndWidth(int count, int width); +#if PLATFORM(ANDROID) +public: + int columnGap() const; +private: +#endif void paintContinuationOutlines(PaintInfo&, int tx, int ty); @@ -432,10 +429,6 @@ private: // This flag is set when we know we're examining bottom margins and we know we're at the bottom of the block. bool m_atBottomOfBlock : 1; - // If our last normal flow child was a self-collapsing block that cleared a float, - // we track it in this variable. - bool m_selfCollapsingBlockClearedFloat : 1; - // These variables are used to detect quirky margins that we need to collapse away (in table cells // and in the body element). bool m_topQuirk : 1; @@ -452,7 +445,6 @@ private: void setAtTopOfBlock(bool b) { m_atTopOfBlock = b; } void setAtBottomOfBlock(bool b) { m_atBottomOfBlock = b; } void clearMargin() { m_posMargin = m_negMargin = 0; } - void setSelfCollapsingBlockClearedFloat(bool b) { m_selfCollapsingBlockClearedFloat = b; } void setTopQuirk(bool b) { m_topQuirk = b; } void setBottomQuirk(bool b) { m_bottomQuirk = b; } void setDeterminedTopQuirk(bool b) { m_determinedTopQuirk = b; } @@ -468,7 +460,6 @@ private: bool canCollapseWithBottom() const { return m_atBottomOfBlock && m_canCollapseBottomWithChildren; } bool canCollapseTopWithChildren() const { return m_canCollapseTopWithChildren; } bool canCollapseBottomWithChildren() const { return m_canCollapseBottomWithChildren; } - bool selfCollapsingBlockClearedFloat() const { return m_selfCollapsingBlockClearedFloat; } bool quirkContainer() const { return m_quirkContainer; } bool determinedTopQuirk() const { return m_determinedTopQuirk; } bool topQuirk() const { return m_topQuirk; } @@ -478,6 +469,7 @@ private: int margin() const { return m_posMargin - m_negMargin; } }; + void layoutBlockChild(RenderBox* child, MarginInfo&, int& previousFloatBottom, int& maxFloatBottom); void adjustPositionedBlock(RenderBox* child, const MarginInfo&); void adjustFloatingBlock(const MarginInfo&); bool handleSpecialChild(RenderBox* child, const MarginInfo&); @@ -528,14 +520,6 @@ private: RenderObjectChildList m_children; RenderLineBoxList m_lineBoxes; // All of the root line boxes created for this block flow. For example, <div>Hello<br>world.</div> will have two total lines for the <div>. -protected: - // How much content overflows out of our block vertically or horizontally. - int m_overflowHeight; - int m_overflowWidth; - int m_overflowLeft; - int m_overflowTop; - -private: mutable int m_lineHeight; }; |