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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp

Issue 2531603003: Only scroll on main if the targeted frames need to scroll on main (Closed)
Patch Set: Resolve conflict Created 3 years, 12 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * 4 *
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
6 * 6 *
7 * Other contributors: 7 * Other contributors:
8 * Robert O'Callahan <roc+@cs.cmu.edu> 8 * Robert O'Callahan <roc+@cs.cmu.edu>
9 * David Baron <dbaron@fas.harvard.edu> 9 * David Baron <dbaron@fas.harvard.edu>
10 * Christian Biesinger <cbiesinger@gmail.com> 10 * Christian Biesinger <cbiesinger@gmail.com>
(...skipping 1696 matching lines...) Expand 10 before | Expand all | Expand 10 after
1707 1707
1708 bool PaintLayerScrollableArea::usesCompositedScrolling() const { 1708 bool PaintLayerScrollableArea::usesCompositedScrolling() const {
1709 // See https://codereview.chromium.org/176633003/ for the tests that fail 1709 // See https://codereview.chromium.org/176633003/ for the tests that fail
1710 // without this disabler. 1710 // without this disabler.
1711 DisableCompositingQueryAsserts disabler; 1711 DisableCompositingQueryAsserts disabler;
1712 return layer()->hasCompositedLayerMapping() && 1712 return layer()->hasCompositedLayerMapping() &&
1713 layer()->compositedLayerMapping()->scrollingLayer(); 1713 layer()->compositedLayerMapping()->scrollingLayer();
1714 } 1714 }
1715 1715
1716 bool PaintLayerScrollableArea::shouldScrollOnMainThread() const { 1716 bool PaintLayerScrollableArea::shouldScrollOnMainThread() const {
1717 if (ScrollingCoordinator* scrollingCoordinator = getScrollingCoordinator()) { 1717 if (LocalFrame* frame = box().frame()) {
1718 if (scrollingCoordinator->shouldUpdateScrollLayerPositionOnMainThread()) 1718 if (frame->view()->mainThreadScrollingReasons())
1719 return true; 1719 return true;
1720 } 1720 }
1721 return ScrollableArea::shouldScrollOnMainThread(); 1721 return ScrollableArea::shouldScrollOnMainThread();
1722 } 1722 }
1723 1723
1724 static bool layerNeedsCompositedScrolling( 1724 static bool layerNeedsCompositedScrolling(
1725 PaintLayerScrollableArea::LCDTextMode mode, 1725 PaintLayerScrollableArea::LCDTextMode mode,
1726 const PaintLayer* layer) { 1726 const PaintLayer* layer) {
1727 if (!layer->scrollsOverflow()) 1727 if (!layer->scrollsOverflow())
1728 return false; 1728 return false;
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
2026 2026
2027 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: 2027 void PaintLayerScrollableArea::DelayScrollOffsetClampScope::
2028 clampScrollableAreas() { 2028 clampScrollableAreas() {
2029 for (auto& scrollableArea : *s_needsClamp) 2029 for (auto& scrollableArea : *s_needsClamp)
2030 scrollableArea->clampScrollOffsetAfterOverflowChange(); 2030 scrollableArea->clampScrollOffsetAfterOverflowChange();
2031 delete s_needsClamp; 2031 delete s_needsClamp;
2032 s_needsClamp = nullptr; 2032 s_needsClamp = nullptr;
2033 } 2033 }
2034 2034
2035 } // namespace blink 2035 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698