Resolve `attr(...)` references within container style queries
Categories
(Core :: CSS Parsing and Computation, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox151 | --- | fixed |
People
(Reporter: jfkthame, Assigned: jfkthame)
References
(Blocks 3 open bugs)
Details
Attachments
(6 files, 2 obsolete files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
One of the testcases in at-container-style-parsing.html fails because it uses CSS attr(...) within a style range query, and we fail to parse & resolve that.
Presumably we need to hook up a suitable AttributeTracker around here and/or here.
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Comment 1•1 month ago
|
||
Posting this as WIP for now; it doesn't actually work. Need to dig further to
understand what's missing/broken here.
Updated•1 month ago
|
| Assignee | ||
Comment 2•1 month ago
|
||
This resolves our remaining at-container-style-parsing failure.
Also added a few examples with attr() and var(--foo, default) to query-evaluation-style,
otherwise we'd be able to parse without actually evaluating, and yet pass the tests.
(Confirmed that the added evaluation tests also pass in Chrome.)
Updated•1 month ago
|
| Assignee | ||
Comment 3•1 month ago
|
||
This is sufficient to make the existing parsing test pass, but the functions don't
actually work at evaluation time. The following patch will add some query evaluation
tests to expose this.
Updated•1 month ago
|
| Assignee | ||
Comment 4•1 month ago
|
||
The existing WPTs check that these forms can be parsed, but not that they actually work
at matching time. So this adds a few examples to the query-evaluation test. They won't
pass in Firefox until support for these functions is hooked up.
(Confirmed that these work as expected in Chrome.)
| Assignee | ||
Comment 5•1 month ago
|
||
This makes the examples with var(--foo, default) pass, as well as those with attr()
that depend on the attribute lookup failing (so they use the default); actual attr
lookups will require an AttributeTracker in the substitute() call.
| Assignee | ||
Comment 6•1 month ago
|
||
Now that we have more general substitution-function support, the special-case for
var() with a simple dashed-ident (and no default) isn't really necessary. In theory
it would be slightly more efficient, but seems unlikely to be much used as query
expressions also support bare custom-property names (without any var() wrapper),
so authors have no reason to write the more verbose form.
| Assignee | ||
Comment 7•1 month ago
|
||
| Assignee | ||
Comment 8•1 month ago
|
||
Comment 10•1 month ago
|
||
Comment 11•1 month ago
|
||
Backed out for causing wr failures @at-supports-namespace-001.html.
| Assignee | ||
Comment 12•1 month ago
|
||
Hmm, so that was actually a pre-existing issue, newly exposed by enabling css attr() for the css-conditional directory. I've moved the pref to enable it only for the container-queries subdir for now.
Comment 13•1 month ago
|
||
Comment 14•1 month ago
|
||
Comment 15•1 month ago
|
||
Reverted this because it was causing wpt failures in attr-container-style-query.html.
- Revert link
- Push with failures
- Failure Log
- Failure line: TEST-UNEXPECTED-PASS | /css/css-values/attr-container-style-query.html | style query should implement to true - expected FAIL
| Assignee | ||
Comment 16•1 month ago
|
||
- Failure line: TEST-UNEXPECTED-PASS | /css/css-values/attr-container-style-query.html | style query should implement to true - expected FAIL
Also (more seriously) shows a bunch of TEST-UNEXPECTED-FAIL on the /css/css-values/attr-cycle.html testcase.
Comment 17•1 month ago
|
||
Comment 19•1 month ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/a2f5abb58176
https://hg.mozilla.org/mozilla-central/rev/eeee1edec2ba
https://hg.mozilla.org/mozilla-central/rev/f1861dfa7998
https://hg.mozilla.org/mozilla-central/rev/4d10545f321f
https://hg.mozilla.org/mozilla-central/rev/c88e7fb1b91d
https://hg.mozilla.org/mozilla-central/rev/26595abfd68c
Updated•8 days ago
|
Upstream PR was closed without merging
Description
•