mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-06 02:55:49 +03:00
LibHTML: Add LayoutNode::is_image() and is<LayoutImage> helper
This commit is contained in:
parent
7cc4b90b16
commit
85ac9705ba
Notes:
sideshowbarker
2024-07-19 10:49:04 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/85ac9705bac
@ -19,4 +19,11 @@ public:
|
||||
|
||||
private:
|
||||
virtual const char* class_name() const override { return "LayoutImage"; }
|
||||
virtual bool is_image() const override { return true; }
|
||||
};
|
||||
|
||||
template<>
|
||||
inline bool is<LayoutImage>(const LayoutNode& node)
|
||||
{
|
||||
return node.is_image();
|
||||
}
|
||||
|
@ -58,6 +58,7 @@ public:
|
||||
virtual bool is_block() const { return false; }
|
||||
virtual bool is_replaced() const { return false; }
|
||||
virtual bool is_widget() const { return false; }
|
||||
virtual bool is_image() const { return false; }
|
||||
virtual bool is_box() const { return false; }
|
||||
virtual bool is_table() const { return false; }
|
||||
virtual bool is_table_row() const { return false; }
|
||||
|
Loading…
Reference in New Issue
Block a user