Skip to content

Commit

Permalink
[chromium] Remove drag and drop API methods that are no longer used
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=90996

Reviewed by Adam Barth.

Source/WebKit/chromium:

In r117327, we added a parameter for modifier keys to these methods.
Chromium has since switched to using the methods that require the
extra parameter so we can remove these methods.

* public/WebView.h:
(WebView):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::dragTargetDragEnter):
(WebKit::WebViewImpl::dragTargetDragOver):
* src/WebViewImpl.h:
(WebViewImpl):

Tools:

Migrate DRT to use the methods that take modifier keys.

* DumpRenderTree/chromium/EventSender.cpp:
(EventSender::doDragDrop):
(EventSender::doMouseUp):
(EventSender::doMouseMove):
(EventSender::beginDragWithFiles):

Canonical link: https://commits.webkit.org/108960@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@122486 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
idealisms committed Jul 12, 2012
1 parent 9fce179 commit 292eced
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 52 deletions.
19 changes: 19 additions & 0 deletions Source/WebKit/chromium/ChangeLog
@@ -1,3 +1,22 @@
2012-07-12 Tony Chang <tony@chromium.org>

[chromium] Remove drag and drop API methods that are no longer used
https://bugs.webkit.org/show_bug.cgi?id=90996

Reviewed by Adam Barth.

In r117327, we added a parameter for modifier keys to these methods.
Chromium has since switched to using the methods that require the
extra parameter so we can remove these methods.

* public/WebView.h:
(WebView):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::dragTargetDragEnter):
(WebKit::WebViewImpl::dragTargetDragOver):
* src/WebViewImpl.h:
(WebViewImpl):

2012-07-12 Tony Chang <tony@chromium.org>

Unreviewed. Rolled DEPS.
Expand Down
12 changes: 0 additions & 12 deletions Source/WebKit/chromium/public/WebView.h
Expand Up @@ -317,28 +317,16 @@ class WebView : public WebWidget {

// Callback methods when a drag-and-drop operation is trying to drop
// something on the WebView.
// FIXME: Remove this method after chromium changes catch up.
virtual WebDragOperation dragTargetDragEnter(
const WebDragData&,
const WebPoint& clientPoint, const WebPoint& screenPoint,
WebDragOperationsMask operationsAllowed) = 0;
virtual WebDragOperation dragTargetDragEnter(
const WebDragData&,
const WebPoint& clientPoint, const WebPoint& screenPoint,
WebDragOperationsMask operationsAllowed,
int keyModifiers) = 0;
// FIXME: Remove this method after chromium changes catch up.
virtual WebDragOperation dragTargetDragOver(
const WebPoint& clientPoint, const WebPoint& screenPoint,
WebDragOperationsMask operationsAllowed) = 0;
virtual WebDragOperation dragTargetDragOver(
const WebPoint& clientPoint, const WebPoint& screenPoint,
WebDragOperationsMask operationsAllowed,
int keyModifiers) = 0;
virtual void dragTargetDragLeave() = 0;
// FIXME: Remove this method after chromium changes catch up.
virtual void dragTargetDrop(
const WebPoint& clientPoint, const WebPoint& screenPoint) = 0;
virtual void dragTargetDrop(
const WebPoint& clientPoint, const WebPoint& screenPoint,
int keyModifiers) = 0;
Expand Down
23 changes: 0 additions & 23 deletions Source/WebKit/chromium/src/WebViewImpl.cpp
Expand Up @@ -2792,15 +2792,6 @@ void WebViewImpl::dragSourceSystemDragEnded()
}
}

WebDragOperation WebViewImpl::dragTargetDragEnter(
const WebDragData& webDragData,
const WebPoint& clientPoint,
const WebPoint& screenPoint,
WebDragOperationsMask operationsAllowed)
{
return dragTargetDragEnter(webDragData, clientPoint, screenPoint, operationsAllowed, 0);
}

WebDragOperation WebViewImpl::dragTargetDragEnter(
const WebDragData& webDragData,
const WebPoint& clientPoint,
Expand All @@ -2816,14 +2807,6 @@ WebDragOperation WebViewImpl::dragTargetDragEnter(
return dragTargetDragEnterOrOver(clientPoint, screenPoint, DragEnter, keyModifiers);
}

WebDragOperation WebViewImpl::dragTargetDragOver(
const WebPoint& clientPoint,
const WebPoint& screenPoint,
WebDragOperationsMask operationsAllowed)
{
return dragTargetDragOver(clientPoint, screenPoint, operationsAllowed, 0);
}

WebDragOperation WebViewImpl::dragTargetDragOver(
const WebPoint& clientPoint,
const WebPoint& screenPoint,
Expand Down Expand Up @@ -2853,12 +2836,6 @@ void WebViewImpl::dragTargetDragLeave()
m_currentDragData = 0;
}

void WebViewImpl::dragTargetDrop(const WebPoint& clientPoint,
const WebPoint& screenPoint)
{
dragTargetDrop(clientPoint, screenPoint, 0);
}

void WebViewImpl::dragTargetDrop(const WebPoint& clientPoint,
const WebPoint& screenPoint,
int keyModifiers)
Expand Down
12 changes: 0 additions & 12 deletions Source/WebKit/chromium/src/WebViewImpl.h
Expand Up @@ -235,30 +235,18 @@ class WebViewImpl : public WebView, public WebLayerTreeViewClient, public RefCou
const WebPoint& screenPoint,
WebDragOperation operation);
virtual void dragSourceSystemDragEnded();
virtual WebDragOperation dragTargetDragEnter(
const WebDragData&,
const WebPoint& clientPoint,
const WebPoint& screenPoint,
WebDragOperationsMask operationsAllowed);
virtual WebDragOperation dragTargetDragEnter(
const WebDragData&,
const WebPoint& clientPoint,
const WebPoint& screenPoint,
WebDragOperationsMask operationsAllowed,
int keyModifiers);
virtual WebDragOperation dragTargetDragOver(
const WebPoint& clientPoint,
const WebPoint& screenPoint,
WebDragOperationsMask operationsAllowed);
virtual WebDragOperation dragTargetDragOver(
const WebPoint& clientPoint,
const WebPoint& screenPoint,
WebDragOperationsMask operationsAllowed,
int keyModifiers);
virtual void dragTargetDragLeave();
virtual void dragTargetDrop(
const WebPoint& clientPoint,
const WebPoint& screenPoint);
virtual void dragTargetDrop(
const WebPoint& clientPoint,
const WebPoint& screenPoint,
Expand Down
15 changes: 15 additions & 0 deletions Tools/ChangeLog
@@ -1,3 +1,18 @@
2012-07-12 Tony Chang <tony@chromium.org>

[chromium] Remove drag and drop API methods that are no longer used
https://bugs.webkit.org/show_bug.cgi?id=90996

Reviewed by Adam Barth.

Migrate DRT to use the methods that take modifier keys.

* DumpRenderTree/chromium/EventSender.cpp:
(EventSender::doDragDrop):
(EventSender::doMouseUp):
(EventSender::doMouseMove):
(EventSender::beginDragWithFiles):

2012-07-12 Ojan Vafai <ojan@chromium.org>

Allow putting ranges in user.py list prompts
Expand Down
10 changes: 5 additions & 5 deletions Tools/DumpRenderTree/chromium/EventSender.cpp
Expand Up @@ -351,7 +351,7 @@ void EventSender::doDragDrop(const WebDragData& dragData, WebDragOperationsMask
WebPoint screenPoint(event.globalX, event.globalY);
currentDragData = dragData;
currentDragEffectsAllowed = mask;
currentDragEffect = webview()->dragTargetDragEnter(dragData, clientPoint, screenPoint, currentDragEffectsAllowed);
currentDragEffect = webview()->dragTargetDragEnter(dragData, clientPoint, screenPoint, currentDragEffectsAllowed, 0);

// Finish processing events.
replaySavedEvents();
Expand Down Expand Up @@ -466,9 +466,9 @@ void EventSender::doMouseUp(const WebMouseEvent& e)
WebPoint clientPoint(e.x, e.y);
WebPoint screenPoint(e.globalX, e.globalY);

currentDragEffect = webview()->dragTargetDragOver(clientPoint, screenPoint, currentDragEffectsAllowed);
currentDragEffect = webview()->dragTargetDragOver(clientPoint, screenPoint, currentDragEffectsAllowed, 0);
if (currentDragEffect)
webview()->dragTargetDrop(clientPoint, screenPoint);
webview()->dragTargetDrop(clientPoint, screenPoint, 0);
else
webview()->dragTargetDragLeave();
webview()->dragSourceEndedAt(clientPoint, screenPoint, currentDragEffect);
Expand Down Expand Up @@ -509,7 +509,7 @@ void EventSender::doMouseMove(const WebMouseEvent& e)
return;
WebPoint clientPoint(e.x, e.y);
WebPoint screenPoint(e.globalX, e.globalY);
currentDragEffect = webview()->dragTargetDragOver(clientPoint, screenPoint, currentDragEffectsAllowed);
currentDragEffect = webview()->dragTargetDragOver(clientPoint, screenPoint, currentDragEffectsAllowed, 0);
}

void EventSender::keyDown(const CppArgumentList& arguments, CppVariant* result)
Expand Down Expand Up @@ -912,7 +912,7 @@ void EventSender::beginDragWithFiles(const CppArgumentList& arguments, CppVarian
currentDragEffectsAllowed = WebKit::WebDragOperationCopy;

// Provide a drag source.
webview()->dragTargetDragEnter(currentDragData, lastMousePos, lastMousePos, currentDragEffectsAllowed);
webview()->dragTargetDragEnter(currentDragData, lastMousePos, lastMousePos, currentDragEffectsAllowed, 0);

// dragMode saves events and then replays them later. We don't need/want that.
dragMode.set(false);
Expand Down

0 comments on commit 292eced

Please sign in to comment.