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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 #if !ASSERT_DISABLED | 116 #if !ASSERT_DISABLED |
117 bool layoutDeltaMatches(const LayoutSize& delta) | 117 bool layoutDeltaMatches(const LayoutSize& delta) |
118 { | 118 { |
119 ASSERT(!RuntimeEnabledFeatures::repaintAfterLayoutEnabled()); | 119 ASSERT(!RuntimeEnabledFeatures::repaintAfterLayoutEnabled()); |
120 if (!m_layoutState) | 120 if (!m_layoutState) |
121 return false; | 121 return false; |
122 return (delta.width() == m_layoutState->layoutDelta().width() || m_layou
tState->layoutDeltaXSaturated()) && (delta.height() == m_layoutState->layoutDelt
a().height() || m_layoutState->layoutDeltaYSaturated()); | 122 return (delta.width() == m_layoutState->layoutDelta().width() || m_layou
tState->layoutDeltaXSaturated()) && (delta.height() == m_layoutState->layoutDelt
a().height() || m_layoutState->layoutDeltaYSaturated()); |
123 } | 123 } |
124 #endif | 124 #endif |
125 | 125 |
126 bool doingFullRepaint() const { return m_frameView->needsFullRepaint(); } | |
127 | |
128 // Subtree push | 126 // Subtree push |
129 void pushLayoutState(RenderObject&); | 127 void pushLayoutState(RenderObject&); |
130 | 128 |
131 void popLayoutState() | 129 void popLayoutState() |
132 { | 130 { |
133 LayoutState* state = m_layoutState; | 131 LayoutState* state = m_layoutState; |
134 m_layoutState = state->next(); | 132 m_layoutState = state->next(); |
135 delete state; | 133 delete state; |
136 popLayoutStateForCurrentFlowThread(); | 134 popLayoutStateForCurrentFlowThread(); |
137 } | 135 } |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint&
layerOffset) const OVERRIDE; | 207 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint&
layerOffset) const OVERRIDE; |
210 | 208 |
211 bool shouldRepaint(const LayoutRect&) const; | 209 bool shouldRepaint(const LayoutRect&) const; |
212 | 210 |
213 bool rootFillsViewportBackground(RenderBox* rootBox) const; | 211 bool rootFillsViewportBackground(RenderBox* rootBox) const; |
214 | 212 |
215 // These functions may only be accessed by LayoutStateMaintainer. | 213 // These functions may only be accessed by LayoutStateMaintainer. |
216 bool pushLayoutState(RenderBox& renderer, const LayoutSize& offset, LayoutUn
it pageHeight = 0, bool pageHeightChanged = false, ColumnInfo* colInfo = 0) | 214 bool pushLayoutState(RenderBox& renderer, const LayoutSize& offset, LayoutUn
it pageHeight = 0, bool pageHeightChanged = false, ColumnInfo* colInfo = 0) |
217 { | 215 { |
218 // We push LayoutState even if layoutState is disabled because it stores
layoutDelta too. | 216 // We push LayoutState even if layoutState is disabled because it stores
layoutDelta too. |
219 if ((!doingFullRepaint() || (RuntimeEnabledFeatures::repaintAfterLayoutE
nabled() && layoutStateEnabled())) || m_layoutState->isPaginated() || renderer.h
asColumns() || renderer.flowThreadContainingBlock() | 217 if (!shouldDoFullRepaintAfterLayout() |
220 ) { | 218 || (RuntimeEnabledFeatures::repaintAfterLayoutEnabled() && layoutSta
teEnabled()) |
| 219 || m_layoutState->isPaginated() |
| 220 || renderer.hasColumns() |
| 221 || renderer.flowThreadContainingBlock()) { |
221 pushLayoutStateForCurrentFlowThread(renderer); | 222 pushLayoutStateForCurrentFlowThread(renderer); |
222 m_layoutState = new LayoutState(m_layoutState, renderer, offset, pag
eHeight, pageHeightChanged, colInfo); | 223 m_layoutState = new LayoutState(m_layoutState, renderer, offset, pag
eHeight, pageHeightChanged, colInfo); |
223 return true; | 224 return true; |
224 } | 225 } |
225 return false; | 226 return false; |
226 } | 227 } |
227 | 228 |
228 void layoutContent(); | 229 void layoutContent(); |
229 #ifndef NDEBUG | 230 #ifndef NDEBUG |
230 void checkLayoutState(); | 231 void checkLayoutState(); |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 { | 375 { |
375 m_view.enableLayoutState(); | 376 m_view.enableLayoutState(); |
376 } | 377 } |
377 private: | 378 private: |
378 RenderView& m_view; | 379 RenderView& m_view; |
379 }; | 380 }; |
380 | 381 |
381 } // namespace WebCore | 382 } // namespace WebCore |
382 | 383 |
383 #endif // RenderView_h | 384 #endif // RenderView_h |
OLD | NEW |