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

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

Issue 2543323003: DevTools: [SSP] make rule link to point to the style open bracket (Closed)
Patch Set: rebaseline Created 4 years 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/undo-set-selector-text-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 77571efd34840713a53eec7ba77249e7eaa32403..35d9ded9b6e89c57978d37a47662cb96b245ed31 100644
--- a/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
+++ b/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
@@ -648,13 +648,10 @@ Elements.StylePropertiesSection = class {
return createTextNode('');
var ruleLocation;
- if (rule instanceof SDK.CSSStyleRule) {
- var matchingSelectors = matchedStyles.matchingSelectors(rule);
- var firstMatchingIndex = matchingSelectors.length ? matchingSelectors[0] : 0;
- ruleLocation = rule.selectors[firstMatchingIndex].range;
- } else if (rule instanceof SDK.CSSKeyframeRule) {
+ if (rule instanceof SDK.CSSStyleRule)
+ ruleLocation = rule.style.range;
+ else if (rule instanceof SDK.CSSKeyframeRule)
ruleLocation = rule.key().range;
- }
var header = rule.styleSheetId ? matchedStyles.cssModel().styleSheetHeaderForId(rule.styleSheetId) : null;
if (ruleLocation && rule.styleSheetId && header && !header.isAnonymousInlineStyleSheet()) {
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/elements/styles/undo-set-selector-text-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698