LibWeb: Limit HTMLTableColElement span to allowed values

This change ensures that `span` is clamped to the maximum value of 1000
if the given value is larger than 2147483647.
This commit is contained in:
Tim Ledbetter 2024-11-30 22:56:41 +00:00 committed by Andreas Kling
commit 44cf457fd2
Notes: github-actions[bot] 2024-12-02 09:26:24 +00:00
4 changed files with 37 additions and 4 deletions

View file

@ -7,6 +7,7 @@
#pragma once
#include <LibWeb/HTML/HTMLElement.h>
#include <LibWeb/WebIDL/Types.h>
namespace Web::HTML {
@ -17,8 +18,8 @@ class HTMLTableColElement final : public HTMLElement {
public:
virtual ~HTMLTableColElement() override;
unsigned span() const;
WebIDL::ExceptionOr<void> set_span(unsigned);
WebIDL::UnsignedLong span() const;
WebIDL::ExceptionOr<void> set_span(WebIDL::UnsignedLong);
private:
HTMLTableColElement(DOM::Document&, DOM::QualifiedName);