| Index: Source/platform/mac/ScrollAnimatorMac.mm
|
| diff --git a/Source/platform/mac/ScrollAnimatorMac.mm b/Source/platform/mac/ScrollAnimatorMac.mm
|
| index 1fbbb9f7b39d09c32d2d51c6e3b30c1d09919ad6..7789e447be714f4297bf0cd6c66ff4e1a24d9c70 100644
|
| --- a/Source/platform/mac/ScrollAnimatorMac.mm
|
| +++ b/Source/platform/mac/ScrollAnimatorMac.mm
|
| @@ -693,6 +693,18 @@ FloatPoint ScrollAnimatorMac::adjustScrollPositionIfNecessary(const FloatPoint&
|
| return FloatPoint(newX, newY);
|
| }
|
|
|
| +void ScrollAnimatorMac::adjustScrollPositionToBoundsIfNecessary()
|
| +{
|
| + bool currentlyConstrainsToContentEdge = m_scrollableArea->constrainsScrollingToContentEdge();
|
| + m_scrollableArea->setConstrainsScrollingToContentEdge(true);
|
| +
|
| + IntPoint currentScrollPosition = absoluteScrollPosition();
|
| + FloatPoint nearestPointWithinBounds = adjustScrollPositionIfNecessary(absoluteScrollPosition());
|
| + immediateScrollBy(nearestPointWithinBounds - currentScrollPosition);
|
| +
|
| + m_scrollableArea->setConstrainsScrollingToContentEdge(currentlyConstrainsToContentEdge);
|
| +}
|
| +
|
| void ScrollAnimatorMac::immediateScrollTo(const FloatPoint& newPosition)
|
| {
|
| FloatPoint adjustedPosition = adjustScrollPositionIfNecessary(newPosition);
|
|
|