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

Side by Side Diff: Source/core/page/EventHandler.cpp

Issue 1013303003: Preventing the default action on 'mousemove' listener shouldn't prevent selection (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updating expectation file Created 5 years, 9 months 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 unified diff | Download patch
« no previous file with comments | « LayoutTests/fast/events/drag-on-mouse-move-cancelled-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies)
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after
1492 } 1492 }
1493 } 1493 }
1494 } 1494 }
1495 1495
1496 m_lastMouseMoveEventSubframe = newSubframe; 1496 m_lastMouseMoveEventSubframe = newSubframe;
1497 1497
1498 if (swallowEvent) 1498 if (swallowEvent)
1499 return true; 1499 return true;
1500 1500
1501 swallowEvent = !dispatchMouseEvent(EventTypeNames::mousemove, mev.innerNode( ), 0, mouseEvent, true); 1501 swallowEvent = !dispatchMouseEvent(EventTypeNames::mousemove, mev.innerNode( ), 0, mouseEvent, true);
1502 if (!swallowEvent)
1503 swallowEvent = handleMouseDraggedEvent(mev);
1504 1502
1505 return swallowEvent; 1503 // http://www.w3.org/TR/DOM-Level-3-Events/#event-type-mousemove
1504 // Since there is no default action for mousemove event as per spec,
1505 // irrespective of event is cancelled or not there should be no differenece
leviw_travelin_and_unemployed 2015/03/27 19:13:34 "irrespective of event is cancelled or not there s
ramya.v 2015/03/30 03:19:36 Done.
1506 return handleMouseDraggedEvent(mev);
1506 } 1507 }
1507 1508
1508 void EventHandler::invalidateClick() 1509 void EventHandler::invalidateClick()
1509 { 1510 {
1510 m_clickCount = 0; 1511 m_clickCount = 0;
1511 m_clickNode = nullptr; 1512 m_clickNode = nullptr;
1512 } 1513 }
1513 1514
1514 static ContainerNode* parentForClickEvent(const Node& node) 1515 static ContainerNode* parentForClickEvent(const Node& node)
1515 { 1516 {
(...skipping 2433 matching lines...) Expand 10 before | Expand all | Expand 10 after
3949 3950
3950 // If it's in the direction to hide the top controls, only consume when the frame can also scroll. 3951 // If it's in the direction to hide the top controls, only consume when the frame can also scroll.
3951 if (m_frame->view()->scrollPosition().y() < m_frame->view()->maximumScrollPo sition().y()) 3952 if (m_frame->view()->scrollPosition().y() < m_frame->view()->maximumScrollPo sition().y())
3952 return true; 3953 return true;
3953 3954
3954 return false; 3955 return false;
3955 } 3956 }
3956 3957
3957 3958
3958 } // namespace blink 3959 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/fast/events/drag-on-mouse-move-cancelled-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698