Skip to content
Permalink
Browse files
Unreviewed, fix the build after r209070
-[ScrollingMomentumCalculatorMac calculateToReachDestination] is only available on Sierra.

* page/scrolling/mac/ScrollingMomentumCalculatorMac.mm:
(WebCore::ScrollingMomentumCalculatorMac::ensurePlatformMomentumCalculator):
* platform/spi/mac/NSScrollingMomentumCalculatorSPI.h:

Canonical link: https://commits.webkit.org/182761@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209071 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
whsieh committed Nov 29, 2016
1 parent b7d7a4c commit e85e4ed5c9d2a169f679bf61dc2e4502c889dece
@@ -1,5 +1,15 @@
2016-11-29 Wenson Hsieh <wenson_hsieh@apple.com>

Unreviewed, fix the build after r209070

-[ScrollingMomentumCalculatorMac calculateToReachDestination] is only available on Sierra.

* page/scrolling/mac/ScrollingMomentumCalculatorMac.mm:
(WebCore::ScrollingMomentumCalculatorMac::ensurePlatformMomentumCalculator):
* platform/spi/mac/NSScrollingMomentumCalculatorSPI.h:

2016-11-28 Wenson Hsieh <wenson_hsieh@apple.com>

Scroll snapping on Mac should use AppKit animations
https://bugs.webkit.org/show_bug.cgi?id=147261
<rdar://problem/29395293>
@@ -61,7 +61,9 @@
NSRect contentFrame = NSMakeRect(0, 0, m_contentSize.width(), m_contentSize.height());
m_platformMomentumCalculator = adoptNS([[_NSScrollingMomentumCalculator alloc] initWithInitialOrigin:origin velocity:m_initialVelocity documentFrame:contentFrame constrainedClippingOrigin:NSZeroPoint clippingSize:m_viewportSize tolerance:NSMakeSize(1, 1)]);
[m_platformMomentumCalculator setDestinationOrigin:NSMakePoint(m_targetScrollOffset.width(), m_targetScrollOffset.height())];
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
[m_platformMomentumCalculator calculateToReachDestination];
#endif
return m_platformMomentumCalculator.get();
}

@@ -35,6 +35,9 @@

- (instancetype)initWithInitialOrigin:(NSPoint)origin velocity:(NSPoint)velocity documentFrame:(NSRect)docFrame constrainedClippingOrigin:(NSPoint)constrainedClippingOrigin clippingSize:(NSSize)clipViewSize tolerance:(NSSize)tolerance;
- (NSPoint)positionAfterDuration:(NSTimeInterval)duration;
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
- (void)calculateToReachDestination;
#endif

@property (atomic) NSPoint destinationOrigin;
@property (readonly) NSTimeInterval durationUntilStop;

0 comments on commit e85e4ed

Please sign in to comment.