OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2010, 2011 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
684 @end | 684 @end |
685 | 685 |
686 namespace blink { | 686 namespace blink { |
687 | 687 |
688 ScrollAnimatorBase* ScrollAnimatorBase::create(ScrollableArea* scrollableArea) { | 688 ScrollAnimatorBase* ScrollAnimatorBase::create(ScrollableArea* scrollableArea) { |
689 return new ScrollAnimatorMac(scrollableArea); | 689 return new ScrollAnimatorMac(scrollableArea); |
690 } | 690 } |
691 | 691 |
692 ScrollAnimatorMac::ScrollAnimatorMac(ScrollableArea* scrollableArea) | 692 ScrollAnimatorMac::ScrollAnimatorMac(ScrollableArea* scrollableArea) |
693 : ScrollAnimatorBase(scrollableArea), | 693 : ScrollAnimatorBase(scrollableArea), |
694 m_taskRunner(Platform::current() | 694 m_taskRunner( |
695 ->currentThread() | 695 Platform::current()->currentThread()->scheduler()->timerTaskRunner()), |
696 ->scheduler() | |
697 ->timerTaskRunner() | |
698 ->clone()), | |
699 m_haveScrolledSincePageLoad(false), | 696 m_haveScrolledSincePageLoad(false), |
700 m_needsScrollerStyleUpdate(false) { | 697 m_needsScrollerStyleUpdate(false) { |
701 m_scrollAnimationHelperDelegate.adoptNS( | 698 m_scrollAnimationHelperDelegate.adoptNS( |
702 [[BlinkScrollAnimationHelperDelegate alloc] initWithScrollAnimator:this]); | 699 [[BlinkScrollAnimationHelperDelegate alloc] initWithScrollAnimator:this]); |
703 m_scrollAnimationHelper.adoptNS( | 700 m_scrollAnimationHelper.adoptNS( |
704 [[NSClassFromString(@"NSScrollAnimationHelper") alloc] | 701 [[NSClassFromString(@"NSScrollAnimationHelper") alloc] |
705 initWithDelegate:m_scrollAnimationHelperDelegate.get()]); | 702 initWithDelegate:m_scrollAnimationHelperDelegate.get()]); |
706 | 703 |
707 m_scrollbarPainterControllerDelegate.adoptNS( | 704 m_scrollbarPainterControllerDelegate.adoptNS( |
708 [[BlinkScrollbarPainterControllerDelegate alloc] | 705 [[BlinkScrollbarPainterControllerDelegate alloc] |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1077 rectInViewCoordinates = | 1074 rectInViewCoordinates = |
1078 verticalScrollbar->convertToContainingWidget(scrollerThumb); | 1075 verticalScrollbar->convertToContainingWidget(scrollerThumb); |
1079 | 1076 |
1080 if (rectInViewCoordinates == m_visibleScrollerThumbRect) | 1077 if (rectInViewCoordinates == m_visibleScrollerThumbRect) |
1081 return; | 1078 return; |
1082 | 1079 |
1083 m_visibleScrollerThumbRect = rectInViewCoordinates; | 1080 m_visibleScrollerThumbRect = rectInViewCoordinates; |
1084 } | 1081 } |
1085 | 1082 |
1086 } // namespace blink | 1083 } // namespace blink |
OLD | NEW |