mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 19:59:17 +00:00
LibWeb: Support fast_is<T>() for table, table sections, rows and cells
3.2x speed-up on WebKit/PerformanceTests/DOM/GridSort.html
This commit is contained in:
@@ -48,6 +48,8 @@ public:
|
||||
private:
|
||||
HTMLTableElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
||||
virtual bool is_html_table_element() const override { return true; }
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
@@ -58,3 +60,8 @@ private:
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
template<>
|
||||
inline bool Node::fast_is<HTML::HTMLTableElement>() const { return is_html_table_element(); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user