Title: [101414] trunk/Source
- Revision
- 101414
- Author
- [email protected]
- Date
- 2011-11-29 13:29:08 -0800 (Tue, 29 Nov 2011)
Log Message
DragClient::dragSourceActionMaskForPoint should use root view coordinates
https://bugs.webkit.org/show_bug.cgi?id=72409
Reviewed by Sam Weinig.
Source/WebCore:
* page/DragClient.h:
Rename parameter and remove obsolete comment.
* page/DragController.cpp:
(WebCore::DragController::delegateDragSourceAction):
* page/DragController.h:
Rename parameter.
* page/EventHandler.cpp:
(WebCore::EventHandler::updateDragSourceActionsAllowed):
Use contentsToRootView instead of contentsToWindow.
Source/WebKit/mac:
* WebCoreSupport/WebDragClient.mm:
(WebDragClient::dragSourceActionMaskForPoint):
Use -[WebView _convertPointFromRootView:] to convert the point to the web view coordinate system.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (101413 => 101414)
--- trunk/Source/WebCore/ChangeLog 2011-11-29 21:29:00 UTC (rev 101413)
+++ trunk/Source/WebCore/ChangeLog 2011-11-29 21:29:08 UTC (rev 101414)
@@ -1,5 +1,24 @@
2011-11-15 Anders Carlsson <[email protected]>
+ DragClient::dragSourceActionMaskForPoint should use root view coordinates
+ https://bugs.webkit.org/show_bug.cgi?id=72409
+
+ Reviewed by Sam Weinig.
+
+ * page/DragClient.h:
+ Rename parameter and remove obsolete comment.
+
+ * page/DragController.cpp:
+ (WebCore::DragController::delegateDragSourceAction):
+ * page/DragController.h:
+ Rename parameter.
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::updateDragSourceActionsAllowed):
+ Use contentsToRootView instead of contentsToWindow.
+
+2011-11-15 Anders Carlsson <[email protected]>
+
EditorClient::showCorrectionPanel should pass the string bounding box in root view coordinates
https://bugs.webkit.org/show_bug.cgi?id=72408
Modified: trunk/Source/WebCore/page/DragClient.h (101413 => 101414)
--- trunk/Source/WebCore/page/DragClient.h 2011-11-29 21:29:00 UTC (rev 101413)
+++ trunk/Source/WebCore/page/DragClient.h 2011-11-29 21:29:08 UTC (rev 101414)
@@ -59,8 +59,7 @@
virtual void willPerformDragSourceAction(DragSourceAction, const IntPoint&, Clipboard*) = 0;
virtual DragDestinationAction actionMaskForDrag(DragData*) = 0;
- // We work in window rather than view coordinates here.
- virtual DragSourceAction dragSourceActionMaskForPoint(const IntPoint& windowPoint) = 0;
+ virtual DragSourceAction dragSourceActionMaskForPoint(const IntPoint& rootViewPoint) = 0;
virtual void startDrag(DragImageRef dragImage, const IntPoint& dragImageOrigin, const IntPoint& eventPos, Clipboard*, Frame*, bool linkDrag = false) = 0;
Modified: trunk/Source/WebCore/page/DragController.cpp (101413 => 101414)
--- trunk/Source/WebCore/page/DragController.cpp 2011-11-29 21:29:00 UTC (rev 101413)
+++ trunk/Source/WebCore/page/DragController.cpp 2011-11-29 21:29:08 UTC (rev 101414)
@@ -375,9 +375,9 @@
return false;
}
-DragSourceAction DragController::delegateDragSourceAction(const IntPoint& windowPoint)
+DragSourceAction DragController::delegateDragSourceAction(const IntPoint& rootViewPoint)
{
- m_dragSourceAction = m_client->dragSourceActionMaskForPoint(windowPoint);
+ m_dragSourceAction = m_client->dragSourceActionMaskForPoint(rootViewPoint);
return m_dragSourceAction;
}
Modified: trunk/Source/WebCore/page/DragController.h (101413 => 101414)
--- trunk/Source/WebCore/page/DragController.h 2011-11-29 21:29:00 UTC (rev 101413)
+++ trunk/Source/WebCore/page/DragController.h 2011-11-29 21:29:08 UTC (rev 101414)
@@ -76,7 +76,7 @@
Document* documentUnderMouse() const { return m_documentUnderMouse.get(); }
DragDestinationAction dragDestinationAction() const { return m_dragDestinationAction; }
- DragSourceAction delegateDragSourceAction(const IntPoint& pagePoint);
+ DragSourceAction delegateDragSourceAction(const IntPoint& rootViewPoint);
Node* draggableNode(const Frame*, Node*, const IntPoint&, DragState&) const;
void dragEnded();
Modified: trunk/Source/WebCore/page/EventHandler.cpp (101413 => 101414)
--- trunk/Source/WebCore/page/EventHandler.cpp 2011-11-29 21:29:00 UTC (rev 101413)
+++ trunk/Source/WebCore/page/EventHandler.cpp 2011-11-29 21:29:08 UTC (rev 101414)
@@ -928,7 +928,7 @@
if (!view)
return DragSourceActionNone;
- return page->dragController()->delegateDragSourceAction(view->contentsToWindow(m_mouseDownPos));
+ return page->dragController()->delegateDragSourceAction(view->contentsToRootView(m_mouseDownPos));
}
#endif // ENABLE(DRAG_SUPPORT)
Modified: trunk/Source/WebKit/mac/ChangeLog (101413 => 101414)
--- trunk/Source/WebKit/mac/ChangeLog 2011-11-29 21:29:00 UTC (rev 101413)
+++ trunk/Source/WebKit/mac/ChangeLog 2011-11-29 21:29:08 UTC (rev 101414)
@@ -1,5 +1,16 @@
2011-11-15 Anders Carlsson <[email protected]>
+ DragClient::dragSourceActionMaskForPoint should use root view coordinates
+ https://bugs.webkit.org/show_bug.cgi?id=72409
+
+ Reviewed by Sam Weinig.
+
+ * WebCoreSupport/WebDragClient.mm:
+ (WebDragClient::dragSourceActionMaskForPoint):
+ Use -[WebView _convertPointFromRootView:] to convert the point to the web view coordinate system.
+
+2011-11-15 Anders Carlsson <[email protected]>
+
EditorClient::showCorrectionPanel should pass the string bounding box in root view coordinates
https://bugs.webkit.org/show_bug.cgi?id=72408
Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebDragClient.mm (101413 => 101414)
--- trunk/Source/WebKit/mac/WebCoreSupport/WebDragClient.mm 2011-11-29 21:29:00 UTC (rev 101413)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebDragClient.mm 2011-11-29 21:29:08 UTC (rev 101414)
@@ -74,9 +74,9 @@
}
-WebCore::DragSourceAction WebDragClient::dragSourceActionMaskForPoint(const IntPoint& windowPoint)
+WebCore::DragSourceAction WebDragClient::dragSourceActionMaskForPoint(const IntPoint& rootViewPoint)
{
- NSPoint viewPoint = [m_webView convertPoint:windowPoint fromView:nil];
+ NSPoint viewPoint = [m_webView _convertPointFromRootView:rootViewPoint];
return (DragSourceAction)[[m_webView _UIDelegateForwarder] webView:m_webView dragSourceActionMaskForPoint:viewPoint];
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes