| 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 974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 985 function CSSPrimitiveValue() | 985 function CSSPrimitiveValue() |
| 986 { | 986 { |
| 987 } | 987 } |
| 988 CSSPrimitiveValue.CSS_PX = 5; | 988 CSSPrimitiveValue.CSS_PX = 5; |
| 989 window.CSSPrimitiveValue = CSSPrimitiveValue; | 989 window.CSSPrimitiveValue = CSSPrimitiveValue; |
| 990 | 990 |
| 991 // Support for legacy (<M44) frontends. Remove in M48. | 991 // Support for legacy (<M44) frontends. Remove in M48. |
| 992 var styleElement = window.document.createElement("style"); | 992 var styleElement = window.document.createElement("style"); |
| 993 styleElement.type = "text/css"; | 993 styleElement.type = "text/css"; |
| 994 styleElement.textContent = "html /deep/ * { min-width: 0; min-height: 0; }"; | 994 styleElement.textContent = "html /deep/ * { min-width: 0; min-height: 0; }"; |
| 995 |
| 996 // Support for quirky border-image behavior (<M51), see: |
| 997 // https://bugs.chromium.org/p/chromium/issues/detail?id=559258 |
| 998 styleElement.textContent += "\nhtml /deep/ .cm-breakpoint .CodeMirror-linenu
mber { border-style: solid !important; }"; |
| 999 styleElement.textContent += "\nhtml /deep/ .cm-breakpoint.cm-breakpoint-cond
itional .CodeMirror-linenumber { border-style: solid !important; }"; |
| 995 window.document.head.appendChild(styleElement); | 1000 window.document.head.appendChild(styleElement); |
| 996 | 1001 |
| 997 // Support for legacy (<M49) frontends. Remove in M52. | 1002 // Support for legacy (<M49) frontends. Remove in M52. |
| 998 Event.prototype.deepPath = undefined; | 1003 Event.prototype.deepPath = undefined; |
| 999 } | 1004 } |
| 1000 | 1005 |
| 1001 function windowLoaded() | 1006 function windowLoaded() |
| 1002 { | 1007 { |
| 1003 window.removeEventListener("DOMContentLoaded", windowLoaded, false); | 1008 window.removeEventListener("DOMContentLoaded", windowLoaded, false); |
| 1004 installBackwardsCompatibility(); | 1009 installBackwardsCompatibility(); |
| 1005 } | 1010 } |
| 1006 | 1011 |
| 1007 if (window.document.head && (window.document.readyState === "complete" || window
.document.readyState === "interactive")) | 1012 if (window.document.head && (window.document.readyState === "complete" || window
.document.readyState === "interactive")) |
| 1008 installBackwardsCompatibility(); | 1013 installBackwardsCompatibility(); |
| 1009 else | 1014 else |
| 1010 window.addEventListener("DOMContentLoaded", windowLoaded, false); | 1015 window.addEventListener("DOMContentLoaded", windowLoaded, false); |
| 1011 | 1016 |
| 1012 })(window); | 1017 })(window); |
| 1013 | 1018 |
| 1014 if (!DOMTokenList.prototype.__originalDOMTokenListToggle) { | 1019 if (!DOMTokenList.prototype.__originalDOMTokenListToggle) { |
| 1015 DOMTokenList.prototype.__originalDOMTokenListToggle = DOMTokenList.prototype
.toggle; | 1020 DOMTokenList.prototype.__originalDOMTokenListToggle = DOMTokenList.prototype
.toggle; |
| 1016 DOMTokenList.prototype.toggle = function(token, force) | 1021 DOMTokenList.prototype.toggle = function(token, force) |
| 1017 { | 1022 { |
| 1018 if (arguments.length === 1) | 1023 if (arguments.length === 1) |
| 1019 force = !this.contains(token); | 1024 force = !this.contains(token); |
| 1020 return this.__originalDOMTokenListToggle(token, !!force); | 1025 return this.__originalDOMTokenListToggle(token, !!force); |
| 1021 } | 1026 } |
| 1022 } | 1027 } |
| OLD | NEW |