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

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

Issue 2468863002: scheduler: Re-enable timer throttling for hidden frames (Closed)
Patch Set: Rebased Created 4 years 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 | « third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/test-helpers.js ('k') | no next file » | 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 4559 matching lines...) Expand 10 before | Expand all | Expand 10 after
4570 layoutViewItem.invalidatePaintForViewAndCompositedLayers(); 4570 layoutViewItem.invalidatePaintForViewAndCompositedLayers();
4571 } 4571 }
4572 4572
4573 bool hasHandlers = m_frame->host() && 4573 bool hasHandlers = m_frame->host() &&
4574 m_frame->host()->eventHandlerRegistry().hasEventHandlers( 4574 m_frame->host()->eventHandlerRegistry().hasEventHandlers(
4575 EventHandlerRegistry::TouchStartOrMoveEventBlocking); 4575 EventHandlerRegistry::TouchStartOrMoveEventBlocking);
4576 if (wasThrottled != canThrottleRendering() && scrollingCoordinator && 4576 if (wasThrottled != canThrottleRendering() && scrollingCoordinator &&
4577 hasHandlers) 4577 hasHandlers)
4578 scrollingCoordinator->touchEventTargetRectsDidChange(); 4578 scrollingCoordinator->touchEventTargetRectsDidChange();
4579 4579
4580 if (m_frame->frameScheduler()) {
4581 m_frame->frameScheduler()->setFrameVisible(!m_hiddenForThrottling);
4582 m_frame->frameScheduler()->setCrossOrigin(m_frame->isCrossOriginSubframe());
4583 }
4584
4580 #if DCHECK_IS_ON() 4585 #if DCHECK_IS_ON()
4581 // Make sure we never have an unthrottled frame inside a throttled one. 4586 // Make sure we never have an unthrottled frame inside a throttled one.
4582 FrameView* parent = parentFrameView(); 4587 FrameView* parent = parentFrameView();
4583 while (parent) { 4588 while (parent) {
4584 DCHECK(canThrottleRendering() || !parent->canThrottleRendering()); 4589 DCHECK(canThrottleRendering() || !parent->canThrottleRendering());
4585 parent = parent->parentFrameView(); 4590 parent = parent->parentFrameView();
4586 } 4591 }
4587 #endif 4592 #endif
4588 } 4593 }
4589 4594
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
4669 DCHECK(m_frame->isMainFrame()); 4674 DCHECK(m_frame->isMainFrame());
4670 return m_initialViewportSize.width(); 4675 return m_initialViewportSize.width();
4671 } 4676 }
4672 4677
4673 int FrameView::initialViewportHeight() const { 4678 int FrameView::initialViewportHeight() const {
4674 DCHECK(m_frame->isMainFrame()); 4679 DCHECK(m_frame->isMainFrame());
4675 return m_initialViewportSize.height(); 4680 return m_initialViewportSize.height();
4676 } 4681 }
4677 4682
4678 } // namespace blink 4683 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/test-helpers.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698