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

Unified Diff: third_party/WebKit/Source/devtools/front_end/bindings/SASSSourceMapping.js

Issue 2889013002: DevTools: introduce uiSourceCode.mimeType() method (Closed)
Patch Set: address comments Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/bindings/SASSSourceMapping.js
diff --git a/third_party/WebKit/Source/devtools/front_end/bindings/SASSSourceMapping.js b/third_party/WebKit/Source/devtools/front_end/bindings/SASSSourceMapping.js
index 87665115e9924072397c7f75833b86c4a1406ccd..6408974967f0d66da10fa97b46379ab26a8c2395 100644
--- a/third_party/WebKit/Source/devtools/front_end/bindings/SASSSourceMapping.js
+++ b/third_party/WebKit/Source/devtools/front_end/bindings/SASSSourceMapping.js
@@ -73,13 +73,14 @@ Bindings.SASSSourceMapping = class {
}
var contentProvider = sourceMap.sourceContentProvider(sassURL, Common.resourceTypes.SourceMapStyleSheet);
+ var mimeType = Common.ResourceType.mimeFromURL(sassURL) || contentProvider.contentType().canonicalMimeType();
var embeddedContent = sourceMap.embeddedContentByURL(sassURL);
var metadata =
typeof embeddedContent === 'string' ? new Workspace.UISourceCodeMetadata(null, embeddedContent.length) : null;
uiSourceCode = this._project.createUISourceCode(sassURL, contentProvider.contentType());
Bindings.NetworkProject.setInitialFrameAttribution(uiSourceCode, header.frameId);
uiSourceCode[Bindings.SASSSourceMapping._sourceMapSymbol] = sourceMap;
- this._project.addUISourceCodeWithProvider(uiSourceCode, contentProvider, metadata);
+ this._project.addUISourceCodeWithProvider(uiSourceCode, contentProvider, metadata, mimeType);
}
Bindings.cssWorkspaceBinding.updateLocations(header);
this._sourceMapAttachedForTest(sourceMap);

Powered by Google App Engine
This is Rietveld 408576698