LibWeb: Add more fast_is<T> helpers for DOM::Node subclasses

This commit is contained in:
Andreas Kling 2025-04-18 10:27:59 +02:00 committed by Andreas Kling
parent 0e490e3352
commit aecb144df0
Notes: github-actions[bot] 2025-04-18 12:47:31 +00:00
10 changed files with 68 additions and 1 deletions

View file

@ -182,6 +182,8 @@ protected:
private:
friend SourceElementSelector;
virtual bool is_html_media_element() const final { return true; }
struct EntireResource { };
using ByteRange = Variant<EntireResource>; // FIXME: This will need to include "until end" and an actual byte range.
@ -324,3 +326,8 @@ private:
};
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<HTML::HTMLMediaElement>() const { return is_html_media_element(); }
}