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

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

Issue 1648293003: Fix smooth scroll jump when switching scroll handling between MT and CC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: finish animations on main Created 4 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
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 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 if (ScrollAnimatorBase* scrollAnimator = existingScrollAnimator()) 510 if (ScrollAnimatorBase* scrollAnimator = existingScrollAnimator())
511 scrollAnimator->notifyCompositorAnimationAborted(groupId); 511 scrollAnimator->notifyCompositorAnimationAborted(groupId);
512 } 512 }
513 513
514 void ScrollableArea::cancelScrollAnimation() 514 void ScrollableArea::cancelScrollAnimation()
515 { 515 {
516 if (ScrollAnimatorBase* scrollAnimator = existingScrollAnimator()) 516 if (ScrollAnimatorBase* scrollAnimator = existingScrollAnimator())
517 scrollAnimator->cancelAnimation(); 517 scrollAnimator->cancelAnimation();
518 } 518 }
519 519
520 void ScrollableArea::clearMainThreadScrollingReasons(bool clear)
521 {
522 if (ScrollAnimatorBase* scrollAnimator = existingScrollAnimator())
523 scrollAnimator->clearMainThreadScrollingReasons(clear);
524 }
525
520 void ScrollableArea::cancelProgrammaticScrollAnimation() 526 void ScrollableArea::cancelProgrammaticScrollAnimation()
521 { 527 {
522 if (ProgrammaticScrollAnimator* programmaticScrollAnimator = existingProgram maticScrollAnimator()) 528 if (ProgrammaticScrollAnimator* programmaticScrollAnimator = existingProgram maticScrollAnimator())
523 programmaticScrollAnimator->cancelAnimation(); 529 programmaticScrollAnimator->cancelAnimation();
524 } 530 }
525 531
526 bool ScrollableArea::shouldScrollOnMainThread() const 532 bool ScrollableArea::shouldScrollOnMainThread() const
527 { 533 {
528 if (GraphicsLayer* layer = layerForScrolling()) { 534 if (GraphicsLayer* layer = layerForScrolling()) {
529 return layer->platformLayer()->shouldScrollOnMainThread(); 535 return layer->platformLayer()->shouldScrollOnMainThread();
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 std::max(0, size.height() - horizontalScrollbarHeight)); 609 std::max(0, size.height() - horizontalScrollbarHeight));
604 } 610 }
605 611
606 DEFINE_TRACE(ScrollableArea) 612 DEFINE_TRACE(ScrollableArea)
607 { 613 {
608 visitor->trace(m_scrollAnimator); 614 visitor->trace(m_scrollAnimator);
609 visitor->trace(m_programmaticScrollAnimator); 615 visitor->trace(m_programmaticScrollAnimator);
610 } 616 }
611 617
612 } // namespace blink 618 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698