OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |