Disallow negative values for now even though they are allowed by the spec (https://www.w3.org/TR/mediaqueries-4/#false-in-the-negative-range). The current WPTs don't yet follow this behavior and no other engine implements it. It is better enabled separately. Also other parsing and evaluation fixes.
Created attachment 463761 [details] Patch
(Fwiw I think the main reason they're allowed is for calc())
(In reply to Tim Nguyen (:ntim) from comment #2) > (Fwiw I think the main reason they're allowed is for calc()) They are still allowed for calc() (matching others).
<rdar://problem/102723342>
Created attachment 463764 [details] Patch
Not sure I feel about using { } instead of std::nullopt for std::optional return values.
(In reply to Darin Adler from comment #6) > Not sure I feel about using { } instead of std::nullopt for std::optional > return values. It is a pretty common pattern in WebKit. I don't see the benefits of being more verbose.
(In reply to Antti Koivisto from comment #7) > It is a pretty common pattern in WebKit. I don't see the benefits of being > more verbose. OK, agreed.
Committed 257105@main (aacea0b8da7d): <https://commits.webkit.org/257105@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 463764 [details].