Title: [197073] releases/WebKitGTK/webkit-2.12/Source/WebInspectorUI
Revision
197073
Author
carlo...@webkit.org
Date
2016-02-25 01:45:15 -0800 (Thu, 25 Feb 2016)

Log Message

Merge r196852 - 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 <dcrousso+web...@gmail.com> 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: releases/WebKitGTK/webkit-2.12/Source/WebInspectorUI/ChangeLog (197072 => 197073)


--- releases/WebKitGTK/webkit-2.12/Source/WebInspectorUI/ChangeLog	2016-02-25 09:43:54 UTC (rev 197072)
+++ releases/WebKitGTK/webkit-2.12/Source/WebInspectorUI/ChangeLog	2016-02-25 09:45:15 UTC (rev 197073)
@@ -1,3 +1,20 @@
+2016-02-19  Devin Rousso  <dcrousso+web...@gmail.com>
+
+        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-18  Devin Rousso  <dcrousso+web...@gmail.com>
 
         Web Inspector: Styles Sidebar focus jumps when trying to edit a color

Modified: releases/WebKitGTK/webkit-2.12/Source/WebInspectorUI/UserInterface/Views/InlineSwatch.js (197072 => 197073)


--- releases/WebKitGTK/webkit-2.12/Source/WebInspectorUI/UserInterface/Views/InlineSwatch.js	2016-02-25 09:43:54 UTC (rev 197072)
+++ releases/WebKitGTK/webkit-2.12/Source/WebInspectorUI/UserInterface/Views/InlineSwatch.js	2016-02-25 09:45:15 UTC (rev 197073)
@@ -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
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to