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

Unified Diff: third_party/WebKit/Source/core/events/MouseEvent.cpp

Issue 2785853002: Selection Action mode triggered like a context menu (Closed)
Patch Set: fix tests Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/events/MouseEvent.cpp
diff --git a/third_party/WebKit/Source/core/events/MouseEvent.cpp b/third_party/WebKit/Source/core/events/MouseEvent.cpp
index 62b5aed35452405c407653f38f16c6c999ff5d6b..76969561df1ba208959f2a4fb03b5f0430c84da6 100644
--- a/third_party/WebKit/Source/core/events/MouseEvent.cpp
+++ b/third_party/WebKit/Source/core/events/MouseEvent.cpp
@@ -176,13 +176,17 @@ MouseEvent::MouseEvent(const AtomicString& event_type,
button_(static_cast<short>(event.button)),
buttons_(WebInputEventModifiersToButtons(event.GetModifiers())),
related_target_(related_target),
- synthetic_event_type_(event.FromTouch() ? kFromTouch
- : kRealOrIndistinguishable),
region_(region) {
IntPoint root_frame_coordinates =
FlooredIntPoint(event.PositionInRootFrame());
InitCoordinatesFromRootFrame(root_frame_coordinates.X(),
root_frame_coordinates.Y());
+ if (event.GetModifiers() & WebInputEvent::kSelectAll)
+ synthetic_event_type_ = kFromSelectAll;
+ else if (event.FromTouch())
+ synthetic_event_type_ = kFromTouch;
+ else
+ synthetic_event_type_ = kRealOrIndistinguishable;
}
MouseEvent::MouseEvent(const AtomicString& event_type,

Powered by Google App Engine
This is Rietveld 408576698