Meta: Fix “shadow-including-ancestors-descendant” generator check
This change fixes the IDLGenerators.cpp implementation of the “If reflectedTarget's explicitly set attr-element is a descendant of any of element's shadow-including ancestors” step from the “If a reflected IDL attribute has the type T?, where T is either Element or an interface that inherits from Element” case in the HTML spec at http://whatwg.org/html/#reflecting-content-attributes-in-idl-attributes
This commit is contained in:
parent
f9d4852a22
commit
e1b4aa94db
Notes:
github-actions[bot]
2025-01-01 11:01:53 +00:00
Author: https://github.com/sideshowbarker Commit: https://github.com/LadybirdBrowser/ladybird/commit/e1b4aa94db9 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3085 Reviewed-by: https://github.com/tcl3 ✅
1 changed files with 1 additions and 1 deletions
|
@ -3821,7 +3821,7 @@ JS_DEFINE_NATIVE_FUNCTION(@class_name@::@attribute.getter_callback@)
|
|||
attribute_generator.append(R"~~~(
|
||||
auto const explicitly_set_attr = TRY(throw_dom_exception_if_needed(vm, [&] { return impl->@attribute.cpp_name@(); }));
|
||||
if (explicitly_set_attr) {
|
||||
if (&impl->shadow_including_root() == &explicitly_set_attr->shadow_including_root()) {
|
||||
if (&impl->shadow_including_root() == &explicitly_set_attr->root()) {
|
||||
retval = explicitly_set_attr;
|
||||
} else {
|
||||
retval = GC::Ptr<Element> {};
|
||||
|
|
Loading…
Add table
Reference in a new issue