summaryrefslogtreecommitdiff
path: root/Libraries
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-06-05 19:23:49 +0200
committerAndreas Kling <kling@serenityos.org>2020-06-05 19:23:49 +0200
commitb656fac00ed9ffb3bbcfd2c3227ea0797f9d5812 (patch)
tree9e8a6028d6ca099ad7c70d7672b3740b449de008 /Libraries
parent4d5ecf6e3202b7c1f5bafe7e3ab98026c187b3cd (diff)
downloadserenity-b656fac00ed9ffb3bbcfd2c3227ea0797f9d5812.zip
LibWeb: Make <canvas> use the generic replaced layout algorithm
LayoutCanvas now communicates intrinsic size to LayoutReplaced so it can use the normal replaced algorithm.
Diffstat (limited to 'Libraries')
-rw-r--r--Libraries/LibWeb/Layout/LayoutCanvas.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Libraries/LibWeb/Layout/LayoutCanvas.cpp b/Libraries/LibWeb/Layout/LayoutCanvas.cpp
index 15ac24c297..8d0f9f248d 100644
--- a/Libraries/LibWeb/Layout/LayoutCanvas.cpp
+++ b/Libraries/LibWeb/Layout/LayoutCanvas.cpp
@@ -42,8 +42,10 @@ LayoutCanvas::~LayoutCanvas()
void LayoutCanvas::layout(LayoutMode layout_mode)
{
- rect().set_width(node().requested_width());
- rect().set_height(node().requested_height());
+ set_has_intrinsic_width(true);
+ set_has_intrinsic_height(true);
+ set_intrinsic_width(node().requested_width());
+ set_intrinsic_height(node().requested_height());
LayoutReplaced::layout(layout_mode);
}