| 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 1234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1245 // Remove or update this code. crbug.com/460596 | 1245 // Remove or update this code. crbug.com/460596 |
| 1246 TRACE_EVENT_END1("devtools.timeline", "Layout", "endData", | 1246 TRACE_EVENT_END1("devtools.timeline", "Layout", "endData", |
| 1247 InspectorLayoutEvent::endData(rootForThisLayout)); | 1247 InspectorLayoutEvent::endData(rootForThisLayout)); |
| 1248 InspectorInstrumentation::didUpdateLayout(m_frame.get()); | 1248 InspectorInstrumentation::didUpdateLayout(m_frame.get()); |
| 1249 PerformanceMonitor::didUpdateLayout(document); | 1249 PerformanceMonitor::didUpdateLayout(document); |
| 1250 | 1250 |
| 1251 m_nestedLayoutCount--; | 1251 m_nestedLayoutCount--; |
| 1252 if (m_nestedLayoutCount) | 1252 if (m_nestedLayoutCount) |
| 1253 return; | 1253 return; |
| 1254 | 1254 |
| 1255 #if ENABLE(ASSERT) | 1255 #if DCHECK_IS_ON() |
| 1256 // Post-layout assert that nobody was re-marked as needing layout during | 1256 // Post-layout assert that nobody was re-marked as needing layout during |
| 1257 // layout. | 1257 // layout. |
| 1258 layoutView()->assertSubtreeIsLaidOut(); | 1258 layoutView()->assertSubtreeIsLaidOut(); |
| 1259 #endif | 1259 #endif |
| 1260 | 1260 |
| 1261 frame().document()->layoutUpdated(); | 1261 frame().document()->layoutUpdated(); |
| 1262 checkDoesNotNeedLayout(); | 1262 checkDoesNotNeedLayout(); |
| 1263 } | 1263 } |
| 1264 | 1264 |
| 1265 void FrameView::invalidateTreeIfNeeded( | 1265 void FrameView::invalidateTreeIfNeeded( |
| 1266 const PaintInvalidationState& paintInvalidationState) { | 1266 const PaintInvalidationState& paintInvalidationState) { |
| 1267 DCHECK(!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()); | 1267 DCHECK(!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()); |
| 1268 | 1268 |
| 1269 if (shouldThrottleRendering()) | 1269 if (shouldThrottleRendering()) |
| 1270 return; | 1270 return; |
| 1271 | 1271 |
| 1272 lifecycle().advanceTo(DocumentLifecycle::InPaintInvalidation); | 1272 lifecycle().advanceTo(DocumentLifecycle::InPaintInvalidation); |
| 1273 | 1273 |
| 1274 RELEASE_ASSERT(!layoutViewItem().isNull()); | 1274 RELEASE_ASSERT(!layoutViewItem().isNull()); |
| 1275 LayoutViewItem rootForPaintInvalidation = layoutViewItem(); | 1275 LayoutViewItem rootForPaintInvalidation = layoutViewItem(); |
| 1276 ASSERT(!rootForPaintInvalidation.needsLayout()); | 1276 ASSERT(!rootForPaintInvalidation.needsLayout()); |
| 1277 | 1277 |
| 1278 TRACE_EVENT1("blink", "FrameView::invalidateTree", "root", | 1278 TRACE_EVENT1("blink", "FrameView::invalidateTree", "root", |
| 1279 rootForPaintInvalidation.debugName().ascii()); | 1279 rootForPaintInvalidation.debugName().ascii()); |
| 1280 | 1280 |
| 1281 invalidatePaintIfNeeded(paintInvalidationState); | 1281 invalidatePaintIfNeeded(paintInvalidationState); |
| 1282 rootForPaintInvalidation.invalidateTreeIfNeeded(paintInvalidationState); | 1282 rootForPaintInvalidation.invalidateTreeIfNeeded(paintInvalidationState); |
| 1283 | 1283 |
| 1284 #if ENABLE(ASSERT) | 1284 #if DCHECK_IS_ON() |
| 1285 layoutView()->assertSubtreeClearedPaintInvalidationFlags(); | 1285 layoutView()->assertSubtreeClearedPaintInvalidationFlags(); |
| 1286 #endif | 1286 #endif |
| 1287 | 1287 |
| 1288 lifecycle().advanceTo(DocumentLifecycle::PaintInvalidationClean); | 1288 lifecycle().advanceTo(DocumentLifecycle::PaintInvalidationClean); |
| 1289 } | 1289 } |
| 1290 | 1290 |
| 1291 void FrameView::invalidatePaintIfNeeded( | 1291 void FrameView::invalidatePaintIfNeeded( |
| 1292 const PaintInvalidationState& paintInvalidationState) { | 1292 const PaintInvalidationState& paintInvalidationState) { |
| 1293 RELEASE_ASSERT(!layoutViewItem().isNull()); | 1293 RELEASE_ASSERT(!layoutViewItem().isNull()); |
| 1294 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) | 1294 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) |
| (...skipping 1804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3099 if (FrameView* view = toLocalFrame(child)->view()) | 3099 if (FrameView* view = toLocalFrame(child)->view()) |
| 3100 frameViews.append(view); | 3100 frameViews.append(view); |
| 3101 } | 3101 } |
| 3102 | 3102 |
| 3103 for (const auto& frameView : frameViews) | 3103 for (const auto& frameView : frameViews) |
| 3104 frameView->updateStyleAndLayoutIfNeededRecursiveInternal(); | 3104 frameView->updateStyleAndLayoutIfNeededRecursiveInternal(); |
| 3105 | 3105 |
| 3106 // These asserts ensure that parent frames are clean, when child frames | 3106 // These asserts ensure that parent frames are clean, when child frames |
| 3107 // finished updating layout and style. | 3107 // finished updating layout and style. |
| 3108 checkDoesNotNeedLayout(); | 3108 checkDoesNotNeedLayout(); |
| 3109 #if ENABLE(ASSERT) | 3109 #if DCHECK_IS_ON() |
| 3110 m_frame->document()->layoutView()->assertLaidOut(); | 3110 m_frame->document()->layoutView()->assertLaidOut(); |
| 3111 #endif | 3111 #endif |
| 3112 | 3112 |
| 3113 updateWidgetGeometriesIfNeeded(); | 3113 updateWidgetGeometriesIfNeeded(); |
| 3114 | 3114 |
| 3115 if (lifecycle().state() < DocumentLifecycle::LayoutClean) | 3115 if (lifecycle().state() < DocumentLifecycle::LayoutClean) |
| 3116 lifecycle().advanceTo(DocumentLifecycle::LayoutClean); | 3116 lifecycle().advanceTo(DocumentLifecycle::LayoutClean); |
| 3117 | 3117 |
| 3118 // Ensure that we become visually non-empty eventually. | 3118 // Ensure that we become visually non-empty eventually. |
| 3119 // TODO(esprehn): This should check isRenderingReady() instead. | 3119 // TODO(esprehn): This should check isRenderingReady() instead. |
| (...skipping 1536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4656 DCHECK(m_frame->isMainFrame()); | 4656 DCHECK(m_frame->isMainFrame()); |
| 4657 return m_initialViewportSize.width(); | 4657 return m_initialViewportSize.width(); |
| 4658 } | 4658 } |
| 4659 | 4659 |
| 4660 int FrameView::initialViewportHeight() const { | 4660 int FrameView::initialViewportHeight() const { |
| 4661 DCHECK(m_frame->isMainFrame()); | 4661 DCHECK(m_frame->isMainFrame()); |
| 4662 return m_initialViewportSize.height(); | 4662 return m_initialViewportSize.height(); |
| 4663 } | 4663 } |
| 4664 | 4664 |
| 4665 } // namespace blink | 4665 } // namespace blink |
| OLD | NEW |