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

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: Update sub-frame using loops instead of recursion & integrate a patch to fix spv2 problem 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 1708 matching lines...) Expand 10 before | Expand all | Expand 10 after
1719 // without this disabler. 1719 // without this disabler.
1720 DisableCompositingQueryAsserts disabler; 1720 DisableCompositingQueryAsserts disabler;
1721 return layer()->hasCompositedLayerMapping() && 1721 return layer()->hasCompositedLayerMapping() &&
1722 layer()->compositedLayerMapping()->scrollingLayer(); 1722 layer()->compositedLayerMapping()->scrollingLayer();
1723 } 1723 }
1724 1724
1725 bool PaintLayerScrollableArea::shouldScrollOnMainThread() const { 1725 bool PaintLayerScrollableArea::shouldScrollOnMainThread() const {
1726 if (LocalFrame* frame = box().frame()) { 1726 if (LocalFrame* frame = box().frame()) {
1727 if (Page* page = frame->page()) { 1727 if (Page* page = frame->page()) {
1728 if (page->scrollingCoordinator() 1728 if (page->scrollingCoordinator()
1729 ->shouldUpdateScrollLayerPositionOnMainThread()) 1729 ->shouldUpdateScrollLayerPositionOnMainThread(frame))
1730 return true; 1730 return true;
1731 } 1731 }
1732 } 1732 }
1733 return ScrollableArea::shouldScrollOnMainThread(); 1733 return ScrollableArea::shouldScrollOnMainThread();
1734 } 1734 }
1735 1735
1736 static bool layerNeedsCompositedScrolling( 1736 static bool layerNeedsCompositedScrolling(
1737 PaintLayerScrollableArea::LCDTextMode mode, 1737 PaintLayerScrollableArea::LCDTextMode mode,
1738 const PaintLayer* layer) { 1738 const PaintLayer* layer) {
1739 if (!layer->scrollsOverflow()) 1739 if (!layer->scrollsOverflow())
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
2033 2033
2034 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: 2034 void PaintLayerScrollableArea::DelayScrollOffsetClampScope::
2035 clampScrollableAreas() { 2035 clampScrollableAreas() {
2036 for (auto& scrollableArea : *s_needsClamp) 2036 for (auto& scrollableArea : *s_needsClamp)
2037 scrollableArea->clampScrollOffsetAfterOverflowChange(); 2037 scrollableArea->clampScrollOffsetAfterOverflowChange();
2038 delete s_needsClamp; 2038 delete s_needsClamp;
2039 s_needsClamp = nullptr; 2039 s_needsClamp = nullptr;
2040 } 2040 }
2041 2041
2042 } // namespace blink 2042 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698