summaryrefslogtreecommitdiffstats
path: root/WebCore/inspector/front-end/StylesSidebarPane.js
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/inspector/front-end/StylesSidebarPane.js')
-rw-r--r--WebCore/inspector/front-end/StylesSidebarPane.js16
1 files changed, 10 insertions, 6 deletions
diff --git a/WebCore/inspector/front-end/StylesSidebarPane.js b/WebCore/inspector/front-end/StylesSidebarPane.js
index 649b9d0..5f5a5ad 100644
--- a/WebCore/inspector/front-end/StylesSidebarPane.js
+++ b/WebCore/inspector/front-end/StylesSidebarPane.js
@@ -649,20 +649,24 @@ WebInspector.StylePropertiesSection = function(styleRule, subtitle, computedStyl
this.headerElement.addStyleClass("hidden");
} else {
if (!subtitle) {
- if (this.styleRule.parentStyleSheet && this.styleRule.parentStyleSheet.href) {
- var url = this.styleRule.parentStyleSheet.href;
- var link = WebInspector.linkifyResourceAsNode(url, "resources", this.rule.sourceLine + 1);
+ function linkifyUncopyable(url, line)
+ {
+ var link = WebInspector.linkifyResourceAsNode(url, "resources", line + 1);
link.setAttribute("data-uncopyable", link.textContent);
link.textContent = "";
- this.subtitleElement.appendChild(link);
- } else if (isUserAgent)
+ return link;
+ }
+
+ if (this.styleRule.parentStyleSheet && this.styleRule.parentStyleSheet.href)
+ this.subtitleElement.appendChild(linkifyUncopyable(this.styleRule.parentStyleSheet.href, this.rule.sourceLine));
+ else if (isUserAgent)
subtitle = WebInspector.UIString("user agent stylesheet");
else if (isUser)
subtitle = WebInspector.UIString("user stylesheet");
else if (isViaInspector)
subtitle = WebInspector.UIString("via inspector");
else
- subtitle = WebInspector.UIString("inline stylesheet");
+ this.subtitleElement.appendChild(linkifyUncopyable(this.rule.documentURL, this.rule.sourceLine));
}
if (isInherited)
this.element.addStyleClass("show-inherited"); // This one is related to inherited rules, not compted style.