mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 16:19:23 +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:
parent
b05bc71002
commit
a486c86eee
Notes:
github-actions[bot]
2024-12-01 15:12:58 +00:00
Author: https://github.com/tcl3
Commit: a486c86eee
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2641
4 changed files with 73 additions and 10 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue