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

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

Issue 2013843003: [DevTools] Handle valid urls with quotes inside them in SSP. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased tests Created 4 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
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/elements/styles/url-multiple-collapsing-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 71505a19be4709a5692643005a1d3615cc06d5c7..3104c01653305aefc7c5a61a58189d34ebc16a43 100644
--- a/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
+++ b/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
@@ -3107,16 +3107,16 @@ WebInspector.StylesSidebarPropertyRenderer.prototype = {
*/
_processURL: function(url)
{
- var hrefUrl = url;
- var match = hrefUrl.match(/['"]?([^'"]+)/);
- if (match)
- hrefUrl = match[1];
+ var isQuoted = /^'.*'$/.test(url) || /^".*"$/.test(url);
+ if (isQuoted)
+ url = url.substring(1, url.length - 1);
var container = createDocumentFragment();
container.createTextChild("url(");
+ var hrefUrl = null;
if (this._rule && this._rule.resourceURL())
- hrefUrl = WebInspector.ParsedURL.completeURL(this._rule.resourceURL(), hrefUrl);
+ hrefUrl = WebInspector.ParsedURL.completeURL(this._rule.resourceURL(), url);
else if (this._node)
- hrefUrl = this._node.resolveURL(hrefUrl);
+ hrefUrl = this._node.resolveURL(url);
var hasResource = hrefUrl && !!WebInspector.resourceForURL(hrefUrl);
// FIXME: WebInspector.linkifyURLAsNode() should really use baseURI.
container.appendChild(WebInspector.linkifyURLAsNode(hrefUrl || url, url, undefined, !hasResource));
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/elements/styles/url-multiple-collapsing-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698