mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
LibWeb: Handle leading whitespace in grid-template-* block components
We're already handling whitespace between components, do the same for leading whitespace. Fixes crash on https://distill.pub/2021/gnn-intro.
This commit is contained in:
parent
586b47cede
commit
db121c7af1
Notes:
sideshowbarker
2024-07-17 22:55:25 +09:00
Author: https://github.com/axgallo Commit: https://github.com/SerenityOS/serenity/commit/db121c7af1 Pull-request: https://github.com/SerenityOS/serenity/pull/19454
3 changed files with 11 additions and 0 deletions
|
@ -0,0 +1,3 @@
|
|||
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
||||
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
|
||||
BlockContainer <body> at (8,8) content-size 784x0 children: not-inline
|
|
@ -0,0 +1,7 @@
|
|||
<style>
|
||||
test {
|
||||
display: grid;
|
||||
width: 100%;
|
||||
grid-template-columns: 50px [ first second ] 1fr;
|
||||
}
|
||||
</style>
|
|
@ -7565,6 +7565,7 @@ ErrorOr<RefPtr<StyleValue>> Parser::parse_grid_track_size_list(Vector<ComponentV
|
|||
if (!token.block().is_square())
|
||||
return GridTrackSizeListStyleValue::make_auto();
|
||||
TokenStream block_tokens { token.block().values() };
|
||||
block_tokens.skip_whitespace();
|
||||
while (block_tokens.has_next_token()) {
|
||||
auto current_block_token = block_tokens.next_token();
|
||||
auto maybe_string = String::from_utf8(current_block_token.token().ident());
|
||||
|
|
Loading…
Reference in a new issue