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

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

Issue 898673004: DevTools: [SSP] fix matched selector highlight for style rules (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ed1dc52870fc88d5d648aa72c53c0715b2d94a43..dcff37971ff94685848cce62f08ee8a14cf40e3a 100644
--- a/Source/devtools/front_end/elements/StylesSidebarPane.js
+++ b/Source/devtools/front_end/elements/StylesSidebarPane.js
@@ -1445,7 +1445,7 @@ WebInspector.StylePropertiesSection = function(parentPane, styleRule)
this.propertiesTreeOutline.section = this;
var selectorContainer = createElement("div");
- this._selectorElement = createElement("span");
+ this._selectorElement = createElementWithClass("span", "selector");
this._selectorElement.textContent = styleRule.selectorText();
selectorContainer.appendChild(this._selectorElement);
@@ -1839,11 +1839,8 @@ WebInspector.StylePropertiesSection.prototype = {
this._mediaListElement.classList.toggle("media-matches", this.styleRule.mediaMatches());
- // .selector is rendered as non-affecting selector by default.
- if (!this.styleRule.hasMatchingSelectors()) {
- this._selectorElement.className = "selector";
+ if (!this.styleRule.hasMatchingSelectors())
return;
- }
var selectors = rule.selectors;
var fragment = createDocumentFragment();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698