 Chromium Code Reviews
 Chromium Code Reviews Issue 658183002:
  Add support for DOM3 KeyboardEvent keycode  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 658183002:
  Add support for DOM3 KeyboardEvent keycode  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| OLD | NEW | 
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/shell/renderer/test_runner/event_sender.h" | 5 #include "content/shell/renderer/test_runner/event_sender.h" | 
| 6 | 6 | 
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" | 
| 8 #include "base/logging.h" | 8 #include "base/logging.h" | 
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" | 
| 10 #include "content/public/common/page_zoom.h" | 10 #include "content/public/common/page_zoom.h" | 
| (...skipping 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1263 } else if ("leftAlt" == code_str) { | 1263 } else if ("leftAlt" == code_str) { | 
| 1264 code = ui::VKEY_LMENU; | 1264 code = ui::VKEY_LMENU; | 
| 1265 } else if ("rightAlt" == code_str) { | 1265 } else if ("rightAlt" == code_str) { | 
| 1266 code = ui::VKEY_RMENU; | 1266 code = ui::VKEY_RMENU; | 
| 1267 } else if ("numLock" == code_str) { | 1267 } else if ("numLock" == code_str) { | 
| 1268 code = ui::VKEY_NUMLOCK; | 1268 code = ui::VKEY_NUMLOCK; | 
| 1269 } else if ("backspace" == code_str) { | 1269 } else if ("backspace" == code_str) { | 
| 1270 code = ui::VKEY_BACK; | 1270 code = ui::VKEY_BACK; | 
| 1271 } else if ("escape" == code_str) { | 1271 } else if ("escape" == code_str) { | 
| 1272 code = ui::VKEY_ESCAPE; | 1272 code = ui::VKEY_ESCAPE; | 
| 1273 } else if ("scrollLock" == code_str) { | |
| 
apavlov
2014/11/12 08:56:32
is this a drive-by change?
 
Habib Virji
2014/11/24 15:13:09
Actually these changes are not needed any more, it
 | |
| 1274 code = ui::VKEY_SCROLL; | |
| 1275 } else if ("pause" == code_str) { | |
| 1276 code = ui::VKEY_PAUSE; | |
| 1273 } else { | 1277 } else { | 
| 1274 // Compare the input string with the function-key names defined by the | 1278 // Compare the input string with the function-key names defined by the | 
| 1275 // DOM spec (i.e. "F1",...,"F24"). If the input string is a function-key | 1279 // DOM spec (i.e. "F1",...,"F24"). If the input string is a function-key | 
| 1276 // name, set its key code. | 1280 // name, set its key code. | 
| 1277 for (int i = 1; i <= 24; ++i) { | 1281 for (int i = 1; i <= 24; ++i) { | 
| 1278 std::string function_key_name = base::StringPrintf("F%d", i); | 1282 std::string function_key_name = base::StringPrintf("F%d", i); | 
| 1279 if (function_key_name == code_str) { | 1283 if (function_key_name == code_str) { | 
| 1280 code = ui::VKEY_F1 + (i - 1); | 1284 code = ui::VKEY_F1 + (i - 1); | 
| 1281 break; | 1285 break; | 
| 1282 } | 1286 } | 
| (...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2292 } | 2296 } | 
| 2293 default: | 2297 default: | 
| 2294 NOTREACHED(); | 2298 NOTREACHED(); | 
| 2295 } | 2299 } | 
| 2296 } | 2300 } | 
| 2297 | 2301 | 
| 2298 replaying_saved_events_ = false; | 2302 replaying_saved_events_ = false; | 
| 2299 } | 2303 } | 
| 2300 | 2304 | 
| 2301 } // namespace content | 2305 } // namespace content | 
| OLD | NEW |