Title: [186562] trunk/Source/WebInspectorUI
- Revision
- 186562
- Author
- drou...@apple.com
- Date
- 2015-07-08 18:17:44 -0700 (Wed, 08 Jul 2015)
Log Message
Web Inspector: Color swatches show up in color names in comments
https://bugs.webkit.org/show_bug.cgi?id=146757
Reviewed by Timothy Hatcher.
* UserInterface/Views/CodeMirrorAdditions.js: Color markers now only appear if the color is in a keyword.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (186561 => 186562)
--- trunk/Source/WebInspectorUI/ChangeLog 2015-07-09 01:14:03 UTC (rev 186561)
+++ trunk/Source/WebInspectorUI/ChangeLog 2015-07-09 01:17:44 UTC (rev 186562)
@@ -1,3 +1,12 @@
+2015-07-08 Devin Rousso <drou...@apple.com>
+
+ Web Inspector: Color swatches show up in color names in comments
+ https://bugs.webkit.org/show_bug.cgi?id=146757
+
+ Reviewed by Timothy Hatcher.
+
+ * UserInterface/Views/CodeMirrorAdditions.js: Color markers now only appear if the color is in a keyword.
+
2015-07-08 Timothy Hatcher <timo...@apple.com>
Web Inspector: Only record a timeline when the Timelines tab is showing
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CodeMirrorAdditions.js (186561 => 186562)
--- trunk/Source/WebInspectorUI/UserInterface/Views/CodeMirrorAdditions.js 2015-07-09 01:14:03 UTC (rev 186561)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CodeMirrorAdditions.js 2015-07-09 01:17:44 UTC (rev 186562)
@@ -533,9 +533,9 @@
continue;
}
- // We're not interested in text within a CSS selector.
+ // We're not interested if the color value is not inside a keyword.
var tokenType = this.getTokenTypeAt(from);
- if (tokenType && (tokenType.indexOf("builtin") !== -1 || tokenType.indexOf("tag") !== -1)) {
+ if (tokenType && !tokenType.includes("keyword")) {
match = colorRegex.exec(lineContent);
continue;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes