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

Side by Side Diff: third_party/WebKit/Source/core/events/KeyboardEvent.cpp

Issue 1352523002: Use high precision timestamp for Event.timestamp (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 2 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
OLDNEW
1 /** 1 /**
2 * Copyright (C) 2001 Peter Kelly (pmk@post.com) 2 * Copyright (C) 2001 Peter Kelly (pmk@post.com)
3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) 3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
5 * Copyright (C) 2003, 2005, 2006, 2007 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2007 Apple Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 KeyboardEvent::KeyboardEvent(const PlatformKeyboardEvent& key, AbstractView* vie w) 76 KeyboardEvent::KeyboardEvent(const PlatformKeyboardEvent& key, AbstractView* vie w)
77 : UIEventWithKeyState(eventTypeForKeyboardEventType(key.type()), true, true, view, 0, key.ctrlKey(), key.altKey(), key.shiftKey(), key.metaKey(), InputDevic eCapabilities::doesntFireTouchEventsSourceCapabilities()) 77 : UIEventWithKeyState(eventTypeForKeyboardEventType(key.type()), true, true, view, 0, key.ctrlKey(), key.altKey(), key.shiftKey(), key.metaKey(), InputDevic eCapabilities::doesntFireTouchEventsSourceCapabilities())
78 , m_keyEvent(adoptPtr(new PlatformKeyboardEvent(key))) 78 , m_keyEvent(adoptPtr(new PlatformKeyboardEvent(key)))
79 , m_keyIdentifier(key.keyIdentifier()) 79 , m_keyIdentifier(key.keyIdentifier())
80 , m_code(key.code()) 80 , m_code(key.code())
81 , m_key(key.key()) 81 , m_key(key.key())
82 , m_location(keyLocationCode(key)) 82 , m_location(keyLocationCode(key))
83 , m_isAutoRepeat(key.isAutoRepeat()) 83 , m_isAutoRepeat(key.isAutoRepeat())
84 { 84 {
85 setUICreateTime(key.timestamp()); 85 setPlatformTimeStamp(key.timestamp());
86 } 86 }
87 87
88 KeyboardEvent::KeyboardEvent(const AtomicString& eventType, const KeyboardEventI nit& initializer) 88 KeyboardEvent::KeyboardEvent(const AtomicString& eventType, const KeyboardEventI nit& initializer)
89 : UIEventWithKeyState(eventType, initializer.bubbles(), initializer.cancelab le(), initializer.view(), initializer.detail(), initializer.ctrlKey(), initializ er.altKey(), initializer.shiftKey(), initializer.metaKey(), initializer.sourceCa pabilities()) 89 : UIEventWithKeyState(eventType, initializer.bubbles(), initializer.cancelab le(), initializer.view(), initializer.detail(), initializer.ctrlKey(), initializ er.altKey(), initializer.shiftKey(), initializer.metaKey(), initializer.sourceCa pabilities())
90 , m_keyIdentifier(initializer.keyIdentifier()) 90 , m_keyIdentifier(initializer.keyIdentifier())
91 , m_location(initializer.location()) 91 , m_location(initializer.location())
92 , m_isAutoRepeat(initializer.repeat()) 92 , m_isAutoRepeat(initializer.repeat())
93 { 93 {
94 } 94 }
95 95
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 { 197 {
198 } 198 }
199 199
200 bool KeyboardEventDispatchMediator::dispatchEvent(EventDispatcher& dispatcher) c onst 200 bool KeyboardEventDispatchMediator::dispatchEvent(EventDispatcher& dispatcher) c onst
201 { 201 {
202 // Make sure not to return true if we already took default action while hand ling the event. 202 // Make sure not to return true if we already took default action while hand ling the event.
203 return EventDispatchMediator::dispatchEvent(dispatcher) && !event().defaultH andled(); 203 return EventDispatchMediator::dispatchEvent(dispatcher) && !event().defaultH andled();
204 } 204 }
205 205
206 } // namespace blink 206 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/GestureEvent.cpp ('k') | third_party/WebKit/Source/core/events/MouseEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698