RESOLVED FIXED176811
Web Inspector: Color created from an RGB/HSL triplet returns bad component arrays
https://bugs.webkit.org/show_bug.cgi?id=176811
Summary Web Inspector: Color created from an RGB/HSL triplet returns bad component ar...
Matt Baker
Reported 2017-09-12 15:09:40 PDT
Summary: Color created from an RGB/HSL triplet returns bad component arrays. For example: > color = new WI.Color(WI.Color.Format.RGB, [255, 0, 0]) > color.rgb < [255, 0] > color.rgba < [255, 0, 0] The results from storing the triplet in either `_rgba` or `_hsla`, which are both assumed to have a length of four. The problem also causes unexpected results when converting a Color created from components to a string: > color.toString() < "rgba(255, 0, 0)" > color.toString(WebInspector.Color.Format.ShortHEX) < "rgba(255, 0, 0)" We should be able to convert a Color created from components just as easily as one created using `fromString()`.
Attachments
Patch (8.80 KB, patch)
2017-09-12 15:21 PDT, Matt Baker
no flags
Patch (10.39 KB, patch)
2017-09-12 15:23 PDT, Matt Baker
no flags
Radar WebKit Bug Importer
Comment 1 2017-09-12 15:10:34 PDT
Matt Baker
Comment 2 2017-09-12 15:21:10 PDT
Matt Baker
Comment 3 2017-09-12 15:23:44 PDT
Joseph Pecoraro
Comment 4 2017-09-14 14:32:18 PDT
Comment on attachment 320572 [details] Patch r=me
WebKit Commit Bot
Comment 5 2017-09-14 15:01:29 PDT
Comment on attachment 320572 [details] Patch Clearing flags on attachment: 320572 Committed r222055: <http://trac.webkit.org/changeset/222055>
WebKit Commit Bot
Comment 6 2017-09-14 15:01:30 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.