1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 09:17:35 +00:00

LibWeb: Implement the :muted pseudo-class

This commit is contained in:
Sam Atkins 2023-08-01 14:49:28 +01:00 committed by Tim Flynn
parent 7b4ae43b91
commit c8a51f232d
6 changed files with 16 additions and 0 deletions

View file

@ -395,6 +395,12 @@ static inline bool matches_pseudo_class(CSS::Selector::SimpleSelector::PseudoCla
auto const& media_element = static_cast<HTML::HTMLMediaElement const&>(element);
return media_element.seeking();
}
case CSS::Selector::SimpleSelector::PseudoClass::Type::Muted: {
if (!is<HTML::HTMLMediaElement>(element))
return false;
auto const& media_element = static_cast<HTML::HTMLMediaElement const&>(element);
return media_element.muted();
}
}
return false;