Closed Bug 1751217 Opened 4 years ago Closed 4 years ago

Expose HDR video support to content

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
100 Branch
Tracking Status
firefox100 --- fixed

People

(Reporter: jrmuizel, Assigned: bradwerth)

References

Details

(Keywords: dev-doc-complete)

Attachments

(6 files)

YouTube currently uses:

return window.matchMedia('(dynamic-range: high)').matches ||
        (window.screen.pixelDepth > 24 &&
         window.matchMedia('(color-gamut: p3)').matches);

Since we're only exposing HDR for video, it's a bit of a stretch for us to claim anything that would pass this test. However the draft media queries spec suggests a query, video-dynamic-range that would work well for us.

Assignee: nobody → bwerth
Depends on: 1749764
Depends on: 1750897

This is a stub that only matches "standard" for all platforms.

This will need tests, but I'll start with requesting review now.

Attachment #9267771 - Attachment description: Bug 1751217 Part 2: Make macOS declare video-dynamic-range: high with new-enough OS. → WIP: Bug 1751217 Part 2: Make macOS declare video-dynamic-range: high with new-enough OS.

Strange. [NSScreen screens] gives me one screen, and NSBitsPerPixelFromDepth gets 24 bits from that screen. My same screen in Chrome reports 30 bits which I think is accurate. So there's something going on with how they are detecting the color depth and we may need to do something similar.

Attachment #9267771 - Attachment description: WIP: Bug 1751217 Part 2: Make macOS declare video-dynamic-range: high with new-enough OS. → Bug 1751217 Part 2: Make macOS declare video-dynamic-range: high with new-enough OS.

This matches Chrome behavior. Our video-dynamic-range media query also relies
on this value being greater than 24 in order to report "high" level support.

Depends on D141056

Depends on D141306

This function always succeeds so there's no reason to maintain an nsresult.

Depends on D141053

Attachment #9267771 - Attachment description: Bug 1751217 Part 2: Make macOS declare video-dynamic-range: high with new-enough OS. → Bug 1751217 Part 4: Make macOS declare video-dynamic-range: high with new-enough OS.
Attachment #9268172 - Attachment description: Bug 1751217 Part 4: Update test expectations. → Bug 1751217 Part 5: Update test expectations.
Pushed by bwerth@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f16305c6ec83 Part 1: Support media queries for dynamic-range and video-dynamic-range. r=emilio https://hg.mozilla.org/integration/autoland/rev/d35c5648c936 Part 2: Change nsDeviceContext::GetDepth to eliminate the outparam. r=emilio https://hg.mozilla.org/integration/autoland/rev/81e41f7a1ee4 Part 3: Make HDR-capable macOS screens report 30 pixelDepth. r=mstange https://hg.mozilla.org/integration/autoland/rev/785f4c5f719d Part 4: Make macOS declare video-dynamic-range: high with new-enough OS. r=emilio https://hg.mozilla.org/integration/autoland/rev/60a4497fd1f5 Part 5: Update test expectations. r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/33329 for changes under testing/web-platform/tests

Backed out 5 changesets (Bug 1751217) for causing wpt(Screen-pixelDepth-Screen-colorDepth001.html) and mochitest(test_media_queries.html) failures.
Backout link
Push with failures
Failure Log - wpt8
Failure Log - 4

Flags: needinfo?(bwerth)
Upstream PR was closed without merging
Pushed by bwerth@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/21e1650b12db Part 1: Support media queries for dynamic-range and video-dynamic-range. r=emilio https://hg.mozilla.org/integration/autoland/rev/277064a1facb Part 2: Change nsDeviceContext::GetDepth to eliminate the outparam. r=emilio https://hg.mozilla.org/integration/autoland/rev/bfa455b8bb1a Part 3: Make HDR-capable macOS screens report 30 pixelDepth. r=mstange https://hg.mozilla.org/integration/autoland/rev/50b6310935d4 Part 4: Make macOS declare video-dynamic-range: high with new-enough OS. r=emilio https://hg.mozilla.org/integration/autoland/rev/f0a4879c9709 Part 5: Update test expectations. r=emilio
Upstream PR was closed without merging
Regressions: 1761091

The test verification of Screen-pixelDepth-Screen-colorDepth001.html fails in the same way even without this patch applied, so I'm going to attempt another landing with every issue fixed but that one.

Pushed by bwerth@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0b741f7f2cbf Part 1: Support media queries for dynamic-range and video-dynamic-range. r=emilio https://hg.mozilla.org/integration/autoland/rev/a271c6ef730b Part 2: Change nsDeviceContext::GetDepth to eliminate the outparam. r=emilio https://hg.mozilla.org/integration/autoland/rev/1b57e65d4d7e Part 3: Make HDR-capable macOS screens report 30 pixelDepth. r=mstange https://hg.mozilla.org/integration/autoland/rev/17c23e78c904 Part 4: Make macOS declare video-dynamic-range: high with new-enough OS. r=emilio https://hg.mozilla.org/integration/autoland/rev/38e81996feb2 Part 5: Update test expectations. r=emilio
Flags: needinfo?(bwerth)
Upstream PR merged by moz-wptsync-bot
Blocks: 1764201
Blocks: 1764641

Hello, I am updating the MDN docs for dynamic-range and video-dynamic-range.
The issue tracking the doc updates is here: https://github.com/mdn/content/issues/14405

I would appreciate any help with a suitable example to add to the video-dynamic-range page.

Flags: needinfo?(bwerth)

(In reply to Dipika from comment #20)

I would appreciate any help with a suitable example to add to the video-dynamic-range page.

Hopefully this is suitable for MDN. The videos are from web-platform-test so they are license unencumbered.

Flags: needinfo?(bwerth)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: