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

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

Issue 540283003: bindings: Retires ScriptWrappable::init, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed a review comment. Created 6 years, 3 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 | « Source/core/events/HashChangeEvent.h ('k') | Source/core/events/MessageEvent.cpp » ('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) 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 , shiftKey(false) 92 , shiftKey(false)
93 , metaKey(false) 93 , metaKey(false)
94 , repeat(false) 94 , repeat(false)
95 { 95 {
96 } 96 }
97 97
98 KeyboardEvent::KeyboardEvent() 98 KeyboardEvent::KeyboardEvent()
99 : m_location(DOM_KEY_LOCATION_STANDARD) 99 : m_location(DOM_KEY_LOCATION_STANDARD)
100 , m_isAutoRepeat(false) 100 , m_isAutoRepeat(false)
101 { 101 {
102 ScriptWrappable::init(this);
103 } 102 }
104 103
105 KeyboardEvent::KeyboardEvent(const PlatformKeyboardEvent& key, AbstractView* vie w) 104 KeyboardEvent::KeyboardEvent(const PlatformKeyboardEvent& key, AbstractView* vie w)
106 : UIEventWithKeyState(eventTypeForKeyboardEventType(key.type()), 105 : UIEventWithKeyState(eventTypeForKeyboardEventType(key.type()),
107 true, true, view, 0, key.ctrlKey(), key.altKey(), key. shiftKey(), key.metaKey()) 106 true, true, view, 0, key.ctrlKey(), key.altKey(), key. shiftKey(), key.metaKey())
108 , m_keyEvent(adoptPtr(new PlatformKeyboardEvent(key))) 107 , m_keyEvent(adoptPtr(new PlatformKeyboardEvent(key)))
109 , m_keyIdentifier(key.keyIdentifier()) 108 , m_keyIdentifier(key.keyIdentifier())
110 , m_location(keyLocationCode(key)) 109 , m_location(keyLocationCode(key))
111 , m_isAutoRepeat(key.isAutoRepeat()) 110 , m_isAutoRepeat(key.isAutoRepeat())
112 { 111 {
113 ScriptWrappable::init(this);
114 } 112 }
115 113
116 KeyboardEvent::KeyboardEvent(const AtomicString& eventType, const KeyboardEventI nit& initializer) 114 KeyboardEvent::KeyboardEvent(const AtomicString& eventType, const KeyboardEventI nit& initializer)
117 : UIEventWithKeyState(eventType, initializer.bubbles, initializer.cancelable , initializer.view, initializer.detail, initializer.ctrlKey, initializer.altKey, initializer.shiftKey, initializer.metaKey) 115 : UIEventWithKeyState(eventType, initializer.bubbles, initializer.cancelable , initializer.view, initializer.detail, initializer.ctrlKey, initializer.altKey, initializer.shiftKey, initializer.metaKey)
118 , m_keyIdentifier(initializer.keyIdentifier) 116 , m_keyIdentifier(initializer.keyIdentifier)
119 , m_location(initializer.location) 117 , m_location(initializer.location)
120 , m_isAutoRepeat(initializer.repeat) 118 , m_isAutoRepeat(initializer.repeat)
121 { 119 {
122 ScriptWrappable::init(this);
123 } 120 }
124 121
125 KeyboardEvent::KeyboardEvent(const AtomicString& eventType, bool canBubble, bool cancelable, AbstractView *view, 122 KeyboardEvent::KeyboardEvent(const AtomicString& eventType, bool canBubble, bool cancelable, AbstractView *view,
126 const String &keyIdentifier, unsigned location, 123 const String &keyIdentifier, unsigned location,
127 bool ctrlKey, bool altKey, bool shiftKey, bool meta Key) 124 bool ctrlKey, bool altKey, bool shiftKey, bool meta Key)
128 : UIEventWithKeyState(eventType, canBubble, cancelable, view, 0, ctrlKey, al tKey, shiftKey, metaKey) 125 : UIEventWithKeyState(eventType, canBubble, cancelable, view, 0, ctrlKey, al tKey, shiftKey, metaKey)
129 , m_keyIdentifier(keyIdentifier) 126 , m_keyIdentifier(keyIdentifier)
130 , m_location(location) 127 , m_location(location)
131 , m_isAutoRepeat(false) 128 , m_isAutoRepeat(false)
132 { 129 {
133 ScriptWrappable::init(this);
134 } 130 }
135 131
136 KeyboardEvent::~KeyboardEvent() 132 KeyboardEvent::~KeyboardEvent()
137 { 133 {
138 } 134 }
139 135
140 void KeyboardEvent::initKeyboardEvent(const AtomicString& type, bool canBubble, bool cancelable, AbstractView* view, 136 void KeyboardEvent::initKeyboardEvent(const AtomicString& type, bool canBubble, bool cancelable, AbstractView* view,
141 const String &keyIdentifier, unsigned loca tion, 137 const String &keyIdentifier, unsigned loca tion,
142 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) 138 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey)
143 { 139 {
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 { 222 {
227 } 223 }
228 224
229 bool KeyboardEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) c onst 225 bool KeyboardEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) c onst
230 { 226 {
231 // Make sure not to return true if we already took default action while hand ling the event. 227 // Make sure not to return true if we already took default action while hand ling the event.
232 return EventDispatchMediator::dispatchEvent(dispatcher) && !event()->default Handled(); 228 return EventDispatchMediator::dispatchEvent(dispatcher) && !event()->default Handled();
233 } 229 }
234 230
235 } // namespace blink 231 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/events/HashChangeEvent.h ('k') | Source/core/events/MessageEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698