mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-24 05:25:13 +00:00
LibWeb: Explain discrepancy with media-query parsing
This had me confused for a while, but I am not smart enough today to actually fix it properly. :^)
This commit is contained in:
parent
8e82544dce
commit
53ec2ace23
Notes:
sideshowbarker
2024-07-17 20:58:35 +09:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/SerenityOS/serenity/commit/53ec2ace23 Pull-request: https://github.com/SerenityOS/serenity/pull/12585
1 changed files with 3 additions and 0 deletions
|
@ -1124,6 +1124,9 @@ OwnPtr<MediaCondition> Parser::parse_media_in_parens(TokenStream<StyleComponentV
|
|||
}
|
||||
|
||||
// `<general-enclosed>`
|
||||
// FIXME: We should only be taking this branch if the grammar doesn't match the above options.
|
||||
// Currently we take it if the above fail to parse, which is different.
|
||||
// eg, `@media (min-width: 76yaks)` is valid grammar, but does not parse because `yaks` isn't a unit.
|
||||
if (auto maybe_general_enclosed = parse_general_enclosed(tokens); maybe_general_enclosed.has_value())
|
||||
return MediaCondition::from_general_enclosed(maybe_general_enclosed.release_value());
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue