Index: Source/core/frame/RootFrameViewport.cpp |
diff --git a/Source/core/frame/RootFrameViewport.cpp b/Source/core/frame/RootFrameViewport.cpp |
index 18c437000170df4c889b01fea2fb051793684606..69166e94bf5f55fe573d01a4fd20495b806a504f 100644 |
--- a/Source/core/frame/RootFrameViewport.cpp |
+++ b/Source/core/frame/RootFrameViewport.cpp |
@@ -91,7 +91,7 @@ ScrollResult RootFrameViewport::handleWheel(const PlatformWheelEvent& event) |
{ |
updateScrollAnimator(); |
- ScrollResult viewScrollResult(false); |
+ ScrollResult viewScrollResult; |
if (layoutViewport().isScrollable()) |
viewScrollResult = layoutViewport().handleWheel(event); |
@@ -102,7 +102,7 @@ ScrollResult RootFrameViewport::handleWheel(const PlatformWheelEvent& event) |
// Move the location by the negative of the remaining scroll delta. |
DoublePoint oldOffset = visualViewport().scrollPositionDouble(); |
DoublePoint locationDelta; |
- if (viewScrollResult.didScroll) { |
+ if (viewScrollResult.didScroll()) { |
locationDelta = -DoublePoint(viewScrollResult.unusedScrollDeltaX, viewScrollResult.unusedScrollDeltaY); |
} else { |
if (event.railsMode() != PlatformEvent::RailsModeVertical) |
@@ -116,11 +116,13 @@ ScrollResult RootFrameViewport::handleWheel(const PlatformWheelEvent& event) |
visualViewport().scrollToOffsetWithoutAnimation(FloatPoint(targetPosition)); |
DoublePoint usedLocationDelta(visualViewport().scrollPositionDouble() - oldOffset); |
- if (!viewScrollResult.didScroll && usedLocationDelta == DoublePoint::zero()) |
- return ScrollResult(false); |
+ if (!viewScrollResult.didScroll() && usedLocationDelta == DoublePoint::zero()) |
+ return ScrollResult(); |
DoubleSize unusedLocationDelta(locationDelta - usedLocationDelta); |
- return ScrollResult(true, -unusedLocationDelta.width(), -unusedLocationDelta.height()); |
+ bool didScrollX = viewScrollResult.didScrollX || unusedLocationDelta.width(); |
+ bool didScrollY = viewScrollResult.didScrollY || unusedLocationDelta.height(); |
+ return ScrollResult(didScrollX, didScrollY, -unusedLocationDelta.width(), -unusedLocationDelta.height()); |
} |
LayoutRect RootFrameViewport::scrollIntoView(const LayoutRect& rectInContent, const ScrollAlignment& alignX, const ScrollAlignment& alignY) |
@@ -276,7 +278,7 @@ GraphicsLayer* RootFrameViewport::layerForVerticalScrollbar() const |
return layoutViewport().layerForVerticalScrollbar(); |
} |
-bool RootFrameViewport::scroll(ScrollDirectionPhysical direction, ScrollGranularity granularity, float delta) |
+ScrollResultOneDimensional RootFrameViewport::scroll(ScrollDirectionPhysical direction, ScrollGranularity granularity, float delta) |
{ |
updateScrollAnimator(); |
@@ -296,7 +298,7 @@ bool RootFrameViewport::scroll(ScrollDirectionPhysical direction, ScrollGranular |
if (layoutViewport().userInputScrollable(orientation)) |
return layoutViewport().scroll(direction, granularity, delta); |
- return false; |
+ return ScrollResultOneDimensional(false); |
} |
bool RootFrameViewport::scrollAnimatorEnabled() const |