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

Side by Side Diff: Source/testing/runner/EventSender.cpp

Issue 23444080: Implement KeyboardEvent.repeat attribute (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/events/KeyboardEvent.idl ('k') | 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 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 } else if (!strcmp(characters, "metaKey") || !strcmp(characters, "addSelecti onKey")) { 177 } else if (!strcmp(characters, "metaKey") || !strcmp(characters, "addSelecti onKey")) {
178 event->modifiers |= WebInputEvent::MetaKey; 178 event->modifiers |= WebInputEvent::MetaKey;
179 // On Mac only command key presses are marked as system key. 179 // On Mac only command key presses are marked as system key.
180 // See the related code in: WebKit/chromium/src/mac/WebInputEventFactory .cpp 180 // See the related code in: WebKit/chromium/src/mac/WebInputEventFactory .cpp
181 // It must be kept in sync with the related code in above file. 181 // It must be kept in sync with the related code in above file.
182 isSystemKey = true; 182 isSystemKey = true;
183 #else 183 #else
184 } else if (!strcmp(characters, "metaKey")) { 184 } else if (!strcmp(characters, "metaKey")) {
185 event->modifiers |= WebInputEvent::MetaKey; 185 event->modifiers |= WebInputEvent::MetaKey;
186 #endif 186 #endif
187 } else if (!strcmp(characters, "autoRepeat")) {
188 event->modifiers |= WebInputEvent::IsAutoRepeat;
187 } 189 }
188 return isSystemKey; 190 return isSystemKey;
189 } 191 }
190 192
191 bool applyKeyModifiers(const CppVariant* argument, WebInputEvent* event) 193 bool applyKeyModifiers(const CppVariant* argument, WebInputEvent* event)
192 { 194 {
193 bool isSystemKey = false; 195 bool isSystemKey = false;
194 if (argument->isObject()) { 196 if (argument->isObject()) {
195 vector<string> modifiers = argument->toStringVector(); 197 vector<string> modifiers = argument->toStringVector();
196 for (vector<string>::const_iterator i = modifiers.begin(); i != modifier s.end(); ++i) 198 for (vector<string>::const_iterator i = modifiers.begin(); i != modifier s.end(); ++i)
(...skipping 1235 matching lines...) Expand 10 before | Expand all | Expand 10 after
1432 { 1434 {
1433 result->setNull(); 1435 result->setNull();
1434 } 1436 }
1435 1437
1436 void EventSender::clearKillRing(const CppArgumentList&, CppVariant* result) 1438 void EventSender::clearKillRing(const CppArgumentList&, CppVariant* result)
1437 { 1439 {
1438 result->setNull(); 1440 result->setNull();
1439 } 1441 }
1440 1442
1441 } 1443 }
OLDNEW
« no previous file with comments | « Source/core/events/KeyboardEvent.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698