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 Event.prototype.deepPath = undefined; |
911 } | 914 } |
912 | 915 |
913 function windowLoaded() | 916 function windowLoaded() |
914 { | 917 { |
915 window.removeEventListener("DOMContentLoaded", windowLoaded, false); | 918 window.removeEventListener("DOMContentLoaded", windowLoaded, false); |
916 installBackwardsCompatibility(); | 919 installBackwardsCompatibility(); |
917 } | 920 } |
918 | 921 |
919 if (window.document.head && (window.document.readyState === "complete" || window
.document.readyState === "interactive")) | 922 if (window.document.head && (window.document.readyState === "complete" || window
.document.readyState === "interactive")) |
920 installBackwardsCompatibility(); | 923 installBackwardsCompatibility(); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
954 | 957 |
955 if (!DOMTokenList.prototype.__originalDOMTokenListToggle) { | 958 if (!DOMTokenList.prototype.__originalDOMTokenListToggle) { |
956 DOMTokenList.prototype.__originalDOMTokenListToggle = DOMTokenList.prototype
.toggle; | 959 DOMTokenList.prototype.__originalDOMTokenListToggle = DOMTokenList.prototype
.toggle; |
957 DOMTokenList.prototype.toggle = function(token, force) | 960 DOMTokenList.prototype.toggle = function(token, force) |
958 { | 961 { |
959 if (arguments.length === 1) | 962 if (arguments.length === 1) |
960 force = !this.contains(token); | 963 force = !this.contains(token); |
961 return this.__originalDOMTokenListToggle(token, !!force); | 964 return this.__originalDOMTokenListToggle(token, !!force); |
962 } | 965 } |
963 } | 966 } |
OLD | NEW |