mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-30 11:37:16 +02: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
Notes:
github-actions[bot]
2025-02-05 17:13:42 +00:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/LadybirdBrowser/ladybird/commit/4cb20635771 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3467 Reviewed-by: https://github.com/gmta ✅
@@ -572,7 +572,7 @@ void HTMLSelectElement::computed_properties_changed()
|
||||
// Hide chevron icon when appearance is none
|
||||
if (m_chevron_icon_element) {
|
||||
auto appearance = computed_properties()->appearance();
|
||||
if (appearance.has_value() && *appearance == CSS::Appearance::None) {
|
||||
if (appearance == CSS::Appearance::None) {
|
||||
MUST(m_chevron_icon_element->style_for_bindings()->set_property(CSS::PropertyID::Display, "none"_string));
|
||||
} else {
|
||||
MUST(m_chevron_icon_element->style_for_bindings()->set_property(CSS::PropertyID::Display, "block"_string));
|
||||
|
||||
Reference in New Issue
Block a user