| 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/PassOwnPtr.h" | 43 #include "wtf/PassRefPtr.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 592 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 646     [_trackAlphaAnimation.get() invalidate]; | 646     [_trackAlphaAnimation.get() invalidate]; | 
| 647     [_uiStateTransitionAnimation.get() invalidate]; | 647     [_uiStateTransitionAnimation.get() invalidate]; | 
| 648     [_expansionTransitionAnimation.get() invalidate]; | 648     [_expansionTransitionAnimation.get() invalidate]; | 
| 649     END_BLOCK_OBJC_EXCEPTIONS; | 649     END_BLOCK_OBJC_EXCEPTIONS; | 
| 650 } | 650 } | 
| 651 | 651 | 
| 652 @end | 652 @end | 
| 653 | 653 | 
| 654 namespace blink { | 654 namespace blink { | 
| 655 | 655 | 
| 656 PassOwnPtr<ScrollAnimator> ScrollAnimator::create(ScrollableArea* scrollableArea
      ) | 656 PassRefPtr<ScrollAnimator> ScrollAnimator::create(ScrollableArea* scrollableArea
      ) | 
| 657 { | 657 { | 
| 658     return adoptPtr(new ScrollAnimatorMac(scrollableArea)); | 658     return adoptRef(new ScrollAnimatorMac(scrollableArea)); | 
| 659 } | 659 } | 
| 660 | 660 | 
| 661 ScrollAnimatorMac::ScrollAnimatorMac(ScrollableArea* scrollableArea) | 661 ScrollAnimatorMac::ScrollAnimatorMac(ScrollableArea* scrollableArea) | 
| 662     : ScrollAnimator(scrollableArea) | 662     : ScrollAnimator(scrollableArea) | 
| 663     , m_initialScrollbarPaintTimer(this, &ScrollAnimatorMac::initialScrollbarPai
      ntTimerFired) | 663     , m_initialScrollbarPaintTimer(this, &ScrollAnimatorMac::initialScrollbarPai
      ntTimerFired) | 
| 664     , m_sendContentAreaScrolledTimer(this, &ScrollAnimatorMac::sendContentAreaSc
      rolledTimerFired) | 664     , m_sendContentAreaScrolledTimer(this, &ScrollAnimatorMac::sendContentAreaSc
      rolledTimerFired) | 
| 665 #if USE(RUBBER_BANDING) | 665 #if USE(RUBBER_BANDING) | 
| 666     , m_scrollElasticityController(this) | 666     , m_scrollElasticityController(this) | 
| 667     , m_snapRubberBandTimer(this, &ScrollAnimatorMac::snapRubberBandTimerFired) | 667     , m_snapRubberBandTimer(this, &ScrollAnimatorMac::snapRubberBandTimerFired) | 
| 668 #endif | 668 #endif | 
| (...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1360         return; | 1360         return; | 
| 1361 | 1361 | 
| 1362     m_visibleScrollerThumbRect = rectInViewCoordinates; | 1362     m_visibleScrollerThumbRect = rectInViewCoordinates; | 
| 1363 } | 1363 } | 
| 1364 | 1364 | 
| 1365 bool ScrollAnimatorMac::canUseCoordinatedScrollbar() { | 1365 bool ScrollAnimatorMac::canUseCoordinatedScrollbar() { | 
| 1366     return ScrollbarThemeMacCommon::isOverlayAPIAvailable(); | 1366     return ScrollbarThemeMacCommon::isOverlayAPIAvailable(); | 
| 1367 } | 1367 } | 
| 1368 | 1368 | 
| 1369 } // namespace blink | 1369 } // namespace blink | 
| OLD | NEW | 
|---|