Title: [139503] trunk
Revision
139503
Author
commit-qu...@webkit.org
Date
2013-01-11 14:52:31 -0800 (Fri, 11 Jan 2013)

Log Message

Unreviewed, rolling out r139044.
http://trac.webkit.org/changeset/139044
https://bugs.webkit.org/show_bug.cgi?id=106702

Caused various scrolling anomolies on Mac with drag and drop
(Requested by smfr on #webkit).

Patch by Sheriff Bot <webkit.review....@gmail.com> on 2013-01-11

Source/WebCore:

* page/AutoscrollController.cpp:
(WebCore::AutoscrollController::AutoscrollController):
(WebCore::AutoscrollController::autoscrollTimerFired):
* page/AutoscrollController.h:
(WebCore):
(AutoscrollController):
* page/EventHandler.cpp:
(WebCore::EventHandler::updateDragAndDrop):
* rendering/RenderBox.cpp:
(WebCore):
(WebCore::RenderBox::autoscroll):
* rendering/RenderBox.h:
(RenderBox):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::autoscroll):
* rendering/RenderLayer.h:
(RenderLayer):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::autoscroll):
* rendering/RenderListBox.h:
(RenderListBox):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::autoscroll):
* rendering/RenderTextControlSingleLine.h:
(RenderTextControlSingleLine):

Source/WebKit/chromium:

* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::WebViewImpl):
(WebKit::WebViewImpl::dragSourceEndedAt):
(WebKit::WebViewImpl::dragSourceMovedTo):
(WebKit::WebViewImpl::dragTargetDrop):
(WebKit::WebViewImpl::dragTargetDragEnterOrOver):
* src/WebViewImpl.h:
(WebKit):

LayoutTests:

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

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (139502 => 139503)


--- trunk/LayoutTests/ChangeLog	2013-01-11 22:45:35 UTC (rev 139502)
+++ trunk/LayoutTests/ChangeLog	2013-01-11 22:52:31 UTC (rev 139503)
@@ -1,3 +1,15 @@
+2013-01-11  Sheriff Bot  <webkit.review....@gmail.com>
+
+        Unreviewed, rolling out r139044.
+        http://trac.webkit.org/changeset/139044
+        https://bugs.webkit.org/show_bug.cgi?id=106702
+
+        Caused various scrolling anomolies on Mac with drag and drop
+        (Requested by smfr on #webkit).
+
+        * fast/events/drag-and-drop-autoscroll-expected.txt: Removed.
+        * fast/events/drag-and-drop-autoscroll.html: Removed.
+
 2013-01-11  Rafael Weinstein  <rafa...@chromium.org>
 
         Prevent HTMLPreloadScanner from fetching resources inside <template>

Deleted: trunk/LayoutTests/fast/events/drag-and-drop-autoscroll-expected.txt (139502 => 139503)


--- trunk/LayoutTests/fast/events/drag-and-drop-autoscroll-expected.txt	2013-01-11 22:45:35 UTC (rev 139502)
+++ trunk/LayoutTests/fast/events/drag-and-drop-autoscroll-expected.txt	2013-01-11 22:52:31 UTC (rev 139503)
@@ -1,8 +0,0 @@
-Check autoscroll by drag-and-drop
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS scrollable.scrollTop > 0
-For manual testing, drag and drop "Drop Me" to "Scrollable" area.
-

Deleted: trunk/LayoutTests/fast/events/drag-and-drop-autoscroll.html (139502 => 139503)


--- trunk/LayoutTests/fast/events/drag-and-drop-autoscroll.html	2013-01-11 22:45:35 UTC (rev 139502)
+++ trunk/LayoutTests/fast/events/drag-and-drop-autoscroll.html	2013-01-11 22:52:31 UTC (rev 139503)
@@ -1,101 +0,0 @@
-<html>
-<head>
-<style type="text/css">
-#draggable {
-  padding: 5pt;
-  border: 3px solid #00cc00;
-  background: #00cccc;
-  width: 80px;
-  cursor: hand;
-}
-
-#scrollable {
-    height: 200px;
-    overflow: auto;
-    border: solid 3px #cc0000;
-}
-</style>
-<script>
-function $(id) { return document.getElementById(id); }
-
-function finishTest() {
-    eventSender.mouseUp();
-    $('container').innerHTML = '';
-    window.testRunner.notifyDone();
-}
-
-function testIt() {
-    var draggable = $('draggable');
-    var scrollable = $('scrollable');
-
-    if (!window.eventSender)
-        return;
-
-    eventSender.dragMode = false;
-
-    // Grab draggable
-    eventSender.mouseMoveTo(draggable.offsetLeft + 5, draggable.offsetTop + 5);
-    eventSender.mouseDown();
-
-    // Move mouse to autoscroll border belt.
-    eventSender.mouseMoveTo(scrollable.offsetLeft + 5, scrollable.offsetTop + scrollable.offsetHeight - 10);
-
-    var retryCount = 0;
-
-    function checkScrolled()
-    {
-        if (scrollable.scrollTop > 0) {
-            testPassed('scrollable.scrollTop > 0');
-            finishTest();
-            return;
-        }
-
-        ++retryCount;
-        if (retryCount > 10) {
-            testFailed('No autoscroll');
-            finishTest();
-            return;
-        }
-
-        // Autoscroll is occurred evey 0.05 sec.
-        window.setTimeout(checkScrolled, 50);
-    }
-
-    checkScrolled();
-}
-
-function setUpTest()
-{
-    var scrollable = $('scrollable');
-    for (var i = 0; i < 100; ++i) {
-      var line = document.createElement('div');
-      line.innerHTML = "line " + i;
-      scrollable.appendChild(line);
-    }
-
-    if (!window.eventSender) {
-        console.log('Please run within DumpRenderTree');
-        return;
-    }
-
-    window.jsTestIsAsync = true;
-    window.setTimeout(testIt, 0);
-}
-</script>
-</head>
-<body>
-For manual testing, drag and drop "Drop Me" to "Scrollable" area.
-<div id="container">
-<div id="draggable" draggable="true">Drop Me</div>
-Scrollable
-<div id="scrollable">
-</div>
-</div>
-<script src=""
-<script>
-description('Check autoscroll by drag-and-drop');
-setUpTest();
-</script>
-<script src=""
-</body>
-</html>

Modified: trunk/Source/WebCore/ChangeLog (139502 => 139503)


--- trunk/Source/WebCore/ChangeLog	2013-01-11 22:45:35 UTC (rev 139502)
+++ trunk/Source/WebCore/ChangeLog	2013-01-11 22:52:31 UTC (rev 139503)
@@ -1,3 +1,38 @@
+2013-01-11  Sheriff Bot  <webkit.review....@gmail.com>
+
+        Unreviewed, rolling out r139044.
+        http://trac.webkit.org/changeset/139044
+        https://bugs.webkit.org/show_bug.cgi?id=106702
+
+        Caused various scrolling anomolies on Mac with drag and drop
+        (Requested by smfr on #webkit).
+
+        * page/AutoscrollController.cpp:
+        (WebCore::AutoscrollController::AutoscrollController):
+        (WebCore::AutoscrollController::autoscrollTimerFired):
+        * page/AutoscrollController.h:
+        (WebCore):
+        (AutoscrollController):
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::updateDragAndDrop):
+        * rendering/RenderBox.cpp:
+        (WebCore):
+        (WebCore::RenderBox::autoscroll):
+        * rendering/RenderBox.h:
+        (RenderBox):
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::autoscroll):
+        * rendering/RenderLayer.h:
+        (RenderLayer):
+        * rendering/RenderListBox.cpp:
+        (WebCore::RenderListBox::autoscroll):
+        * rendering/RenderListBox.h:
+        (RenderListBox):
+        * rendering/RenderTextControlSingleLine.cpp:
+        (WebCore::RenderTextControlSingleLine::autoscroll):
+        * rendering/RenderTextControlSingleLine.h:
+        (RenderTextControlSingleLine):
+
 2013-01-11  Rafael Weinstein  <rafa...@chromium.org>
 
         Prevent HTMLPreloadScanner from fetching resources inside <template>

Modified: trunk/Source/WebCore/page/AutoscrollController.cpp (139502 => 139503)


--- trunk/Source/WebCore/page/AutoscrollController.cpp	2013-01-11 22:45:35 UTC (rev 139502)
+++ trunk/Source/WebCore/page/AutoscrollController.cpp	2013-01-11 22:52:31 UTC (rev 139503)
@@ -35,13 +35,9 @@
 #include "Page.h"
 #include "RenderBox.h"
 #include "ScrollView.h"
-#include <wtf/CurrentTime.h>
 
 namespace WebCore {
 
-// Delay time in second for start autoscroll if pointer is in border edge of scrollable element.
-static double autoscrollDelay = 0.2;
-
 // When the autoscroll or the panScroll is triggered when do the scroll every 0.05s to make it smooth
 static const double autoscrollInterval = 0.05;
 
@@ -57,7 +53,6 @@
     : m_autoscrollTimer(this, &AutoscrollController::autoscrollTimerFired)
     , m_autoscrollRenderer(0)
     , m_autoscrollType(NoAutoscroll)
-    , m_dragAndDropAutoscrollStartTime(0)
 #if ENABLE(PAN_SCROLLING)
     , m_panScrollButtonPressed(false)
     , m_springLoadedPanScrollInProgress(false)
@@ -149,38 +144,6 @@
     m_autoscrollRenderer = renderer && renderer->isBox() ? toRenderBox(renderer) : 0;
 }
 
-void AutoscrollController::updateDragAndDrop(Node* dropTargetNode, const IntPoint& eventPosition, double eventTime)
-{
-    if (!dropTargetNode) {
-        stopAutoscrollTimer();
-        return;
-    }
-
-    RenderBox* scrollable = RenderBox::findAutoscrollable(dropTargetNode->renderer());
-    if (!scrollable) {
-        stopAutoscrollTimer();
-        return;
-    }
-
-    IntSize offset = scrollable->calculateAutoscrollDirection(eventPosition);
-    if (offset.isZero()) {
-        stopAutoscrollTimer();
-        return;
-    }
-
-    m_dragAndDropAutoscrollReferencePosition = eventPosition + offset;
-
-    if (m_autoscrollType == NoAutoscroll) {
-        m_autoscrollType = AutoscrollForDragAndDrop;
-        m_autoscrollRenderer = scrollable;
-        m_dragAndDropAutoscrollStartTime = eventTime;
-        startAutoscrollTimer();
-    } else if (m_autoscrollRenderer != scrollable) {
-        m_dragAndDropAutoscrollStartTime = eventTime;
-        m_autoscrollRenderer = scrollable;
-    }
-}
-
 #if ENABLE(PAN_SCROLLING)
 void AutoscrollController::didPanScrollStart()
 {
@@ -237,20 +200,13 @@
 
     Frame* frame = m_autoscrollRenderer->frame();
     switch (m_autoscrollType) {
-    case AutoscrollForDragAndDrop:
-        if (WTF::currentTime() - m_dragAndDropAutoscrollStartTime > autoscrollDelay)
-            m_autoscrollRenderer->autoscroll(m_dragAndDropAutoscrollReferencePosition);
-        break;
-    case AutoscrollForSelection: {
-        EventHandler* eventHandler = frame->eventHandler();
-        if (!eventHandler->mousePressed()) {
+    case AutoscrollForSelection:
+        if (!frame->eventHandler()->mousePressed()) {
             stopAutoscrollTimer();
             return;
         }
-        eventHandler->updateSelectionForMouseDrag();
-        m_autoscrollRenderer->autoscroll(eventHandler->lastKnownMousePosition());
+        m_autoscrollRenderer->autoscroll();
         break;
-    }
     case NoAutoscroll:
         break;
 #if ENABLE(PAN_SCROLLING)

Modified: trunk/Source/WebCore/page/AutoscrollController.h (139502 => 139503)


--- trunk/Source/WebCore/page/AutoscrollController.h	2013-01-11 22:45:35 UTC (rev 139502)
+++ trunk/Source/WebCore/page/AutoscrollController.h	2013-01-11 22:52:31 UTC (rev 139503)
@@ -34,14 +34,12 @@
 class EventHandler;
 class Frame;
 class FrameView;
-class Node;
 class PlatformMouseEvent;
 class RenderBox;
 class RenderObject;
 
 enum AutoscrollType {
     NoAutoscroll,
-    AutoscrollForDragAndDrop,
     AutoscrollForSelection,
 #if ENABLE(PAN_SCROLLING)
     AutoscrollForPan,
@@ -58,7 +56,6 @@
     void startAutoscrollForSelection(RenderObject*);
     void stopAutoscrollTimer(bool rendererIsBeingDestroyed = false);
     void updateAutoscrollRenderer();
-    void updateDragAndDrop(Node* targetNode, const IntPoint& eventPosition, double eventTime);
 #if ENABLE(PAN_SCROLLING)
     void didPanScrollStart();
     void didPanScrollStop();
@@ -77,8 +74,6 @@
     Timer<AutoscrollController> m_autoscrollTimer;
     RenderBox* m_autoscrollRenderer;
     AutoscrollType m_autoscrollType;
-    IntPoint m_dragAndDropAutoscrollReferencePosition;
-    double m_dragAndDropAutoscrollStartTime;
 #if ENABLE(PAN_SCROLLING)
     IntPoint m_panScrollStartPos;
     bool m_panScrollButtonPressed;

Modified: trunk/Source/WebCore/page/EventHandler.cpp (139502 => 139503)


--- trunk/Source/WebCore/page/EventHandler.cpp	2013-01-11 22:45:35 UTC (rev 139502)
+++ trunk/Source/WebCore/page/EventHandler.cpp	2013-01-11 22:52:31 UTC (rev 139503)
@@ -1957,8 +1957,6 @@
     if (newTarget && newTarget->isTextNode())
         newTarget = newTarget->parentNode();
 
-    m_autoscrollController->updateDragAndDrop(newTarget.get(), event.position(), event.timestamp());
-
     if (m_dragTarget != newTarget) {
         // FIXME: this ordering was explicitly chosen to match WinIE. However,
         // it is sometimes incorrect when dragging within subframes, as seen with

Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (139502 => 139503)


--- trunk/Source/WebCore/rendering/RenderBox.cpp	2013-01-11 22:45:35 UTC (rev 139502)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp	2013-01-11 22:52:31 UTC (rev 139503)
@@ -81,11 +81,6 @@
 static OverrideSizeMap* gOverrideContainingBlockLogicalHeightMap = 0;
 static OverrideSizeMap* gOverrideContainingBlockLogicalWidthMap = 0;
 
-
-// Size of border belt for autoscroll. When mouse pointer in border belt,
-// autoscroll is started.
-static const int autoscrollBeltSize = 20;
-
 bool RenderBox::s_hadOverflowClip = false;
 
 RenderBox::RenderBox(Node* node)
@@ -703,10 +698,10 @@
     return hasOverflowClip() && hasLayer() && layer()->usesCompositedScrolling();
 }
 
-void RenderBox::autoscroll(const IntPoint& position)
+void RenderBox::autoscroll()
 {
     if (layer())
-        layer()->autoscroll(position);
+        layer()->autoscroll();
 }
 
 // There are two kinds of renderer that can autoscroll.
@@ -730,33 +725,6 @@
     return page && page->mainFrame() == frame;
 }
 
-// If specified point is in border belt, returned offset denotes direction of
-// scrolling.
-IntSize RenderBox::calculateAutoscrollDirection(const IntPoint& windowPoint) const
-{
-    if (!frame())
-        return IntSize();
-
-    FrameView* frameView = frame()->view();
-    if (!frameView)
-        return IntSize();
-
-    IntSize offset;
-    IntPoint point = frameView->windowToContents(windowPoint);
-    IntRect box(absoluteBoundingBoxRect());
-
-    if (point.x() < box.x() + autoscrollBeltSize)
-        point.move(-autoscrollBeltSize, 0);
-    else if (point.x() > box.maxX() - autoscrollBeltSize)
-        point.move(autoscrollBeltSize, 0);
-
-    if (point.y() < box.y() + autoscrollBeltSize)
-        point.move(0, -autoscrollBeltSize);
-    else if (point.y() > box.maxY() - autoscrollBeltSize)
-        point.move(0, autoscrollBeltSize);
-    return frameView->contentsToWindow(point) - windowPoint;
-}
-
 RenderBox* RenderBox::findAutoscrollable(RenderObject* renderer)
 {
     while (renderer && !(renderer->isBox() && toRenderBox(renderer)->canAutoscroll())) {

Modified: trunk/Source/WebCore/rendering/RenderBox.h (139502 => 139503)


--- trunk/Source/WebCore/rendering/RenderBox.h	2013-01-11 22:45:35 UTC (rev 139502)
+++ trunk/Source/WebCore/rendering/RenderBox.h	2013-01-11 22:52:31 UTC (rev 139503)
@@ -447,9 +447,8 @@
     virtual bool logicalScroll(ScrollLogicalDirection, ScrollGranularity, float multiplier = 1, Node** stopNode = 0);
     bool canBeScrolledAndHasScrollableArea() const;
     virtual bool canBeProgramaticallyScrolled() const;
-    virtual void autoscroll(const IntPoint&);
+    virtual void autoscroll();
     bool canAutoscroll() const;
-    IntSize calculateAutoscrollDirection(const IntPoint& windowPoint) const;
     static RenderBox* findAutoscrollable(RenderObject*);
     virtual void stopAutoscroll() { }
     virtual void panScroll(const IntPoint&);

Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (139502 => 139503)


--- trunk/Source/WebCore/rendering/RenderLayer.cpp	2013-01-11 22:45:35 UTC (rev 139502)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp	2013-01-11 22:52:31 UTC (rev 139503)
@@ -2293,7 +2293,7 @@
     return LayoutRect(LayoutPoint(x, y), visibleRect.size());
 }
 
-void RenderLayer::autoscroll(const IntPoint& position)
+void RenderLayer::autoscroll()
 {
     Frame* frame = renderer()->frame();
     if (!frame)
@@ -2303,7 +2303,11 @@
     if (!frameView)
         return;
 
-    IntPoint currentDocumentPosition = frameView->windowToContents(position);
+#if ENABLE(DRAG_SUPPORT)
+    frame->eventHandler()->updateSelectionForMouseDrag();
+#endif
+
+    IntPoint currentDocumentPosition = frameView->windowToContents(frame->eventHandler()->lastKnownMousePosition());
     scrollRectToVisible(LayoutRect(currentDocumentPosition, LayoutSize(1, 1)), ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignToEdgeIfNeeded);
 }
 

Modified: trunk/Source/WebCore/rendering/RenderLayer.h (139502 => 139503)


--- trunk/Source/WebCore/rendering/RenderLayer.h	2013-01-11 22:45:35 UTC (rev 139502)
+++ trunk/Source/WebCore/rendering/RenderLayer.h	2013-01-11 22:52:31 UTC (rev 139503)
@@ -373,7 +373,7 @@
     void updateScrollInfoAfterLayout();
 
     bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1);
-    void autoscroll(const IntPoint&);
+    void autoscroll();
 
     void resize(const PlatformMouseEvent&, const LayoutSize&);
     bool inResizeMode() const { return m_inResizeMode; }

Modified: trunk/Source/WebCore/rendering/RenderListBox.cpp (139502 => 139503)


--- trunk/Source/WebCore/rendering/RenderListBox.cpp	2013-01-11 22:45:35 UTC (rev 139502)
+++ trunk/Source/WebCore/rendering/RenderListBox.cpp	2013-01-11 22:52:31 UTC (rev 139503)
@@ -554,7 +554,7 @@
     return listIndexAtOffset(positionOffset);
 }
 
-void RenderListBox::autoscroll(const IntPoint&)
+void RenderListBox::autoscroll()
 {
     IntPoint pos = frame()->view()->windowToContents(frame()->eventHandler()->lastKnownMousePosition());
 

Modified: trunk/Source/WebCore/rendering/RenderListBox.h (139502 => 139503)


--- trunk/Source/WebCore/rendering/RenderListBox.h	2013-01-11 22:45:35 UTC (rev 139502)
+++ trunk/Source/WebCore/rendering/RenderListBox.h	2013-01-11 22:52:31 UTC (rev 139503)
@@ -84,7 +84,7 @@
     virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint&);
 
     virtual bool canBeProgramaticallyScrolled() const { return true; }
-    virtual void autoscroll(const IntPoint&);
+    virtual void autoscroll();
     virtual void stopAutoscroll();
 
     virtual bool shouldPanScroll() const { return true; }

Modified: trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp (139502 => 139503)


--- trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp	2013-01-11 22:45:35 UTC (rev 139502)
+++ trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp	2013-01-11 22:52:31 UTC (rev 139503)
@@ -381,11 +381,11 @@
         && style()->textOverflow() == TextOverflowEllipsis;
 }
 
-void RenderTextControlSingleLine::autoscroll(const IntPoint& position)
+void RenderTextControlSingleLine::autoscroll()
 {
     RenderLayer* layer = innerTextElement()->renderBox()->layer();
     if (layer)
-        layer->autoscroll(position);
+        layer->autoscroll();
 }
 
 int RenderTextControlSingleLine::scrollWidth() const

Modified: trunk/Source/WebCore/rendering/RenderTextControlSingleLine.h (139502 => 139503)


--- trunk/Source/WebCore/rendering/RenderTextControlSingleLine.h	2013-01-11 22:45:35 UTC (rev 139502)
+++ trunk/Source/WebCore/rendering/RenderTextControlSingleLine.h	2013-01-11 22:52:31 UTC (rev 139503)
@@ -58,7 +58,7 @@
 
     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) OVERRIDE;
 
-    virtual void autoscroll(const IntPoint&);
+    virtual void autoscroll();
 
     // Subclassed to forward to our inner div.
     virtual int scrollLeft() const;

Modified: trunk/Source/WebKit/chromium/ChangeLog (139502 => 139503)


--- trunk/Source/WebKit/chromium/ChangeLog	2013-01-11 22:45:35 UTC (rev 139502)
+++ trunk/Source/WebKit/chromium/ChangeLog	2013-01-11 22:52:31 UTC (rev 139503)
@@ -1,3 +1,21 @@
+2013-01-11  Sheriff Bot  <webkit.review....@gmail.com>
+
+        Unreviewed, rolling out r139044.
+        http://trac.webkit.org/changeset/139044
+        https://bugs.webkit.org/show_bug.cgi?id=106702
+
+        Caused various scrolling anomolies on Mac with drag and drop
+        (Requested by smfr on #webkit).
+
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::WebViewImpl):
+        (WebKit::WebViewImpl::dragSourceEndedAt):
+        (WebKit::WebViewImpl::dragSourceMovedTo):
+        (WebKit::WebViewImpl::dragTargetDrop):
+        (WebKit::WebViewImpl::dragTargetDragEnterOrOver):
+        * src/WebViewImpl.h:
+        (WebKit):
+
 2013-01-11  Tony Chang  <t...@chromium.org>
 
         [chromium] Don't regenerate all bindings when any idl file changes

Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (139502 => 139503)


--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2013-01-11 22:45:35 UTC (rev 139502)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2013-01-11 22:52:31 UTC (rev 139503)
@@ -53,6 +53,7 @@
 #include "DocumentLoader.h"
 #include "DragController.h"
 #include "DragData.h"
+#include "DragScrollTimer.h"
 #include "DragSession.h"
 #include "Editor.h"
 #include "EventHandler.h"
@@ -413,6 +414,7 @@
     , m_autofillPopup(0)
     , m_isTransparent(false)
     , m_tabsToLinks(false)
+    , m_dragScrollTimer(adoptPtr(new DragScrollTimer))
     , m_isCancelingFullScreen(false)
     , m_benchmarkSupport(this)
 #if USE(ACCELERATED_COMPOSITING)
@@ -3236,6 +3238,7 @@
                            false, 0);
     m_page->mainFrame()->eventHandler()->dragSourceEndedAt(pme,
         static_cast<DragOperation>(operation));
+    m_dragScrollTimer->stop();
 }
 
 void WebViewImpl::dragSourceMovedTo(
@@ -3243,6 +3246,7 @@
     const WebPoint& screenPoint,
     WebDragOperation operation)
 {
+    m_dragScrollTimer->triggerScroll(mainFrameImpl()->frameView(), clientPoint);
 }
 
 void WebViewImpl::dragSourceSystemDragEnded()
@@ -3328,6 +3332,8 @@
 
     m_dragOperation = WebDragOperationNone;
     m_currentDragData = 0;
+
+    m_dragScrollTimer->stop();
 }
 
 WebDragOperation WebViewImpl::dragTargetDragEnterOrOver(const WebPoint& clientPoint, const WebPoint& screenPoint, DragAction dragAction, int keyModifiers)
@@ -3355,6 +3361,11 @@
 
      m_dragOperation = static_cast<WebDragOperation>(dropEffect);
 
+    if (dragAction == DragOver)
+        m_dragScrollTimer->triggerScroll(mainFrameImpl()->frameView(), clientPoint);
+    else
+        m_dragScrollTimer->stop();
+
     return m_dragOperation;
 }
 

Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.h (139502 => 139503)


--- trunk/Source/WebKit/chromium/src/WebViewImpl.h	2013-01-11 22:45:35 UTC (rev 139502)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.h	2013-01-11 22:52:31 UTC (rev 139503)
@@ -91,6 +91,7 @@
 class ContextFeaturesClientImpl;
 class ContextMenuClientImpl;
 class DeviceOrientationClientProxy;
+class DragScrollTimer;
 class GeolocationClientProxy;
 class LinkHighlight;
 class NonCompositedContentHost;
@@ -816,6 +817,7 @@
 
     typedef HashMap<WTF::String, WTF::String> SettingsMap;
     OwnPtr<SettingsMap> m_inspectorSettingsMap;
+    OwnPtr<DragScrollTimer> m_dragScrollTimer;
 
 #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
     // The provider of desktop notifications;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to