Bug 176811

Summary: Web Inspector: Color created from an RGB/HSL triplet returns bad component arrays
Product: WebKit Reporter: Matt Baker <mattbaker>
Component: Web InspectorAssignee: Matt Baker <mattbaker>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, bensims880, brianmckay070, britishwriteruk, christinejohn999, commit-queue, elisjohnson395, flavia.derby110, georgekhancock784, gereb70650, gistjames850, hartrichard331, inspector-bugzilla-changes, joepeck, jonathnaylor, lilliecourtright, maronetammy, miltonwhite381, nelsonmurdockk, nk8253243, oliyanabeth, pl2340801, rahysalexander90, saraacron0, sarahbeeny, sarawatsons123, scilife873, thisiskatewinslet, thomasmarsden970, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 176822    
Attachments:
Description Flags
Patch
none
Patch none

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.