Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/devtools.js

Issue 2040563002: Remove FileError interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fe-dep
Patch Set: Rebased, and closure annotations Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 /* eslint-disable indent */ 5 /* eslint-disable indent */
6 (function(window) { 6 (function(window) {
7 7
8 // DevToolsAPI ---------------------------------------------------------------- 8 // DevToolsAPI ----------------------------------------------------------------
9 9
10 /** 10 /**
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after
993 var pair = params[i].split("="); 993 var pair = params[i].split("=");
994 var name = pair.shift(); 994 var name = pair.shift();
995 var value = pair.join("="); 995 var value = pair.join("=");
996 if (name === "remoteFrontendUrl" && !value.startsWith("https://chrome-de vtools-frontend.appspot.com/")) 996 if (name === "remoteFrontendUrl" && !value.startsWith("https://chrome-de vtools-frontend.appspot.com/"))
997 location.search = ""; 997 location.search = "";
998 } 998 }
999 } 999 }
1000 1000
1001 /** 1001 /**
1002 * @suppressGlobalPropertiesCheck 1002 * @suppressGlobalPropertiesCheck
1003 * @suppress {checkTypes}
1003 */ 1004 */
1004 function installBackwardsCompatibility() 1005 function installBackwardsCompatibility()
1005 { 1006 {
1006 sanitizeRemoteFrontendUrl(); 1007 sanitizeRemoteFrontendUrl();
1007 1008
1008 if (window.location.search.indexOf("remoteFrontend") === -1) 1009 if (window.location.search.indexOf("remoteFrontend") === -1)
1009 return; 1010 return;
1010 1011
1011 // Support for legacy (<M50) frontends. 1012 // Support for legacy (<M50) frontends.
1012 installObjectObserve(); 1013 installObjectObserve();
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
1046 styleElement.textContent = "html /deep/ * { min-width: 0; min-height: 0; }"; 1047 styleElement.textContent = "html /deep/ * { min-width: 0; min-height: 0; }";
1047 1048
1048 // Support for quirky border-image behavior (<M51), see: 1049 // Support for quirky border-image behavior (<M51), see:
1049 // https://bugs.chromium.org/p/chromium/issues/detail?id=559258 1050 // https://bugs.chromium.org/p/chromium/issues/detail?id=559258
1050 styleElement.textContent += "\nhtml /deep/ .cm-breakpoint .CodeMirror-linenu mber { border-style: solid !important; }"; 1051 styleElement.textContent += "\nhtml /deep/ .cm-breakpoint .CodeMirror-linenu mber { border-style: solid !important; }";
1051 styleElement.textContent += "\nhtml /deep/ .cm-breakpoint.cm-breakpoint-cond itional .CodeMirror-linenumber { border-style: solid !important; }"; 1052 styleElement.textContent += "\nhtml /deep/ .cm-breakpoint.cm-breakpoint-cond itional .CodeMirror-linenumber { border-style: solid !important; }";
1052 window.document.head.appendChild(styleElement); 1053 window.document.head.appendChild(styleElement);
1053 1054
1054 // Support for legacy (<M49) frontends. 1055 // Support for legacy (<M49) frontends.
1055 Event.prototype.deepPath = undefined; 1056 Event.prototype.deepPath = undefined;
1057
1058 // Support for legacy (<53) frontends.
1059 window.FileError = {
1060 NOT_FOUND_ERR: DOMException.NOT_FOUND_ERR,
1061 ABORT_ERR: DOMException.ABORT_ERR,
1062 INVALID_MODIFICATION_ERR: DOMException.INVALID_MODIFICATION_ERR,
1063 NOT_READABLE_ERR: 0 // No matching DOMException, so code will be 0.
1064 };
1056 } 1065 }
1057 1066
1058 function windowLoaded() 1067 function windowLoaded()
1059 { 1068 {
1060 window.removeEventListener("DOMContentLoaded", windowLoaded, false); 1069 window.removeEventListener("DOMContentLoaded", windowLoaded, false);
1061 installBackwardsCompatibility(); 1070 installBackwardsCompatibility();
1062 } 1071 }
1063 1072
1064 sanitizeRemoteFrontendUrl(); 1073 sanitizeRemoteFrontendUrl();
1065 if (window.document.head && (window.document.readyState === "complete" || window .document.readyState === "interactive")) 1074 if (window.document.head && (window.document.readyState === "complete" || window .document.readyState === "interactive"))
1066 installBackwardsCompatibility(); 1075 installBackwardsCompatibility();
1067 else 1076 else
1068 window.addEventListener("DOMContentLoaded", windowLoaded, false); 1077 window.addEventListener("DOMContentLoaded", windowLoaded, false);
1069 1078
1070 })(window); 1079 })(window);
1071 1080
1072 if (!DOMTokenList.prototype.__originalDOMTokenListToggle) { 1081 if (!DOMTokenList.prototype.__originalDOMTokenListToggle) {
1073 DOMTokenList.prototype.__originalDOMTokenListToggle = DOMTokenList.prototype .toggle; 1082 DOMTokenList.prototype.__originalDOMTokenListToggle = DOMTokenList.prototype .toggle;
1074 DOMTokenList.prototype.toggle = function(token, force) 1083 DOMTokenList.prototype.toggle = function(token, force)
1075 { 1084 {
1076 if (arguments.length === 1) 1085 if (arguments.length === 1)
1077 force = !this.contains(token); 1086 force = !this.contains(token);
1078 return this.__originalDOMTokenListToggle(token, !!force); 1087 return this.__originalDOMTokenListToggle(token, !!force);
1079 } 1088 }
1080 } 1089 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698