mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-04 08:36:12 +00:00
LibWeb: Allow SVG painting to escape out of a shadow tree
The spec for the `<use>` element requires a shadow tree for the rendered content, so we need to be able to escape shadow trees when rendering svg content.
This commit is contained in:
parent
fd360ba171
commit
31d536912c
Notes:
sideshowbarker
2024-07-17 21:16:31 +09:00
Author: https://github.com/PrestonLTaylor
Commit: 31d536912c
Pull-request: https://github.com/SerenityOS/serenity/pull/19177
Reviewed-by: https://github.com/awesomekling
5 changed files with 24 additions and 5 deletions
|
@ -636,6 +636,15 @@ public:
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
template<typename U>
|
||||
U const* shadow_including_first_ancestor_of_type() const
|
||||
{
|
||||
return const_cast<Node*>(this)->template shadow_including_first_ancestor_of_type<U>();
|
||||
}
|
||||
|
||||
template<typename U>
|
||||
U* shadow_including_first_ancestor_of_type();
|
||||
|
||||
bool is_parent_of(Node const& other) const
|
||||
{
|
||||
for (auto* child = first_child(); child; child = child->next_sibling()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue