Index: Source/devtools/front_end/elements/StylesSidebarPane.js |
diff --git a/Source/devtools/front_end/elements/StylesSidebarPane.js b/Source/devtools/front_end/elements/StylesSidebarPane.js |
index b00fb3c486c31603d884cc0eace4d9cb67fb8470..86a519d01177e9d260fa48146fb0a98a07113ce5 100644 |
--- a/Source/devtools/front_end/elements/StylesSidebarPane.js |
+++ b/Source/devtools/front_end/elements/StylesSidebarPane.js |
@@ -1195,14 +1195,14 @@ WebInspector.StylePropertiesSection.prototype = { |
var lineNumber = media.lineNumberInSource(); |
var columnNumber = media.columnNumberInSource(); |
console.assert(typeof lineNumber !== "undefined" && typeof columnNumber !== "undefined"); |
- rawLocation = new WebInspector.CSSLocation(this._parentPane._target, media.sourceURL, lineNumber, columnNumber); |
+ rawLocation = new WebInspector.CSSLocation(this._parentPane._target, mediaHeader.id, media.sourceURL, lineNumber, columnNumber); |
} |
} |
var anchor; |
- if (rawLocation) |
- anchor = this._parentPane._linkifier.linkifyCSSLocation(mediaHeader.id, rawLocation); |
- else { |
+ if (rawLocation) { |
+ anchor = this._parentPane._linkifier.linkifyCSSLocation(rawLocation); |
+ } else { |
// The "linkedStylesheet" case. |
anchor = WebInspector.linkifyResourceAsNode(media.sourceURL, undefined, "subtitle", media.sourceURL); |
} |
@@ -1448,7 +1448,6 @@ WebInspector.StylePropertiesSection.prototype = { |
var isSelectorMatching = matchingSelectors[currentMatch] === i; |
if (isSelectorMatching) |
++currentMatch; |
- var rawLocation = new WebInspector.CSSLocation(this._parentPane._target, rule.sourceURL, rule.lineNumberInSource(i), rule.columnNumberInSource(i)); |
var matchingSelectorClass = isSelectorMatching ? " selector-matches" : ""; |
var selectorElement = document.createElement("span"); |
selectorElement.className = "simple-selector" + matchingSelectorClass; |
@@ -1523,8 +1522,8 @@ WebInspector.StylePropertiesSection.prototype = { |
if (this.styleRule.sourceURL) { |
var firstMatchingIndex = this.styleRule.rule.matchingSelectors && this.rule.matchingSelectors.length ? this.rule.matchingSelectors[0] : 0; |
- var matchingSelectorLocation = new WebInspector.CSSLocation(this._parentPane._target, this.styleRule.sourceURL, this.rule.lineNumberInSource(firstMatchingIndex), this.rule.columnNumberInSource(firstMatchingIndex)); |
- return this._parentPane._linkifier.linkifyCSSLocation(this.rule.styleSheetId, matchingSelectorLocation) || linkifyUncopyable(this.styleRule.sourceURL, this.rule.lineNumberInSource()); |
+ var matchingSelectorLocation = new WebInspector.CSSLocation(this._parentPane._target, this.rule.styleSheetId, this.styleRule.sourceURL, this.rule.lineNumberInSource(firstMatchingIndex), this.rule.columnNumberInSource(firstMatchingIndex)); |
+ return this._parentPane._linkifier.linkifyCSSLocation(matchingSelectorLocation) || linkifyUncopyable(this.styleRule.sourceURL, this.rule.lineNumberInSource()); |
} |
if (!this.rule) |