mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 07:36:50 +00:00
LibWeb: Allow setting the width & height properties on <canvas> elements
This commit is contained in:
@@ -37,6 +37,16 @@ unsigned HTMLCanvasElement::height() const
|
||||
return attribute(HTML::AttributeNames::height).to_uint().value_or(150);
|
||||
}
|
||||
|
||||
void HTMLCanvasElement::set_width(unsigned value)
|
||||
{
|
||||
set_attribute(HTML::AttributeNames::width, String::number(value));
|
||||
}
|
||||
|
||||
void HTMLCanvasElement::set_height(unsigned value)
|
||||
{
|
||||
set_attribute(HTML::AttributeNames::height, String::number(value));
|
||||
}
|
||||
|
||||
RefPtr<Layout::Node> HTMLCanvasElement::create_layout_node()
|
||||
{
|
||||
auto style = document().style_computer().compute_style(*this);
|
||||
|
||||
Reference in New Issue
Block a user