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

Side by Side Diff: Source/platform/scroll/ScrollableArea.cpp

Issue 1133513002: Animations: Port ProgrammaticScrollAnimator to use compositor timelines (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@linkhigh
Patch Set: Mark subframe-interrupted-scroll as flaky Created 5 years, 5 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 | « Source/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 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 bool ScrollableArea::hasLayerForVerticalScrollbar() const 480 bool ScrollableArea::hasLayerForVerticalScrollbar() const
481 { 481 {
482 return layerForVerticalScrollbar(); 482 return layerForVerticalScrollbar();
483 } 483 }
484 484
485 bool ScrollableArea::hasLayerForScrollCorner() const 485 bool ScrollableArea::hasLayerForScrollCorner() const
486 { 486 {
487 return layerForScrollCorner(); 487 return layerForScrollCorner();
488 } 488 }
489 489
490 void ScrollableArea::layerForScrollingDidChange() 490 void ScrollableArea::layerForScrollingDidChange(WebCompositorAnimationTimeline* timeline)
491 { 491 {
492 if (ProgrammaticScrollAnimator* programmaticScrollAnimator = existingProgram maticScrollAnimator()) 492 if (ProgrammaticScrollAnimator* programmaticScrollAnimator = existingProgram maticScrollAnimator())
493 programmaticScrollAnimator->layerForCompositedScrollingDidChange(); 493 programmaticScrollAnimator->layerForCompositedScrollingDidChange(timelin e);
494 } 494 }
495 495
496 bool ScrollableArea::scheduleAnimation() 496 bool ScrollableArea::scheduleAnimation()
497 { 497 {
498 if (HostWindow* window = hostWindow()) { 498 if (HostWindow* window = hostWindow()) {
499 window->scheduleAnimation(); 499 window->scheduleAnimation();
500 return true; 500 return true;
501 } 501 }
502 return false; 502 return false;
503 } 503 }
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 verticalScrollbarWidth = !verticalBar->isOverlayScrollbar() ? verticalBa r->width() : 0; 610 verticalScrollbarWidth = !verticalBar->isOverlayScrollbar() ? verticalBa r->width() : 0;
611 if (Scrollbar* horizontalBar = horizontalScrollbar()) 611 if (Scrollbar* horizontalBar = horizontalScrollbar())
612 horizontalScrollbarHeight = !horizontalBar->isOverlayScrollbar() ? horiz ontalBar->height() : 0; 612 horizontalScrollbarHeight = !horizontalBar->isOverlayScrollbar() ? horiz ontalBar->height() : 0;
613 613
614 return IntSize(std::max(0, size.width() - verticalScrollbarWidth), 614 return IntSize(std::max(0, size.width() - verticalScrollbarWidth),
615 std::max(0, size.height() - horizontalScrollbarHeight)); 615 std::max(0, size.height() - horizontalScrollbarHeight));
616 616
617 } 617 }
618 618
619 } // namespace blink 619 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/scroll/ScrollableArea.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698