Set preferred color-scheme based on embedder element
For frames, instead of retrieving the global preference setting,
propagate a preferred color-scheme based on the computed color-scheme of
the embedder element and the page's supported color-schemes.
This means that if the OS setting for preferred color-scheme is dark,
the document embedded by <iframe style="color-scheme:light"></iframe>
will still match "(prefer-color-scheme: light", and elements in the
embedded document with "color-scheme:light dark" will have a used
color-scheme that is light.
Bug: 40234347
Change-Id: I779f9630a2eea2617444c8ecc9fb7e23fb21473e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5785966
Commit-Queue: Rune Lillesveen futhark@chromium.org
Reviewed-by: Kent Tamura tkent@chromium.org
Reviewed-by: Stefan Zager szager@chromium.org
Reviewed-by: Daniel Cheng dcheng@chromium.org
Cr-Commit-Position: refs/heads/main@{#1343371}