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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sdk/CSSMatchedStyles.js

Issue 2637593002: DevTools: Autocomplete CSS variables in StylesSidebar (Closed)
Patch Set: merge Created 3 years, 10 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/Source/devtools/front_end/elements/StylesSidebarPane.js ('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/sdk/CSSMatchedStyles.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/CSSMatchedStyles.js b/third_party/WebKit/Source/devtools/front_end/sdk/CSSMatchedStyles.js
index 85c8251e2f760de847e4483d312222ef7a55c055..f4cc534cdd57d176dabc2efa201e137562ad18b9 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/CSSMatchedStyles.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/CSSMatchedStyles.js
@@ -306,6 +306,20 @@ SDK.CSSMatchedStyles = class {
}
/**
+ * @return {!Array<string>}
+ */
+ cssVariables() {
+ var cssVariables = [];
+ for (var style of this.nodeStyles()) {
+ for (var property of style.allProperties()) {
+ if (property.name.startsWith('--'))
+ cssVariables.push(property.name);
+ }
+ }
+ return cssVariables;
+ }
+
+ /**
* @param {!SDK.CSSStyleDeclaration} style
* @return {boolean}
*/
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698