-
Notifications
You must be signed in to change notification settings - Fork 671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-mediaqueries-5] Clarifications on [video-]dynamic-range MQs #6793
Comments
CC'ing participants in the original discussion for visibility: @tabatkins @gregwhitworth @astearns @svgeesus @Crissov @mwatson2 @AmeliaBR @chcunningham @vi-dot-cpp |
The other issue with the wording regarding "The combination of the User Agent and the output device..." is that User Agents may have different capabilities for CSS (and HTML) colors, colors in images, colors in canvas, colors in videos, etc. Which of these are required to be supported should probably be specified, both (separately) for |
As a developer, I agree that it would be kind of pointless to have |
As a participant in the original discussion, I want to give a big +1 to ^this point. The dynamic-range MQ was motivated entirely by a need to describe the screen's capabilities. This is consistent with the overall purpose of Media Queries, which describe features (e.g. resolution) for the current media device (e.g. screen). I think folks are confused by the video-dynamic-range feature. At a glance, this looks like it indicates when the UA is capable of playing HDR Both video-dynamic-range and dynamic-range describe the screen. The video-dynamic-range proposal concerns a weird quirk of user agents implemented in TVs. Given limited system resources and a clear priority use case, these devices have a quirky implementation where video and non-video are rendered in distinct "planes", which amounts to distinct screens with distinct capabilities. Generally speaking, the video plane has a much higher resolution and dynamic range than that of non-video. Traditional user-agents have only one plane, such that video-dynamic-range and dynamic-range should behave identically. Again, video-dynamic-range just describes the screen. It does not describe support for HDR video playback. This is a much more complicated question (w/ parameters like codec, transfer function, metadata, ...) which Media Queries is ill-suited to answer (it is instead answered by |
Yes, exactly. In other words, for most devices, these will have the same value. Only for a TV with a high-res, HDR video buffer and a (lower res, non-HDR) "graphics overlay buffer" will they have different values. So the specification needs to more clearly reflect that. |
The CSS Working Group just discussed The full IRC log of that discussion<fantasai> Topic: [css-mediaqueries-5] Clarifications on [video-]dynamic-range MQs<fantasai> github: https://github.com//issues/6793 <fantasai> florian: We have 2 MQ which are similar, dynamic-range and video-dynamic-range <fantasai> florian: 2 issues in 1 here <fantasai> florian: one is primarily editorial, doing poor job of explaining the difference between these two queries <fantasai> florian: notion of video plane is fairly rare concept that relates to TVs and how they have unusual screen buffer impls that we can query separately <fantasai> florian: core question raised in this issue, besides clarification <chris> +1 to that editorial clarification <fantasai> florian: is that we have 2 values: high and standard <fantasai> florian: You might assume, and this apparently is what Safari did, that any device will match standard and some will match high as well <fantasai> florian: this is not how currently specced, though <fantasai> florian: devices expected to match one or the other <fantasai> florian: not standard and high simultaneously <chris> q+ <fantasai> florian: The query about color-gamut does behave differently, it has 3 values <fantasai> florian: and these are additional, when you match broader gamut you also match narrower one <fantasai> florian: unclear what we should do here <Rossen_> q? <Rossen_> ack chris <fantasai> chris: I agree, media capability does the same thing, of using supersets <fantasai> chris: overall I think it's a better model, think we can easily make spec say that <fantasai> chris: the reason to do it is that when we add super-high later on, we want it to be a superset that still passes high <fantasai> chris: so I think we should change the spec; not because it's what implemented, but because it makes more sense <fantasai> dbaron: Wanted to add, think there's a 3rd issue <fantasai> dbaron: currently wording in spec about combo of UA and output device <fantasai> dbaron: needs clarification what the UA part of it means <chris> see also https://w3c.github.io/media-capabilities/#hdrmetadatatype <fantasai> dbaron: definition of high says, combination of UA and output device fulfill all the following criteria <fantasai> dbaron: there are a number of ppl in the issue saying that the UA bit should be ignored, and should only be query about the output device <Rossen_> ack dbaron <fantasai> dbaron: but if this is question of UA capability, which are you considering if UA can do for some things but not others <florian> q? <fantasai> dbaron: e.g. videos but not images, or ... <chris> q+ to also mention HDR is opt-in and can change dynamically <fantasai> florian: I suspect querying device and not UA is useless <fantasai> florian: because if the UA isn't able to access the capability, it's not helping you <fantasai> florian: but if capability varies within UA, that's a problem <fantasai> Rossen_: Is one a superset of other? Is UA superset of device? <fantasai> dbaron: I wouldn't think of it that way <fantasai> florian: We're querying union of both <fantasai> florian: need both UA and device to be capabe <fantasai> chris: Also, HDR capability can vary over time <fantasai> chris: high power usage <fantasai> chris: so off by efault <fantasai> chris: so need to know that it can change <fantasai> chris: One, is the device capable of HDR mode, and then two, is it in that mode? <Rossen_> s/Is UA superset/Is UA subset/ <fantasai> chris: we are mixing those two up <fantasai> florian: we do <Rossen_> ack chris <Zakim> chris, you wanted to also mention HDR is opt-in and can change dynamically <Rossen_> ack fantasai <drott> fantasai: we should take a resolution to change the query to superset model <drott> fantasai: multiple things to be clarified <drott> fantasai: let's ask editor to go back to the thread to work out results <drott> fantasai: a lot of the clarifications are straightforward <drott> fantasai: need a resolution to change the media queries <fantasai> florian: Don't quite agree, question of capability or in HDR mode currently <fantasai> florian: or videos vs images etc. <fantasai> florian: not quite clarification, is change in functionality <fantasai> florian: puzzle how to answer if we don't change the syntax <chris> q+ <fantasai> florian: so can do things fantasai highlighted, but not enough to solve the issue <Rossen_> ack chris <fantasai> chris: media capabilities spec talks about capability, "can the device do it" <fantasai> chris: if we clarify that way, need the other query as well <fantasai> chris: the capability and concrete "am I in this mode" are separate <fantasai> florian: Is it expected to remain this way? <fantasai> chris: especially for mobile, definite power drained <fantasai> chris: can be switched automatically, doesn't require user action <fantasai> chris: but there needs to be a capability <fantasai> chris: and need to know which mode you're in <drott> fantasai: i think we should spec as being able to use the switch <drott> fantasai: from a media queries point of view, how are we styling the document - many of those questions on depend on current mode <drott> fantasai: [missed parts] <fantasai> florian: what do we do about if UA can do for images and video but not CSS colors? <fantasai> florian: or some other variation? <fantasai> florian: should we consider the UA does or does not fulfill the criteria? <fantasai> florian: or do we think about query in a different way <fantasai> florian: I haven't thought about deeply, but maybe you would have high-dynamic-range: video | canvas | etc. <fantasai> florian: and would get something true if that specific thing is in HDR mode <fantasai> Rossen_: sounds like a convesation to continue in GH <fantasai> Rossen_: and doesn't seem we're ready to resolve just yet <fantasai> Rossen_: propose we stop here, and then after working out proposal in issue, bring back and we'll record a resolution <fantasai> Rossen_: but hopefully attracted some help on this issue |
Having had a little side discussion with the chrome folks, the tentative conclusion is that the way Safari implemented this is what we'd like the spec to align to. Specifically:
In other words, a hypothetical different design, like
is not actually appealing to authors, and would add complexity for no practical reason, thus we should spec what Safari is shipping. |
As of the latest discussion on the spec, it's been determined that '[video-]dynamic-range: standard' should be a subset of '[video-]dynamic-range: high'. This CL implements that change, and updates all tests accordingly. The relevant spec discussion may be viewed here: w3c/csswg-drafts#6793 Bug: 1224711
As of the latest discussion on the spec, it's been determined that '[video-]dynamic-range: standard' should be a subset of '[video-]dynamic-range: high'. This CL implements that change, and updates all tests accordingly. The relevant spec discussion may be viewed here: w3c/csswg-drafts#6793 Bug: 1224711 Change-Id: I640e574cd2809dc1d8b721115e79372d302c723a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3293745 Reviewed-by: Anders Hartvoll Ruud <[email protected]> Commit-Queue: Will Cassella <[email protected]> Cr-Commit-Position: refs/heads/main@{#944203}
As of the latest discussion on the spec, it's been determined that '[video-]dynamic-range: standard' should be a subset of '[video-]dynamic-range: high'. This CL implements that change, and updates all tests accordingly. The relevant spec discussion may be viewed here: w3c/csswg-drafts#6793 Bug: 1224711 Change-Id: I640e574cd2809dc1d8b721115e79372d302c723a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3293745 Reviewed-by: Anders Hartvoll Ruud <[email protected]> Commit-Queue: Will Cassella <[email protected]> Cr-Commit-Position: refs/heads/main@{#944203}
As of the latest discussion on the spec, it's been determined that '[video-]dynamic-range: standard' should be a subset of '[video-]dynamic-range: high'. This CL implements that change, and updates all tests accordingly. The relevant spec discussion may be viewed here: w3c/csswg-drafts#6793 Bug: 1224711 Change-Id: I640e574cd2809dc1d8b721115e79372d302c723a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3293745 Reviewed-by: Anders Hartvoll Ruud <[email protected]> Commit-Queue: Will Cassella <[email protected]> Cr-Commit-Position: refs/heads/main@{#944203}
…es, a=testonly Automatic update from web-platform-tests Update [video-]dynamic-range media queries As of the latest discussion on the spec, it's been determined that '[video-]dynamic-range: standard' should be a subset of '[video-]dynamic-range: high'. This CL implements that change, and updates all tests accordingly. The relevant spec discussion may be viewed here: w3c/csswg-drafts#6793 Bug: 1224711 Change-Id: I640e574cd2809dc1d8b721115e79372d302c723a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3293745 Reviewed-by: Anders Hartvoll Ruud <[email protected]> Commit-Queue: Will Cassella <[email protected]> Cr-Commit-Position: refs/heads/main@{#944203} -- wpt-commits: 166dd2ceeaecb1e22ecf7c5c08713a47cf828deb wpt-pr: 31688
…es, a=testonly Automatic update from web-platform-tests Update [video-]dynamic-range media queries As of the latest discussion on the spec, it's been determined that '[video-]dynamic-range: standard' should be a subset of '[video-]dynamic-range: high'. This CL implements that change, and updates all tests accordingly. The relevant spec discussion may be viewed here: w3c/csswg-drafts#6793 Bug: 1224711 Change-Id: I640e574cd2809dc1d8b721115e79372d302c723a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3293745 Reviewed-by: Anders Hartvoll Ruud <[email protected]> Commit-Queue: Will Cassella <[email protected]> Cr-Commit-Position: refs/heads/main@{#944203} -- wpt-commits: 166dd2ceeaecb1e22ecf7c5c08713a47cf828deb wpt-pr: 31688
Misconfigured the log bot while discussing this. The discussion is at https://logs.csswg.org/irc.w3.org/css/2021-12-15/#e1452098, and the resolution was :
|
As of the latest discussion on the spec, it's been determined that '[video-]dynamic-range: standard' should be a subset of '[video-]dynamic-range: high'. This CL implements that change, and updates all tests accordingly. The relevant spec discussion may be viewed here: w3c/csswg-drafts#6793 Bug: 1224711 Change-Id: I640e574cd2809dc1d8b721115e79372d302c723a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3293745 Reviewed-by: Anders Hartvoll Ruud <[email protected]> Commit-Queue: Will Cassella <[email protected]> Cr-Commit-Position: refs/heads/main@{#944203} NOKEYCHECK=True GitOrigin-RevId: 5693224f23babe8df225c2a8bf8c641f9e7bfbd9
CSS Media Queries Level 5 introduced two new queries:
dynamic-range
andvideo-dynamic-range
. Both have similar wording, and currently the wording fordynamic-range
is like so:The way Safari has implemented this media query is to make
@media (dynamic-range: standard)
checks always pass, and@media (dynamic-range: high)
check against the capabilities of the current display device. This makes sense from a future-proofing perspective, asstandard
can be seen as a subset ofhigh
, and ifultra-high
dynamic-range displays are ever introduced,high
should be a subset of that.However, the wording of the
standard
enum makes it sound as ifstandard
andhigh
should be mutually-exclusive. I think we should change this wording to reflectstandard
as a subset ofhigh
.Additionally, the wording of "The combination of the User Agent and the output device..." has caused some confusion about what the capabilities of the user agent must be in order for the
high
query to pass. In the discussion surrounding the proposal for these queries, the idea was that this query would be a coarse representation of the display device's capabilities, and more detailed APIs such as MediaCapabilities could be used to gather specific information about the User Agent's capabilities for specific purposes. I think we should remove mention of the UA in the description of this media query to clarify this confusion.The text was updated successfully, but these errors were encountered: