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

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

Issue 2559273003: Blink Compositor Animation: Introduce CompositorAnimationHost correctly. (Closed)
Patch Set: Add nullcheck for m_layerTreeView in WebViewImpl 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 1795 matching lines...) Expand 10 before | Expand all | Expand 10 after
1806 1806
1807 Widget* PaintLayerScrollableArea::getWidget() { 1807 Widget* PaintLayerScrollableArea::getWidget() {
1808 return box().frame()->view(); 1808 return box().frame()->view();
1809 } 1809 }
1810 1810
1811 void PaintLayerScrollableArea::resetRebuildScrollbarLayerFlags() { 1811 void PaintLayerScrollableArea::resetRebuildScrollbarLayerFlags() {
1812 m_rebuildHorizontalScrollbarLayer = false; 1812 m_rebuildHorizontalScrollbarLayer = false;
1813 m_rebuildVerticalScrollbarLayer = false; 1813 m_rebuildVerticalScrollbarLayer = false;
1814 } 1814 }
1815 1815
1816 CompositorAnimationHost* PaintLayerScrollableArea::compositorAnimationHost()
1817 const {
1818 if (LocalFrame* frame = box().frame()) {
jbroman 2016/12/13 16:38:32 OK because it already exists below, but ordinarily
loyso (OOO) 2016/12/19 04:03:12 Done.
1819 if (Page* page = frame->page()) {
1820 return page->scrollingCoordinator()
1821 ? page->scrollingCoordinator()->compositorAnimationHost()
1822 : nullptr;
1823 }
1824 }
1825 return nullptr;
1826 }
1827
1816 CompositorAnimationTimeline* 1828 CompositorAnimationTimeline*
1817 PaintLayerScrollableArea::compositorAnimationTimeline() const { 1829 PaintLayerScrollableArea::compositorAnimationTimeline() const {
1818 if (LocalFrame* frame = box().frame()) { 1830 if (LocalFrame* frame = box().frame()) {
1819 if (Page* page = frame->page()) 1831 if (Page* page = frame->page())
1820 return page->scrollingCoordinator() 1832 return page->scrollingCoordinator()
1821 ? page->scrollingCoordinator()->compositorAnimationTimeline() 1833 ? page->scrollingCoordinator()->compositorAnimationTimeline()
1822 : nullptr; 1834 : nullptr;
1823 } 1835 }
1824 return nullptr; 1836 return nullptr;
1825 } 1837 }
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
2033 2045
2034 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: 2046 void PaintLayerScrollableArea::DelayScrollOffsetClampScope::
2035 clampScrollableAreas() { 2047 clampScrollableAreas() {
2036 for (auto& scrollableArea : *s_needsClamp) 2048 for (auto& scrollableArea : *s_needsClamp)
2037 scrollableArea->clampScrollOffsetAfterOverflowChange(); 2049 scrollableArea->clampScrollOffsetAfterOverflowChange();
2038 delete s_needsClamp; 2050 delete s_needsClamp;
2039 s_needsClamp = nullptr; 2051 s_needsClamp = nullptr;
2040 } 2052 }
2041 2053
2042 } // namespace blink 2054 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698