Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(636)

Unified Diff: Source/core/page/EventHandler.cpp

Issue 726703002: Remove some probably dead code in EventHandler::handleDrag. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/EventHandler.cpp
diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp
index 0d2af190fdadcaf713ea859b70be696606655e3a..a41eb7f250b6b72015824c735104d1144312bb51 100644
--- a/Source/core/page/EventHandler.cpp
+++ b/Source/core/page/EventHandler.cpp
@@ -650,14 +650,14 @@ bool EventHandler::handleMouseDraggedEvent(const MouseEventWithHitTestResults& e
{
TRACE_EVENT0("blink", "EventHandler::handleMouseDraggedEvent");
- if (!m_mousePressed)
+ if (!m_mousePressed || event.event().button() != LeftButton)
Rick Byers 2014/11/14 18:29:28 You said this case is "probably dead". Should we
dcheng 2014/11/14 18:41:26 The thing is, we always bailed out anyway if it wa
return false;
if (handleDrag(event, DragInitiator::Mouse))
return true;
Node* targetNode = event.innerNode();
- if (event.event().button() != LeftButton || !targetNode)
+ if (!targetNode)
return false;
RenderObject* renderer = targetNode->renderer();
@@ -3209,16 +3209,6 @@ bool EventHandler::handleDrag(const MouseEventWithHitTestResults& event, DragIni
if (!m_frame->page())
return false;
- // FIXME: Does this ever get hit??
- if (event.event().button() != LeftButton || event.event().type() != PlatformEvent::MouseMoved) {
- // If we allowed the other side of the bridge to handle a drag
- // last time, then m_mousePressed might still be set. So we
- // clear it now to make sure the next move after a drag
- // doesn't look like a drag.
- m_mousePressed = false;
- return false;
- }
-
if (m_mouseDownMayStartDrag) {
HitTestRequest request(HitTestRequest::ReadOnly);
HitTestResult result(m_mouseDownPos);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698