summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-03-20 19:00:22 +0100
committerAndreas Kling <kling@serenityos.org>2022-03-20 19:03:43 +0100
commit8cc757b92b439aa28704141314e46776737c2ee2 (patch)
treea267588d61339ffeba6467a45caca6fb3142e38b /Userland/Libraries/LibWeb/Painting/PaintableBox.cpp
parent07a4d590dd5fbeee08c81336e5c324698d482423 (diff)
downloadserenity-8cc757b92b439aa28704141314e46776737c2ee2.zip
LibWeb: Always call Layout::Box::did_set_rect()
Since paintables have a default content size of 0x0, we were neglecting to notify the corresponding layout node about size changes, if the used content size came out to 0x0. This fixes an issue where resizing an iframe to 0x0 didn't take effect.
Diffstat (limited to 'Userland/Libraries/LibWeb/Painting/PaintableBox.cpp')
-rw-r--r--Userland/Libraries/LibWeb/Painting/PaintableBox.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp b/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp
index d1deb1f8da..2cdfbbbf22 100644
--- a/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp
+++ b/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp
@@ -39,8 +39,6 @@ PaintableWithLines::~PaintableWithLines()
void PaintableBox::set_offset(const Gfx::FloatPoint& offset)
{
- if (m_offset == offset)
- return;
m_offset = offset;
// FIXME: This const_cast is gross.
const_cast<Layout::Box&>(layout_box()).did_set_rect();
@@ -48,8 +46,6 @@ void PaintableBox::set_offset(const Gfx::FloatPoint& offset)
void PaintableBox::set_content_size(Gfx::FloatSize const& size)
{
- if (m_content_size == size)
- return;
m_content_size = size;
// FIXME: This const_cast is gross.
const_cast<Layout::Box&>(layout_box()).did_set_rect();