Closed Bug 2014098 Opened 9 months ago Closed 8 months ago

Support nested expressions and boolean operations within @container style() queries

Categories

(Core :: CSS Parsing and Computation, defect)

defect

Tracking

()

RESOLVED FIXED
150 Branch
Tracking Status
firefox150 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame, NeedInfo)

References

Details

(Keywords: dev-doc-complete)

Attachments

(1 external file)

Currently it appears that we support @container style(--foo) or style(--bar) but not @container style((--foo) or (--bar)). (Even style((--foo)), just with nested parens, fails to parse.)

I think a way to handle this will be to wrap StyleFeature in a StyleQuery enum that supports nesting and boolean ops, similar to the top-level QueryCondition.

As the spec includes similar boolean syntax with not, and and or inside the
style() function to the top-level syntax used for negating/combining conditions,
I refactored the parse_inner method from QueryCondition into a trait that is
also shared by the new StyleQuery type.

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Keywords: dev-doc-needed
Pushed by jkew@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/4efb8600702f https://hg.mozilla.org/integration/autoland/rev/69e33056bac6 Wrap StyleFeature in a StyleQuery enum that also supports nested queries and boolean operators. r=firefox-style-system-reviewers,emilio
Pushed by agoloman@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/67734dde7770 https://hg.mozilla.org/integration/autoland/rev/b2299264af23 Revert "Bug 2014098 - Wrap StyleFeature in a StyleQuery enum that also supports nested queries and boolean operators. r=firefox-style-system-reviewers,emilio" for causing mochitest failures @test_media_queries.html.

Backed out for causing mochitest failures @test_media_queries.html.

Flags: needinfo?(jfkthame)
Pushed by jkew@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/3963075f52c0 https://hg.mozilla.org/integration/autoland/rev/4cfe789c03b4 Wrap StyleFeature in a StyleQuery enum that also supports nested queries and boolean operators. r=firefox-style-system-reviewers,emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/57991 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 150 Branch
Upstream PR merged by moz-wptsync-bot
Upstream PR merged by moz-wptsync-bot
QA Whiteboard: [qa-triage-done-c151/b150]

Related issues and pull requests

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: