Bug 317702
| Summary: | [css-values-5 random-item()] computed-value resolution (parse <random-key>, select item) | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | joanne_pan2 |
| Component: | New Bugs | Assignee: | joanne_pan2 |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://github.com/web-platform-tests/wpt/pull/61201 | ||
joanne_pan2
Subtask of rdar://179937274 (Implement support for random-item()).
Follow-up to the parse-time PR (rdar://180429446). At computed-value time, resolve random-item() per the full grammar: substitute the argument grammar, parse the first argument as <random-key>, select one item, and substitute it. Implemented in Style::SubstitutionResolver, modeled on substituteAttrFunction (substitute argument grammar first, then apply the full grammar) per Antti's review on PR #67400.
Scope (matches random()'s currently-supported <random-key> subset): auto | <dashed-ident> | element-scoped | fixed <number [0,1]> property-scoped / property-index-scoped / <random-ua-ident> are a separate follow-up, in sync with random().
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
joanne_pan2
rdar://180457609
joanne_pan2
Pull request: https://github.com/WebKit/WebKit/pull/68097
EWS
Committed 316589@main (a2a052667335): <https://commits.webkit.org/316589@main>
Reviewed commits have been landed. Closing PR #68097 and removing active labels.
joanne_pan2
Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/61201