OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2007 David Smith (catfish.man@gmail.com) | 4 * (C) 2007 David Smith (catfish.man@gmail.com) |
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r
ights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 LayoutUnit logicalLeftOffsetForContent() const { return isHorizontalWritingM
ode() ? borderLeft() + paddingLeft() : borderTop() + paddingTop(); } | 391 LayoutUnit logicalLeftOffsetForContent() const { return isHorizontalWritingM
ode() ? borderLeft() + paddingLeft() : borderTop() + paddingTop(); } |
392 LayoutUnit logicalRightOffsetForContent() const { return logicalLeftOffsetFo
rContent() + availableLogicalWidth(); } | 392 LayoutUnit logicalRightOffsetForContent() const { return logicalLeftOffsetFo
rContent() + availableLogicalWidth(); } |
393 LayoutUnit startOffsetForContent() const { return style()->isLeftToRightDire
ction() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetFor
Content(); } | 393 LayoutUnit startOffsetForContent() const { return style()->isLeftToRightDire
ction() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetFor
Content(); } |
394 LayoutUnit endOffsetForContent() const { return !style()->isLeftToRightDirec
tion() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetForC
ontent(); } | 394 LayoutUnit endOffsetForContent() const { return !style()->isLeftToRightDirec
tion() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetForC
ontent(); } |
395 | 395 |
396 void setStaticInlinePositionForChild(RenderBox*, LayoutUnit blockOffset, Lay
outUnit inlinePosition); | 396 void setStaticInlinePositionForChild(RenderBox*, LayoutUnit blockOffset, Lay
outUnit inlinePosition); |
397 void updateStaticInlinePositionForChild(RenderBox*, LayoutUnit logicalTop); | 397 void updateStaticInlinePositionForChild(RenderBox*, LayoutUnit logicalTop); |
398 | 398 |
399 LayoutUnit computeStartPositionDeltaForChildAvoidingFloats(const RenderBox*
child, LayoutUnit childMarginStart, RenderRegion* = 0); | 399 LayoutUnit computeStartPositionDeltaForChildAvoidingFloats(const RenderBox*
child, LayoutUnit childMarginStart, RenderRegion* = 0); |
400 | 400 |
401 void placeRunInIfNeeded(RenderObject* newChild); | |
402 bool runInIsPlacedIntoSiblingBlock(RenderObject* runIn); | |
403 | |
404 #ifndef NDEBUG | 401 #ifndef NDEBUG |
405 void checkPositionedObjectsNeedLayout(); | 402 void checkPositionedObjectsNeedLayout(); |
406 void showLineTreeAndMark(const InlineBox* = 0, const char* = 0, const Inline
Box* = 0, const char* = 0, const RenderObject* = 0) const; | 403 void showLineTreeAndMark(const InlineBox* = 0, const char* = 0, const Inline
Box* = 0, const char* = 0, const RenderObject* = 0) const; |
407 #endif | 404 #endif |
408 | 405 |
409 ShapeInsideInfo* ensureShapeInsideInfo() | 406 ShapeInsideInfo* ensureShapeInsideInfo() |
410 { | 407 { |
411 if (!m_rareData || !m_rareData->m_shapeInsideInfo) | 408 if (!m_rareData || !m_rareData->m_shapeInsideInfo) |
412 setShapeInsideInfo(ShapeInsideInfo::createInfo(this)); | 409 setShapeInsideInfo(ShapeInsideInfo::createInfo(this)); |
413 return m_rareData->m_shapeInsideInfo.get(); | 410 return m_rareData->m_shapeInsideInfo.get(); |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
670 | 667 |
671 void splitBlocks(RenderBlock* fromBlock, RenderBlock* toBlock, RenderBlock*
middleBlock, | 668 void splitBlocks(RenderBlock* fromBlock, RenderBlock* toBlock, RenderBlock*
middleBlock, |
672 RenderObject* beforeChild, RenderBoxModelObject* oldCont); | 669 RenderObject* beforeChild, RenderBoxModelObject* oldCont); |
673 void splitFlow(RenderObject* beforeChild, RenderBlock* newBlockBox, | 670 void splitFlow(RenderObject* beforeChild, RenderBlock* newBlockBox, |
674 RenderObject* newChild, RenderBoxModelObject* oldCont); | 671 RenderObject* newChild, RenderBoxModelObject* oldCont); |
675 RenderBlock* clone() const; | 672 RenderBlock* clone() const; |
676 RenderBlock* continuationBefore(RenderObject* beforeChild); | 673 RenderBlock* continuationBefore(RenderObject* beforeChild); |
677 RenderBlock* containingColumnsBlock(bool allowAnonymousColumnBlock = true); | 674 RenderBlock* containingColumnsBlock(bool allowAnonymousColumnBlock = true); |
678 RenderBlock* columnsBlockForSpanningElement(RenderObject* newChild); | 675 RenderBlock* columnsBlockForSpanningElement(RenderObject* newChild); |
679 | 676 |
680 RenderBoxModelObject* createReplacementRunIn(RenderBoxModelObject* runIn); | |
681 void moveRunInUnderSiblingBlockIfNeeded(RenderObject* runIn); | |
682 void moveRunInToOriginalPosition(RenderObject* runIn); | |
683 // End helper functions and structs used by layoutBlockChildren. | 677 // End helper functions and structs used by layoutBlockChildren. |
684 | 678 |
685 protected: | 679 protected: |
686 void determineLogicalLeftPositionForChild(RenderBox* child, ApplyLayoutDelta
Mode = DoNotApplyLayoutDelta); | 680 void determineLogicalLeftPositionForChild(RenderBox* child, ApplyLayoutDelta
Mode = DoNotApplyLayoutDelta); |
687 | 681 |
688 // Pagination routines. | 682 // Pagination routines. |
689 virtual bool relayoutForPagination(bool hasSpecifiedPageLogicalHeight, Layou
tUnit pageLogicalHeight, LayoutStateMaintainer&); | 683 virtual bool relayoutForPagination(bool hasSpecifiedPageLogicalHeight, Layou
tUnit pageLogicalHeight, LayoutStateMaintainer&); |
690 bool relayoutToAvoidWidows(LayoutStateMaintainer&); | 684 bool relayoutToAvoidWidows(LayoutStateMaintainer&); |
691 | 685 |
692 // Returns the logicalOffset at the top of the next page. If the offset pass
ed in is already at the top of the current page, | 686 // Returns the logicalOffset at the top of the next page. If the offset pass
ed in is already at the top of the current page, |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
788 // FIXME: This is temporary as we move code that accesses block flow | 782 // FIXME: This is temporary as we move code that accesses block flow |
789 // member variables out of RenderBlock and into RenderBlockFlow. | 783 // member variables out of RenderBlock and into RenderBlockFlow. |
790 friend class RenderBlockFlow; | 784 friend class RenderBlockFlow; |
791 }; | 785 }; |
792 | 786 |
793 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); | 787 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); |
794 | 788 |
795 } // namespace WebCore | 789 } // namespace WebCore |
796 | 790 |
797 #endif // RenderBlock_h | 791 #endif // RenderBlock_h |
OLD | NEW |