LibWeb: Add CSS view-transition-name

This commit is contained in:
Psychpsyo 2025-02-21 17:56:24 +01:00 committed by Sam Atkins
commit c0eb072645
Notes: github-actions[bot] 2025-02-22 14:53:16 +00:00
10 changed files with 78 additions and 5 deletions

View file

@ -17,6 +17,7 @@
#include <LibWeb/CSS/StyleValues/ContentStyleValue.h>
#include <LibWeb/CSS/StyleValues/CounterDefinitionsStyleValue.h>
#include <LibWeb/CSS/StyleValues/CounterStyleValue.h>
#include <LibWeb/CSS/StyleValues/CustomIdentStyleValue.h>
#include <LibWeb/CSS/StyleValues/DisplayStyleValue.h>
#include <LibWeb/CSS/StyleValues/GridAutoFlowStyleValue.h>
#include <LibWeb/CSS/StyleValues/GridTemplateAreaStyleValue.h>
@ -1598,6 +1599,18 @@ MixBlendMode ComputedProperties::mix_blend_mode() const
return keyword_to_mix_blend_mode(value.to_keyword()).release_value();
}
Optional<FlyString> ComputedProperties::view_transition_name() const
{
auto const& value = property(PropertyID::ViewTransitionName);
if (value.is_custom_ident()) {
auto ident = value.as_custom_ident().custom_ident();
if (ident == "none"_fly_string)
return {};
return ident;
}
return {};
}
MaskType ComputedProperties::mask_type() const
{
auto const& value = property(PropertyID::MaskType);