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 2639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2650 LayoutFlowThread* flowThread = flowThreadContainingBlock(); | 2650 LayoutFlowThread* flowThread = flowThreadContainingBlock(); |
2651 if (!flowThread) { | 2651 if (!flowThread) { |
2652 // If there's no flow thread, we're not nested. All pages have the same
height. Give up. | 2652 // If there's no flow thread, we're not nested. All pages have the same
height. Give up. |
2653 return strutToNextPage; | 2653 return strutToNextPage; |
2654 } | 2654 } |
2655 // Start searching for a suitable offset at the top of the next page or colu
mn. | 2655 // Start searching for a suitable offset at the top of the next page or colu
mn. |
2656 LayoutUnit flowThreadOffset = offsetFromLogicalTopOfFirstPage() + nextPageLo
gicalTop; | 2656 LayoutUnit flowThreadOffset = offsetFromLogicalTopOfFirstPage() + nextPageLo
gicalTop; |
2657 return strutToNextPage + flowThread->nextLogicalTopForUnbreakableContent(flo
wThreadOffset, contentLogicalHeight) - flowThreadOffset; | 2657 return strutToNextPage + flowThread->nextLogicalTopForUnbreakableContent(flo
wThreadOffset, contentLogicalHeight) - flowThreadOffset; |
2658 } | 2658 } |
2659 | 2659 |
2660 void LayoutBlock::paginatedContentWasLaidOut(LayoutUnit logicalTopOffsetAfterPag
ination) | 2660 void LayoutBlock::paginatedContentWasLaidOut(LayoutUnit logicalBottomOffsetAfter
Pagination) |
2661 { | 2661 { |
2662 if (LayoutFlowThread* flowThread = flowThreadContainingBlock()) | 2662 if (LayoutFlowThread* flowThread = flowThreadContainingBlock()) |
2663 flowThread->contentWasLaidOut(offsetFromLogicalTopOfFirstPage() + logica
lTopOffsetAfterPagination); | 2663 flowThread->contentWasLaidOut(offsetFromLogicalTopOfFirstPage() + logica
lBottomOffsetAfterPagination); |
2664 } | 2664 } |
2665 | 2665 |
2666 LayoutUnit LayoutBlock::collapsedMarginBeforeForChild(const LayoutBox& child) co
nst | 2666 LayoutUnit LayoutBlock::collapsedMarginBeforeForChild(const LayoutBox& child) co
nst |
2667 { | 2667 { |
2668 // If the child has the same directionality as we do, then we can just retur
n its | 2668 // If the child has the same directionality as we do, then we can just retur
n its |
2669 // collapsed margin. | 2669 // collapsed margin. |
2670 if (!child.isWritingModeRoot()) | 2670 if (!child.isWritingModeRoot()) |
2671 return child.collapsedMarginBefore(); | 2671 return child.collapsedMarginBefore(); |
2672 | 2672 |
2673 // The child has a different directionality. If the child is parallel, then
it's just | 2673 // The child has a different directionality. If the child is parallel, then
it's just |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2895 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout
Object* obj) const | 2895 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout
Object* obj) const |
2896 { | 2896 { |
2897 showLayoutObject(); | 2897 showLayoutObject(); |
2898 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) | 2898 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) |
2899 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); | 2899 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); |
2900 } | 2900 } |
2901 | 2901 |
2902 #endif | 2902 #endif |
2903 | 2903 |
2904 } // namespace blink | 2904 } // namespace blink |
OLD | NEW |