Per https://github.com/w3c/csswg-drafts/issues/3846, we should respect the first parseable <meta name=color-scheme>, not the last.
<rdar://problem/64705222>
We seem to handle dynamic changes badly in general: https://wpt.fyi/results/html/semantics/document-metadata/the-meta-element/color-scheme This also impacts a bunch of other <meta name> values based on how HTMLMetaElement::process is structured.
Pull request: https://github.com/WebKit/WebKit/pull/17817
Committed 268064@main (7d7215513fb5): <https://commits.webkit.org/268064@main> Reviewed commits have been landed. Closing PR #17817 and removing active labels.
(In reply to Anne van Kesteren from comment #2) > We seem to handle dynamic changes badly in general: > https://wpt.fyi/results/html/semantics/document-metadata/the-meta-element/ > color-scheme After the change in https://github.com/WebKit/WebKit/pull/17845 is reviewed and merged, WebKit will be passing all the tests in that WPT color-scheme subtree. > This also impacts a bunch of other <meta name> values based on how > HTMLMetaElement::process is structured. I can look into ensuring that HTMLMetaElement::process code conforms to the relevant spec requirements. I wonder if there are any <meta name> WPT tests WebKit is currently failing due to that code not being structured in a way which causes <meta name> processing to conform with the spec requirements.