Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(540)

Unified Diff: Source/core/rendering/RenderBox.cpp

Issue 24074002: Drag'n drop Autoscroll does not work properly on inner frames (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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)

Powered by Google App Engine
This is Rietveld 408576698