mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibWeb: Add fast_is for span and div
This commit is contained in:
parent
23f3ecbe98
commit
a3e485e2d0
|
|
@ -207,6 +207,8 @@ public:
|
|||
virtual bool is_html_form_element() const { return false; }
|
||||
virtual bool is_html_image_element() const { return false; }
|
||||
virtual bool is_html_iframe_element() const { return false; }
|
||||
virtual bool is_html_div_element() const { return false; }
|
||||
virtual bool is_html_span_element() const { return false; }
|
||||
virtual bool is_html_frameset_element() const { return false; }
|
||||
virtual bool is_html_fieldset_element() const { return false; }
|
||||
virtual bool is_navigable_container() const { return false; }
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ public:
|
|||
// https://www.w3.org/TR/html-aria/#el-div
|
||||
virtual Optional<ARIA::Role> default_role() const override { return ARIA::Role::generic; }
|
||||
|
||||
virtual bool is_html_div_element() const override { return true; }
|
||||
|
||||
protected:
|
||||
HTMLDivElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
||||
|
|
@ -31,3 +33,8 @@ private:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
template<>
|
||||
inline bool Node::fast_is<HTML::HTMLDivElement>() const { return is_html_div_element(); }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ public:
|
|||
// https://www.w3.org/TR/html-aria/#el-span
|
||||
virtual Optional<ARIA::Role> default_role() const override { return ARIA::Role::generic; }
|
||||
|
||||
virtual bool is_html_span_element() const override { return true; }
|
||||
|
||||
private:
|
||||
HTMLSpanElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
||||
|
|
@ -28,3 +30,8 @@ private:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
template<>
|
||||
inline bool Node::fast_is<HTML::HTMLSpanElement>() const { return is_html_span_element(); }
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user