OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
703 for (var j = 0; j < recepients.length; ++j) { | 703 for (var j = 0; j < recepients.length; ++j) { |
704 if (!(touchEvents[i] in recepients[j])) | 704 if (!(touchEvents[i] in recepients[j])) |
705 Object.defineProperty(recepients[j], touchEvents[i], { v alue: null, writable: true, configurable: true, enumerable: true }); | 705 Object.defineProperty(recepients[j], touchEvents[i], { v alue: null, writable: true, configurable: true, enumerable: true }); |
706 } | 706 } |
707 } | 707 } |
708 } | 708 } |
709 | 709 |
710 var symbol = WebInspector.OverridesSupport._touchEventsScriptIdSymbol; | 710 var symbol = WebInspector.OverridesSupport._touchEventsScriptIdSymbol; |
711 | 711 |
712 if (emulationEnabled && target[symbol] !== -1) { | 712 if (emulationEnabled && target[symbol] !== -1) { |
713 if (typeof target[symbol] !== "undefined") | |
714 target.pageAgent().removeScriptToEvaluateOnLoad(target[symbol]); | |
dgozman
2015/08/25 18:02:09
This is getting messy. Could you please rewrite th
| |
715 | |
713 target[symbol] = -1; | 716 target[symbol] = -1; |
714 target.pageAgent().addScriptToEvaluateOnLoad("(" + injectedFunction. toString() + ")()", scriptAddedCallback); | 717 target.pageAgent().addScriptToEvaluateOnLoad("(" + injectedFunction. toString() + ")()", scriptAddedCallback); |
715 } else { | 718 } else { |
716 if (typeof target[symbol] !== "undefined") { | 719 if (typeof target[symbol] !== "undefined") { |
717 target.pageAgent().removeScriptToEvaluateOnLoad(target[symbol]); | 720 target.pageAgent().removeScriptToEvaluateOnLoad(target[symbol]); |
718 delete target[symbol]; | 721 delete target[symbol]; |
719 } | 722 } |
720 } | 723 } |
721 | 724 |
722 /** | 725 /** |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
818 }, | 821 }, |
819 | 822 |
820 __proto__: WebInspector.Object.prototype | 823 __proto__: WebInspector.Object.prototype |
821 } | 824 } |
822 | 825 |
823 | 826 |
824 /** | 827 /** |
825 * @type {!WebInspector.OverridesSupport} | 828 * @type {!WebInspector.OverridesSupport} |
826 */ | 829 */ |
827 WebInspector.overridesSupport; | 830 WebInspector.overridesSupport; |
OLD | NEW |