WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
154525
Web Inspector: Autocomplete CSS system colors
https://bugs.webkit.org/show_bug.cgi?id=154525
Summary
Web Inspector: Autocomplete CSS system colors
Nikita Vasilyev
Reported
2016-02-21 21:10:18 PST
The following: background-color: H| should autocomplete with "Highlight". All the system keywords:
https://www.w3.org/TR/CSS2/ui.html#system-colors
Although this spec is deprecated, it is still supported by WebKit and all major browsers.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2016-02-21 21:10:46 PST
<
rdar://problem/24763778
>
Joseph Pecoraro
Comment 2
2016-02-21 22:53:08 PST
I notice you didn't assign this bug to you. Are you going to put up a patch for this? What is interesting about this is that the actual color is only known by the backend, not the frontend. So to produce an accurate color swatch for "highlight" you have to check what "highlight" actually resolves to on the target. This is important remotely inspecting a target. You could for instance evaluate some JavaScript and get the computed style of something with that color. Note the element has to be in the DOM, so appending to the <head> ensures the element won't cause any visible change to the page when doing the calculation: var span = document.createElement("span"); span.style.backgroundColor = "highlight"; document.head.appendChild(span); var rgbColor = getComputedStyle(span).backgroundColor; span.remove(); rgbColor // rgb(...)
Nikita Vasilyev
Comment 3
2016-02-21 23:01:27 PST
(In reply to
comment #2
)
> I notice you didn't assign this bug to you. Are you going to put up a patch > for this?
Nope. I intentionally didn't assign it to myself and added "GoodFirstBug" keyword.
> > What is interesting about this is that the actual color is only known by the > backend, not the frontend. So to produce an accurate color swatch for > "highlight" you have to check what "highlight" actually resolves to on the > target. This is important remotely inspecting a target. [...]
Good catch! I didn't realise it would be that complicated.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug