Skip to content
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

Clarify case-insensitive parsing for enum values #1142

Open
christianliebel opened this issue Aug 26, 2024 · 3 comments · May be fixed by #1149
Open

Clarify case-insensitive parsing for enum values #1142

christianliebel opened this issue Aug 26, 2024 · 3 comments · May be fixed by #1149

Comments

@christianliebel
Copy link
Member

christianliebel commented Aug 26, 2024

The parsing algorithms of the current specification don't mention case-insensitive parsing of the enum-based members (dir, display, orientation), but all browser engines have implemented this:

User Agent dir display orientation
Chromium 🤷🏼‍♂️ case-insensitive 🤷🏼‍♂️ case-insensitive 🤷🏼‍♂️ case-insensitive
Gecko 🤷🏼‍♂️ case-insensitive 🤷🏼‍♂️ case-insensitive 🤷🏼‍♂️ case-insensitive
WebKit 🤷🏼‍♂️ case-insensitive 🤷🏼‍♂️ case-insensitive 🤷🏼‍♂️ case-insensitive
@marcoscaceres
Copy link
Member

marcoscaceres commented Aug 27, 2024

Bit of history... the original version of the spec did... then we did the IDL conversion (case-sensitive/exact match)... then we got rid of the IDL conversion... but then we forgot to revert back to normalizing the case.

At the same time, we were originally being a bit too liberal with the what we accepted. We shouldn't have done case normalization for enum values, but given that's what's implemented by everyone, we might as well updated the spec to match.

@christianliebel
Copy link
Member Author

Filed the following Gecko bug to make "dir" parsing case-insensitive as well: https://bugzilla.mozilla.org/show_bug.cgi?id=1921633

We could then make parsing the enum-based members case-insensitive.

@christianliebel christianliebel linked a pull request Oct 15, 2024 that will close this issue
3 tasks
@christianliebel
Copy link
Member Author

The Gecko patch has landed, so "dir" will soon be case-insensitive there as well. Thanks @saschanaz!

I filed a PR to reflect the engines' behavior in the spec.

moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Oct 15, 2024
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this issue Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@marcoscaceres @christianliebel and others