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

Unified Diff: Source/devtools/front_end/Runtime.js

Issue 724333004: DevTools: Provide #sourceURL for CSS stylesheets in the debug_devtools=1 mode (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « no previous file | Source/devtools/front_end/ui/View.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/Runtime.js
diff --git a/Source/devtools/front_end/Runtime.js b/Source/devtools/front_end/Runtime.js
index 4003c80a197dfad1c9155805dc35fa332a769c4e..d35021651be84d1a3ddfca3732f32879e515704d 100644
--- a/Source/devtools/front_end/Runtime.js
+++ b/Source/devtools/front_end/Runtime.js
@@ -681,7 +681,11 @@ Runtime.Module.prototype = {
console.error("Failed to load stylesheet: " + path);
return;
}
- Runtime.cachedResources[path] = content;
+ var sourceURL = window.location.href;
+ if (window.location.search)
+ sourceURL.replace(window.location.search, "");
+ sourceURL = sourceURL.substring(0, sourceURL.lastIndexOf("/") + 1) + path;
+ Runtime.cachedResources[path] = content + "\n/*# sourceURL=" + sourceURL + " */";
}
},
« no previous file with comments | « no previous file | Source/devtools/front_end/ui/View.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698