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

Side by Side Diff: sky/engine/platform/scroll/ScrollableArea.cpp

Issue 875283003: Make all callers of scheduleAnimation() use scheduleVisualUpdate(). (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « sky/engine/platform/scroll/ScrollableArea.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2010, Google Inc. All rights reserved. 2 * Copyright (c) 2010, Google Inc. All rights reserved.
3 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved. 3 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 228
229 bool ScrollableArea::hasOverlayScrollbars() const 229 bool ScrollableArea::hasOverlayScrollbars() const
230 { 230 {
231 Scrollbar* vScrollbar = verticalScrollbar(); 231 Scrollbar* vScrollbar = verticalScrollbar();
232 if (vScrollbar && vScrollbar->isOverlayScrollbar()) 232 if (vScrollbar && vScrollbar->isOverlayScrollbar())
233 return true; 233 return true;
234 Scrollbar* hScrollbar = horizontalScrollbar(); 234 Scrollbar* hScrollbar = horizontalScrollbar();
235 return hScrollbar && hScrollbar->isOverlayScrollbar(); 235 return hScrollbar && hScrollbar->isOverlayScrollbar();
236 } 236 }
237 237
238 bool ScrollableArea::scheduleAnimation()
239 {
240 WTF_LOG(ScriptedAnimationController, "ScrollableArea::scheduleAnimation: win dow = %d",
241 hostWindow() ? 1 : 0);
242 if (HostWindow* window = hostWindow()) {
243 window->scheduleAnimation();
244 return true;
245 }
246 return false;
247 }
248
249 void ScrollableArea::serviceScrollAnimations(double monotonicTime)
250 {
251 if (ScrollAnimator* scrollAnimator = existingScrollAnimator())
252 scrollAnimator->serviceScrollAnimations();
253 }
254
255 IntPoint ScrollableArea::clampScrollPosition(const IntPoint& scrollPosition) con st 238 IntPoint ScrollableArea::clampScrollPosition(const IntPoint& scrollPosition) con st
256 { 239 {
257 return scrollPosition.shrunkTo(maximumScrollPosition()).expandedTo(minimumSc rollPosition()); 240 return scrollPosition.shrunkTo(maximumScrollPosition()).expandedTo(minimumSc rollPosition());
258 } 241 }
259 242
260 int ScrollableArea::lineStep(ScrollbarOrientation) const 243 int ScrollableArea::lineStep(ScrollbarOrientation) const
261 { 244 {
262 return pixelsPerLineStep(); 245 return pixelsPerLineStep();
263 } 246 }
264 247
265 int ScrollableArea::documentStep(ScrollbarOrientation orientation) const 248 int ScrollableArea::documentStep(ScrollbarOrientation orientation) const
266 { 249 {
267 return scrollSize(orientation); 250 return scrollSize(orientation);
268 } 251 }
269 252
270 float ScrollableArea::pixelStep(ScrollbarOrientation) const 253 float ScrollableArea::pixelStep(ScrollbarOrientation) const
271 { 254 {
272 return 1; 255 return 1;
273 } 256 }
274 257
275 } // namespace blink 258 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/platform/scroll/ScrollableArea.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698