OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. |
4 * All rights reserved. | 4 * All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 } | 228 } |
229 | 229 |
230 void LayoutView::layout() { | 230 void LayoutView::layout() { |
231 if (!document().paginated()) | 231 if (!document().paginated()) |
232 setPageLogicalHeight(LayoutUnit()); | 232 setPageLogicalHeight(LayoutUnit()); |
233 | 233 |
234 setShouldDoFullPaintInvalidationOnResizeIfNeeded(); | 234 setShouldDoFullPaintInvalidationOnResizeIfNeeded(); |
235 | 235 |
236 if (pageLogicalHeight() && shouldUsePrintingLayout()) { | 236 if (pageLogicalHeight() && shouldUsePrintingLayout()) { |
237 m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = logicalWidth(); | 237 m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = logicalWidth(); |
238 if (!m_fragmentationContext) | 238 if (!m_fragmentationContext) { |
239 m_fragmentationContext = wrapUnique(new ViewFragmentationContext(*this)); | 239 m_fragmentationContext = wrapUnique(new ViewFragmentationContext(*this)); |
| 240 m_paginationStateChanged = true; |
| 241 } |
240 } else if (m_fragmentationContext) { | 242 } else if (m_fragmentationContext) { |
241 m_fragmentationContext.reset(); | 243 m_fragmentationContext.reset(); |
| 244 m_paginationStateChanged = true; |
242 } | 245 } |
243 | 246 |
244 SubtreeLayoutScope layoutScope(*this); | 247 SubtreeLayoutScope layoutScope(*this); |
245 | 248 |
246 LayoutRect oldLayoutOverflowRect = layoutOverflowRect(); | 249 LayoutRect oldLayoutOverflowRect = layoutOverflowRect(); |
247 | 250 |
248 // Use calcWidth/Height to get the new width/height, since this will take the | 251 // Use calcWidth/Height to get the new width/height, since this will take the |
249 // full page zoom factor into account. | 252 // full page zoom factor into account. |
250 bool relayoutChildren = | 253 bool relayoutChildren = |
251 !shouldUsePrintingLayout() && | 254 !shouldUsePrintingLayout() && |
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1062 if (block) | 1065 if (block) |
1063 block->adjustChildDebugRect(rect); | 1066 block->adjustChildDebugRect(rect); |
1064 | 1067 |
1065 rect.setWidth(LayoutUnit(viewWidth(IncludeScrollbars))); | 1068 rect.setWidth(LayoutUnit(viewWidth(IncludeScrollbars))); |
1066 rect.setHeight(LayoutUnit(viewHeight(IncludeScrollbars))); | 1069 rect.setHeight(LayoutUnit(viewHeight(IncludeScrollbars))); |
1067 | 1070 |
1068 return rect; | 1071 return rect; |
1069 } | 1072 } |
1070 | 1073 |
1071 } // namespace blink | 1074 } // namespace blink |
OLD | NEW |