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) 2006 Apple Computer, Inc. | 3 * Copyright (C) 2006 Apple Computer, Inc. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 | 218 |
219 // These functions may only be accessed by LayoutStateMaintainer. | 219 // These functions may only be accessed by LayoutStateMaintainer. |
220 bool pushLayoutState(RenderBox* renderer, const LayoutSize& offset, LayoutUn
it pageHeight = 0, bool pageHeightChanged = false, ColumnInfo* colInfo = 0) | 220 bool pushLayoutState(RenderBox* renderer, const LayoutSize& offset, LayoutUn
it pageHeight = 0, bool pageHeightChanged = false, ColumnInfo* colInfo = 0) |
221 { | 221 { |
222 // We push LayoutState even if layoutState is disabled because it stores
layoutDelta too. | 222 // We push LayoutState even if layoutState is disabled because it stores
layoutDelta too. |
223 if (!doingFullRepaint() || m_layoutState->isPaginated() || renderer->has
Columns() || renderer->flowThreadContainingBlock() | 223 if (!doingFullRepaint() || m_layoutState->isPaginated() || renderer->has
Columns() || renderer->flowThreadContainingBlock() |
224 || m_layoutState->lineGrid() || (renderer->style()->lineGrid() != Re
nderStyle::initialLineGrid() && renderer->isBlockFlow()) | 224 || m_layoutState->lineGrid() || (renderer->style()->lineGrid() != Re
nderStyle::initialLineGrid() && renderer->isBlockFlow()) |
225 || (renderer->isRenderBlock() && toRenderBlock(renderer)->shapeInsid
eInfo()) | 225 || (renderer->isRenderBlock() && toRenderBlock(renderer)->shapeInsid
eInfo()) |
226 || (m_layoutState->shapeInsideInfo() && renderer->isRenderBlock() &&
!toRenderBlock(renderer)->allowsShapeInsideInfoSharing()) | 226 || (m_layoutState->shapeInsideInfo() && renderer->isRenderBlock() &&
!toRenderBlock(renderer)->allowsShapeInsideInfoSharing()) |
227 ) { | 227 ) { |
228 m_layoutState = new (renderArena()) LayoutState(m_layoutState, rende
rer, offset, pageHeight, pageHeightChanged, colInfo); | 228 m_layoutState = new LayoutState(m_layoutState, renderer, offset, pag
eHeight, pageHeightChanged, colInfo); |
229 return true; | 229 return true; |
230 } | 230 } |
231 return false; | 231 return false; |
232 } | 232 } |
233 | 233 |
234 void popLayoutState() | 234 void popLayoutState() |
235 { | 235 { |
236 LayoutState* state = m_layoutState; | 236 LayoutState* state = m_layoutState; |
237 m_layoutState = state->m_next; | 237 m_layoutState = state->m_next; |
238 state->destroy(renderArena()); | 238 delete state; |
239 } | 239 } |
240 | 240 |
241 // Suspends the LayoutState optimization. Used under transforms that cannot
be represented by | 241 // Suspends the LayoutState optimization. Used under transforms that cannot
be represented by |
242 // LayoutState (common in SVG) and when manipulating the render tree during
layout in ways | 242 // LayoutState (common in SVG) and when manipulating the render tree during
layout in ways |
243 // that can trigger repaint of a non-child (e.g. when a list item moves its
list marker around). | 243 // that can trigger repaint of a non-child (e.g. when a list item moves its
list marker around). |
244 // Note that even when disabled, LayoutState is still used to store layoutDe
lta. | 244 // Note that even when disabled, LayoutState is still used to store layoutDe
lta. |
245 // These functions may only be accessed by LayoutStateMaintainer or LayoutSt
ateDisabler. | 245 // These functions may only be accessed by LayoutStateMaintainer or LayoutSt
ateDisabler. |
246 void disableLayoutState() { m_layoutStateDisableCount++; } | 246 void disableLayoutState() { m_layoutStateDisableCount++; } |
247 void enableLayoutState() { ASSERT(m_layoutStateDisableCount > 0); m_layoutSt
ateDisableCount--; } | 247 void enableLayoutState() { ASSERT(m_layoutStateDisableCount > 0); m_layoutSt
ateDisableCount--; } |
248 | 248 |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 RenderObject::FlowThreadState m_flowThreadState; | 401 RenderObject::FlowThreadState m_flowThreadState; |
402 bool m_fragmenting; | 402 bool m_fragmenting; |
403 #ifndef NDEBUG | 403 #ifndef NDEBUG |
404 LayoutState* m_layoutState; | 404 LayoutState* m_layoutState; |
405 #endif | 405 #endif |
406 }; | 406 }; |
407 | 407 |
408 } // namespace WebCore | 408 } // namespace WebCore |
409 | 409 |
410 #endif // RenderView_h | 410 #endif // RenderView_h |
OLD | NEW |