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, 2011 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. |
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 3627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3638 { | 3638 { |
3639 if (RenderFlowThread* flowThread = flowThreadContainingBlock()) | 3639 if (RenderFlowThread* flowThread = flowThreadContainingBlock()) |
3640 flowThread->updateMinimumPageHeight(offsetFromLogicalTopOfFirstPage() + offset, minHeight); | 3640 flowThread->updateMinimumPageHeight(offsetFromLogicalTopOfFirstPage() + offset, minHeight); |
3641 else if (ColumnInfo* colInfo = view()->layoutState()->columnInfo()) | 3641 else if (ColumnInfo* colInfo = view()->layoutState()->columnInfo()) |
3642 colInfo->updateMinimumColumnHeight(minHeight); | 3642 colInfo->updateMinimumColumnHeight(minHeight); |
3643 } | 3643 } |
3644 | 3644 |
3645 LayoutUnit RenderBlock::offsetFromLogicalTopOfFirstPage() const | 3645 LayoutUnit RenderBlock::offsetFromLogicalTopOfFirstPage() const |
3646 { | 3646 { |
3647 LayoutState* layoutState = view()->layoutState(); | 3647 LayoutState* layoutState = view()->layoutState(); |
3648 if (layoutState && !layoutState->isPaginated()) | 3648 if (!layoutState) { |
Julien - ping for review
2014/12/04 16:46:19
ASSERT(layoutState) / RELEASE_ASSERT(layoutState)?
mstensho (USE GERRIT)
2014/12/04 18:19:43
Done.
| |
3649 return 0; | 3649 ASSERT_NOT_REACHED(); |
3650 | 3650 return LayoutUnit(); |
3651 RenderFlowThread* flowThread = flowThreadContainingBlock(); | |
3652 if (flowThread) | |
3653 return flowThread->offsetFromLogicalTopOfFirstRegion(this); | |
3654 | |
3655 if (layoutState) { | |
3656 ASSERT(layoutState->renderer() == this); | |
3657 | |
3658 LayoutSize offsetDelta = layoutState->layoutOffset() - layoutState->page Offset(); | |
3659 return isHorizontalWritingMode() ? offsetDelta.height() : offsetDelta.wi dth(); | |
3660 } | 3651 } |
3661 | 3652 |
3662 ASSERT_NOT_REACHED(); | 3653 if (!layoutState->isPaginated()) |
3663 return 0; | 3654 return LayoutUnit(); |
3655 // It would be possible to remove the requirement that this block be the one currently being | |
3656 // laid out, but nobody needs that at the moment. | |
3657 ASSERT(layoutState->renderer() == this); | |
3658 LayoutSize offsetDelta = layoutState->layoutOffset() - layoutState->pageOffs et(); | |
3659 return isHorizontalWritingMode() ? offsetDelta.height() : offsetDelta.width( ); | |
3664 } | 3660 } |
3665 | 3661 |
3666 LayoutUnit RenderBlock::collapsedMarginBeforeForChild(const RenderBox& child) co nst | 3662 LayoutUnit RenderBlock::collapsedMarginBeforeForChild(const RenderBox& child) co nst |
3667 { | 3663 { |
3668 // If the child has the same directionality as we do, then we can just retur n its | 3664 // If the child has the same directionality as we do, then we can just retur n its |
3669 // collapsed margin. | 3665 // collapsed margin. |
3670 if (!child.isWritingModeRoot()) | 3666 if (!child.isWritingModeRoot()) |
3671 return child.collapsedMarginBefore(); | 3667 return child.collapsedMarginBefore(); |
3672 | 3668 |
3673 // The child has a different directionality. If the child is parallel, then it's just | 3669 // The child has a different directionality. If the child is parallel, then it's just |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3915 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const | 3911 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const |
3916 { | 3912 { |
3917 showRenderObject(); | 3913 showRenderObject(); |
3918 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) | 3914 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) |
3919 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); | 3915 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); |
3920 } | 3916 } |
3921 | 3917 |
3922 #endif | 3918 #endif |
3923 | 3919 |
3924 } // namespace blink | 3920 } // namespace blink |
OLD | NEW |