Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 1411463004: Allow local root FrameView to be throttled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 2350 matching lines...) Expand 10 before | Expand all | Expand 10 after
2361 2361
2362 void FrameView::updateLifecyclePhasesInternal(LifeCycleUpdateOption phases) 2362 void FrameView::updateLifecyclePhasesInternal(LifeCycleUpdateOption phases)
2363 { 2363 {
2364 // This must be called from the root frame, since it recurses down, not up. 2364 // 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. 2365 // Otherwise the lifecycles of the frames might be out of sync.
2366 ASSERT(m_frame->isLocalRoot()); 2366 ASSERT(m_frame->isLocalRoot());
2367 2367
2368 // Updating layout can run script, which can tear down the FrameView. 2368 // Updating layout can run script, which can tear down the FrameView.
2369 RefPtrWillBeRawPtr<FrameView> protector(this); 2369 RefPtrWillBeRawPtr<FrameView> protector(this);
2370 2370
2371 if (shouldThrottleRendering()) {
2372 updateViewportIntersectionsForSubtree();
ojan 2015/12/01 01:11:05 Do we need to update the intersections for the sub
Sami 2015/12/04 18:39:53 We need to update the subtree in both cases becaus
2373 return;
2374 }
2375
2371 updateStyleAndLayoutIfNeededRecursive(); 2376 updateStyleAndLayoutIfNeededRecursive();
2372 ASSERT(lifecycle().state() >= DocumentLifecycle::LayoutClean); 2377 ASSERT(lifecycle().state() >= DocumentLifecycle::LayoutClean);
2373 2378
2374 if (phases == OnlyUpToLayoutClean) { 2379 if (phases == OnlyUpToLayoutClean) {
2375 updateViewportIntersectionsForSubtree(); 2380 updateViewportIntersectionsForSubtree();
2376 return; 2381 return;
2377 } 2382 }
2378 2383
2379 if (LayoutView* view = layoutView()) { 2384 if (LayoutView* view = layoutView()) {
2380 TRACE_EVENT1("devtools.timeline", "UpdateLayerTree", "data", InspectorUp dateLayerTreeEvent::data(m_frame.get())); 2385 TRACE_EVENT1("devtools.timeline", "UpdateLayerTree", "data", InspectorUp dateLayerTreeEvent::data(m_frame.get()));
(...skipping 1596 matching lines...) Expand 10 before | Expand all | Expand 10 after
3977 return m_hiddenForThrottling && m_crossOriginForThrottling; 3982 return m_hiddenForThrottling && m_crossOriginForThrottling;
3978 } 3983 }
3979 3984
3980 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const 3985 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const
3981 { 3986 {
3982 ASSERT(layoutView()); 3987 ASSERT(layoutView());
3983 return *layoutView(); 3988 return *layoutView();
3984 } 3989 }
3985 3990
3986 } // namespace blink 3991 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698