LibWeb: Resolve the transition-delay property

This commit is contained in:
stelar7 2023-05-27 22:05:48 +02:00 committed by Andreas Kling
parent aa691c22d4
commit a5f2024afa
Notes: sideshowbarker 2024-07-17 18:13:59 +09:00
4 changed files with 26 additions and 2 deletions

View file

@ -36,6 +36,7 @@
#include <LibWeb/CSS/StyleValues/RectStyleValue.h>
#include <LibWeb/CSS/StyleValues/ShadowStyleValue.h>
#include <LibWeb/CSS/StyleValues/StyleValueList.h>
#include <LibWeb/CSS/StyleValues/TimeStyleValue.h>
#include <LibWeb/CSS/StyleValues/TransformationStyleValue.h>
#include <LibWeb/DOM/Document.h>
#include <LibWeb/DOM/Element.h>
@ -767,8 +768,10 @@ ErrorOr<RefPtr<StyleValue const>> ResolvedCSSStyleDeclaration::style_value_for_p
StyleValueVector matrix_functions { matrix_function };
return StyleValueList::create(move(matrix_functions), StyleValueList::Separator::Space);
}
case PropertyID::VerticalAlign:
if (auto const* length_percentage = layout_node.computed_values().vertical_align().get_pointer<LengthPercentage>()) {
case CSS::PropertyID::TransitionDelay:
return TimeStyleValue::create(layout_node.computed_values().transition_delay());
case CSS::PropertyID::VerticalAlign:
if (auto const* length_percentage = layout_node.computed_values().vertical_align().get_pointer<CSS::LengthPercentage>()) {
return style_value_for_length_percentage(*length_percentage);
}
return IdentifierStyleValue::create(to_value_id(layout_node.computed_values().vertical_align().get<VerticalAlign>()));