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.
This commit is contained in:
parent
07a4d590dd
commit
8cc757b92b
Notes:
sideshowbarker
2024-07-17 17:02:42 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/8cc757b92b
1 changed files with 0 additions and 4 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue