OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 } | 68 } |
69 | 69 |
70 if (this._scriptFileForTarget.size || uiSourceCode.extension() === "js" || u
iSourceCode.project().type() === WebInspector.projectTypes.Snippets) | 70 if (this._scriptFileForTarget.size || uiSourceCode.extension() === "js" || u
iSourceCode.project().type() === WebInspector.projectTypes.Snippets) |
71 this._compiler = new WebInspector.JavaScriptCompiler(this); | 71 this._compiler = new WebInspector.JavaScriptCompiler(this); |
72 | 72 |
73 WebInspector.moduleSetting("skipStackFramesPattern").addChangeListener(this.
_showBlackboxInfobarIfNeeded, this); | 73 WebInspector.moduleSetting("skipStackFramesPattern").addChangeListener(this.
_showBlackboxInfobarIfNeeded, this); |
74 WebInspector.moduleSetting("skipContentScripts").addChangeListener(this._sho
wBlackboxInfobarIfNeeded, this); | 74 WebInspector.moduleSetting("skipContentScripts").addChangeListener(this._sho
wBlackboxInfobarIfNeeded, this); |
75 this._showBlackboxInfobarIfNeeded(); | 75 this._showBlackboxInfobarIfNeeded(); |
76 /** @type {!Map.<number, !Element>} */ | 76 /** @type {!Map.<number, !Element>} */ |
77 this._valueWidgets = new Map(); | 77 this._valueWidgets = new Map(); |
78 } | 78 }; |
79 | 79 |
80 WebInspector.JavaScriptSourceFrame.prototype = { | 80 WebInspector.JavaScriptSourceFrame.prototype = { |
81 /** | 81 /** |
82 * @override | 82 * @override |
83 * @return {!Array<!WebInspector.ToolbarItem>} | 83 * @return {!Array<!WebInspector.ToolbarItem>} |
84 */ | 84 */ |
85 syncToolbarItems: function() | 85 syncToolbarItems: function() |
86 { | 86 { |
87 var result = WebInspector.UISourceCodeFrame.prototype.syncToolbarItems.c
all(this); | 87 var result = WebInspector.UISourceCodeFrame.prototype.syncToolbarItems.c
all(this); |
88 var originURL = WebInspector.CompilerScriptMapping.uiSourceCodeOrigin(th
is.uiSourceCode()); | 88 var originURL = WebInspector.CompilerScriptMapping.uiSourceCodeOrigin(th
is.uiSourceCode()); |
(...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
971 | 971 |
972 this._prettyPrintInfobar = WebInspector.Infobar.create( | 972 this._prettyPrintInfobar = WebInspector.Infobar.create( |
973 WebInspector.Infobar.Type.Info, | 973 WebInspector.Infobar.Type.Info, |
974 WebInspector.UIString("Pretty-print this minified file?"), | 974 WebInspector.UIString("Pretty-print this minified file?"), |
975 WebInspector.settings.createSetting("prettyPrintInfobarDisabled", fa
lse)); | 975 WebInspector.settings.createSetting("prettyPrintInfobarDisabled", fa
lse)); |
976 if (!this._prettyPrintInfobar) | 976 if (!this._prettyPrintInfobar) |
977 return; | 977 return; |
978 | 978 |
979 this._prettyPrintInfobar.setCloseCallback(() => delete this._prettyPrint
Infobar); | 979 this._prettyPrintInfobar.setCloseCallback(() => delete this._prettyPrint
Infobar); |
980 var toolbar = new WebInspector.Toolbar(""); | 980 var toolbar = new WebInspector.Toolbar(""); |
981 var button = new WebInspector.ToolbarButton("", "format-toolbar-item") | 981 var button = new WebInspector.ToolbarButton("", "format-toolbar-item"); |
982 toolbar.appendToolbarItem(button); | 982 toolbar.appendToolbarItem(button); |
983 toolbar.element.style.display = "inline-block"; | 983 toolbar.element.style.display = "inline-block"; |
984 toolbar.element.style.verticalAlign = "middle"; | 984 toolbar.element.style.verticalAlign = "middle"; |
985 toolbar.element.style.marginBottom = "3px"; | 985 toolbar.element.style.marginBottom = "3px"; |
986 toolbar.element.style.pointerEvents = "none"; | 986 toolbar.element.style.pointerEvents = "none"; |
987 var element = this._prettyPrintInfobar.createDetailsRowMessage(); | 987 var element = this._prettyPrintInfobar.createDetailsRowMessage(); |
988 element.appendChild(WebInspector.formatLocalized("You can click the %s b
utton on the bottom status bar, and continue debugging with the new formatted so
urce.", [toolbar.element])); | 988 element.appendChild(WebInspector.formatLocalized("You can click the %s b
utton on the bottom status bar, and continue debugging with the new formatted so
urce.", [toolbar.element])); |
989 this.attachInfobars([this._prettyPrintInfobar]); | 989 this.attachInfobars([this._prettyPrintInfobar]); |
990 }, | 990 }, |
991 | 991 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1068 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events
.SourceMappingChanged, this._onSourceMappingChanged, this); | 1068 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events
.SourceMappingChanged, this._onSourceMappingChanged, this); |
1069 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events
.WorkingCopyChanged, this._workingCopyChanged, this); | 1069 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events
.WorkingCopyChanged, this._workingCopyChanged, this); |
1070 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events
.WorkingCopyCommitted, this._workingCopyCommitted, this); | 1070 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events
.WorkingCopyCommitted, this._workingCopyCommitted, this); |
1071 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events
.TitleChanged, this._showBlackboxInfobarIfNeeded, this); | 1071 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events
.TitleChanged, this._showBlackboxInfobarIfNeeded, this); |
1072 WebInspector.moduleSetting("skipStackFramesPattern").removeChangeListene
r(this._showBlackboxInfobarIfNeeded, this); | 1072 WebInspector.moduleSetting("skipStackFramesPattern").removeChangeListene
r(this._showBlackboxInfobarIfNeeded, this); |
1073 WebInspector.moduleSetting("skipContentScripts").removeChangeListener(th
is._showBlackboxInfobarIfNeeded, this); | 1073 WebInspector.moduleSetting("skipContentScripts").removeChangeListener(th
is._showBlackboxInfobarIfNeeded, this); |
1074 WebInspector.UISourceCodeFrame.prototype.dispose.call(this); | 1074 WebInspector.UISourceCodeFrame.prototype.dispose.call(this); |
1075 }, | 1075 }, |
1076 | 1076 |
1077 __proto__: WebInspector.UISourceCodeFrame.prototype | 1077 __proto__: WebInspector.UISourceCodeFrame.prototype |
1078 } | 1078 }; |
OLD | NEW |