mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 07:36:50 +00:00
LibWeb: Limit HTMLCanvasElement width and height to allowed values
Setting the `width` or `height` properties of `HTMLCanvasElement` to a value greater than 2147483647 will now cause the property to be set to its default value.
This commit is contained in:
committed by
Tim Ledbetter
parent
b05bc71002
commit
a486c86eee
@@ -11,6 +11,7 @@
|
||||
#include <LibGfx/PaintingSurface.h>
|
||||
#include <LibWeb/HTML/HTMLElement.h>
|
||||
#include <LibWeb/WebGL/WebGLRenderingContext.h>
|
||||
#include <LibWeb/WebIDL/Types.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
@@ -29,11 +30,11 @@ public:
|
||||
|
||||
JS::ThrowCompletionOr<RenderingContext> get_context(String const& type, JS::Value options);
|
||||
|
||||
unsigned width() const;
|
||||
unsigned height() const;
|
||||
WebIDL::UnsignedLong width() const;
|
||||
WebIDL::UnsignedLong height() const;
|
||||
|
||||
WebIDL::ExceptionOr<void> set_width(unsigned);
|
||||
WebIDL::ExceptionOr<void> set_height(unsigned);
|
||||
WebIDL::ExceptionOr<void> set_width(WebIDL::UnsignedLong);
|
||||
WebIDL::ExceptionOr<void> set_height(WebIDL::UnsignedLong);
|
||||
|
||||
String to_data_url(StringView type, JS::Value quality);
|
||||
WebIDL::ExceptionOr<void> to_blob(GC::Ref<WebIDL::CallbackType> callback, StringView type, JS::Value quality);
|
||||
|
||||
Reference in New Issue
Block a user