LibWeb: Return error on modification of a computed CSS style declaration

Previously, calling `setProperty` or `removeProperty` from JS on a
CSSStyleDeclaration returned from `getComputedStyle()` would return
null. We now return a NoModificationAllowedError instead, which aligns
our implementation with the specification.
This commit is contained in:
Tim Ledbetter 2024-08-04 22:12:31 +01:00 committed by Andreas Kling
commit ea68bdef26
Notes: github-actions[bot] 2024-08-05 07:56:40 +00:00
5 changed files with 51 additions and 4 deletions

View file

@ -30,8 +30,8 @@ public:
virtual WebIDL::ExceptionOr<void> set_property(PropertyID, StringView css_text, StringView priority = ""sv) = 0;
virtual WebIDL::ExceptionOr<String> remove_property(PropertyID) = 0;
WebIDL::ExceptionOr<void> set_property(StringView property_name, StringView css_text, StringView priority);
WebIDL::ExceptionOr<String> remove_property(StringView property_name);
virtual WebIDL::ExceptionOr<void> set_property(StringView property_name, StringView css_text, StringView priority);
virtual WebIDL::ExceptionOr<String> remove_property(StringView property_name);
String get_property_value(StringView property) const;
StringView get_property_priority(StringView property) const;