mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
LibWeb: Do not assert the type of transformation style values
In this case, the StyleValue may be "unresolved", however let's just avoid the assert altogether and treat all non-transform values as "none".
This commit is contained in:
parent
1ca31e0dc1
commit
5dfe99e247
Notes:
sideshowbarker
2024-07-16 19:42:24 +09:00
Author: https://github.com/mattco98 Commit: https://github.com/SerenityOS/serenity/commit/5dfe99e247 Pull-request: https://github.com/SerenityOS/serenity/pull/23486 Issue: https://github.com/SerenityOS/serenity/issues/23471 Issue: https://github.com/SerenityOS/serenity/issues/23473 Reviewed-by: https://github.com/awesomekling
1 changed files with 4 additions and 4 deletions
|
@ -818,13 +818,13 @@ static RefPtr<StyleValue const> interpolate_transform(DOM::Element& element, Sty
|
|||
};
|
||||
|
||||
static constexpr auto style_value_to_matrix = [](DOM::Element& element, StyleValue const& value) -> FloatMatrix4x4 {
|
||||
if (value.to_identifier() == ValueID::None)
|
||||
return FloatMatrix4x4::identity();
|
||||
|
||||
if (value.is_transformation())
|
||||
return transformation_style_value_to_matrix(element, value.as_transformation()).value_or(FloatMatrix4x4::identity());
|
||||
|
||||
VERIFY(value.is_value_list());
|
||||
// This encompasses both the allowed value "none" and any invalid values
|
||||
if (!value.is_value_list())
|
||||
return FloatMatrix4x4::identity();
|
||||
|
||||
auto matrix = FloatMatrix4x4::identity();
|
||||
for (auto const& value_element : value.as_value_list().values()) {
|
||||
if (value_element->is_transformation()) {
|
||||
|
|
Loading…
Reference in a new issue