OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 if (renderer.isOutOfFlowPositioned() && !fixed) { | 65 if (renderer.isOutOfFlowPositioned() && !fixed) { |
66 if (RenderObject* container = renderer.container()) { | 66 if (RenderObject* container = renderer.container()) { |
67 if (container->style()->hasInFlowPosition() && container->isRenderIn
line()) | 67 if (container->style()->hasInFlowPosition() && container->isRenderIn
line()) |
68 m_layoutOffset += toRenderInline(container)->offsetForInFlowPosi
tionedInline(renderer); | 68 m_layoutOffset += toRenderInline(container)->offsetForInFlowPosi
tionedInline(renderer); |
69 } | 69 } |
70 } | 70 } |
71 // If we establish a new page height, then cache the offset to the top of th
e first page. | 71 // If we establish a new page height, then cache the offset to the top of th
e first page. |
72 // We can compare this later on to figure out what part of the page we're ac
tually on, | 72 // We can compare this later on to figure out what part of the page we're ac
tually on, |
73 if (pageLogicalHeight || m_columnInfo || renderer.isRenderFlowThread()) { | 73 if (pageLogicalHeight || m_columnInfo || renderer.isRenderFlowThread()) { |
74 m_pageLogicalHeight = pageLogicalHeight; | 74 m_pageLogicalHeight = pageLogicalHeight; |
75 bool isFlipped = renderer.style()->isFlippedBlocksWritingMode(); | 75 bool isFlipped = renderer.style()->slowIsFlippedBlocksWritingMode(); |
76 m_pageOffset = LayoutSize(m_layoutOffset.width() + (!isFlipped ? rendere
r.borderLeft() + renderer.paddingLeft() : renderer.borderRight() + renderer.padd
ingRight()), | 76 m_pageOffset = LayoutSize(m_layoutOffset.width() + (!isFlipped ? rendere
r.borderLeft() + renderer.paddingLeft() : renderer.borderRight() + renderer.padd
ingRight()), |
77 m_layoutOffset.height() + (!isFlipped ? renderer.borderTop() + rende
rer.paddingTop() : renderer.borderBottom() + renderer.paddingBottom())); | 77 m_layoutOffset.height() + (!isFlipped ? renderer.borderTop() + rende
rer.paddingTop() : renderer.borderBottom() + renderer.paddingBottom())); |
78 m_pageLogicalHeightChanged = pageLogicalHeightChanged; | 78 m_pageLogicalHeightChanged = pageLogicalHeightChanged; |
79 m_isPaginated = true; | 79 m_isPaginated = true; |
80 } else { | 80 } else { |
81 // If we don't establish a new page height, then propagate the old page
height and offset down. | 81 // If we don't establish a new page height, then propagate the old page
height and offset down. |
82 m_pageLogicalHeight = m_next->m_pageLogicalHeight; | 82 m_pageLogicalHeight = m_next->m_pageLogicalHeight; |
83 m_pageLogicalHeightChanged = m_next->m_pageLogicalHeightChanged; | 83 m_pageLogicalHeightChanged = m_next->m_pageLogicalHeightChanged; |
84 m_pageOffset = m_next->m_pageOffset; | 84 m_pageOffset = m_next->m_pageOffset; |
85 | 85 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 } | 144 } |
145 | 145 |
146 void LayoutState::addForcedColumnBreak(const RenderBox& child, const LayoutUnit&
childLogicalOffset) | 146 void LayoutState::addForcedColumnBreak(const RenderBox& child, const LayoutUnit&
childLogicalOffset) |
147 { | 147 { |
148 if (!m_columnInfo || m_columnInfo->columnHeight()) | 148 if (!m_columnInfo || m_columnInfo->columnHeight()) |
149 return; | 149 return; |
150 m_columnInfo->addForcedBreak(pageLogicalOffset(child, childLogicalOffset)); | 150 m_columnInfo->addForcedBreak(pageLogicalOffset(child, childLogicalOffset)); |
151 } | 151 } |
152 | 152 |
153 } // namespace blink | 153 } // namespace blink |
OLD | NEW |