Commit c7dec323 authored by apavlov@chromium.org's avatar apavlov@chromium.org

DevTools: Provide #sourceURL for CSS stylesheets in the debug_devtools=1 mode

R=pfeldman

Review URL: https://codereview.chromium.org/724333004

git-svn-id: svn://svn.chromium.org/blink/trunk@185375 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 20174b22
...@@ -681,7 +681,11 @@ Runtime.Module.prototype = { ...@@ -681,7 +681,11 @@ Runtime.Module.prototype = {
console.error("Failed to load stylesheet: " + path); console.error("Failed to load stylesheet: " + path);
return; 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 + " */";
} }
}, },
......
...@@ -50,11 +50,6 @@ WebInspector.View = function(isWebComponent) ...@@ -50,11 +50,6 @@ WebInspector.View = function(isWebComponent)
this._notificationDepth = 0; this._notificationDepth = 0;
} }
WebInspector.View._buildSourceURL = function(cssFile)
{
return "\n/*# sourceURL=" + WebInspector.ParsedURL.completeURL(window.location.href, cssFile) + " */";
}
/** /**
* @param {string} cssFile * @param {string} cssFile
* @return {!Element} * @return {!Element}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment