1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 10:18:15 +09:00

LibWeb: Prevent crash with custom cursor

We don't support custom cursors, use the default instead of crashing.
Also clean up a bit of dead code from when Cursor was optional.
This commit is contained in:
Gingeh 2025-02-14 20:58:38 +11:00 committed by Sam Atkins
parent 7be78ec044
commit 4966fa4aed
Notes: github-actions[bot] 2025-02-17 12:25:53 +00:00
2 changed files with 5 additions and 5 deletions

View file

@ -953,6 +953,9 @@ ContentVisibility ComputedProperties::content_visibility() const
Cursor ComputedProperties::cursor() const
{
auto const& value = property(PropertyID::Cursor);
// FIXME: We don't currently support custom cursors.
if (value.is_url())
return Cursor::Auto;
return keyword_to_cursor(value.to_keyword()).release_value();
}