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

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: Fixed a memory leak in the test. Created 4 years, 11 months 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/tests/FrameThrottlingTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2357 matching lines...) Expand 10 before | Expand all | Expand 10 after
2368 if (phases == AllPhases) 2368 if (phases == AllPhases)
2369 isUpdatingAllLifecyclePhasesScope.emplace(m_isUpdatingAllLifecyclePhases , true); 2369 isUpdatingAllLifecyclePhasesScope.emplace(m_isUpdatingAllLifecyclePhases , true);
2370 2370
2371 // This must be called from the root frame, since it recurses down, not up. 2371 // This must be called from the root frame, since it recurses down, not up.
2372 // Otherwise the lifecycles of the frames might be out of sync. 2372 // Otherwise the lifecycles of the frames might be out of sync.
2373 ASSERT(m_frame->isLocalRoot()); 2373 ASSERT(m_frame->isLocalRoot());
2374 2374
2375 // Updating layout can run script, which can tear down the FrameView. 2375 // Updating layout can run script, which can tear down the FrameView.
2376 RefPtrWillBeRawPtr<FrameView> protector(this); 2376 RefPtrWillBeRawPtr<FrameView> protector(this);
2377 2377
2378 if (shouldThrottleRendering()) {
2379 updateViewportIntersectionsForSubtree();
2380 return;
2381 }
2382
2378 updateStyleAndLayoutIfNeededRecursive(); 2383 updateStyleAndLayoutIfNeededRecursive();
2379 ASSERT(lifecycle().state() >= DocumentLifecycle::LayoutClean); 2384 ASSERT(lifecycle().state() >= DocumentLifecycle::LayoutClean);
2380 2385
2381 if (phases == OnlyUpToLayoutClean) { 2386 if (phases == OnlyUpToLayoutClean) {
2382 updateViewportIntersectionsForSubtree(); 2387 updateViewportIntersectionsForSubtree();
2383 return; 2388 return;
2384 } 2389 }
2385 2390
2386 if (LayoutView* view = layoutView()) { 2391 if (LayoutView* view = layoutView()) {
2387 { 2392 {
(...skipping 1624 matching lines...) Expand 10 before | Expand all | Expand 10 after
4012 return m_hiddenForThrottling && m_crossOriginForThrottling; 4017 return m_hiddenForThrottling && m_crossOriginForThrottling;
4013 } 4018 }
4014 4019
4015 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const 4020 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const
4016 { 4021 {
4017 ASSERT(layoutView()); 4022 ASSERT(layoutView());
4018 return *layoutView(); 4023 return *layoutView();
4019 } 4024 }
4020 4025
4021 } // namespace blink 4026 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/tests/FrameThrottlingTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698