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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 LayoutState::LayoutState(RenderObject& root) | 105 LayoutState::LayoutState(RenderObject& root) |
106 : m_isPaginated(false) | 106 : m_isPaginated(false) |
107 , m_pageLogicalHeightChanged(false) | 107 , m_pageLogicalHeightChanged(false) |
108 , m_containingBlockLogicalWidthChanged(false) | 108 , m_containingBlockLogicalWidthChanged(false) |
109 , m_flowThread(0) | 109 , m_flowThread(0) |
110 , m_columnInfo(0) | 110 , m_columnInfo(0) |
111 , m_next(root.view()->layoutState()) | 111 , m_next(root.view()->layoutState()) |
112 , m_pageLogicalHeight(0) | 112 , m_pageLogicalHeight(0) |
113 , m_renderer(root) | 113 , m_renderer(root) |
114 { | 114 { |
115 // FIXME: Why does RenderTableSection create this wonky LayoutState? | 115 ASSERT(!m_next); |
116 ASSERT(!m_next || root.isTableSection()); | |
117 // We'll end up pushing in RenderView itself, so don't bother adding it. | 116 // We'll end up pushing in RenderView itself, so don't bother adding it. |
118 if (root.isRenderView()) | 117 if (root.isRenderView()) |
119 return; | 118 return; |
120 | 119 |
121 root.view()->pushLayoutState(*this); | 120 root.view()->pushLayoutState(*this); |
122 | 121 |
123 RenderObject* container = root.container(); | 122 RenderObject* container = root.container(); |
124 FloatPoint absContentPoint = container->localToAbsolute(FloatPoint(), UseTra
nsforms); | 123 FloatPoint absContentPoint = container->localToAbsolute(FloatPoint(), UseTra
nsforms); |
125 m_layoutOffset = LayoutSize(absContentPoint.x(), absContentPoint.y()); | 124 m_layoutOffset = LayoutSize(absContentPoint.x(), absContentPoint.y()); |
126 } | 125 } |
(...skipping 21 matching lines...) Expand all Loading... |
148 } | 147 } |
149 | 148 |
150 void LayoutState::addForcedColumnBreak(const RenderBox& child, const LayoutUnit&
childLogicalOffset) | 149 void LayoutState::addForcedColumnBreak(const RenderBox& child, const LayoutUnit&
childLogicalOffset) |
151 { | 150 { |
152 if (!m_columnInfo || m_columnInfo->columnHeight()) | 151 if (!m_columnInfo || m_columnInfo->columnHeight()) |
153 return; | 152 return; |
154 m_columnInfo->addForcedBreak(pageLogicalOffset(child, childLogicalOffset)); | 153 m_columnInfo->addForcedBreak(pageLogicalOffset(child, childLogicalOffset)); |
155 } | 154 } |
156 | 155 |
157 } // namespace blink | 156 } // namespace blink |
OLD | NEW |