Index: third_party/WebKit/Source/core/events/MouseRelatedEvent.cpp |
diff --git a/third_party/WebKit/Source/core/events/MouseRelatedEvent.cpp b/third_party/WebKit/Source/core/events/MouseRelatedEvent.cpp |
index 837bdd6b1edfad5faa3059dcb72fa0fede56b2f1..234b35327b20f23311b3f09c7def2e79b9ff830b 100644 |
--- a/third_party/WebKit/Source/core/events/MouseRelatedEvent.cpp |
+++ b/third_party/WebKit/Source/core/events/MouseRelatedEvent.cpp |
@@ -74,24 +74,24 @@ MouseRelatedEvent::MouseRelatedEvent( |
m_movementDelta(movementDelta), |
m_positionType(positionType) { |
LayoutPoint adjustedPageLocation; |
- LayoutPoint scrollPosition; |
+ LayoutPoint scrollOffset; |
bokan
2016/10/02 19:47:50
Make this LayoutSize to avoid casts below.
szager1
2016/10/05 07:43:36
Done.
|
LocalFrame* frame = view() && view()->isLocalDOMWindow() |
? toLocalDOMWindow(view())->frame() |
: nullptr; |
if (frame && hasPosition()) { |
if (FrameView* frameView = frame->view()) { |
- scrollPosition = frameView->scrollPosition(); |
+ scrollOffset = LayoutPoint(LayoutSize(frameView->scrollOffsetInt())); |
adjustedPageLocation = frameView->rootFrameToContents(rootFrameLocation); |
float scaleFactor = 1 / frame->pageZoomFactor(); |
if (scaleFactor != 1.0f) { |
adjustedPageLocation.scale(scaleFactor, scaleFactor); |
- scrollPosition.scale(scaleFactor, scaleFactor); |
+ scrollOffset.scale(scaleFactor, scaleFactor); |
} |
} |
} |
- m_clientLocation = adjustedPageLocation - toLayoutSize(scrollPosition); |
+ m_clientLocation = adjustedPageLocation - toLayoutSize(scrollOffset); |
m_pageLocation = adjustedPageLocation; |
// Set up initial values for coordinates. |