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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 #include "platform/ScriptForbiddenScope.h" | 85 #include "platform/ScriptForbiddenScope.h" |
86 #include "platform/TraceEvent.h" | 86 #include "platform/TraceEvent.h" |
87 #include "platform/TracedValue.h" | 87 #include "platform/TracedValue.h" |
88 #include "platform/fonts/FontCache.h" | 88 #include "platform/fonts/FontCache.h" |
89 #include "platform/geometry/DoubleRect.h" | 89 #include "platform/geometry/DoubleRect.h" |
90 #include "platform/geometry/FloatRect.h" | 90 #include "platform/geometry/FloatRect.h" |
91 #include "platform/geometry/LayoutRect.h" | 91 #include "platform/geometry/LayoutRect.h" |
92 #include "platform/graphics/GraphicsContext.h" | 92 #include "platform/graphics/GraphicsContext.h" |
93 #include "platform/graphics/GraphicsLayer.h" | 93 #include "platform/graphics/GraphicsLayer.h" |
94 #include "platform/graphics/GraphicsLayerDebugInfo.h" | 94 #include "platform/graphics/GraphicsLayerDebugInfo.h" |
| 95 #include "platform/graphics/GraphicsScreen.h" |
95 #include "platform/graphics/paint/CullRect.h" | 96 #include "platform/graphics/paint/CullRect.h" |
96 #include "platform/graphics/paint/PaintController.h" | 97 #include "platform/graphics/paint/PaintController.h" |
97 #include "platform/scheduler/CancellableTaskFactory.h" | 98 #include "platform/scheduler/CancellableTaskFactory.h" |
98 #include "platform/scroll/ScrollAnimatorBase.h" | 99 #include "platform/scroll/ScrollAnimatorBase.h" |
99 #include "platform/text/TextStream.h" | 100 #include "platform/text/TextStream.h" |
100 #include "public/platform/WebDisplayItemList.h" | 101 #include "public/platform/WebDisplayItemList.h" |
101 #include "public/platform/WebFrameScheduler.h" | 102 #include "public/platform/WebFrameScheduler.h" |
102 #include "wtf/CurrentTime.h" | 103 #include "wtf/CurrentTime.h" |
103 #include "wtf/StdLibExtras.h" | 104 #include "wtf/StdLibExtras.h" |
104 #include "wtf/TemporaryChange.h" | 105 #include "wtf/TemporaryChange.h" |
(...skipping 2256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2361 | 2362 |
2362 void FrameView::updateLifecyclePhasesInternal(LifeCycleUpdateOption phases) | 2363 void FrameView::updateLifecyclePhasesInternal(LifeCycleUpdateOption phases) |
2363 { | 2364 { |
2364 // This must be called from the root frame, since it recurses down, not up. | 2365 // This must be called from the root frame, since it recurses down, not up. |
2365 // Otherwise the lifecycles of the frames might be out of sync. | 2366 // Otherwise the lifecycles of the frames might be out of sync. |
2366 ASSERT(m_frame->isLocalRoot()); | 2367 ASSERT(m_frame->isLocalRoot()); |
2367 | 2368 |
2368 // Updating layout can run script, which can tear down the FrameView. | 2369 // Updating layout can run script, which can tear down the FrameView. |
2369 RefPtrWillBeRawPtr<FrameView> protector(this); | 2370 RefPtrWillBeRawPtr<FrameView> protector(this); |
2370 | 2371 |
| 2372 int64_t previousId = setCurrentScreenId(reinterpret_cast<int64_t>(page())); |
| 2373 fflush(stderr); |
| 2374 |
2371 updateStyleAndLayoutIfNeededRecursive(); | 2375 updateStyleAndLayoutIfNeededRecursive(); |
2372 ASSERT(lifecycle().state() >= DocumentLifecycle::LayoutClean); | 2376 ASSERT(lifecycle().state() >= DocumentLifecycle::LayoutClean); |
2373 | 2377 |
2374 if (phases == OnlyUpToLayoutClean) { | 2378 if (phases == OnlyUpToLayoutClean) { |
2375 updateViewportIntersectionsForSubtree(); | 2379 updateViewportIntersectionsForSubtree(); |
| 2380 setCurrentScreenId(previousId); |
| 2381 fflush(stderr); |
2376 return; | 2382 return; |
2377 } | 2383 } |
2378 | 2384 |
2379 if (LayoutView* view = layoutView()) { | 2385 if (LayoutView* view = layoutView()) { |
2380 { | 2386 { |
2381 TRACE_EVENT1("devtools.timeline", "UpdateLayerTree", "data", Inspect
orUpdateLayerTreeEvent::data(m_frame.get())); | 2387 TRACE_EVENT1("devtools.timeline", "UpdateLayerTree", "data", Inspect
orUpdateLayerTreeEvent::data(m_frame.get())); |
2382 | 2388 |
2383 // This was required for slimming paint v1 but is only temporarily | 2389 // This was required for slimming paint v1 but is only temporarily |
2384 // needed for slimming paint v2. | 2390 // needed for slimming paint v2. |
2385 view->compositor()->updateIfNeededRecursive(); | 2391 view->compositor()->updateIfNeededRecursive(); |
(...skipping 21 matching lines...) Expand all Loading... |
2407 if (RuntimeEnabledFeatures::frameTimingSupportEnabled()) | 2413 if (RuntimeEnabledFeatures::frameTimingSupportEnabled()) |
2408 updateFrameTimingRequestsIfNeeded(); | 2414 updateFrameTimingRequestsIfNeeded(); |
2409 | 2415 |
2410 ASSERT(!view->hasPendingSelection()); | 2416 ASSERT(!view->hasPendingSelection()); |
2411 ASSERT(lifecycle().state() == DocumentLifecycle::PaintInvalidationCl
ean | 2417 ASSERT(lifecycle().state() == DocumentLifecycle::PaintInvalidationCl
ean |
2412 || (RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEna
bled() && lifecycle().state() == DocumentLifecycle::PaintClean)); | 2418 || (RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEna
bled() && lifecycle().state() == DocumentLifecycle::PaintClean)); |
2413 } | 2419 } |
2414 } | 2420 } |
2415 | 2421 |
2416 updateViewportIntersectionsForSubtree(); | 2422 updateViewportIntersectionsForSubtree(); |
| 2423 setCurrentScreenId(previousId); |
| 2424 fflush(stderr); |
2417 } | 2425 } |
2418 | 2426 |
2419 void FrameView::updatePaintProperties() | 2427 void FrameView::updatePaintProperties() |
2420 { | 2428 { |
2421 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); | 2429 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); |
2422 | 2430 |
2423 forAllNonThrottledFrameViews([](FrameView& frameView) { frameView.lifecycle(
).advanceTo(DocumentLifecycle::InUpdatePaintProperties); }); | 2431 forAllNonThrottledFrameViews([](FrameView& frameView) { frameView.lifecycle(
).advanceTo(DocumentLifecycle::InUpdatePaintProperties); }); |
2424 PaintPropertyTreeBuilder().buildPropertyTrees(*this); | 2432 PaintPropertyTreeBuilder().buildPropertyTrees(*this); |
2425 forAllNonThrottledFrameViews([](FrameView& frameView) { frameView.lifecycle(
).advanceTo(DocumentLifecycle::UpdatePaintPropertiesClean); }); | 2433 forAllNonThrottledFrameViews([](FrameView& frameView) { frameView.lifecycle(
).advanceTo(DocumentLifecycle::UpdatePaintPropertiesClean); }); |
2426 } | 2434 } |
(...skipping 1554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3981 return m_hiddenForThrottling && m_crossOriginForThrottling; | 3989 return m_hiddenForThrottling && m_crossOriginForThrottling; |
3982 } | 3990 } |
3983 | 3991 |
3984 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const | 3992 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const |
3985 { | 3993 { |
3986 ASSERT(layoutView()); | 3994 ASSERT(layoutView()); |
3987 return *layoutView(); | 3995 return *layoutView(); |
3988 } | 3996 } |
3989 | 3997 |
3990 } // namespace blink | 3998 } // namespace blink |
OLD | NEW |