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

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: Fix compiling error due to using backslash at the end of a commenting line" 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
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 1687 matching lines...) Expand 10 before | Expand all | Expand 10 after
1698 bool PaintLayerScrollableArea::usesCompositedScrolling() const { 1698 bool PaintLayerScrollableArea::usesCompositedScrolling() const {
1699 // See https://codereview.chromium.org/176633003/ for the tests that fail 1699 // See https://codereview.chromium.org/176633003/ for the tests that fail
1700 // without this disabler. 1700 // without this disabler.
1701 DisableCompositingQueryAsserts disabler; 1701 DisableCompositingQueryAsserts disabler;
1702 return layer()->hasCompositedLayerMapping() && 1702 return layer()->hasCompositedLayerMapping() &&
1703 layer()->compositedLayerMapping()->scrollingLayer(); 1703 layer()->compositedLayerMapping()->scrollingLayer();
1704 } 1704 }
1705 1705
1706 bool PaintLayerScrollableArea::shouldScrollOnMainThread() const { 1706 bool PaintLayerScrollableArea::shouldScrollOnMainThread() const {
1707 if (LocalFrame* frame = box().frame()) { 1707 if (LocalFrame* frame = box().frame()) {
1708 if (Page* page = frame->page()) { 1708 if (frame->view()->mainThreadScrollingReasons())
1709 if (page->scrollingCoordinator() 1709 return true;
1710 ->shouldUpdateScrollLayerPositionOnMainThread())
1711 return true;
1712 }
1713 } 1710 }
1714 return ScrollableArea::shouldScrollOnMainThread(); 1711 return ScrollableArea::shouldScrollOnMainThread();
1715 } 1712 }
1716 1713
1717 static bool layerNeedsCompositedScrolling( 1714 static bool layerNeedsCompositedScrolling(
1718 PaintLayerScrollableArea::LCDTextMode mode, 1715 PaintLayerScrollableArea::LCDTextMode mode,
1719 const PaintLayer* layer) { 1716 const PaintLayer* layer) {
1720 if (!layer->scrollsOverflow()) 1717 if (!layer->scrollsOverflow())
1721 return false; 1718 return false;
1722 1719
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
2014 2011
2015 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: 2012 void PaintLayerScrollableArea::DelayScrollOffsetClampScope::
2016 clampScrollableAreas() { 2013 clampScrollableAreas() {
2017 for (auto& scrollableArea : *s_needsClamp) 2014 for (auto& scrollableArea : *s_needsClamp)
2018 scrollableArea->clampScrollOffsetAfterOverflowChange(); 2015 scrollableArea->clampScrollOffsetAfterOverflowChange();
2019 delete s_needsClamp; 2016 delete s_needsClamp;
2020 s_needsClamp = nullptr; 2017 s_needsClamp = nullptr;
2021 } 2018 }
2022 2019
2023 } // namespace blink 2020 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698