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

Side by Side Diff: content/browser/renderer_host/ui_events_helper.cc

Issue 402613010: Fix DOM KeyboardEvent 'repeat' state (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 | content/browser/renderer_host/web_input_event_aurax11.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui_events_helper.h" 5 #include "content/browser/renderer_host/ui_events_helper.h"
6 6
7 #include "content/common/input/web_touch_event_traits.h" 7 #include "content/common/input/web_touch_event_traits.h"
8 #include "third_party/WebKit/public/web/WebInputEvent.h" 8 #include "third_party/WebKit/public/web/WebInputEvent.h"
9 #include "ui/events/event.h" 9 #include "ui/events/event.h"
10 #include "ui/events/event_constants.h" 10 #include "ui/events/event_constants.h"
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 modifiers |= blink::WebInputEvent::AltKey; 251 modifiers |= blink::WebInputEvent::AltKey;
252 // TODO(beng): MetaKey/META_MASK 252 // TODO(beng): MetaKey/META_MASK
253 if (flags & ui::EF_LEFT_MOUSE_BUTTON) 253 if (flags & ui::EF_LEFT_MOUSE_BUTTON)
254 modifiers |= blink::WebInputEvent::LeftButtonDown; 254 modifiers |= blink::WebInputEvent::LeftButtonDown;
255 if (flags & ui::EF_MIDDLE_MOUSE_BUTTON) 255 if (flags & ui::EF_MIDDLE_MOUSE_BUTTON)
256 modifiers |= blink::WebInputEvent::MiddleButtonDown; 256 modifiers |= blink::WebInputEvent::MiddleButtonDown;
257 if (flags & ui::EF_RIGHT_MOUSE_BUTTON) 257 if (flags & ui::EF_RIGHT_MOUSE_BUTTON)
258 modifiers |= blink::WebInputEvent::RightButtonDown; 258 modifiers |= blink::WebInputEvent::RightButtonDown;
259 if (flags & ui::EF_CAPS_LOCK_DOWN) 259 if (flags & ui::EF_CAPS_LOCK_DOWN)
260 modifiers |= blink::WebInputEvent::CapsLockOn; 260 modifiers |= blink::WebInputEvent::CapsLockOn;
261 if (flags & ui::EF_IS_REPEAT)
262 modifiers |= blink::WebInputEvent::IsAutoRepeat;
261 return modifiers; 263 return modifiers;
262 } 264 }
263 265
264 blink::WebTouchPoint* UpdateWebTouchEventFromUIEvent( 266 blink::WebTouchPoint* UpdateWebTouchEventFromUIEvent(
265 const ui::TouchEvent& event, 267 const ui::TouchEvent& event,
266 blink::WebTouchEvent* web_event) { 268 blink::WebTouchEvent* web_event) {
267 blink::WebTouchPoint* point = NULL; 269 blink::WebTouchPoint* point = NULL;
268 switch (event.type()) { 270 switch (event.type()) {
269 case ui::ET_TOUCH_PRESSED: 271 case ui::ET_TOUCH_PRESSED:
270 // Add a new touch point. 272 // Add a new touch point.
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 // Update the type of the touch event. 330 // Update the type of the touch event.
329 WebTouchEventTraits::ResetType(TouchEventTypeFromEvent(event), 331 WebTouchEventTraits::ResetType(TouchEventTypeFromEvent(event),
330 event.time_stamp().InSecondsF(), 332 event.time_stamp().InSecondsF(),
331 web_event); 333 web_event);
332 web_event->modifiers = EventFlagsToWebEventModifiers(event.flags()); 334 web_event->modifiers = EventFlagsToWebEventModifiers(event.flags());
333 335
334 return point; 336 return point;
335 } 337 }
336 338
337 } // namespace content 339 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/web_input_event_aurax11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698