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 22 matching lines...) Expand all Loading... |
33 #include "platform/animation/TimingFunction.h" | 33 #include "platform/animation/TimingFunction.h" |
34 #include "platform/geometry/FloatRect.h" | 34 #include "platform/geometry/FloatRect.h" |
35 #include "platform/geometry/IntRect.h" | 35 #include "platform/geometry/IntRect.h" |
36 #include "platform/mac/BlockExceptions.h" | 36 #include "platform/mac/BlockExceptions.h" |
37 #include "platform/mac/NSScrollerImpDetails.h" | 37 #include "platform/mac/NSScrollerImpDetails.h" |
38 #include "platform/scroll/ScrollableArea.h" | 38 #include "platform/scroll/ScrollableArea.h" |
39 #include "platform/scroll/ScrollbarTheme.h" | 39 #include "platform/scroll/ScrollbarTheme.h" |
40 #include "platform/scroll/ScrollbarThemeMacCommon.h" | 40 #include "platform/scroll/ScrollbarThemeMacCommon.h" |
41 #include "platform/scroll/ScrollbarThemeMacOverlayAPI.h" | 41 #include "platform/scroll/ScrollbarThemeMacOverlayAPI.h" |
42 #include "wtf/MainThread.h" | 42 #include "wtf/MainThread.h" |
43 #include "wtf/PassRefPtr.h" | 43 #include "wtf/PassOwnPtr.h" |
44 | 44 |
45 using namespace blink; | 45 using namespace blink; |
46 | 46 |
47 static bool supportsUIStateTransitionProgress() | 47 static bool supportsUIStateTransitionProgress() |
48 { | 48 { |
49 // FIXME: This is temporary until all platforms that support ScrollbarPainte
r support this part of the API. | 49 // FIXME: This is temporary until all platforms that support ScrollbarPainte
r support this part of the API. |
50 static bool globalSupportsUIStateTransitionProgress = [NSClassFromString(@"N
SScrollerImp") instancesRespondToSelector:@selector(mouseEnteredScroller)]; | 50 static bool globalSupportsUIStateTransitionProgress = [NSClassFromString(@"N
SScrollerImp") instancesRespondToSelector:@selector(mouseEnteredScroller)]; |
51 return globalSupportsUIStateTransitionProgress; | 51 return globalSupportsUIStateTransitionProgress; |
52 } | 52 } |
53 | 53 |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
645 [_trackAlphaAnimation.get() invalidate]; | 645 [_trackAlphaAnimation.get() invalidate]; |
646 [_uiStateTransitionAnimation.get() invalidate]; | 646 [_uiStateTransitionAnimation.get() invalidate]; |
647 [_expansionTransitionAnimation.get() invalidate]; | 647 [_expansionTransitionAnimation.get() invalidate]; |
648 END_BLOCK_OBJC_EXCEPTIONS; | 648 END_BLOCK_OBJC_EXCEPTIONS; |
649 } | 649 } |
650 | 650 |
651 @end | 651 @end |
652 | 652 |
653 namespace blink { | 653 namespace blink { |
654 | 654 |
655 PassRefPtr<ScrollAnimator> ScrollAnimator::create(ScrollableArea* scrollableArea
) | 655 PassOwnPtr<ScrollAnimator> ScrollAnimator::create(ScrollableArea* scrollableArea
) |
656 { | 656 { |
657 return adoptRef(new ScrollAnimatorMac(scrollableArea)); | 657 return adoptPtr(new ScrollAnimatorMac(scrollableArea)); |
658 } | 658 } |
659 | 659 |
660 ScrollAnimatorMac::ScrollAnimatorMac(ScrollableArea* scrollableArea) | 660 ScrollAnimatorMac::ScrollAnimatorMac(ScrollableArea* scrollableArea) |
661 : ScrollAnimator(scrollableArea) | 661 : ScrollAnimator(scrollableArea) |
662 , m_initialScrollbarPaintTimer(this, &ScrollAnimatorMac::initialScrollbarPai
ntTimerFired) | 662 , m_initialScrollbarPaintTimer(this, &ScrollAnimatorMac::initialScrollbarPai
ntTimerFired) |
663 , m_sendContentAreaScrolledTimer(this, &ScrollAnimatorMac::sendContentAreaSc
rolledTimerFired) | 663 , m_sendContentAreaScrolledTimer(this, &ScrollAnimatorMac::sendContentAreaSc
rolledTimerFired) |
664 , m_haveScrolledSincePageLoad(false) | 664 , m_haveScrolledSincePageLoad(false) |
665 , m_needsScrollerStyleUpdate(false) | 665 , m_needsScrollerStyleUpdate(false) |
666 { | 666 { |
667 m_scrollAnimationHelperDelegate.adoptNS([[WebScrollAnimationHelperDelegate a
lloc] initWithScrollAnimator:this]); | 667 m_scrollAnimationHelperDelegate.adoptNS([[WebScrollAnimationHelperDelegate a
lloc] initWithScrollAnimator:this]); |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1164 return; | 1164 return; |
1165 | 1165 |
1166 m_visibleScrollerThumbRect = rectInViewCoordinates; | 1166 m_visibleScrollerThumbRect = rectInViewCoordinates; |
1167 } | 1167 } |
1168 | 1168 |
1169 bool ScrollAnimatorMac::canUseCoordinatedScrollbar() { | 1169 bool ScrollAnimatorMac::canUseCoordinatedScrollbar() { |
1170 return ScrollbarThemeMacCommon::isOverlayAPIAvailable(); | 1170 return ScrollbarThemeMacCommon::isOverlayAPIAvailable(); |
1171 } | 1171 } |
1172 | 1172 |
1173 } // namespace blink | 1173 } // namespace blink |
OLD | NEW |