mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2026-06-19 08:11:58 +00:00
LibWeb: Unify WebIDL C++ type generation
Represent WebIDL C++ types with a single CppType model that tracks nullability, optional presence, and contained storage. GC-like values now use GC::Ref/GC::Ptr directly, while containers choose "plain", "Root", or "Conservative" container types depending on what they contain. For example, sequence<Element> becomes a RootVector of GC::Ref values, while sequence<SomeDictionary> becomes a ConservativeVector only when the dictionary contains GC-like values. This moves the generated bindings away from wrapping GC values in GC::Root by default. This has broad fallout as the types passed to interfaces for GC objects changes almost fully across the board.
This commit is contained in:
parent
aa0eb13a89
commit
637fd51595
Notes:
github-actions[bot]
2026-05-23 16:27:03 +00:00
Author: https://github.com/shannonbooth
Commit: 637fd51595
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/9523
207 changed files with 1126 additions and 1255 deletions
|
|
@ -764,7 +764,7 @@ WebIDL::ExceptionOr<void> HTMLScriptElement::set_src(TrustedTypes::TrustedScript
|
|||
}
|
||||
|
||||
// https://w3c.github.io/trusted-types/dist/spec/#the-textContent-idl-attribute
|
||||
Variant<GC::Root<TrustedTypes::TrustedScript>, Utf16String, Empty> HTMLScriptElement::text_content() const
|
||||
Variant<GC::Ref<TrustedTypes::TrustedScript>, Utf16String, Empty> HTMLScriptElement::text_content() const
|
||||
{
|
||||
// 1. Return the result of running get text content with this.
|
||||
return descendant_text_content();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue