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

Side by Side Diff: content/browser/renderer_host/input/web_input_event_builders_win.cc

Issue 419283003: Fix 'repeat' state of a DOM KeyboardEvent on Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/input/web_input_event_builders_win.h" 5 #include "content/browser/renderer_host/input/web_input_event_builders_win.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "content/browser/renderer_host/input/web_input_event_util.h" 8 #include "content/browser/renderer_host/input/web_input_event_util.h"
9 9
10 using blink::WebInputEvent; 10 using blink::WebInputEvent;
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 153
154 if (::GetKeyState(VK_SHIFT) & 0x8000) 154 if (::GetKeyState(VK_SHIFT) & 0x8000)
155 result.modifiers |= WebInputEvent::ShiftKey; 155 result.modifiers |= WebInputEvent::ShiftKey;
156 if (::GetKeyState(VK_CONTROL) & 0x8000) 156 if (::GetKeyState(VK_CONTROL) & 0x8000)
157 result.modifiers |= WebInputEvent::ControlKey; 157 result.modifiers |= WebInputEvent::ControlKey;
158 if (::GetKeyState(VK_MENU) & 0x8000) 158 if (::GetKeyState(VK_MENU) & 0x8000)
159 result.modifiers |= WebInputEvent::AltKey; 159 result.modifiers |= WebInputEvent::AltKey;
160 // NOTE: There doesn't seem to be a way to query the mouse button state in 160 // NOTE: There doesn't seem to be a way to query the mouse button state in
161 // this case. 161 // this case.
162 162
163 if (LOWORD(lparam) > 1) 163 if (lparam & (1 << 30))
jamesr 2014/07/28 19:38:49 the rest of this file uses & 0xXXXXX for masks, yo
164 result.modifiers |= WebInputEvent::IsAutoRepeat; 164 result.modifiers |= WebInputEvent::IsAutoRepeat;
165 165
166 result.modifiers |= GetLocationModifier(wparam, lparam); 166 result.modifiers |= GetLocationModifier(wparam, lparam);
167 167
168 SetToggleKeyState(&result); 168 SetToggleKeyState(&result);
169 return result; 169 return result;
170 } 170 }
171 171
172 // WebMouseEvent -------------------------------------------------------------- 172 // WebMouseEvent --------------------------------------------------------------
173 173
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 result.wheelTicksX = wheel_delta; 452 result.wheelTicksX = wheel_delta;
453 } else { 453 } else {
454 result.deltaY = scroll_delta; 454 result.deltaY = scroll_delta;
455 result.wheelTicksY = wheel_delta; 455 result.wheelTicksY = wheel_delta;
456 } 456 }
457 457
458 return result; 458 return result;
459 } 459 }
460 460
461 } // namespace content 461 } // namespace content
OLDNEW
« 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