Bug 213563 - First parseable <meta name=color-scheme> should win
Summary: First parseable <meta name=color-scheme> should win
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: sideshowbarker
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-06-24 09:23 PDT by Simon Fraser (smfr)
Modified: 2023-09-17 08:15 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2020-06-24 09:23:03 PDT
Per https://github.com/w3c/csswg-drafts/issues/3846, we should respect the first parseable <meta name=color-scheme>, not the last.
Comment 1 Radar WebKit Bug Importer 2020-06-24 09:23:25 PDT
<rdar://problem/64705222>
Comment 2 Anne van Kesteren 2023-09-04 09:34:38 PDT
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.
Comment 3 sideshowbarker 2023-09-15 09:27:46 PDT
Pull request: https://github.com/WebKit/WebKit/pull/17817
Comment 4 EWS 2023-09-17 07:16:42 PDT
Committed 268064@main (7d7215513fb5): <https://commits.webkit.org/268064@main>

Reviewed commits have been landed. Closing PR #17817 and removing active labels.
Comment 5 sideshowbarker 2023-09-17 08:15:30 PDT
(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.