| Index: third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js b/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js
|
| index 13b5de4e4fd21e80c5f72eb25df571108d69d02f..9096f1a683bcdd60e1839419f6681f2d1e2a1894 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js
|
| @@ -40,7 +40,7 @@ Sources.JavaScriptSourceFrame = class extends Sources.UISourceCodeFrame {
|
|
|
| this._scriptsPanel = Sources.SourcesPanel.instance();
|
| this._breakpointManager = Bindings.breakpointManager;
|
| - if (uiSourceCode.project().type() === Workspace.projectTypes.Debugger)
|
| + if (Bindings.DefaultScriptMapping.isDebuggerUISourceCode(uiSourceCode))
|
| this.element.classList.add('source-frame-debugger-script');
|
|
|
| this._popoverHelper = new Components.ObjectPopoverHelper(
|
| @@ -80,7 +80,7 @@ Sources.JavaScriptSourceFrame = class extends Sources.UISourceCodeFrame {
|
| }
|
|
|
| if (this._scriptFileForTarget.size || uiSourceCode.extension() === 'js' ||
|
| - uiSourceCode.project().type() === Workspace.projectTypes.Snippets)
|
| + Snippets.ScriptSnippetModel.isSnippetUISourceCode(uiSourceCode))
|
| this._compiler = new Sources.JavaScriptCompiler(this);
|
|
|
| Common.moduleSetting('skipStackFramesPattern').addChangeListener(this._showBlackboxInfobarIfNeeded, this);
|
| @@ -103,7 +103,7 @@ Sources.JavaScriptSourceFrame = class extends Sources.UISourceCodeFrame {
|
| result.push(new UI.ToolbarText(Common.UIString('(source mapped from %s)', parsedURL.displayName)));
|
| }
|
|
|
| - if (this.uiSourceCode().project().type() === Workspace.projectTypes.Snippets) {
|
| + if (Snippets.ScriptSnippetModel.isSnippetUISourceCode(this.uiSourceCode())) {
|
| result.push(new UI.ToolbarSeparator(true));
|
| var runSnippet = UI.Toolbar.createActionButtonForId('debugger.run-snippet');
|
| runSnippet.setText(Host.isMac() ? Common.UIString('\u2318+Enter') : Common.UIString('Ctrl+Enter'));
|
| @@ -117,8 +117,7 @@ Sources.JavaScriptSourceFrame = class extends Sources.UISourceCodeFrame {
|
| var uiSourceCode = this.uiSourceCode();
|
| if (!uiSourceCode.contentType().hasScripts())
|
| return;
|
| - var projectType = uiSourceCode.project().type();
|
| - if (projectType === Workspace.projectTypes.Snippets)
|
| + if (Snippets.ScriptSnippetModel.isSnippetUISourceCode(uiSourceCode))
|
| return;
|
| if (!Bindings.blackboxManager.isBlackboxedUISourceCode(uiSourceCode)) {
|
| this._hideBlackboxInfobar();
|
| @@ -148,7 +147,7 @@ Sources.JavaScriptSourceFrame = class extends Sources.UISourceCodeFrame {
|
|
|
| function unblackbox() {
|
| Bindings.blackboxManager.unblackboxUISourceCode(uiSourceCode);
|
| - if (projectType === Workspace.projectTypes.ContentScripts)
|
| + if (Bindings.NetworkProject.isContentScriptUISourceCode(uiSourceCode))
|
| Bindings.blackboxManager.unblackboxContentScripts();
|
| }
|
|
|
| @@ -274,7 +273,7 @@ Sources.JavaScriptSourceFrame = class extends Sources.UISourceCodeFrame {
|
| * @this {Sources.JavaScriptSourceFrame}
|
| */
|
| function populateSourceMapMembers() {
|
| - if (this.uiSourceCode().project().type() === Workspace.projectTypes.Network &&
|
| + if (Bindings.NetworkProject.isNetworkUISourceCode(this.uiSourceCode()) &&
|
| Common.moduleSetting('jsSourceMapsEnabled').get() &&
|
| !Bindings.blackboxManager.isBlackboxedUISourceCode(this.uiSourceCode())) {
|
| if (this._scriptFileForTarget.size) {
|
| @@ -330,7 +329,7 @@ Sources.JavaScriptSourceFrame = class extends Sources.UISourceCodeFrame {
|
| }
|
|
|
| _supportsEnabledBreakpointsWhileEditing() {
|
| - return this.uiSourceCode().project().type() === Workspace.projectTypes.Snippets;
|
| + return Snippets.ScriptSnippetModel.isSnippetUISourceCode(this.uiSourceCode());
|
| }
|
|
|
| _restoreBreakpointsIfConsistentScripts() {
|
|
|