https://bugs.webkit.org/show_bug.cgi?id=128909
Reviewed by Joseph Pecoraro.
Disregard any text that might be contained within a CSS selector.
* UserInterface/CodeMirrorAdditions.js:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@164236
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2014-02-17 Antoine Quint <graouts@webkit.org>
+
+ Web Inspector: CSS selectors containing a color name shouldn't be considered for color editing
+ https://bugs.webkit.org/show_bug.cgi?id=128909
+
+ Reviewed by Joseph Pecoraro.
+
+ Disregard any text that might be contained within a CSS selector.
+
+ * UserInterface/CodeMirrorAdditions.js:
+
2014-02-15 Chris J. Shull <chrisjshull@gmail.com>
Web Inspector: scope chain details sidebar doesn't update values modified via console
continue;
}
+ // We're not interested in text within a CSS selector.
+ var tokenType = this.getTokenTypeAt(from);
+ if (tokenType && (tokenType.indexOf("builtin") !== -1 || tokenType.indexOf("tag") !== -1)) {
+ match = colorRegex.exec(lineContent);
+ continue;
+ }
+
var colorString = match[0];
var color = WebInspector.Color.fromString(colorString);
if (!color) {