Bug 204085 - Web Inspector: "aqua" and "fuchsia" aren't detected as colors
Summary: Web Inspector: "aqua" and "fuchsia" aren't detected as colors
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nikita Vasilyev
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-11-11 14:50 PST by Nikita Vasilyev
Modified: 2019-11-13 20:05 PST (History)
5 users (show)

See Also:


Attachments
Patch (1.16 KB, patch)
2019-11-11 14:51 PST, Nikita Vasilyev
drousso: review+
Details | Formatted Diff | Diff
Patch (1.46 KB, patch)
2019-11-13 13:41 PST, Nikita Vasilyev
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Vasilyev 2019-11-11 14:50:30 PST
That's the only color keyword that is defined in https://www.w3.org/TR/css-color-4/#named-colors
but missing in the Web Inpector color dictionary.
Comment 1 Nikita Vasilyev 2019-11-11 14:51:19 PST
Created attachment 383303 [details]
Patch
Comment 2 Devin Rousso 2019-11-13 10:29:48 PST
Comment on attachment 383303 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=383303&action=review

r=me

> Source/WebInspectorUI/UserInterface/Models/Color.js:745
> +    "aqua": [0, 255, 255, 1],

We're also missing `fuchsia`, which is one of the original HTML colors 🤦‍♂️:
```
    "fuchsia": [255, 0, 255, 1],
```

Interestingly, both `aqua` and `fuchsia` have alternate names in CSS, respectively being `cyan` and `magenta`.

This doesn't look to be an issue, other than that we'll instead always prefer `aqua` over `cyan` (same with `fuchsia` over `magenta`) when generating CSS color keyword strings simply because they're sorted alphabetically.
Comment 3 Nikita Vasilyev 2019-11-13 13:41:48 PST
Created attachment 383489 [details]
Patch
Comment 4 WebKit Commit Bot 2019-11-13 20:04:23 PST
Comment on attachment 383489 [details]
Patch

Clearing flags on attachment: 383489

Committed r252448: <https://trac.webkit.org/changeset/252448>
Comment 5 WebKit Commit Bot 2019-11-13 20:04:25 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2019-11-13 20:05:22 PST
<rdar://problem/57178710>