Skip to content

Commit

Permalink
Meta: Fix “shadow-including-ancestors-descendant” generator check
Browse files Browse the repository at this point in the history
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
  • Loading branch information
sideshowbarker authored and tcl3 committed Jan 1, 2025
1 parent f9d4852 commit e1b4aa9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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> {};
Expand Down

0 comments on commit e1b4aa9

Please sign in to comment.