https://bugs.webkit.org/show_bug.cgi?id=112079
Reviewed by Tony Chang.
.:
* ManualTests/context-menu-during-drag-selection.html: Added.
Source/WebCore:
This appears to be the intent of the original code anyway (the comments in the corresponding
context menu handlers indicate that they set m_mousePressed to false in order to suppress
drags from starting). Since exact platform behavior differs quite a bit in this area, this
will also make the behavior more consistent across different WebKit implementations.
Manually testable using context-menu-during-drag-selection.html.
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMouseDraggedEvent):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@146784
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2013-03-25 Daniel Cheng <dcheng@chromium.org>
+
+ Don't allow drags to start after a mouse press that creates a context menu
+ https://bugs.webkit.org/show_bug.cgi?id=112079
+
+ Reviewed by Tony Chang.
+
+ * ManualTests/context-menu-during-drag-selection.html: Added.
+
2013-03-22 Yuki Sekiguchi <yuki.sekiguchi@access-company.com>
Cannot run All Source (target WebProcess) on Xcode.
--- /dev/null
+<!DOCTYPE html>
+<html>
+<body>
+<p>Simple manual behavior test for the interaction between selection drags,
+context menu invocation, and actual dragging. In order to test, simply start
+selecting a span of text by clicking and dragging. During text selection, no
+drag should start. While selecting text, press and hold the right mouse button
+to invoke the context menu, then release the right mouse button over a context
+menu entry like "Copy". After this, if you keep moving the mouse around, no drag
+of the selected text should start, even though the left mouse button is still
+held down.
+</body>
+</html>
+2013-03-25 Daniel Cheng <dcheng@chromium.org>
+
+ Don't allow drags to start after a mouse press that creates a context menu
+ https://bugs.webkit.org/show_bug.cgi?id=112079
+
+ Reviewed by Tony Chang.
+
+ This appears to be the intent of the original code anyway (the comments in the corresponding
+ context menu handlers indicate that they set m_mousePressed to false in order to suppress
+ drags from starting). Since exact platform behavior differs quite a bit in this area, this
+ will also make the behavior more consistent across different WebKit implementations.
+
+ Manually testable using context-menu-during-drag-selection.html.
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleMouseDraggedEvent):
+
2013-03-25 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: [Regression] Provisional breakpoints are not shown on reload.
#if ENABLE(DRAG_SUPPORT)
bool EventHandler::handleMouseDraggedEvent(const MouseEventWithHitTestResults& event)
{
- if (handleDrag(event, ShouldCheckDragHysteresis))
- return true;
-
if (!m_mousePressed)
return false;
+ if (handleDrag(event, ShouldCheckDragHysteresis))
+ return true;
+
Node* targetNode = event.targetNode();
if (event.event().button() != LeftButton || !targetNode)
return false;