| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
| 3 * 1999 Lars Knoll <knoll@kde.org> | 3 * 1999 Lars Knoll <knoll@kde.org> |
| 4 * 1999 Antti Koivisto <koivisto@kde.org> | 4 * 1999 Antti Koivisto <koivisto@kde.org> |
| 5 * 2000 Dirk Mueller <mueller@kde.org> | 5 * 2000 Dirk Mueller <mueller@kde.org> |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 9 * Copyright (C) 2009 Google Inc. All rights reserved. | 9 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 10 * | 10 * |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 m_postLayoutTasksTimer.stop(); | 104 m_postLayoutTasksTimer.stop(); |
| 105 | 105 |
| 106 ASSERT(m_frame); | 106 ASSERT(m_frame); |
| 107 ASSERT(m_frame->view() != this || !m_frame->contentRenderer()); | 107 ASSERT(m_frame->view() != this || !m_frame->contentRenderer()); |
| 108 } | 108 } |
| 109 | 109 |
| 110 void FrameView::reset() | 110 void FrameView::reset() |
| 111 { | 111 { |
| 112 m_hasPendingLayout = false; | 112 m_hasPendingLayout = false; |
| 113 m_layoutSubtreeRoot = 0; | 113 m_layoutSubtreeRoot = 0; |
| 114 m_doFullPaintInvalidation = false; | |
| 115 m_layoutSchedulingEnabled = true; | 114 m_layoutSchedulingEnabled = true; |
| 116 m_inPerformLayout = false; | 115 m_inPerformLayout = false; |
| 117 m_canInvalidatePaintDuringPerformLayout = false; | 116 m_canInvalidatePaintDuringPerformLayout = false; |
| 118 m_inSynchronousPostLayout = false; | 117 m_inSynchronousPostLayout = false; |
| 119 m_layoutCount = 0; | 118 m_layoutCount = 0; |
| 120 m_nestedLayoutCount = 0; | 119 m_nestedLayoutCount = 0; |
| 121 m_postLayoutTasksTimer.stop(); | 120 m_postLayoutTasksTimer.stop(); |
| 122 m_firstLayout = true; | 121 m_firstLayout = true; |
| 123 m_firstLayoutCallbackPending = false; | 122 m_firstLayoutCallbackPending = false; |
| 124 m_lastViewportSize = IntSize(); | 123 m_lastViewportSize = IntSize(); |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 | 342 |
| 344 FontCachePurgePreventer fontCachePurgePreventer; | 343 FontCachePurgePreventer fontCachePurgePreventer; |
| 345 RenderLayer* layer; | 344 RenderLayer* layer; |
| 346 { | 345 { |
| 347 TemporaryChange<bool> changeSchedulingEnabled(m_layoutSchedulingEnabled,
false); | 346 TemporaryChange<bool> changeSchedulingEnabled(m_layoutSchedulingEnabled,
false); |
| 348 | 347 |
| 349 m_nestedLayoutCount++; | 348 m_nestedLayoutCount++; |
| 350 | 349 |
| 351 if (!inSubtreeLayout) { | 350 if (!inSubtreeLayout) { |
| 352 if (m_firstLayout) { | 351 if (m_firstLayout) { |
| 353 m_doFullPaintInvalidation = true; | |
| 354 m_firstLayout = false; | 352 m_firstLayout = false; |
| 355 m_firstLayoutCallbackPending = true; | 353 m_firstLayoutCallbackPending = true; |
| 356 m_lastViewportSize = layoutSize(IncludeScrollbars); | 354 m_lastViewportSize = layoutSize(IncludeScrollbars); |
| 357 } | 355 } |
| 358 | 356 |
| 359 m_size = LayoutSize(layoutSize().width(), layoutSize().height()); | 357 m_size = LayoutSize(layoutSize().width(), layoutSize().height()); |
| 360 | |
| 361 // We need to set m_doFullPaintInvalidation before triggering layout
as RenderObject::checkForPaintInvalidation | |
| 362 // checks the boolean to disable local paint invalidations. | |
| 363 m_doFullPaintInvalidation |= renderView()->shouldDoFullPaintInvalida
tionForNextLayout(); | |
| 364 } | 358 } |
| 365 | 359 |
| 366 layer = rootForThisLayout->enclosingLayer(); | 360 layer = rootForThisLayout->enclosingLayer(); |
| 367 | 361 |
| 368 performLayout(rootForThisLayout, inSubtreeLayout); | 362 performLayout(rootForThisLayout, inSubtreeLayout); |
| 369 | 363 |
| 370 m_layoutSubtreeRoot = 0; | 364 m_layoutSubtreeRoot = 0; |
| 371 } // Reset m_layoutSchedulingEnabled to its previous value. | 365 } // Reset m_layoutSchedulingEnabled to its previous value. |
| 372 | 366 |
| 373 layer->updateLayerPositionsAfterLayout(); | 367 layer->updateLayerPositionsAfterLayout(); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 396 // necessitating this check here. | 390 // necessitating this check here. |
| 397 // ASSERT(frame()->page()); | 391 // ASSERT(frame()->page()); |
| 398 if (frame().page()) | 392 if (frame().page()) |
| 399 frame().page()->chrome().client().layoutUpdated(m_frame.get()); | 393 frame().page()->chrome().client().layoutUpdated(m_frame.get()); |
| 400 } | 394 } |
| 401 | 395 |
| 402 // FIXME(sky): Remove | 396 // FIXME(sky): Remove |
| 403 void FrameView::invalidateTreeIfNeeded() | 397 void FrameView::invalidateTreeIfNeeded() |
| 404 { | 398 { |
| 405 lifecycle().advanceTo(DocumentLifecycle::InPaintInvalidation); | 399 lifecycle().advanceTo(DocumentLifecycle::InPaintInvalidation); |
| 406 m_doFullPaintInvalidation = false; | |
| 407 lifecycle().advanceTo(DocumentLifecycle::PaintInvalidationClean); | 400 lifecycle().advanceTo(DocumentLifecycle::PaintInvalidationClean); |
| 408 } | 401 } |
| 409 | 402 |
| 410 DocumentLifecycle& FrameView::lifecycle() const | 403 DocumentLifecycle& FrameView::lifecycle() const |
| 411 { | 404 { |
| 412 return m_frame->document()->lifecycle(); | 405 return m_frame->document()->lifecycle(); |
| 413 } | 406 } |
| 414 | 407 |
| 415 void FrameView::setMediaType(const AtomicString& mediaType) | 408 void FrameView::setMediaType(const AtomicString& mediaType) |
| 416 { | 409 { |
| (...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 934 totalObjects = 0; | 927 totalObjects = 0; |
| 935 | 928 |
| 936 for (RenderObject* o = root; o; o = o->nextInPreOrder(root)) { | 929 for (RenderObject* o = root; o; o = o->nextInPreOrder(root)) { |
| 937 ++totalObjects; | 930 ++totalObjects; |
| 938 if (o->needsLayout()) | 931 if (o->needsLayout()) |
| 939 ++needsLayoutObjects; | 932 ++needsLayoutObjects; |
| 940 } | 933 } |
| 941 } | 934 } |
| 942 | 935 |
| 943 } // namespace blink | 936 } // namespace blink |
| OLD | NEW |