| Summary: | Computed style for "outline-offset" is wrong when "outline-style" is "none" | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Manuel Rego Casasnovas <rego> | ||||||||
| Component: | CSS | Assignee: | Manuel Rego Casasnovas <rego> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | esprehn+autocc, ews-watchlist, glenn, kondapallykalyan, pdr, simon.fraser, webkit-bug-importer, zalan | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | WebKit Nightly Build | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| See Also: | https://bugs.chromium.org/p/chromium/issues/detail?id=1005372 | ||||||||||
| Attachments: |
|
||||||||||
Created attachment 395346 [details]
Patch
Created attachment 395359 [details]
Patch
Created attachment 395363 [details]
Patch
Comment on attachment 395363 [details]
Patch
Looks reasonable.
Committed r259562: <https://trac.webkit.org/changeset/259562> All reviewed patches have been landed. Closing bug and clearing flags on attachment 395363 [details]. |
This is easy to reproduce with the following example: <style>#foo { outline-offset: 10px; }</style> <div id="foo"></div> <script>console.log(getComputedStyle(foo).outlineOffset);</script> It should log 10px but it actually logs 0px. This is probably a mistake as "outline-width" is special on the spec (https://drafts.csswg.org/css-ui/#outline-props). For "outline-width" the computed value says: "absolute length; 0 if the outline style is none." But for "outline-offset" it says: "absolute length" There's a check causing this behavior at RenderStyle::outlineOffset().