Changeset 156297 in webkit
- Timestamp:
- Sep 23, 2013 2:50:16 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r156293 r156297 1 2013-09-23 Antonio Gomes <a1.gomes@sisa.samsung.com> 2 3 iframe and scrollbar with "overflow:auto" should support autoscroll with mousedrag 4 https://bugs.webkit.org/show_bug.cgi?id=40981 5 6 Reviewed by Darin Adler. 7 8 Test ensures that dragging an element close to the boundary of 9 scrollable Frames, scroll its content in that direction. 10 11 * fast/events/drag-and-drop-autoscroll-inner-frame-expected.txt: Added. 12 * fast/events/drag-and-drop-autoscroll-inner-frame.html: Added. 13 1 14 2013-09-23 Alexey Proskuryakov <ap@apple.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r156296 r156297 1 2013-09-23 Antonio Gomes <a1.gomes@sisa.samsung.com> 2 3 iframe and scrollbar with "overflow:auto" should support autoscroll with mousedrag 4 https://bugs.webkit.org/show_bug.cgi?id=40981 5 6 Reviewed by Darin Adler. 7 8 RenderBox::calculateAutoscrollDirection does not properly translate 9 inner frames' coordinates in order to determine its auto-scrollability. 10 By coincidence, if the inner frame box it placed near to page's 0, 0 position 11 (upper left corner), it might work. 12 13 Patch fixes it by changing ::calculateAutoscrollDirection algorithm to operate 14 with window coordinates, taking inner frames offset and scroll position into account. 15 The behavior of auto-scrollable non-frame overflow boxes, including divs, still works 16 as it is used to. 17 18 Test: fast/events/drag-and-drop-autoscroll-inner-frame.html 19 20 * rendering/RenderBox.cpp: 21 (WebCore::RenderBox::calculateAutoscrollDirection): 22 1 23 2013-09-23 Brady Eidson <beidson@apple.com> 2 24 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r156285 r156297 843 843 IntSize RenderBox::calculateAutoscrollDirection(const IntPoint& windowPoint) const 844 844 { 845 IntSize offset;846 IntPoint point = view().frameView().windowToContents(windowPoint);847 845 IntRect box(absoluteBoundingBoxRect()); 848 849 if (point.x() < box.x() + autoscrollBeltSize) 850 point.move(-autoscrollBeltSize, 0); 851 else if (point.x() > box.maxX() - autoscrollBeltSize) 852 point.move(autoscrollBeltSize, 0); 853 854 if (point.y() < box.y() + autoscrollBeltSize) 855 point.move(0, -autoscrollBeltSize); 856 else if (point.y() > box.maxY() - autoscrollBeltSize) 857 point.move(0, autoscrollBeltSize); 858 return view().frameView().contentsToWindow(point) - windowPoint; 846 box.move(view().frameView().scrollOffset()); 847 IntRect windowBox = view().frameView().contentsToWindow(box); 848 849 IntPoint windowAutoscrollPoint = windowPoint; 850 851 if (windowAutoscrollPoint.x() < windowBox.x() + autoscrollBeltSize) 852 windowAutoscrollPoint.move(-autoscrollBeltSize, 0); 853 else if (windowAutoscrollPoint.x() > windowBox.maxX() - autoscrollBeltSize) 854 windowAutoscrollPoint.move(autoscrollBeltSize, 0); 855 856 if (windowAutoscrollPoint.y() < windowBox.y() + autoscrollBeltSize) 857 windowAutoscrollPoint.move(0, -autoscrollBeltSize); 858 else if (windowAutoscrollPoint.y() > windowBox.maxY() - autoscrollBeltSize) 859 windowAutoscrollPoint.move(0, autoscrollBeltSize); 860 861 return windowAutoscrollPoint - windowPoint; 859 862 } 860 863
Note: See TracChangeset
for help on using the changeset viewer.