After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 662818 - clutter_color_from_string incorrectly documented and fails to parse hsla values.
clutter_color_from_string incorrectly documented and fails to parse hsla values.
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2011-10-27 01:42 UTC by Pablo Pissanetzky
Modified: 2014-02-10 18:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to fix color parsing and correct docs (1.72 KB, patch)
2011-10-27 01:43 UTC, Pablo Pissanetzky
needs-work Details | Review
color: Fix documentation of 'hsla()' parsing (1.43 KB, patch)
2014-02-10 18:08 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review
conform/color: Add more test coverage (1.45 KB, patch)
2014-02-10 18:08 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review

Description Pablo Pissanetzky 2011-10-27 01:42:44 UTC
When looking for an alpha component, any white space trailing the l component would fail the conversion."hsla(0,100%,100% ,0.5)" would fail.

Documentation for s and l components was incorrect; these have to be percentage values and must have a '%' character right after the number.
Comment 1 Pablo Pissanetzky 2011-10-27 01:43:22 UTC
Created attachment 200073 [details] [review]
Patch to fix color parsing and correct docs
Comment 2 Emmanuele Bassi (:ebassi) 2011-10-31 12:13:50 UTC
Review of attachment 200073 [details] [review]:

thanks for catching this; the patch looks okay to me, except for one little issue.

::: clutter/clutter-color.c
@@ +597,3 @@
   if (has_alpha)
     {
+      skip_whitespace (&str);

could you please split this chunk into its own separate commit? we do prefer to have atomic changes in the history.
Comment 3 Emmanuele Bassi (:ebassi) 2014-02-10 18:08:13 UTC
Created attachment 268704 [details] [review]
color: Fix documentation of 'hsla()' parsing

The documentation for the s and l components is incorrect; these have to
be percentage values and must have a '%' character right after the
number.

Based on a patch by: Pablo Pissanetzky <pablo@trickplay.com>
Comment 4 Emmanuele Bassi (:ebassi) 2014-02-10 18:08:28 UTC
Created attachment 268705 [details] [review]
conform/color: Add more test coverage
Comment 5 Emmanuele Bassi (:ebassi) 2014-02-10 18:10:02 UTC
Attachment 268704 [details] pushed as 33ebe92 - color: Fix documentation of 'hsla()' parsing
Attachment 268705 [details] pushed as 92c0c77 - conform/color: Add more test coverage