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

Side by Side Diff: Source/web/WebInputEventConversion.cpp

Issue 879333002: Support buttons attribute for drag event (blink side). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase 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 | « Source/web/WebInputEventConversion.h ('k') | Source/web/WebViewImpl.h » ('j') | 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 newModifiers |= PlatformEvent::ShiftKey; 108 newModifiers |= PlatformEvent::ShiftKey;
109 if (webModifiers & WebInputEvent::ControlKey) 109 if (webModifiers & WebInputEvent::ControlKey)
110 newModifiers |= PlatformEvent::CtrlKey; 110 newModifiers |= PlatformEvent::CtrlKey;
111 if (webModifiers & WebInputEvent::AltKey) 111 if (webModifiers & WebInputEvent::AltKey)
112 newModifiers |= PlatformEvent::AltKey; 112 newModifiers |= PlatformEvent::AltKey;
113 if (webModifiers & WebInputEvent::MetaKey) 113 if (webModifiers & WebInputEvent::MetaKey)
114 newModifiers |= PlatformEvent::MetaKey; 114 newModifiers |= PlatformEvent::MetaKey;
115 return newModifiers; 115 return newModifiers;
116 } 116 }
117 117
118 static unsigned toPlatformMouseEventModifiers(int webModifiers) 118 unsigned toPlatformMouseEventModifiers(int webModifiers)
119 { 119 {
120 unsigned newModifiers = toPlatformEventModifiers(webModifiers); 120 unsigned newModifiers = toPlatformEventModifiers(webModifiers);
121 if (webModifiers & WebInputEvent::LeftButtonDown) 121 if (webModifiers & WebInputEvent::LeftButtonDown)
122 newModifiers |= PlatformEvent::LeftButtonDown; 122 newModifiers |= PlatformEvent::LeftButtonDown;
123 if (webModifiers & WebInputEvent::MiddleButtonDown) 123 if (webModifiers & WebInputEvent::MiddleButtonDown)
124 newModifiers |= PlatformEvent::MiddleButtonDown; 124 newModifiers |= PlatformEvent::MiddleButtonDown;
125 if (webModifiers & WebInputEvent::RightButtonDown) 125 if (webModifiers & WebInputEvent::RightButtonDown)
126 newModifiers |= PlatformEvent::RightButtonDown; 126 newModifiers |= PlatformEvent::RightButtonDown;
127 return newModifiers; 127 return newModifiers;
128 } 128 }
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 modifiers = getWebInputModifiers(event); 810 modifiers = getWebInputModifiers(event);
811 811
812 globalX = event.screenX(); 812 globalX = event.screenX();
813 globalY = event.screenY(); 813 globalY = event.screenY();
814 IntPoint localPoint = convertAbsoluteLocationForLayoutObject(event.absoluteL ocation(), *layoutObject); 814 IntPoint localPoint = convertAbsoluteLocationForLayoutObject(event.absoluteL ocation(), *layoutObject);
815 x = localPoint.x(); 815 x = localPoint.x();
816 y = localPoint.y(); 816 y = localPoint.y();
817 } 817 }
818 818
819 } // namespace blink 819 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebInputEventConversion.h ('k') | Source/web/WebViewImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698