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 23 matching lines...) Expand all Loading... |
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/ScrollView.h" | 38 #include "platform/scroll/ScrollView.h" |
39 #include "platform/scroll/ScrollableArea.h" | 39 #include "platform/scroll/ScrollableArea.h" |
40 #include "platform/scroll/ScrollbarTheme.h" | 40 #include "platform/scroll/ScrollbarTheme.h" |
41 #include "platform/scroll/ScrollbarThemeMacCommon.h" | 41 #include "platform/scroll/ScrollbarThemeMacCommon.h" |
42 #include "platform/scroll/ScrollbarThemeMacOverlayAPI.h" | 42 #include "platform/scroll/ScrollbarThemeMacOverlayAPI.h" |
43 #include "wtf/MainThread.h" | 43 #include "wtf/MainThread.h" |
44 #include "wtf/PassOwnPtr.h" | 44 #include "wtf/PassRefPtr.h" |
45 | 45 |
46 using namespace blink; | 46 using namespace blink; |
47 | 47 |
48 static bool supportsUIStateTransitionProgress() | 48 static bool supportsUIStateTransitionProgress() |
49 { | 49 { |
50 // FIXME: This is temporary until all platforms that support ScrollbarPainte
r support this part of the API. | 50 // FIXME: This is temporary until all platforms that support ScrollbarPainte
r support this part of the API. |
51 static bool globalSupportsUIStateTransitionProgress = [NSClassFromString(@"N
SScrollerImp") instancesRespondToSelector:@selector(mouseEnteredScroller)]; | 51 static bool globalSupportsUIStateTransitionProgress = [NSClassFromString(@"N
SScrollerImp") instancesRespondToSelector:@selector(mouseEnteredScroller)]; |
52 return globalSupportsUIStateTransitionProgress; | 52 return globalSupportsUIStateTransitionProgress; |
53 } | 53 } |
54 | 54 |
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 [_trackAlphaAnimation.get() invalidate]; | 647 [_trackAlphaAnimation.get() invalidate]; |
648 [_uiStateTransitionAnimation.get() invalidate]; | 648 [_uiStateTransitionAnimation.get() invalidate]; |
649 [_expansionTransitionAnimation.get() invalidate]; | 649 [_expansionTransitionAnimation.get() invalidate]; |
650 END_BLOCK_OBJC_EXCEPTIONS; | 650 END_BLOCK_OBJC_EXCEPTIONS; |
651 } | 651 } |
652 | 652 |
653 @end | 653 @end |
654 | 654 |
655 namespace blink { | 655 namespace blink { |
656 | 656 |
657 PassOwnPtr<ScrollAnimator> ScrollAnimator::create(ScrollableArea* scrollableArea
) | 657 PassRefPtr<ScrollAnimator> ScrollAnimator::create(ScrollableArea* scrollableArea
) |
658 { | 658 { |
659 return adoptPtr(new ScrollAnimatorMac(scrollableArea)); | 659 return adoptRef(new ScrollAnimatorMac(scrollableArea)); |
660 } | 660 } |
661 | 661 |
662 ScrollAnimatorMac::ScrollAnimatorMac(ScrollableArea* scrollableArea) | 662 ScrollAnimatorMac::ScrollAnimatorMac(ScrollableArea* scrollableArea) |
663 : ScrollAnimator(scrollableArea) | 663 : ScrollAnimator(scrollableArea) |
664 , m_initialScrollbarPaintTimer(this, &ScrollAnimatorMac::initialScrollbarPai
ntTimerFired) | 664 , m_initialScrollbarPaintTimer(this, &ScrollAnimatorMac::initialScrollbarPai
ntTimerFired) |
665 , m_sendContentAreaScrolledTimer(this, &ScrollAnimatorMac::sendContentAreaSc
rolledTimerFired) | 665 , m_sendContentAreaScrolledTimer(this, &ScrollAnimatorMac::sendContentAreaSc
rolledTimerFired) |
666 #if USE(RUBBER_BANDING) | 666 #if USE(RUBBER_BANDING) |
667 , m_scrollElasticityController(this) | 667 , m_scrollElasticityController(this) |
668 , m_snapRubberBandTimer(this, &ScrollAnimatorMac::snapRubberBandTimerFired) | 668 , m_snapRubberBandTimer(this, &ScrollAnimatorMac::snapRubberBandTimerFired) |
669 #endif | 669 #endif |
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1361 return; | 1361 return; |
1362 | 1362 |
1363 m_visibleScrollerThumbRect = rectInViewCoordinates; | 1363 m_visibleScrollerThumbRect = rectInViewCoordinates; |
1364 } | 1364 } |
1365 | 1365 |
1366 bool ScrollAnimatorMac::canUseCoordinatedScrollbar() { | 1366 bool ScrollAnimatorMac::canUseCoordinatedScrollbar() { |
1367 return ScrollbarThemeMacCommon::isOverlayAPIAvailable(); | 1367 return ScrollbarThemeMacCommon::isOverlayAPIAvailable(); |
1368 } | 1368 } |
1369 | 1369 |
1370 } // namespace blink | 1370 } // namespace blink |
OLD | NEW |