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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 ASSERT(!view.layoutState()); | 45 ASSERT(!view.layoutState()); |
46 view.pushLayoutState(*this); | 46 view.pushLayoutState(*this); |
47 } | 47 } |
48 | 48 |
49 LayoutState::LayoutState(LayoutBox& renderer, const LayoutSize& offset, LayoutUn
it pageLogicalHeight, bool pageLogicalHeightChanged, ColumnInfo* columnInfo, boo
l containingBlockLogicalWidthChanged) | 49 LayoutState::LayoutState(LayoutBox& renderer, const LayoutSize& offset, LayoutUn
it pageLogicalHeight, bool pageLogicalHeightChanged, ColumnInfo* columnInfo, boo
l containingBlockLogicalWidthChanged) |
50 : m_containingBlockLogicalWidthChanged(containingBlockLogicalWidthChanged) | 50 : m_containingBlockLogicalWidthChanged(containingBlockLogicalWidthChanged) |
51 , m_columnInfo(columnInfo) | 51 , m_columnInfo(columnInfo) |
52 , m_next(renderer.view()->layoutState()) | 52 , m_next(renderer.view()->layoutState()) |
53 , m_renderer(renderer) | 53 , m_renderer(renderer) |
54 { | 54 { |
55 m_flowThread = renderer.isLayoutFlowThread() ? toLayoutFlowThread(&renderer)
: m_next->flowThread(); | 55 if (renderer.isLayoutFlowThread()) |
| 56 m_flowThread = toLayoutFlowThread(&renderer); |
| 57 else if (!renderer.isOutOfFlowPositioned() && !renderer.isColumnSpanAll()) |
| 58 m_flowThread = m_next->flowThread(); |
| 59 else |
| 60 m_flowThread = nullptr; |
56 renderer.view()->pushLayoutState(*this); | 61 renderer.view()->pushLayoutState(*this); |
57 bool fixed = renderer.isOutOfFlowPositioned() && renderer.style()->position(
) == FixedPosition; | 62 bool fixed = renderer.isOutOfFlowPositioned() && renderer.style()->position(
) == FixedPosition; |
58 if (fixed) { | 63 if (fixed) { |
59 // FIXME: This doesn't work correctly with transforms. | 64 // FIXME: This doesn't work correctly with transforms. |
60 FloatPoint fixedOffset = renderer.view()->localToAbsolute(FloatPoint(),
IsFixed); | 65 FloatPoint fixedOffset = renderer.view()->localToAbsolute(FloatPoint(),
IsFixed); |
61 m_layoutOffset = LayoutSize(fixedOffset.x(), fixedOffset.y()) + offset; | 66 m_layoutOffset = LayoutSize(fixedOffset.x(), fixedOffset.y()) + offset; |
62 } else { | 67 } else { |
63 m_layoutOffset = m_next->m_layoutOffset + offset; | 68 m_layoutOffset = m_next->m_layoutOffset + offset; |
64 } | 69 } |
65 | 70 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 } | 150 } |
146 | 151 |
147 void LayoutState::addForcedColumnBreak(const LayoutBox& child, const LayoutUnit&
childLogicalOffset) | 152 void LayoutState::addForcedColumnBreak(const LayoutBox& child, const LayoutUnit&
childLogicalOffset) |
148 { | 153 { |
149 if (!m_columnInfo || m_columnInfo->columnHeight()) | 154 if (!m_columnInfo || m_columnInfo->columnHeight()) |
150 return; | 155 return; |
151 m_columnInfo->addForcedBreak(pageLogicalOffset(child, childLogicalOffset)); | 156 m_columnInfo->addForcedBreak(pageLogicalOffset(child, childLogicalOffset)); |
152 } | 157 } |
153 | 158 |
154 } // namespace blink | 159 } // namespace blink |
OLD | NEW |