Closed Bug 2031956 Opened 6 months ago Closed 6 months ago

range style query condition's query property gets extra parenthesis

Categories

(Core :: CSS Parsing and Computation, defect)

defect

Tracking

()

RESOLVED FIXED
152 Branch
Tracking Status
firefox151 --- fixed
firefox152 --- fixed

People

(Reporter: nchevobbe, Assigned: alaskanemily)

References

Details

Attachments

(1 external file)

When using range syntax, the rule condition text gets wrapped in extra parenthesis.
For example, if I have this CSS query @container style(--w > 0) , the condition query property is style((--w > 0))
See https://developer.mozilla.org/en-US/play?id=7Wunycqz65AD3Lj4JuPbg9XDw8H%2FYUkN0yXE7rB9AKtDsGuIoLjweg3sxReTiS5TlweoWO%2FlVv2Gp2sC

Assignee: nobody → emcdonough

The severity field is not set for this bug.
:jfkthame, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(jfkthame)

It seems https://wpt.live/css/css-conditional/container-queries/at-container-style-serialization.html doesn't cover this -- it's missing examples with range syntax. So I guess we should add those when fixing this.

Severity: -- → S3
Flags: needinfo?(jfkthame)

Note that when fixing this https://searchfox.org/firefox-main/source/devtools/client/inspector/rules/test/browser_rules_container-queries.js will need to be updated as we're using the serialized output, e.g. https://searchfox.org/firefox-main/rev/410a52656dd13aa2360a3e96788e41bf48e80c0f/devtools/client/inspector/rules/test/browser_rules_container-queries.js#327

"style(((attr(data-x type(<length>)) < 10px)) or ((attr(data-y px, 10px) < 100px)) or ((attr(data-z px) < 1000px))) {",

I have a fix which should be ready for review soon.

Pushed by emcdonough@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/0873bfeb0e41 https://hg.mozilla.org/integration/autoland/rev/394e46b25716 Fix serialization of QueryStyleRange for container queries r=firefox-style-system-reviewers,nchevobbe,devtools-reviewers,emilio
Failed to create upstream wpt PR due to merge conflicts. This requires fixup from a wpt sync admin.
Flags: needinfo?(james)
Flags: needinfo?(aborovova)

Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/59659 for changes under testing/web-platform/tests

Flags: needinfo?(james)
Flags: needinfo?(aborovova)
Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 152 Branch

Comment on attachment 9575293 [details]
Bug 2031956 - Fix serialization of QueryStyleRange for container queries

Beta/Release Uplift Approval Request

  • User impact if declined/Reason for urgency: Incorrect serialization from script and inspection display of any container rules that use style range queries
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The change is quite small and simple, and includes its own tests
  • String changes made/needed:
  • Is Android affected?: Yes
Attachment #9575293 - Flags: approval-mozilla-beta?

Comment on attachment 9575293 [details]
Bug 2031956 - Fix serialization of QueryStyleRange for container queries

Approved for 151.0b7

Attachment #9575293 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Upstream PR was closed without merging

Upstream PR merged by moz-wptsync-bot

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

Attachment

General

Created:
Updated:
Size: