OLD | NEW |
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 1706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1717 bool PaintLayerScrollableArea::usesCompositedScrolling() const { | 1717 bool PaintLayerScrollableArea::usesCompositedScrolling() const { |
1718 // See https://codereview.chromium.org/176633003/ for the tests that fail | 1718 // See https://codereview.chromium.org/176633003/ for the tests that fail |
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 (frame->view()->mainThreadScrollingReasons()) |
1728 if (page->scrollingCoordinator() | 1728 return true; |
1729 ->shouldUpdateScrollLayerPositionOnMainThread()) | |
1730 return true; | |
1731 } | |
1732 } | 1729 } |
1733 return ScrollableArea::shouldScrollOnMainThread(); | 1730 return ScrollableArea::shouldScrollOnMainThread(); |
1734 } | 1731 } |
1735 | 1732 |
1736 static bool layerNeedsCompositedScrolling( | 1733 static bool layerNeedsCompositedScrolling( |
1737 PaintLayerScrollableArea::LCDTextMode mode, | 1734 PaintLayerScrollableArea::LCDTextMode mode, |
1738 const PaintLayer* layer) { | 1735 const PaintLayer* layer) { |
1739 if (!layer->scrollsOverflow()) | 1736 if (!layer->scrollsOverflow()) |
1740 return false; | 1737 return false; |
1741 | 1738 |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2033 | 2030 |
2034 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: | 2031 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: |
2035 clampScrollableAreas() { | 2032 clampScrollableAreas() { |
2036 for (auto& scrollableArea : *s_needsClamp) | 2033 for (auto& scrollableArea : *s_needsClamp) |
2037 scrollableArea->clampScrollOffsetAfterOverflowChange(); | 2034 scrollableArea->clampScrollOffsetAfterOverflowChange(); |
2038 delete s_needsClamp; | 2035 delete s_needsClamp; |
2039 s_needsClamp = nullptr; | 2036 s_needsClamp = nullptr; |
2040 } | 2037 } |
2041 | 2038 |
2042 } // namespace blink | 2039 } // namespace blink |
OLD | NEW |