| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 574 _onForwardKeyboardEvent: function(message) | 574 _onForwardKeyboardEvent: function(message) |
| 575 { | 575 { |
| 576 const Esc = "U+001B"; | 576 const Esc = "U+001B"; |
| 577 | 577 |
| 578 if (!message.ctrlKey && !message.altKey && !message.metaKey && !/^F\d+$/
.test(message.keyIdentifier) && message.keyIdentifier !== Esc) | 578 if (!message.ctrlKey && !message.altKey && !message.metaKey && !/^F\d+$/
.test(message.keyIdentifier) && message.keyIdentifier !== Esc) |
| 579 return; | 579 return; |
| 580 // Fool around closure compiler -- it has its own notion of both Keyboar
dEvent constructor | 580 // Fool around closure compiler -- it has its own notion of both Keyboar
dEvent constructor |
| 581 // and initKeyboardEvent methods and overriding these in externs.js does
not have effect. | 581 // and initKeyboardEvent methods and overriding these in externs.js does
not have effect. |
| 582 var event = new window.KeyboardEvent(message.eventType, { | 582 var event = new window.KeyboardEvent(message.eventType, { |
| 583 keyIdentifier: message.keyIdentifier, | 583 keyIdentifier: message.keyIdentifier, |
| 584 keyLocation: message.keyLocation, | 584 location: message.location, |
| 585 ctrlKey: message.ctrlKey, | 585 ctrlKey: message.ctrlKey, |
| 586 altKey: message.altKey, | 586 altKey: message.altKey, |
| 587 shiftKey: message.shiftKey, | 587 shiftKey: message.shiftKey, |
| 588 metaKey: message.metaKey | 588 metaKey: message.metaKey |
| 589 }); | 589 }); |
| 590 document.dispatchEvent(event); | 590 document.dispatchEvent(event); |
| 591 }, | 591 }, |
| 592 | 592 |
| 593 _dispatchCallback: function(requestId, port, result) | 593 _dispatchCallback: function(requestId, port, result) |
| 594 { | 594 { |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 902 | 902 |
| 903 WebInspector.extensionServer = new WebInspector.ExtensionServer(); | 903 WebInspector.extensionServer = new WebInspector.ExtensionServer(); |
| 904 | 904 |
| 905 window.addExtension = function(page, name) | 905 window.addExtension = function(page, name) |
| 906 { | 906 { |
| 907 WebInspector.extensionServer._addExtension({ | 907 WebInspector.extensionServer._addExtension({ |
| 908 startPage: page, | 908 startPage: page, |
| 909 name: name, | 909 name: name, |
| 910 }); | 910 }); |
| 911 } | 911 } |
| OLD | NEW |