mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWeb/CSS: Handle whitespace properly for border-image properties
This commit is contained in:
parent
a2cd5d5ec8
commit
c5fa5fb80e
Notes:
github-actions[bot]
2025-11-03 11:29:04 +00:00
Author: https://github.com/AtkinsSJ
Commit: c5fa5fb80e
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6646
Reviewed-by: https://github.com/tcl3
2 changed files with 5 additions and 6 deletions
|
|
@ -1772,8 +1772,10 @@ RefPtr<StyleValue const> Parser::parse_border_image_slice_value(TokenStream<Comp
|
|||
return false;
|
||||
};
|
||||
|
||||
tokens.discard_whitespace();
|
||||
if (parse_fill(tokens))
|
||||
fill = true;
|
||||
tokens.discard_whitespace();
|
||||
|
||||
Vector<ValueComparingNonnullRefPtr<StyleValue const>> number_percentages;
|
||||
while (number_percentages.size() <= 4 && tokens.has_next_token()) {
|
||||
|
|
@ -1786,6 +1788,7 @@ RefPtr<StyleValue const> Parser::parse_border_image_slice_value(TokenStream<Comp
|
|||
if (number_percentage->is_percentage() && !property_accepts_percentage(PropertyID::BorderImageSlice, number_percentage->as_percentage().percentage()))
|
||||
return nullptr;
|
||||
number_percentages.append(number_percentage.release_nonnull());
|
||||
tokens.discard_whitespace();
|
||||
}
|
||||
|
||||
switch (number_percentages.size()) {
|
||||
|
|
@ -1817,11 +1820,13 @@ RefPtr<StyleValue const> Parser::parse_border_image_slice_value(TokenStream<Comp
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
tokens.discard_whitespace();
|
||||
if (tokens.has_next_token() && parse_fill(tokens)) {
|
||||
if (fill)
|
||||
return nullptr;
|
||||
|
||||
fill = true;
|
||||
tokens.discard_whitespace();
|
||||
}
|
||||
|
||||
transaction.commit();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue