Index: Source/core/rendering/RenderBox.cpp |
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp |
index 66f69da739efb2b2e5f3a5767ab01d4d59e8b263..12957a2d1e4a5127a732791ba5e607507337dd83 100644 |
--- a/Source/core/rendering/RenderBox.cpp |
+++ b/Source/core/rendering/RenderBox.cpp |
@@ -778,11 +778,10 @@ IntSize RenderBox::calculateAutoscrollDirection(const IntPoint& windowPoint) con |
if (!frameView) |
return IntSize(); |
- IntSize offset; |
- IntPoint point = frameView->windowToContents(windowPoint); |
- IntRect box(absoluteBoundingBoxRect()); |
- if (isRenderView()) |
- box.moveBy(frameView->windowToContents(IntPoint())); |
+ IntPoint point = windowPoint; |
yosin_UTC9
2013/09/10 02:09:38
nit: can we introduce new variable windowAutoscrol
|
+ IntRect box((absoluteBoundingBoxRect())); |
+ box.move(view()->frameView()->scrollOffset()); |
+ box = view()->frameView()->contentsToWindow(box); |
yosin_UTC9
2013/09/10 02:09:38
nit: can we introduce new variable windowBox to de
|
if (point.x() < box.x() + autoscrollBeltSize) |
point.move(-autoscrollBeltSize, 0); |
@@ -793,7 +792,8 @@ IntSize RenderBox::calculateAutoscrollDirection(const IntPoint& windowPoint) con |
point.move(0, -autoscrollBeltSize); |
else if (point.y() > box.maxY() - autoscrollBeltSize) |
point.move(0, autoscrollBeltSize); |
- return frameView->contentsToWindow(point) - windowPoint; |
+ |
+ return point - windowPoint; |
} |
RenderBox* RenderBox::findAutoscrollable(RenderObject* renderer) |