Title: [154224] trunk/Source
Revision
154224
Author
[email protected]
Date
2013-08-17 07:27:20 -0700 (Sat, 17 Aug 2013)

Log Message

<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.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (154223 => 154224)


--- trunk/Source/WebCore/ChangeLog	2013-08-17 12:38:49 UTC (rev 154223)
+++ trunk/Source/WebCore/ChangeLog	2013-08-17 14:27:20 UTC (rev 154224)
@@ -1,3 +1,22 @@
+2013-08-17  Darin Adler  <[email protected]>
+
+        <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  <[email protected]>
 
         <https://webkit.org/b/119795> Propagate writing-mode from the first region to the flow thread

Modified: trunk/Source/WebCore/page/DragController.cpp (154223 => 154224)


--- trunk/Source/WebCore/page/DragController.cpp	2013-08-17 12:38:49 UTC (rev 154223)
+++ trunk/Source/WebCore/page/DragController.cpp	2013-08-17 14:27:20 UTC (rev 154224)
@@ -492,7 +492,7 @@
         return fileInput->receiveDroppedFiles(dragData);
     }
 
-    if (!m_page->dragController()->canProcessDrag(dragData)) {
+    if (!m_page->dragController().canProcessDrag(dragData)) {
         m_page->dragCaretController()->clear();
         return false;
     }

Modified: trunk/Source/WebCore/page/EventHandler.cpp (154223 => 154224)


--- trunk/Source/WebCore/page/EventHandler.cpp	2013-08-17 12:38:49 UTC (rev 154223)
+++ trunk/Source/WebCore/page/EventHandler.cpp	2013-08-17 14:27:20 UTC (rev 154224)
@@ -789,7 +789,7 @@
     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 @@
     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 @@
         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 @@
     
     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) {

Modified: trunk/Source/WebCore/page/Page.h (154223 => 154224)


--- trunk/Source/WebCore/page/Page.h	2013-08-17 12:38:49 UTC (rev 154223)
+++ trunk/Source/WebCore/page/Page.h	2013-08-17 14:27:20 UTC (rev 154224)
@@ -187,7 +187,7 @@
     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)

Modified: trunk/Source/WebCore/page/mac/EventHandlerMac.mm (154223 => 154224)


--- trunk/Source/WebCore/page/mac/EventHandlerMac.mm	2013-08-17 12:38:49 UTC (rev 154223)
+++ trunk/Source/WebCore/page/mac/EventHandlerMac.mm	2013-08-17 14:27:20 UTC (rev 154224)
@@ -339,7 +339,7 @@
             if (!m_mouseDownWasInSubframe)
                 return false;
 #if ENABLE(DRAG_SUPPORT)
-            if (subframe->page()->dragController()->didInitiateDrag())
+            if (subframe->page()->dragController().didInitiateDrag())
                 return false;
 #endif
         case NSMouseMoved:

Modified: trunk/Source/WebKit/gtk/ChangeLog (154223 => 154224)


--- trunk/Source/WebKit/gtk/ChangeLog	2013-08-17 12:38:49 UTC (rev 154223)
+++ trunk/Source/WebKit/gtk/ChangeLog	2013-08-17 14:27:20 UTC (rev 154224)
@@ -1,3 +1,16 @@
+2013-08-17  Darin Adler  <[email protected]>
+
+        <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  <[email protected]>
 
         <https://webkit.org/b/119852> Frame::scriptController() should return a reference

Modified: trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp (154223 => 154224)


--- trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp	2013-08-17 12:38:49 UTC (rev 154223)
+++ trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp	2013-08-17 14:27:20 UTC (rev 154224)
@@ -1533,8 +1533,8 @@
     // 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 @@
         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 @@
         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 @@
 
     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;
 }

Modified: trunk/Source/WebKit/mac/ChangeLog (154223 => 154224)


--- trunk/Source/WebKit/mac/ChangeLog	2013-08-17 12:38:49 UTC (rev 154223)
+++ trunk/Source/WebKit/mac/ChangeLog	2013-08-17 14:27:20 UTC (rev 154224)
@@ -1,3 +1,24 @@
+2013-08-17  Darin Adler  <[email protected]>
+
+        <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  <[email protected]>
 
         <https://webkit.org/b/119852> Frame::scriptController() should return a reference

Modified: trunk/Source/WebKit/mac/WebView/WebFrameView.mm (154223 => 154224)


--- trunk/Source/WebKit/mac/WebView/WebFrameView.mm	2013-08-17 12:38:49 UTC (rev 154223)
+++ trunk/Source/WebKit/mac/WebView/WebFrameView.mm	2013-08-17 14:27:20 UTC (rev 154224)
@@ -139,7 +139,7 @@
     WebDynamicScrollBarsView *sv = [self _scrollView];
     
 #if ENABLE(DRAG_SUPPORT)
-    core([self _webView])->dragController()->setDidInitiateDrag(false);
+    core([self _webView])->dragController().setDidInitiateDrag(false);
 #endif
     
     [sv setSuppressLayout:YES];

Modified: trunk/Source/WebKit/mac/WebView/WebHTMLView.mm (154223 => 154224)


--- trunk/Source/WebKit/mac/WebView/WebHTMLView.mm	2013-08-17 12:38:49 UTC (rev 154223)
+++ trunk/Source/WebKit/mac/WebView/WebHTMLView.mm	2013-08-17 14:27:20 UTC (rev 154224)
@@ -3626,7 +3626,7 @@
     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 @@
     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 @@
         if (!page) 
             return nil; 
         
-        const KURL& imageURL = page->dragController()->draggingImageURL();
+        const KURL& imageURL = page->dragController().draggingImageURL();
         ASSERT(!imageURL.isEmpty());
         draggingImageURL = imageURL;
 

Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (154223 => 154224)


--- trunk/Source/WebKit/mac/WebView/WebView.mm	2013-08-17 12:38:49 UTC (rev 154223)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm	2013-08-17 14:27:20 UTC (rev 154224)
@@ -2043,7 +2043,7 @@
 {
     if (!_private->page)
         return;
-    _private->page->dragController()->setDidInitiateDrag(initiatedDrag);
+    _private->page->dragController().setDidInitiateDrag(initiatedDrag);
 }
 #endif
 
@@ -4302,7 +4302,7 @@
     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 @@
     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 @@
     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 @@
     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 @@
 {
 #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 @@
 {
 #if ENABLE(DRAG_SUPPORT)
     if (Page* page = core(self))
-        page->dragController()->dragEnded();
+        page->dragController().dragEnded();
 #endif
 }
 

Modified: trunk/Source/WebKit/qt/ChangeLog (154223 => 154224)


--- trunk/Source/WebKit/qt/ChangeLog	2013-08-17 12:38:49 UTC (rev 154223)
+++ trunk/Source/WebKit/qt/ChangeLog	2013-08-17 14:27:20 UTC (rev 154224)
@@ -1,3 +1,18 @@
+2013-08-17  Darin Adler  <[email protected]>
+
+        <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  <[email protected]>
 
         <https://webkit.org/b/119852> Frame::scriptController() should return a reference

Modified: trunk/Source/WebKit/qt/WebCoreSupport/DragClientQt.cpp (154223 => 154224)


--- trunk/Source/WebKit/qt/WebCoreSupport/DragClientQt.cpp	2013-08-17 12:38:49 UTC (rev 154223)
+++ trunk/Source/WebKit/qt/WebCoreSupport/DragClientQt.cpp	2013-08-17 14:27:20 UTC (rev 154224)
@@ -110,7 +110,7 @@
         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
 }
 

Modified: trunk/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp (154223 => 154224)


--- trunk/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp	2013-08-17 12:38:49 UTC (rev 154223)
+++ trunk/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp	2013-08-17 14:27:20 UTC (rev 154224)
@@ -594,25 +594,25 @@
 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)

Modified: trunk/Source/WebKit/win/ChangeLog (154223 => 154224)


--- trunk/Source/WebKit/win/ChangeLog	2013-08-17 12:38:49 UTC (rev 154223)
+++ trunk/Source/WebKit/win/ChangeLog	2013-08-17 14:27:20 UTC (rev 154224)
@@ -1,3 +1,19 @@
+2013-08-17  Darin Adler  <[email protected]>
+
+        <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  <[email protected]>
 
         <https://webkit.org/b/119852> Frame::scriptController() should return a reference

Modified: trunk/Source/WebKit/win/WebCoreSupport/WebDragClient.cpp (154223 => 154224)


--- trunk/Source/WebKit/win/WebCoreSupport/WebDragClient.cpp	2013-08-17 12:38:49 UTC (rev 154223)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebDragClient.cpp	2013-08-17 14:27:20 UTC (rev 154224)
@@ -145,7 +145,7 @@
             }
         }
 
-        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;

Modified: trunk/Source/WebKit/win/WebView.cpp (154223 => 154224)


--- trunk/Source/WebKit/win/WebView.cpp	2013-08-17 12:38:49 UTC (rev 154223)
+++ trunk/Source/WebKit/win/WebView.cpp	2013-08-17 14:27:20 UTC (rev 154224)
@@ -5186,7 +5186,7 @@
     // 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 @@
     ::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 @@
         ::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 @@
     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 @@
     ::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;
 }
 

Modified: trunk/Source/WebKit2/ChangeLog (154223 => 154224)


--- trunk/Source/WebKit2/ChangeLog	2013-08-17 12:38:49 UTC (rev 154223)
+++ trunk/Source/WebKit2/ChangeLog	2013-08-17 14:27:20 UTC (rev 154224)
@@ -1,3 +1,14 @@
+2013-08-17  Darin Adler  <[email protected]>
+
+        <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  <[email protected]>
 
         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]

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (154223 => 154224)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2013-08-17 12:38:49 UTC (rev 154223)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2013-08-17 14:27:20 UTC (rev 154224)
@@ -2683,19 +2683,19 @@
 
     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 @@
     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 @@
                 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::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;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to