LibWeb: Limit HTMLInputElement.size to allowed values

Attempting to set `HTMLInputElement.size` to 0 via IDL now throws an
IndexSizeError DOMException. Attempting to set it to a value larger
than 2147483647 results in it being set to the default value.
This commit is contained in:
Tim Ledbetter 2024-11-28 14:33:53 +00:00 committed by Andreas Kling
commit ae0c87c747
Notes: github-actions[bot] 2024-11-29 08:50:16 +00:00
4 changed files with 26 additions and 5 deletions

View file

@ -125,8 +125,8 @@ public:
WebIDL::Long min_length() const;
WebIDL::ExceptionOr<void> set_min_length(WebIDL::Long);
unsigned size() const;
WebIDL::ExceptionOr<void> set_size(unsigned value);
WebIDL::UnsignedLong size() const;
WebIDL::ExceptionOr<void> set_size(WebIDL::UnsignedLong value);
struct SelectedCoordinate {
int x { 0 };