Title: [164236] trunk/Source/WebInspectorUI
- Revision
- 164236
- Author
- grao...@webkit.org
- Date
- 2014-02-17 11:36:01 -0800 (Mon, 17 Feb 2014)
Log Message
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:
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (164235 => 164236)
--- trunk/Source/WebInspectorUI/ChangeLog 2014-02-17 19:26:55 UTC (rev 164235)
+++ trunk/Source/WebInspectorUI/ChangeLog 2014-02-17 19:36:01 UTC (rev 164236)
@@ -1,3 +1,14 @@
+2014-02-17 Antoine Quint <grao...@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 <chrisjsh...@gmail.com>
Web Inspector: scope chain details sidebar doesn't update values modified via console
Modified: trunk/Source/WebInspectorUI/UserInterface/CodeMirrorAdditions.js (164235 => 164236)
--- trunk/Source/WebInspectorUI/UserInterface/CodeMirrorAdditions.js 2014-02-17 19:26:55 UTC (rev 164235)
+++ trunk/Source/WebInspectorUI/UserInterface/CodeMirrorAdditions.js 2014-02-17 19:36:01 UTC (rev 164236)
@@ -461,6 +461,13 @@
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) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes