Title: [160143] trunk/Source/WebInspectorUI
- Revision
- 160143
- Author
- [email protected]
- Date
- 2013-12-04 16:17:54 -0800 (Wed, 04 Dec 2013)
Log Message
Web Inspector: color picker doesn't work with "blue"
https://bugs.webkit.org/show_bug.cgi?id=125262
Reviewed by Joseph Pecoraro.
Under certain circumstances rounding issues would have us compare
two equal numbers that differ by 0.00000001 and sometime trip this
if statement and yield a null color. We now add a little fudge to
the test and also return a clear color rather than null to match what
we do in the getters for "tintedColor" and "rawColor".
* UserInterface/ColorWheel.js:
(WebInspector.ColorWheel.prototype._colorAtPointWithBrightness):
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (160142 => 160143)
--- trunk/Source/WebInspectorUI/ChangeLog 2013-12-05 00:17:21 UTC (rev 160142)
+++ trunk/Source/WebInspectorUI/ChangeLog 2013-12-05 00:17:54 UTC (rev 160143)
@@ -1,5 +1,21 @@
2013-12-04 Antoine Quint <[email protected]>
+ Web Inspector: color picker doesn't work with "blue"
+ https://bugs.webkit.org/show_bug.cgi?id=125262
+
+ Reviewed by Joseph Pecoraro.
+
+ Under certain circumstances rounding issues would have us compare
+ two equal numbers that differ by 0.00000001 and sometime trip this
+ if statement and yield a null color. We now add a little fudge to
+ the test and also return a clear color rather than null to match what
+ we do in the getters for "tintedColor" and "rawColor".
+
+ * UserInterface/ColorWheel.js:
+ (WebInspector.ColorWheel.prototype._colorAtPointWithBrightness):
+
+2013-12-04 Antoine Quint <[email protected]>
+
Web Inspector: use only two decimals for opacity in rgba/hsla colors
https://bugs.webkit.org/show_bug.cgi?id=125261
Modified: trunk/Source/WebInspectorUI/UserInterface/ColorWheel.js (160142 => 160143)
--- trunk/Source/WebInspectorUI/UserInterface/ColorWheel.js 2013-12-05 00:17:21 UTC (rev 160142)
+++ trunk/Source/WebInspectorUI/UserInterface/ColorWheel.js 2013-12-05 00:17:54 UTC (rev 160143)
@@ -231,8 +231,8 @@
var yDis = y - center;
var distance = Math.sqrt(xDis * xDis + yDis * yDis);
- if (distance > center)
- return null;
+ if (distance - center > 0.001)
+ return new WebInspector.Color(WebInspector.Color.Format.RGBA, [0, 0, 0, 0]);
var h = Math.atan2(y - center, center - x) * 180 / Math.PI;
h = (h + 180) % 360;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes