mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-24 02:09:28 +00:00
LibWeb/CSS: Stop returning Optional for enum properties
While keyword_to_foo() does return Optional<Foo>, in practice the invalid keywords get rejected at parse-time, so we don't have to worry about them here. This simplifies the user code quite a bit.
This commit is contained in:
committed by
Jelle Raaijmakers
parent
d3057a9c79
commit
4cb2063577
@@ -1194,7 +1194,7 @@ void HTMLInputElement::create_range_input_shadow_tree()
|
||||
void HTMLInputElement::computed_properties_changed()
|
||||
{
|
||||
auto appearance = computed_properties()->appearance();
|
||||
if (!appearance.has_value() || *appearance == CSS::Appearance::None)
|
||||
if (appearance == CSS::Appearance::None)
|
||||
return;
|
||||
|
||||
auto accent_color = MUST(String::from_utf8(CSS::string_from_keyword(CSS::Keyword::Accentcolor)));
|
||||
|
||||
Reference in New Issue
Block a user