Title: [156259] trunk
Revision
156259
Author
[email protected]
Date
2013-09-22 23:31:24 -0700 (Sun, 22 Sep 2013)

Log Message

Unreviewed, rolling out r156257.
http://trac.webkit.org/changeset/156257
https://bugs.webkit.org/show_bug.cgi?id=121777

The test from this patch fails (Requested by ap on #webkit).

Source/WebCore:

* rendering/RenderBox.cpp:
(WebCore::RenderBox::calculateAutoscrollDirection):

LayoutTests:

* fast/events/drag-and-drop-autoscroll-inner-frame-expected.txt: Removed.
* fast/events/drag-and-drop-autoscroll-inner-frame.html: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (156258 => 156259)


--- trunk/LayoutTests/ChangeLog	2013-09-23 04:32:32 UTC (rev 156258)
+++ trunk/LayoutTests/ChangeLog	2013-09-23 06:31:24 UTC (rev 156259)
@@ -1,3 +1,14 @@
+2013-09-22  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r156257.
+        http://trac.webkit.org/changeset/156257
+        https://bugs.webkit.org/show_bug.cgi?id=121777
+
+        The test from this patch fails (Requested by ap on #webkit).
+
+        * fast/events/drag-and-drop-autoscroll-inner-frame-expected.txt: Removed.
+        * fast/events/drag-and-drop-autoscroll-inner-frame.html: Removed.
+
 2013-09-22  Jinwoo Song  <[email protected]>
 
         Unreviewed EFL gardening. Rebaselining after r156040.

Deleted: trunk/LayoutTests/fast/events/drag-and-drop-autoscroll-inner-frame-expected.txt (156258 => 156259)


--- trunk/LayoutTests/fast/events/drag-and-drop-autoscroll-inner-frame-expected.txt	2013-09-23 04:32:32 UTC (rev 156258)
+++ trunk/LayoutTests/fast/events/drag-and-drop-autoscroll-inner-frame-expected.txt	2013-09-23 06:31:24 UTC (rev 156259)
@@ -1,12 +0,0 @@
-For manual testing, drag and drop "Drop Me" downwards and then upwards. 
-Check autoscroll within an inner frame by drag-and-drop
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS Autoscroll should have scrolled the iframe downwards, and did.
-PASS iframe.contentDocument.body.scrollTop < middleTermScrollOffset is true
-PASS successfullyParsed is true
-
-TEST COMPLETE
-

Deleted: trunk/LayoutTests/fast/events/drag-and-drop-autoscroll-inner-frame.html (156258 => 156259)


--- trunk/LayoutTests/fast/events/drag-and-drop-autoscroll-inner-frame.html	2013-09-23 04:32:32 UTC (rev 156258)
+++ trunk/LayoutTests/fast/events/drag-and-drop-autoscroll-inner-frame.html	2013-09-23 06:31:24 UTC (rev 156259)
@@ -1,118 +0,0 @@
-<!DOCTYPE html>
-<head>
-<style type="text/css">
-#scrollable {
-    height: 200px;
-    overflow: auto;
-    border: solid 3px #cc0000;
-    font-size: 80px;
-}
-</style>
-<script>
-
-var x, y, middleTermScrollOffset;
-var iframe, iframeDocument, draggable;
-
-function log(msg)
-{
-    document.getElementById('console').appendChild(document.createTextNode(msg + '\n'));
-}
-
-function setUpTest()
-{
-    if (!window.eventSender) {
-        log('Please run within DumpRenderTree');
-        return;
-    }
-
-    window.internals.settings.setAutoscrollForDragAndDropEnabled(true);
-    window.jsTestIsAsync = true;
-    setTimeout(testIt, 0);
-}
-
-function testIt()
-{
-    eventSender.dragMode = false;
-
-    iframe = document.getElementById('scrollable');
-    iframeDocument = iframe.contentDocument;
-    draggable = iframeDocument.getElementById('draggable');
-
-    iframeDocument.addEventListener("scroll", recordScroll);
-
-    // Grab draggable.
-    x = iframe.offsetLeft + draggable.offsetLeft + 7;
-    y = iframe.offsetTop + draggable.offsetTop + 7;
-
-    eventSender.mouseMoveTo(x, y);
-    eventSender.mouseDown();
-
-    // Move mouse to the bottom autoscroll border belt.
-    y = iframe.offsetTop + iframe.offsetHeight - 10;
-    eventSender.mouseMoveTo(x, y);
-}
-
-function recordScroll(e)
-{
-    autoscrollTestPart1();
-    iframeDocument.removeEventListener("scroll", recordScroll);
-}
-
-function recordScroll2(e)
-{
-    autoscrollTestPart2();
-    iframeDocument.removeEventListener("scroll", recordScroll);
-}
-
-function autoscrollTestPart1()
-{
-    if (iframe.contentDocument.body.scrollTop == 0) {
-        testFailed("Autoscroll should have scrolled the iframe downwards, but did not");
-        finishTest();
-        return;
-    }
-
-    testPassed("Autoscroll should have scrolled the iframe downwards, and did.");
-
-    middleTermScrollOffset = iframe.contentDocument.body.scrollTop;
-    iframeDocument.addEventListener("scroll", recordScroll2);
-
-    // Move mouse to the upper autoscroll border belt.
-    y = iframe.offsetTop + 10;
-    eventSender.mouseMoveTo(x, y);
-}
-
-function autoscrollTestPart2()
-{
-    shouldBeTrue("iframe.contentDocument.body.scrollTop < middleTermScrollOffset")
-    finishTest();
-}
-
-function finishTest()
-{
-    eventSender.mouseUp();
-    finishJSTest();
-}
-
-var successfullyParsed = true;
-</script>
-</head>
-<body>
-For manual testing, drag and drop "Drop Me" downwards and then upwards.
-<iframe id="scrollable" src=""
-<p id='draggable' draggable='true' style='cursor: hand;'>
-    <b>Drag me!</b>
-</p>
-Try to drag and drop the text above in the input element at the bottom of this iframe. It should scroll. Then, try the way back.
-<br><br>more<br>more<br>more<br>more<br>more<br>more<br>more<br>more<br>more<br>more<br>more<br>more<br><input>
-"></iframe><br>
-</div>
-<div id="console"></div>
-<script src=""
-<script>
-description('Check autoscroll within an inner frame by drag-and-drop');
-setUpTest();
-</script>
-<script src=""
-</body>
-</html>

Modified: trunk/Source/WebCore/ChangeLog (156258 => 156259)


--- trunk/Source/WebCore/ChangeLog	2013-09-23 04:32:32 UTC (rev 156258)
+++ trunk/Source/WebCore/ChangeLog	2013-09-23 06:31:24 UTC (rev 156259)
@@ -1,3 +1,14 @@
+2013-09-22  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r156257.
+        http://trac.webkit.org/changeset/156257
+        https://bugs.webkit.org/show_bug.cgi?id=121777
+
+        The test from this patch fails (Requested by ap on #webkit).
+
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::calculateAutoscrollDirection):
+
 2013-09-22  Antonio Gomes  <[email protected]>
 
         iframe and scrollbar with "overflow:auto" should support autoscroll with mousedrag

Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (156258 => 156259)


--- trunk/Source/WebCore/rendering/RenderBox.cpp	2013-09-23 04:32:32 UTC (rev 156258)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp	2013-09-23 06:31:24 UTC (rev 156259)
@@ -842,23 +842,20 @@
 // scrolling.
 IntSize RenderBox::calculateAutoscrollDirection(const IntPoint& windowPoint) const
 {
+    IntSize offset;
+    IntPoint point = view().frameView().windowToContents(windowPoint);
     IntRect box(absoluteBoundingBoxRect());
-    box.move(view().frameView().scrollOffset());
-    IntRect windowBox = view().frameView().contentsToWindow(box);
 
-    IntPoint windowAutoscrollPoint = windowPoint;
+    if (point.x() < box.x() + autoscrollBeltSize)
+        point.move(-autoscrollBeltSize, 0);
+    else if (point.x() > box.maxX() - autoscrollBeltSize)
+        point.move(autoscrollBeltSize, 0);
 
-    if (windowAutoscrollPoint.x() < windowBox.x() + autoscrollBeltSize)
-        windowAutoscrollPoint.move(-autoscrollBeltSize, 0);
-    else if (windowAutoscrollPoint.x() > windowBox.maxX() - autoscrollBeltSize)
-        windowAutoscrollPoint.move(autoscrollBeltSize, 0);
-
-    if (windowAutoscrollPoint.y() < windowBox.y() + autoscrollBeltSize)
-        windowAutoscrollPoint.move(0, -autoscrollBeltSize);
-    else if (windowAutoscrollPoint.y() > windowBox.maxY() - autoscrollBeltSize)
-        windowAutoscrollPoint.move(0, autoscrollBeltSize);
-
-    return windowAutoscrollPoint - windowPoint;
+    if (point.y() < box.y() + autoscrollBeltSize)
+        point.move(0, -autoscrollBeltSize);
+    else if (point.y() > box.maxY() - autoscrollBeltSize)
+        point.move(0, autoscrollBeltSize);
+    return view().frameView().contentsToWindow(point) - windowPoint;
 }
 
 RenderBox* RenderBox::findAutoscrollable(RenderObject* renderer)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to