mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-16 13:09:41 +00:00
LibWeb: Store CursorStyleValue
sub-values directly
Storing these within NumberOrCalculated is unnecessary
This commit is contained in:
parent
25192d3c20
commit
e772a992be
Notes:
github-actions[bot]
2025-10-07 09:51:09 +00:00
Author: https://github.com/Calme1709
Commit: e772a992be
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6375
Reviewed-by: https://github.com/AtkinsSJ ✅
3 changed files with 38 additions and 29 deletions
|
@ -1161,14 +1161,14 @@ RefPtr<StyleValue const> Parser::parse_cursor_value(TokenStream<ComponentValue>&
|
|||
|
||||
if (part_tokens.has_next_token()) {
|
||||
// <number>{2}, which are the x and y coordinates of the hotspot
|
||||
auto x = parse_number(part_tokens);
|
||||
auto x = parse_number_value(part_tokens);
|
||||
part_tokens.discard_whitespace();
|
||||
auto y = parse_number(part_tokens);
|
||||
auto y = parse_number_value(part_tokens);
|
||||
part_tokens.discard_whitespace();
|
||||
if (!x.has_value() || !y.has_value() || part_tokens.has_next_token())
|
||||
if (!x || !y || part_tokens.has_next_token())
|
||||
return nullptr;
|
||||
|
||||
cursors.append(CursorStyleValue::create(image_value.release_nonnull(), x.release_value(), y.release_value()));
|
||||
cursors.append(CursorStyleValue::create(image_value.release_nonnull(), x, y));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue