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

Unified Diff: third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js

Issue 2545883005: DevTools: support sourceMappingURL for the inline stylesheets (Closed)
Patch Set: fix sourcemap for inline style Created 4 years 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/elements/StylesSidebarPane.js
diff --git a/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js b/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
index 30c887d325225d76272a7a17ca22e090da0f1369..cdeed6eb0c94ba35a7a4d8604602d3fb02b7e952 100644
--- a/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
+++ b/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
@@ -625,8 +625,11 @@ Elements.StylePropertiesSection = class {
this.editable = false;
} else {
// Check this is a real CSSRule, not a bogus object coming from Elements.BlankStylePropertiesSection.
- if (rule.styleSheetId)
- this.navigable = !!rule.resourceURL();
+ if (rule.styleSheetId) {
+ var header = rule.cssModel().styleSheetHeaderForId(rule.styleSheetId);
+ var hasSourceMap = header ? !!header.sourceMap() : false;
+ this.navigable = !!rule.resourceURL() || hasSourceMap;
dgozman 2016/12/04 03:13:13 Note: you can replace rule.resourceURL() with head
lushnikov 2016/12/05 19:56:38 Done.
+ }
}
}
@@ -670,7 +673,7 @@ Elements.StylePropertiesSection = class {
}
var header = rule.styleSheetId ? matchedStyles.cssModel().styleSheetHeaderForId(rule.styleSheetId) : null;
- if (ruleLocation && rule.styleSheetId && header && header.resourceURL()) {
+ if (ruleLocation && rule.styleSheetId && header && (header.resourceURL() || !!header.sourceMap())) {
dgozman 2016/12/04 03:13:13 ... and use it here.
lushnikov 2016/12/05 19:56:38 Done.
return Elements.StylePropertiesSection._linkifyRuleLocation(
matchedStyles.cssModel(), linkifier, rule.styleSheetId, ruleLocation);
}

Powered by Google App Engine
This is Rietveld 408576698