| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 #include "core/loader/FrameLoader.h" | 73 #include "core/loader/FrameLoader.h" |
| 74 #include "core/loader/FrameLoaderClient.h" | 74 #include "core/loader/FrameLoaderClient.h" |
| 75 #include "core/page/AutoscrollController.h" | 75 #include "core/page/AutoscrollController.h" |
| 76 #include "core/page/ChromeClient.h" | 76 #include "core/page/ChromeClient.h" |
| 77 #include "core/page/FocusController.h" | 77 #include "core/page/FocusController.h" |
| 78 #include "core/page/FrameTree.h" | 78 #include "core/page/FrameTree.h" |
| 79 #include "core/page/Page.h" | 79 #include "core/page/Page.h" |
| 80 #include "core/page/scrolling/ScrollingCoordinator.h" | 80 #include "core/page/scrolling/ScrollingCoordinator.h" |
| 81 #include "core/paint/FramePainter.h" | 81 #include "core/paint/FramePainter.h" |
| 82 #include "core/paint/PaintLayer.h" | 82 #include "core/paint/PaintLayer.h" |
| 83 #include "core/paint/PaintPropertyTreeBuilder.h" | 83 #include "core/paint/PrePaintTreeWalk.h" |
| 84 #include "core/plugins/PluginView.h" | 84 #include "core/plugins/PluginView.h" |
| 85 #include "core/style/ComputedStyle.h" | 85 #include "core/style/ComputedStyle.h" |
| 86 #include "core/svg/SVGDocumentExtensions.h" | 86 #include "core/svg/SVGDocumentExtensions.h" |
| 87 #include "core/svg/SVGSVGElement.h" | 87 #include "core/svg/SVGSVGElement.h" |
| 88 #include "platform/Histogram.h" | 88 #include "platform/Histogram.h" |
| 89 #include "platform/HostWindow.h" | 89 #include "platform/HostWindow.h" |
| 90 #include "platform/RuntimeEnabledFeatures.h" | 90 #include "platform/RuntimeEnabledFeatures.h" |
| 91 #include "platform/ScriptForbiddenScope.h" | 91 #include "platform/ScriptForbiddenScope.h" |
| 92 #include "platform/TraceEvent.h" | 92 #include "platform/TraceEvent.h" |
| 93 #include "platform/TracedValue.h" | 93 #include "platform/TracedValue.h" |
| (...skipping 2319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2413 } | 2413 } |
| 2414 | 2414 |
| 2415 void FrameView::updateLifecycleToLayoutClean() | 2415 void FrameView::updateLifecycleToLayoutClean() |
| 2416 { | 2416 { |
| 2417 frame().localFrameRoot()->view()->updateLifecyclePhasesInternal(OnlyUpToLayo
utClean); | 2417 frame().localFrameRoot()->view()->updateLifecyclePhasesInternal(OnlyUpToLayo
utClean); |
| 2418 } | 2418 } |
| 2419 | 2419 |
| 2420 void FrameView::scheduleVisualUpdateForPaintInvalidationIfNeeded() | 2420 void FrameView::scheduleVisualUpdateForPaintInvalidationIfNeeded() |
| 2421 { | 2421 { |
| 2422 LocalFrame* localFrameRoot = frame().localFrameRoot(); | 2422 LocalFrame* localFrameRoot = frame().localFrameRoot(); |
| 2423 if (!localFrameRoot->view()->m_isUpdatingAllLifecyclePhases || lifecycle().s
tate() >= DocumentLifecycle::PaintInvalidationClean) { | 2423 if (!localFrameRoot->view()->m_isUpdatingAllLifecyclePhases || lifecycle().s
tate() >= DocumentLifecycle::PrePaintClean) { |
| 2424 // Schedule visual update to process the paint invalidation in the next
cycle. | 2424 // Schedule visual update to process the paint invalidation in the next
cycle. |
| 2425 localFrameRoot->scheduleVisualUpdateUnlessThrottled(); | 2425 localFrameRoot->scheduleVisualUpdateUnlessThrottled(); |
| 2426 } | 2426 } |
| 2427 // Otherwise the paint invalidation will be handled in paint invalidation ph
ase of this cycle. | 2427 // Otherwise the paint invalidation will be handled in paint invalidation ph
ase of this cycle. |
| 2428 } | 2428 } |
| 2429 | 2429 |
| 2430 // TODO(leviw): We don't assert lifecycle information from documents in child Pl
uginViews. | 2430 // TODO(leviw): We don't assert lifecycle information from documents in child Pl
uginViews. |
| 2431 void FrameView::updateLifecyclePhasesInternal(LifeCycleUpdateOption phases) | 2431 void FrameView::updateLifecyclePhasesInternal(LifeCycleUpdateOption phases) |
| 2432 { | 2432 { |
| 2433 Optional<TemporaryChange<bool>> isUpdatingAllLifecyclePhasesScope; | 2433 Optional<TemporaryChange<bool>> isUpdatingAllLifecyclePhasesScope; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2492 | 2492 |
| 2493 updateViewportIntersectionsForSubtree(phases); | 2493 updateViewportIntersectionsForSubtree(phases); |
| 2494 } | 2494 } |
| 2495 | 2495 |
| 2496 void FrameView::updatePaintProperties() | 2496 void FrameView::updatePaintProperties() |
| 2497 { | 2497 { |
| 2498 TRACE_EVENT0("blink", "FrameView::updatePaintProperties"); | 2498 TRACE_EVENT0("blink", "FrameView::updatePaintProperties"); |
| 2499 | 2499 |
| 2500 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); | 2500 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); |
| 2501 | 2501 |
| 2502 forAllNonThrottledFrameViews([](FrameView& frameView) { frameView.lifecycle(
).advanceTo(DocumentLifecycle::InUpdatePaintProperties); }); | 2502 forAllNonThrottledFrameViews([](FrameView& frameView) { frameView.lifecycle(
).advanceTo(DocumentLifecycle::InPrePaint); }); |
| 2503 PaintPropertyTreeBuilder().buildPropertyTrees(*this); | 2503 PrePaintTreeWalk().walk(*this); |
| 2504 forAllNonThrottledFrameViews([](FrameView& frameView) { frameView.lifecycle(
).advanceTo(DocumentLifecycle::UpdatePaintPropertiesClean); }); | 2504 forAllNonThrottledFrameViews([](FrameView& frameView) { frameView.lifecycle(
).advanceTo(DocumentLifecycle::PrePaintClean); }); |
| 2505 } | 2505 } |
| 2506 | 2506 |
| 2507 void FrameView::synchronizedPaint() | 2507 void FrameView::synchronizedPaint() |
| 2508 { | 2508 { |
| 2509 TRACE_EVENT0("blink", "FrameView::synchronizedPaint"); | 2509 TRACE_EVENT0("blink", "FrameView::synchronizedPaint"); |
| 2510 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.Paint.UpdateTime"); | 2510 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.Paint.UpdateTime"); |
| 2511 | 2511 |
| 2512 ASSERT(frame() == page()->mainFrame() || (!frame().tree().parent()->isLocalF
rame())); | 2512 ASSERT(frame() == page()->mainFrame() || (!frame().tree().parent()->isLocalF
rame())); |
| 2513 | 2513 |
| 2514 LayoutViewItem view = layoutViewItem(); | 2514 LayoutViewItem view = layoutViewItem(); |
| (...skipping 1620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4135 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); | 4135 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); |
| 4136 } | 4136 } |
| 4137 | 4137 |
| 4138 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const | 4138 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const |
| 4139 { | 4139 { |
| 4140 ASSERT(!layoutViewItem().isNull()); | 4140 ASSERT(!layoutViewItem().isNull()); |
| 4141 return *layoutView(); | 4141 return *layoutView(); |
| 4142 } | 4142 } |
| 4143 | 4143 |
| 4144 } // namespace blink | 4144 } // namespace blink |
| OLD | NEW |