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

Side by Side Diff: Source/core/frame/RootFrameViewport.cpp

Issue 1056983004: OverscrollGlow for mainThread-{BLINK CHANGES} (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: added function for comparison Created 5 years, 7 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/frame/RootFrameViewport.h" 6 #include "core/frame/RootFrameViewport.h"
7 7
8 #include "core/frame/FrameView.h" 8 #include "core/frame/FrameView.h"
9 #include "core/layout/ScrollAlignment.h" 9 #include "core/layout/ScrollAlignment.h"
10 #include "platform/geometry/DoubleRect.h" 10 #include "platform/geometry/DoubleRect.h"
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 GraphicsLayer* RootFrameViewport::layerForHorizontalScrollbar() const 269 GraphicsLayer* RootFrameViewport::layerForHorizontalScrollbar() const
270 { 270 {
271 return layoutViewport().layerForHorizontalScrollbar(); 271 return layoutViewport().layerForHorizontalScrollbar();
272 } 272 }
273 273
274 GraphicsLayer* RootFrameViewport::layerForVerticalScrollbar() const 274 GraphicsLayer* RootFrameViewport::layerForVerticalScrollbar() const
275 { 275 {
276 return layoutViewport().layerForVerticalScrollbar(); 276 return layoutViewport().layerForVerticalScrollbar();
277 } 277 }
278 278
279 bool RootFrameViewport::scroll(ScrollDirection direction, ScrollGranularity gran ularity, float delta) 279 ScrollResultOneDimensional RootFrameViewport::scroll(ScrollDirection direction, ScrollGranularity granularity, float delta)
280 { 280 {
281 updateScrollAnimator(); 281 updateScrollAnimator();
282 282
283 ScrollbarOrientation orientation; 283 ScrollbarOrientation orientation;
284 284
285 if (direction == ScrollUp || direction == ScrollDown) 285 if (direction == ScrollUp || direction == ScrollDown)
286 orientation = VerticalScrollbar; 286 orientation = VerticalScrollbar;
287 else 287 else
288 orientation = HorizontalScrollbar; 288 orientation = HorizontalScrollbar;
289 289
290 if (layoutViewport().userInputScrollable(orientation) && visualViewport().us erInputScrollable(orientation)) 290 if (layoutViewport().userInputScrollable(orientation) && visualViewport().us erInputScrollable(orientation))
291 return ScrollableArea::scroll(direction, granularity, delta); 291 return ScrollableArea::scroll(direction, granularity, delta);
292 292
293 if (visualViewport().userInputScrollable(orientation)) 293 if (visualViewport().userInputScrollable(orientation))
294 return visualViewport().scroll(direction, granularity, delta); 294 return visualViewport().scroll(direction, granularity, delta);
295 295
296 if (layoutViewport().userInputScrollable(orientation)) 296 if (layoutViewport().userInputScrollable(orientation))
297 return layoutViewport().scroll(direction, granularity, delta); 297 return layoutViewport().scroll(direction, granularity, delta);
298 298
299 return false; 299 return ScrollResultOneDimensional(false);
300 } 300 }
301 301
302 } // namespace blink 302 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698