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