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 1 open bug)
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•7 months ago
|
| Assignee | ||
Comment 1•7 months ago
|
||
Posting this as WIP for now; it doesn't actually work. Need to dig further to
understand what's missing/broken here.
Updated•7 months ago
|
| Assignee | ||
Comment 2•7 months 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•7 months ago
|
| Assignee | ||
Comment 3•6 months 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•6 months ago
|
| Assignee | ||
Comment 4•6 months 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•6 months 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•6 months 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•6 months ago
|
||
| Assignee | ||
Comment 8•6 months ago
|
||
Comment 10•6 months ago
|
||
Comment 11•6 months ago
|
||
Backed out for causing wr failures @at-supports-namespace-001.html.
| Assignee | ||
Comment 12•6 months 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•6 months ago
|
||
Comment 14•6 months ago
|
||
Comment 15•6 months 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•6 months 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•6 months ago
|
||
Comment 19•6 months 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•5 months ago
|
Upstream PR was closed without merging
Description
•