Title: [196852] trunk/Source/WebInspectorUI
- Revision
- 196852
- Author
- [email protected]
- Date
- 2016-02-19 19:24:22 -0800 (Fri, 19 Feb 2016)
Log Message
Web Inspector: Color picker in Visual Styles sidebar should not default to zero alpha
https://bugs.webkit.org/show_bug.cgi?id=154474
<rdar://problem/24750217>
Patch by Devin Rousso <[email protected]> on 2016-02-19
Reviewed by Timothy Hatcher.
* UserInterface/Views/InlineSwatch.js:
(WebInspector.InlineSwatch.prototype._fallbackValue):
Changed the fallback value for color from transparent to white so that
the color picker starts out with an alpha value of 1.
(WebInspector.InlineSwatch.prototype._handleContextMenuEvent):
Prevents context menu events from having an effect if there is no value
for them to modify.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (196851 => 196852)
--- trunk/Source/WebInspectorUI/ChangeLog 2016-02-20 02:47:08 UTC (rev 196851)
+++ trunk/Source/WebInspectorUI/ChangeLog 2016-02-20 03:24:22 UTC (rev 196852)
@@ -1,3 +1,20 @@
+2016-02-19 Devin Rousso <[email protected]>
+
+ Web Inspector: Color picker in Visual Styles sidebar should not default to zero alpha
+ https://bugs.webkit.org/show_bug.cgi?id=154474
+ <rdar://problem/24750217>
+
+ Reviewed by Timothy Hatcher.
+
+ * UserInterface/Views/InlineSwatch.js:
+ (WebInspector.InlineSwatch.prototype._fallbackValue):
+ Changed the fallback value for color from transparent to white so that
+ the color picker starts out with an alpha value of 1.
+
+ (WebInspector.InlineSwatch.prototype._handleContextMenuEvent):
+ Prevents context menu events from having an effect if there is no value
+ for them to modify.
+
2016-02-19 Matt Baker <[email protected]>
Web Inspector: CSS var() function should be syntax highlighted
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/InlineSwatch.js (196851 => 196852)
--- trunk/Source/WebInspectorUI/UserInterface/Views/InlineSwatch.js 2016-02-20 02:47:08 UTC (rev 196851)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/InlineSwatch.js 2016-02-20 03:24:22 UTC (rev 196852)
@@ -89,7 +89,7 @@
case WebInspector.InlineSwatch.Type.Gradient:
return WebInspector.Gradient.fromString("linear-gradient(transparent, transparent)");
case WebInspector.InlineSwatch.Type.Color:
- return WebInspector.Color.fromString("transparent");
+ return WebInspector.Color.fromString("white");
default:
return null;
}
@@ -161,6 +161,9 @@
_handleContextMenuEvent(event)
{
+ if (!this._value)
+ return;
+
let contextMenu = WebInspector.ContextMenu.createFromEvent(event);
if (this._value.isKeyword() && this._value.format !== WebInspector.Color.Format.Keyword) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes