summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Libraries/LibHTML/Layout/LayoutImage.h7
-rw-r--r--Libraries/LibHTML/Layout/LayoutNode.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/Libraries/LibHTML/Layout/LayoutImage.h b/Libraries/LibHTML/Layout/LayoutImage.h
index 344797769c..5fcf62ca55 100644
--- a/Libraries/LibHTML/Layout/LayoutImage.h
+++ b/Libraries/LibHTML/Layout/LayoutImage.h
@@ -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();
+}
diff --git a/Libraries/LibHTML/Layout/LayoutNode.h b/Libraries/LibHTML/Layout/LayoutNode.h
index 7f80b73e91..35591ae77e 100644
--- a/Libraries/LibHTML/Layout/LayoutNode.h
+++ b/Libraries/LibHTML/Layout/LayoutNode.h
@@ -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; }