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

Unified Diff: third_party/WebKit/Source/devtools/front_end/components/DOMPresentationUtils.js

Issue 2830773002: DevTools: recognize CSSIdentifiers that start with double hyphen (Closed)
Patch Set: Created 3 years, 8 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/LayoutTests/inspector/elements/elements-css-path-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/components/DOMPresentationUtils.js
diff --git a/third_party/WebKit/Source/devtools/front_end/components/DOMPresentationUtils.js b/third_party/WebKit/Source/devtools/front_end/components/DOMPresentationUtils.js
index 960c9e1bd90c07cb65ecf57d79e7741bb3d68562..679710f759ba437f82a8e5964e9e126408b7275c 100644
--- a/third_party/WebKit/Source/devtools/front_end/components/DOMPresentationUtils.js
+++ b/third_party/WebKit/Source/devtools/front_end/components/DOMPresentationUtils.js
@@ -415,7 +415,8 @@ Components.DOMPresentationUtils._cssPathStep = function(node, optimized, isTarge
* @return {boolean}
*/
function isCSSIdentifier(value) {
- return /^-?[a-zA-Z_][a-zA-Z0-9_-]*$/.test(value);
+ // Double hyphen prefixes are not allowed by specification, but many sites use it.
+ return /^-{0,2}[a-zA-Z_][a-zA-Z0-9_-]*$/.test(value);
}
var prefixedOwnClassNamesArray = prefixedElementClassNames(node);
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/elements/elements-css-path-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698