From e1b4aa94db97a4ad46092c76cc045c144abfc395 Mon Sep 17 00:00:00 2001 From: sideshowbarker Date: Wed, 1 Jan 2025 09:04:51 +0900 Subject: [PATCH] =?UTF-8?q?Meta:=20Fix=20=E2=80=9Cshadow-including-ancesto?= =?UTF-8?q?rs-descendant=E2=80=9D=20generator=20check?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp index 60926a92c68..03e027ef723 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp @@ -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 {};