1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:18:13 +00:00

LibWeb: Implement the :seeking pseudo-class

This matches while a media element is seeking.
This commit is contained in:
Sam Atkins 2023-08-01 13:04:47 +01:00 committed by Tim Flynn
parent 4df5e24926
commit 7b4ae43b91
7 changed files with 28 additions and 3 deletions

View file

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