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 (function(window) { | 5 (function(window) { |
6 | 6 |
7 // DevToolsAPI ---------------------------------------------------------------- | 7 // DevToolsAPI ---------------------------------------------------------------- |
8 | 8 |
9 /** | 9 /** |
10 * @constructor | 10 * @constructor |
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
901 { | 901 { |
902 } | 902 } |
903 CSSPrimitiveValue.CSS_PX = 5; | 903 CSSPrimitiveValue.CSS_PX = 5; |
904 window.CSSPrimitiveValue = CSSPrimitiveValue; | 904 window.CSSPrimitiveValue = CSSPrimitiveValue; |
905 | 905 |
906 // Support for legacy (<M44) frontends. Remove in M48. | 906 // Support for legacy (<M44) frontends. Remove in M48. |
907 var styleElement = window.document.createElement("style"); | 907 var styleElement = window.document.createElement("style"); |
908 styleElement.type = "text/css"; | 908 styleElement.type = "text/css"; |
909 styleElement.textContent = "html /deep/ * { min-width: 0; min-height: 0; }"; | 909 styleElement.textContent = "html /deep/ * { min-width: 0; min-height: 0; }"; |
910 window.document.head.appendChild(styleElement); | 910 window.document.head.appendChild(styleElement); |
911 | |
912 // Support for legacy (<M49) frontends. Remove in M52. | |
913 if (Object.getOwnPropertyDescriptor(Event.prototype, "deepPath")) | |
pfeldman
2016/02/03 00:16:24
Wouldn't it remove it at all times? I am not follo
samli
2016/02/03 00:17:57
Yes. You want me to only remove it on attribute on
pfeldman
2016/02/04 00:19:58
I was thinking of simply executing "Event.prototyp
| |
914 Event.prototype.deepPath = undefined; | |
911 } | 915 } |
912 | 916 |
913 function windowLoaded() | 917 function windowLoaded() |
914 { | 918 { |
915 window.removeEventListener("DOMContentLoaded", windowLoaded, false); | 919 window.removeEventListener("DOMContentLoaded", windowLoaded, false); |
916 installBackwardsCompatibility(); | 920 installBackwardsCompatibility(); |
917 } | 921 } |
918 | 922 |
919 if (window.document.head && (window.document.readyState === "complete" || window .document.readyState === "interactive")) | 923 if (window.document.head && (window.document.readyState === "complete" || window .document.readyState === "interactive")) |
920 installBackwardsCompatibility(); | 924 installBackwardsCompatibility(); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
954 | 958 |
955 if (!DOMTokenList.prototype.__originalDOMTokenListToggle) { | 959 if (!DOMTokenList.prototype.__originalDOMTokenListToggle) { |
956 DOMTokenList.prototype.__originalDOMTokenListToggle = DOMTokenList.prototype .toggle; | 960 DOMTokenList.prototype.__originalDOMTokenListToggle = DOMTokenList.prototype .toggle; |
957 DOMTokenList.prototype.toggle = function(token, force) | 961 DOMTokenList.prototype.toggle = function(token, force) |
958 { | 962 { |
959 if (arguments.length === 1) | 963 if (arguments.length === 1) |
960 force = !this.contains(token); | 964 force = !this.contains(token); |
961 return this.__originalDOMTokenListToggle(token, !!force); | 965 return this.__originalDOMTokenListToggle(token, !!force); |
962 } | 966 } |
963 } | 967 } |
OLD | NEW |