Просмотр исходного кода

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.
Andreas Kling 3 лет назад
Родитель
Сommit
8cc757b92b
1 измененных файлов с 0 добавлено и 4 удалено
  1. 0 4
      Userland/Libraries/LibWeb/Painting/PaintableBox.cpp

+ 0 - 4
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();