Commit a5e48bb2 authored by darin@apple.com's avatar darin@apple.com

<https://webkit.org/b/119941> Make Page::dragController return a reference

Reviewed by Andreas Kling.

Source/WebCore:

* page/Page.h:
(WebCore::Page::dragController): Return a reference instead of a pointer.

* page/DragController.cpp:
(WebCore::DragController::concludeEditDrag):
* page/EventHandler.cpp:
(WebCore::EventHandler::eventMayStartDrag):
(WebCore::EventHandler::updateDragSourceActionsAllowed):
(WebCore::EventHandler::handleDrag):
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::passSubframeEventToSubframe):
Updated call sites.

Source/WebKit/gtk:

* webkit/webkitwebview.cpp:
(dragExitedCallback):
(webkit_web_view_drag_motion):
(webkit_web_view_drag_data_received):
(webkit_web_view_drag_drop):
Updated call sites.

Source/WebKit/mac:

* WebView/WebFrameView.mm:
(-[WebFrameView _setDocumentView:]):
* WebView/WebHTMLView.mm:
(-[WebHTMLView draggingSourceOperationMaskForLocal:]):
(-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
* WebView/WebView.mm:
(-[WebView _setInitiatedDrag:]):
(-[WebView draggingEntered:]):
(-[WebView draggingUpdated:]):
(-[WebView draggingExited:]):
(-[WebView performDragOperation:]):
(-[WebView moveDragCaretToPoint:]):
(-[WebView removeDragCaret]):
Updated call sites.

Source/WebKit/qt:

* WebCoreSupport/DragClientQt.cpp:
(WebCore::DragClientQt::startDrag):
* WebCoreSupport/QWebPageAdapter.cpp:
(QWebPageAdapter::dragEntered):
(QWebPageAdapter::dragLeaveEvent):
(QWebPageAdapter::dragUpdated):
(QWebPageAdapter::performDrag):
Updated call sites.

Source/WebKit/win:

* WebCoreSupport/WebDragClient.cpp:
(WebDragClient::startDrag):
* WebView.cpp:
(WebView::keyStateToDragOperation):
(WebView::DragEnter):
(WebView::DragOver):
(WebView::DragLeave):
(WebView::Drop):
Updated call sites.

Source/WebKit2:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::performDragControllerAction):
(WebKit::WebPage::dragEnded):
Updated call sites.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154224 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 85bc10bd
2013-08-17 Darin Adler <darin@apple.com>
<https://webkit.org/b/119941> Make Page::dragController return a reference
Reviewed by Andreas Kling.
* page/Page.h:
(WebCore::Page::dragController): Return a reference instead of a pointer.
* page/DragController.cpp:
(WebCore::DragController::concludeEditDrag):
* page/EventHandler.cpp:
(WebCore::EventHandler::eventMayStartDrag):
(WebCore::EventHandler::updateDragSourceActionsAllowed):
(WebCore::EventHandler::handleDrag):
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::passSubframeEventToSubframe):
Updated call sites.
2013-08-17 Morten Stenshorne <mstensho@opera.com>
<https://webkit.org/b/119795> Propagate writing-mode from the first region to the flow thread
......@@ -492,7 +492,7 @@ bool DragController::concludeEditDrag(DragData* dragData)
return fileInput->receiveDroppedFiles(dragData);
}
if (!m_page->dragController()->canProcessDrag(dragData)) {
if (!m_page->dragController().canProcessDrag(dragData)) {
m_page->dragCaretController()->clear();
return false;
}
......
......@@ -789,7 +789,7 @@ bool EventHandler::eventMayStartDrag(const PlatformMouseEvent& event) const
HitTestResult result(view->windowToContents(event.position()));
m_frame->contentRenderer()->hitTest(request, result);
DragState state;
return result.innerElement() && page->dragController()->draggableElement(m_frame, result.innerElement(), result.roundedPointInInnerNodeFrame(), state);
return result.innerElement() && page->dragController().draggableElement(m_frame, result.innerElement(), result.roundedPointInInnerNodeFrame(), state);
}
void EventHandler::updateSelectionForMouseDrag()
......@@ -1025,7 +1025,7 @@ DragSourceAction EventHandler::updateDragSourceActionsAllowed() const
if (!view)
return DragSourceActionNone;
return page->dragController()->delegateDragSourceAction(view->contentsToRootView(m_mouseDownPos));
return page->dragController().delegateDragSourceAction(view->contentsToRootView(m_mouseDownPos));
}
#endif // ENABLE(DRAG_SUPPORT)
......@@ -3479,7 +3479,7 @@ bool EventHandler::handleDrag(const MouseEventWithHitTestResults& event, CheckDr
HitTestResult result(m_mouseDownPos);
m_frame->contentRenderer()->hitTest(request, result);
if (m_frame->page())
dragState().source = m_frame->page()->dragController()->draggableElement(m_frame, result.innerElement(), m_mouseDownPos, dragState());
dragState().source = m_frame->page()->dragController().draggableElement(m_frame, result.innerElement(), m_mouseDownPos, dragState());
if (!dragState().source)
m_mouseDownMayStartDrag = false; // no element is draggable
......@@ -3577,8 +3577,7 @@ bool EventHandler::handleDrag(const MouseEventWithHitTestResults& event, CheckDr
if (m_mouseDownMayStartDrag) {
Page* page = m_frame->page();
DragController* dragController = page ? page->dragController() : 0;
m_didStartDrag = dragController && dragController->startDrag(m_frame, dragState(), srcOp, event.event(), m_mouseDownPos);
m_didStartDrag = page && page->dragController().startDrag(m_frame, dragState(), srcOp, event.event(), m_mouseDownPos);
// In WebKit2 we could re-enter this code and start another drag.
// On OS X this causes problems with the ownership of the pasteboard and the promised types.
if (m_didStartDrag) {
......
......@@ -187,7 +187,7 @@ public:
Chrome& chrome() const { return *m_chrome; }
DragCaretController* dragCaretController() const { return m_dragCaretController.get(); }
#if ENABLE(DRAG_SUPPORT)
DragController* dragController() const { return m_dragController.get(); }
DragController& dragController() const { return *m_dragController; }
#endif
FocusController& focusController() const { return *m_focusController; }
#if ENABLE(CONTEXT_MENUS)
......
......@@ -339,7 +339,7 @@ bool EventHandler::passSubframeEventToSubframe(MouseEventWithHitTestResults& eve
if (!m_mouseDownWasInSubframe)
return false;
#if ENABLE(DRAG_SUPPORT)
if (subframe->page()->dragController()->didInitiateDrag())
if (subframe->page()->dragController().didInitiateDrag())
return false;
#endif
case NSMouseMoved:
......
2013-08-17 Darin Adler <darin@apple.com>
<https://webkit.org/b/119941> Make Page::dragController return a reference
Reviewed by Andreas Kling.
* webkit/webkitwebview.cpp:
(dragExitedCallback):
(webkit_web_view_drag_motion):
(webkit_web_view_drag_data_received):
(webkit_web_view_drag_drop):
Updated call sites.
2013-08-16 Pratik Solanki <psolanki@apple.com>
<https://webkit.org/b/119852> Frame::scriptController() should return a reference
......
......@@ -1533,8 +1533,8 @@ static void dragExitedCallback(GtkWidget* widget, DragData* dragData, bool dropH
// Don't call dragExited if we have just received a drag-drop signal. This
// happens in the case of a successful drop onto the view.
if (!dropHappened)
core(WEBKIT_WEB_VIEW(widget))->dragController()->dragExited(dragData);
core(WEBKIT_WEB_VIEW(widget))->dragController()->dragEnded();
core(WEBKIT_WEB_VIEW(widget))->dragController().dragExited(dragData);
core(WEBKIT_WEB_VIEW(widget))->dragController().dragEnded();
}
static void webkit_web_view_drag_leave(GtkWidget* widget, GdkDragContext* context, guint time)
......@@ -1551,7 +1551,7 @@ static gboolean webkit_web_view_drag_motion(GtkWidget* widget, GdkDragContext* c
return TRUE;
DragData dragData(dataObject, position, convertWidgetPointToScreenPoint(widget, position), gdkDragActionToDragOperation(gdk_drag_context_get_actions(context)));
DragOperation operation = core(webView)->dragController()->dragUpdated(&dragData).operation;
DragOperation operation = core(webView)->dragController().dragUpdated(&dragData).operation;
gdk_drag_status(context, dragOperationToSingleGdkDragAction(operation), time);
return TRUE;
}
......@@ -1565,7 +1565,7 @@ static void webkit_web_view_drag_data_received(GtkWidget* widget, GdkDragContext
return;
DragData dragData(dataObject, position, convertWidgetPointToScreenPoint(widget, position), gdkDragActionToDragOperation(gdk_drag_context_get_actions(context)));
DragOperation operation = core(webView)->dragController()->dragEntered(&dragData).operation;
DragOperation operation = core(webView)->dragController().dragEntered(&dragData).operation;
gdk_drag_status(context, dragOperationToSingleGdkDragAction(operation), time);
}
......@@ -1578,7 +1578,7 @@ static gboolean webkit_web_view_drag_drop(GtkWidget* widget, GdkDragContext* con
IntPoint position(x, y);
DragData dragData(dataObject, position, convertWidgetPointToScreenPoint(widget, position), gdkDragActionToDragOperation(gdk_drag_context_get_actions(context)));
core(webView)->dragController()->performDrag(&dragData);
core(webView)->dragController().performDrag(&dragData);
gtk_drag_finish(context, TRUE, FALSE, time);
return TRUE;
}
......
2013-08-17 Darin Adler <darin@apple.com>
<https://webkit.org/b/119941> Make Page::dragController return a reference
Reviewed by Andreas Kling.
* WebView/WebFrameView.mm:
(-[WebFrameView _setDocumentView:]):
* WebView/WebHTMLView.mm:
(-[WebHTMLView draggingSourceOperationMaskForLocal:]):
(-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
* WebView/WebView.mm:
(-[WebView _setInitiatedDrag:]):
(-[WebView draggingEntered:]):
(-[WebView draggingUpdated:]):
(-[WebView draggingExited:]):
(-[WebView performDragOperation:]):
(-[WebView moveDragCaretToPoint:]):
(-[WebView removeDragCaret]):
Updated call sites.
2013-08-16 Pratik Solanki <psolanki@apple.com>
<https://webkit.org/b/119852> Frame::scriptController() should return a reference
......
......@@ -139,7 +139,7 @@ enum {
WebDynamicScrollBarsView *sv = [self _scrollView];
#if ENABLE(DRAG_SUPPORT)
core([self _webView])->dragController()->setDidInitiateDrag(false);
core([self _webView])->dragController().setDidInitiateDrag(false);
#endif
[sv setSuppressLayout:YES];
......
......@@ -3626,7 +3626,7 @@ static void setMenuTargets(NSMenu* menu)
if (!page)
return NSDragOperationNone;
return (NSDragOperation)page->dragController()->sourceDragOperation();
return (NSDragOperation)page->dragController().sourceDragOperation();
}
- (void)draggedImage:(NSImage *)anImage endedAt:(NSPoint)aPoint operation:(NSDragOperation)operation
......@@ -3637,9 +3637,8 @@ static void setMenuTargets(NSMenu* menu)
NSPoint windowMouseLoc = windowImageLoc;
if (Page* page = core([self _webView])) {
DragController* dragController = page->dragController();
windowMouseLoc = NSMakePoint(windowImageLoc.x + dragController->dragOffset().x(), windowImageLoc.y + dragController->dragOffset().y());
dragController->dragEnded();
windowMouseLoc = NSMakePoint(windowImageLoc.x + page->dragController().dragOffset().x(), windowImageLoc.y + page->dragController().dragOffset().y());
page->dragController().dragEnded();
}
[[self _frame] _dragSourceEndedAt:windowMouseLoc operation:operation];
......@@ -3696,7 +3695,7 @@ static bool matchesExtensionOrEquivalent(NSString *filename, NSString *extension
if (!page)
return nil;
const KURL& imageURL = page->dragController()->draggingImageURL();
const KURL& imageURL = page->dragController().draggingImageURL();
ASSERT(!imageURL.isEmpty());
draggingImageURL = imageURL;
......
......@@ -2043,7 +2043,7 @@ static inline IMP getMethod(id o, SEL s)
{
if (!_private->page)
return;
_private->page->dragController()->setDidInitiateDrag(initiatedDrag);
_private->page->dragController().setDidInitiateDrag(initiatedDrag);
}
#endif
......@@ -4302,7 +4302,7 @@ static NSString * const backingPropertyOldScaleFactorKey = @"NSBackingPropertyOl
IntPoint client([draggingInfo draggingLocation]);
IntPoint global(globalPoint([draggingInfo draggingLocation], [self window]));
DragData dragData(draggingInfo, client, global, static_cast<DragOperation>([draggingInfo draggingSourceOperationMask]), [self applicationFlags:draggingInfo]);
return core(self)->dragController()->dragEntered(&dragData).operation;
return core(self)->dragController().dragEntered(&dragData).operation;
}
- (NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)draggingInfo
......@@ -4314,7 +4314,7 @@ static NSString * const backingPropertyOldScaleFactorKey = @"NSBackingPropertyOl
IntPoint client([draggingInfo draggingLocation]);
IntPoint global(globalPoint([draggingInfo draggingLocation], [self window]));
DragData dragData(draggingInfo, client, global, static_cast<DragOperation>([draggingInfo draggingSourceOperationMask]), [self applicationFlags:draggingInfo]);
return page->dragController()->dragUpdated(&dragData).operation;
return page->dragController().dragUpdated(&dragData).operation;
}
- (void)draggingExited:(id <NSDraggingInfo>)draggingInfo
......@@ -4326,7 +4326,7 @@ static NSString * const backingPropertyOldScaleFactorKey = @"NSBackingPropertyOl
IntPoint client([draggingInfo draggingLocation]);
IntPoint global(globalPoint([draggingInfo draggingLocation], [self window]));
DragData dragData(draggingInfo, client, global, static_cast<DragOperation>([draggingInfo draggingSourceOperationMask]), [self applicationFlags:draggingInfo]);
page->dragController()->dragExited(&dragData);
page->dragController().dragExited(&dragData);
}
- (BOOL)prepareForDragOperation:(id <NSDraggingInfo>)draggingInfo
......@@ -4339,7 +4339,7 @@ static NSString * const backingPropertyOldScaleFactorKey = @"NSBackingPropertyOl
IntPoint client([draggingInfo draggingLocation]);
IntPoint global(globalPoint([draggingInfo draggingLocation], [self window]));
DragData dragData(draggingInfo, client, global, static_cast<DragOperation>([draggingInfo draggingSourceOperationMask]), [self applicationFlags:draggingInfo]);
return core(self)->dragController()->performDrag(&dragData);
return core(self)->dragController().performDrag(&dragData);
}
- (NSView *)_hitTest:(NSPoint *)point dragTypes:(NSSet *)types
......@@ -4512,7 +4512,7 @@ static WebFrame *incrementFrame(WebFrame *frame, WebFindOptions options = 0)
{
#if ENABLE(DRAG_SUPPORT)
if (Page* page = core(self))
page->dragController()->placeDragCaret(IntPoint([self convertPoint:point toView:nil]));
page->dragController().placeDragCaret(IntPoint([self convertPoint:point toView:nil]));
#endif
}
......@@ -4520,7 +4520,7 @@ static WebFrame *incrementFrame(WebFrame *frame, WebFindOptions options = 0)
{
#if ENABLE(DRAG_SUPPORT)
if (Page* page = core(self))
page->dragController()->dragEnded();
page->dragController().dragEnded();
#endif
}
......
2013-08-17 Darin Adler <darin@apple.com>
<https://webkit.org/b/119941> Make Page::dragController return a reference
Reviewed by Andreas Kling.
* WebCoreSupport/DragClientQt.cpp:
(WebCore::DragClientQt::startDrag):
* WebCoreSupport/QWebPageAdapter.cpp:
(QWebPageAdapter::dragEntered):
(QWebPageAdapter::dragLeaveEvent):
(QWebPageAdapter::dragUpdated):
(QWebPageAdapter::performDrag):
Updated call sites.
2013-08-16 Pratik Solanki <psolanki@apple.com>
<https://webkit.org/b/119852> Frame::scriptController() should return a reference
......
......@@ -110,7 +110,7 @@ void DragClientQt::startDrag(DragImageRef dragImage, const IntPoint&, const IntP
PlatformMouseEvent me(m_chromeClient->screenToRootView(QCursor::pos()), QCursor::pos(), LeftButton, PlatformEvent::MouseMoved, 0, false, false, false, false, 0);
frame->eventHandler().dragSourceEndedAt(me, dropActionToDragOperation(actualDropAction));
}
frame->page()->dragController()->dragEnded();
frame->page()->dragController().dragEnded();
#endif
}
......
......@@ -594,25 +594,25 @@ void QWebPageAdapter::wheelEvent(QWheelEvent *ev, int wheelScrollLines)
Qt::DropAction QWebPageAdapter::dragEntered(const QMimeData *data, const QPoint &pos, Qt::DropActions possibleActions)
{
DragData dragData(data, pos, QCursor::pos(), dropActionToDragOp(possibleActions));
return dragOpToDropAction(page->dragController()->dragEntered(&dragData).operation);
return dragOpToDropAction(page->dragController().dragEntered(&dragData).operation);
}
void QWebPageAdapter::dragLeaveEvent()
{
DragData dragData(0, IntPoint(), QCursor::pos(), DragOperationNone);
page->dragController()->dragExited(&dragData);
page->dragController().dragExited(&dragData);
}
Qt::DropAction QWebPageAdapter::dragUpdated(const QMimeData *data, const QPoint &pos, Qt::DropActions possibleActions)
{
DragData dragData(data, pos, QCursor::pos(), dropActionToDragOp(possibleActions));
return dragOpToDropAction(page->dragController()->dragUpdated(&dragData).operation);
return dragOpToDropAction(page->dragController().dragUpdated(&dragData).operation);
}
bool QWebPageAdapter::performDrag(const QMimeData *data, const QPoint &pos, Qt::DropActions possibleActions)
{
DragData dragData(data, pos, QCursor::pos(), dropActionToDragOp(possibleActions));
return page->dragController()->performDrag(&dragData);
return page->dragController().performDrag(&dragData);
}
void QWebPageAdapter::inputMethodEvent(QInputMethodEvent *ev)
......
2013-08-17 Darin Adler <darin@apple.com>
<https://webkit.org/b/119941> Make Page::dragController return a reference
Reviewed by Andreas Kling.
* WebCoreSupport/WebDragClient.cpp:
(WebDragClient::startDrag):
* WebView.cpp:
(WebView::keyStateToDragOperation):
(WebView::DragEnter):
(WebView::DragOver):
(WebView::DragLeave):
(WebView::Drop):
Updated call sites.
2013-08-16 Pratik Solanki <psolanki@apple.com>
<https://webkit.org/b/119852> Frame::scriptController() should return a reference
......
......@@ -145,7 +145,7 @@ void WebDragClient::startDrag(DragImageRef image, const IntPoint& imageOrigin, c
}
}
DWORD okEffect = draggingSourceOperationMaskToDragCursors(m_webView->page()->dragController()->sourceDragOperation());
DWORD okEffect = draggingSourceOperationMaskToDragCursors(m_webView->page()->dragController().sourceDragOperation());
DWORD effect = DROPEFFECT_NONE;
COMPtr<IWebUIDelegate> ui;
HRESULT hr = E_NOTIMPL;
......
......@@ -5186,7 +5186,7 @@ DragOperation WebView::keyStateToDragOperation(DWORD grfKeyState) const
// IDropTarget::DragOver. Note, grfKeyState is the current
// state of the keyboard modifier keys on the keyboard. See:
// <http://msdn.microsoft.com/en-us/library/ms680129(VS.85).aspx>.
DragOperation operation = m_page->dragController()->sourceDragOperation();
DragOperation operation = m_page->dragController().sourceDragOperation();
if ((grfKeyState & (MK_CONTROL | MK_SHIFT)) == (MK_CONTROL | MK_SHIFT))
operation = DragOperationLink;
......@@ -5210,7 +5210,7 @@ HRESULT STDMETHODCALLTYPE WebView::DragEnter(
::ScreenToClient(m_viewWindow, (LPPOINT)&localpt);
DragData data(pDataObject, IntPoint(localpt.x, localpt.y),
IntPoint(pt.x, pt.y), keyStateToDragOperation(grfKeyState));
*pdwEffect = dragOperationToDragCursor(m_page->dragController()->dragEntered(&data).operation);
*pdwEffect = dragOperationToDragCursor(m_page->dragController().dragEntered(&data).operation);
m_lastDropEffect = *pdwEffect;
m_dragData = pDataObject;
......@@ -5229,7 +5229,7 @@ HRESULT STDMETHODCALLTYPE WebView::DragOver(
::ScreenToClient(m_viewWindow, (LPPOINT)&localpt);
DragData data(m_dragData.get(), IntPoint(localpt.x, localpt.y),
IntPoint(pt.x, pt.y), keyStateToDragOperation(grfKeyState));
*pdwEffect = dragOperationToDragCursor(m_page->dragController()->dragUpdated(&data).operation);
*pdwEffect = dragOperationToDragCursor(m_page->dragController().dragUpdated(&data).operation);
} else
*pdwEffect = DROPEFFECT_NONE;
......@@ -5245,7 +5245,7 @@ HRESULT STDMETHODCALLTYPE WebView::DragLeave()
if (m_dragData) {
DragData data(m_dragData.get(), IntPoint(), IntPoint(),
DragOperationNone);
m_page->dragController()->dragExited(&data);
m_page->dragController().dragExited(&data);
m_dragData = 0;
}
return S_OK;
......@@ -5263,7 +5263,7 @@ HRESULT STDMETHODCALLTYPE WebView::Drop(
::ScreenToClient(m_viewWindow, (LPPOINT)&localpt);
DragData data(pDataObject, IntPoint(localpt.x, localpt.y),
IntPoint(pt.x, pt.y), keyStateToDragOperation(grfKeyState));
m_page->dragController()->performDrag(&data);
m_page->dragController().performDrag(&data);
return S_OK;
}
......
2013-08-17 Darin Adler <darin@apple.com>
<https://webkit.org/b/119941> Make Page::dragController return a reference
Reviewed by Andreas Kling.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::performDragControllerAction):
(WebKit::WebPage::dragEnded):
Updated call sites.
2013-08-17 David Kilzer <ddkilzer@apple.com>
WebKit2 fails to build with trunk clang: error: 'WebPluginSiteDataManagerh' is used as a header guard here, followed by #define of a different macro [-Werror,-Wheader-guard]
......
......@@ -2683,19 +2683,19 @@ void WebPage::performDragControllerAction(uint64_t action, WebCore::DragData dra
switch (action) {
case DragControllerActionEntered:
send(Messages::WebPageProxy::DidPerformDragControllerAction(m_page->dragController()->dragEntered(&dragData)));
send(Messages::WebPageProxy::DidPerformDragControllerAction(m_page->dragController().dragEntered(&dragData)));
break;
case DragControllerActionUpdated:
send(Messages::WebPageProxy::DidPerformDragControllerAction(m_page->dragController()->dragUpdated(&dragData)));
send(Messages::WebPageProxy::DidPerformDragControllerAction(m_page->dragController().dragUpdated(&dragData)));
break;
case DragControllerActionExited:
m_page->dragController()->dragExited(&dragData);
m_page->dragController().dragExited(&dragData);
break;
case DragControllerActionPerformDrag: {
m_page->dragController()->performDrag(&dragData);
m_page->dragController().performDrag(&dragData);
break;
}
......@@ -2723,15 +2723,15 @@ void WebPage::performDragControllerAction(uint64_t action, WebCore::IntPoint cli
DragData dragData(dragStorageName, clientPosition, globalPosition, static_cast<DragOperation>(draggingSourceOperationMask), static_cast<DragApplicationFlags>(flags));
switch (action) {
case DragControllerActionEntered:
send(Messages::WebPageProxy::DidPerformDragControllerAction(m_page->dragController()->dragEntered(&dragData)));
send(Messages::WebPageProxy::DidPerformDragControllerAction(m_page->dragController().dragEntered(&dragData)));
break;
case DragControllerActionUpdated:
send(Messages::WebPageProxy::DidPerformDragControllerAction(m_page->dragController()->dragUpdated(&dragData)));
send(Messages::WebPageProxy::DidPerformDragControllerAction(m_page->dragController().dragUpdated(&dragData)));
break;
case DragControllerActionExited:
m_page->dragController()->dragExited(&dragData);
m_page->dragController().dragExited(&dragData);
break;
case DragControllerActionPerformDrag: {
......@@ -2743,7 +2743,7 @@ void WebPage::performDragControllerAction(uint64_t action, WebCore::IntPoint cli
m_pendingDropExtensionsForFileUpload.append(extension);
}
m_page->dragController()->performDrag(&dragData);
m_page->dragController().performDrag(&dragData);
// If we started loading a local file, the sandbox extension tracker would have adopted this
// pending drop sandbox extension. If not, we'll play it safe and clear it.
......@@ -2761,10 +2761,10 @@ void WebPage::performDragControllerAction(uint64_t action, WebCore::IntPoint cli
void WebPage::dragEnded(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t operation)
{
IntPoint adjustedClientPosition(clientPosition.x() + m_page->dragController()->dragOffset().x(), clientPosition.y() + m_page->dragController()->dragOffset().y());
IntPoint adjustedGlobalPosition(globalPosition.x() + m_page->dragController()->dragOffset().x(), globalPosition.y() + m_page->dragController()->dragOffset().y());
IntPoint adjustedClientPosition(clientPosition.x() + m_page->dragController().dragOffset().x(), clientPosition.y() + m_page->dragController().dragOffset().y());
IntPoint adjustedGlobalPosition(globalPosition.x() + m_page->dragController().dragOffset().x(), globalPosition.y() + m_page->dragController().dragOffset().y());
m_page->dragController()->dragEnded();
m_page->dragController().dragEnded();
FrameView* view = m_page->mainFrame()->view();
if (!view)
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment