LibWeb: Avoid invoking Trusted Types where avoidable

Prevents observably calling Trusted Types, which can run arbitrary JS,
cause crashes due to use of MUST and allow arbitrary JS to modify
internal elements.
This commit is contained in:
Luke Wilde 2025-10-31 12:30:47 +00:00 committed by Tim Flynn
parent fb9406ddcd
commit 82bd3d3891
Notes: github-actions[bot] 2025-11-06 16:46:00 +00:00
83 changed files with 407 additions and 366 deletions

View file

@ -41,7 +41,7 @@ public:
TypeAttributeState type_state() const;
String type_for_bindings() const;
WebIDL::ExceptionOr<void> set_type_for_bindings(String const&);
void set_type_for_bindings(String const&);
virtual void form_associated_element_attribute_changed(FlyString const& name, Optional<String> const& old_value, Optional<String> const& value, Optional<FlyString> const& namespace_) override;
@ -81,7 +81,7 @@ public:
virtual void activation_behavior(DOM::Event const&) override;
String command() const;
WebIDL::ExceptionOr<void> set_command(String const&);
void set_command(String const&);
GC::Ptr<DOM::Element> command_for_element() { return m_command_for_element; }
void set_command_for_element(GC::Ptr<DOM::Element> value) { m_command_for_element = value; }