mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb: Add fast_is<T> for hotly dynamic_cast'ed things on imdb.com
This commit is contained in:
parent
2fcacd21f5
commit
989f6ddb42
Notes:
github-actions[bot]
2025-09-25 19:44:12 +00:00
Author: https://github.com/awesomekling
Commit: 989f6ddb42
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6305
5 changed files with 28 additions and 1 deletions
|
|
@ -20,9 +20,18 @@ public:
|
|||
virtual GC::Ptr<Layout::Node> create_layout_node(GC::Ref<CSS::ComputedProperties>) override;
|
||||
|
||||
private:
|
||||
virtual bool is_svg_g_element() const final { return true; }
|
||||
|
||||
SVGGElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
template<>
|
||||
inline bool Node::fast_is<SVG::SVGGElement>() const { return is_svg_g_element(); }
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ public:
|
|||
virtual void apply_presentational_hints(GC::Ref<CSS::CascadedProperties>) const override;
|
||||
|
||||
private:
|
||||
virtual bool is_svg_symbol_element() const final { return true; }
|
||||
|
||||
SVGSymbolElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
|
|
@ -36,3 +38,10 @@ private:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
template<>
|
||||
inline bool Node::fast_is<SVG::SVGSymbolElement>() const { return is_svg_symbol_element(); }
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue