diff options
author | Andreas Kling <kling@serenityos.org> | 2020-05-08 22:40:20 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-08 22:40:20 +0200 |
commit | 6e9c57fcc304f0dae475b40826bd4faec28f0472 (patch) | |
tree | cb613a7c031abed6dca4f6387ef57d9e8f4f47c7 /Libraries/LibWeb/Layout | |
parent | 85a3678b4fde901fde743c347a4847ef7e73ed20 (diff) | |
download | serenity-6e9c57fcc304f0dae475b40826bd4faec28f0472.zip |
LibWeb: Generate a new list item marker on every layout
This is a workaround for the silly issue where some content would move
one pixel upward on every layout. The block layout code was finding
the list item marker and doing regular inline layout on it. We were not
prepared to handle this, which caused it to move in a silly way.
For now, just regenerate markers on every layout to work around the
issue. In the future we should figure out a nice way to layout markers.
Diffstat (limited to 'Libraries/LibWeb/Layout')
-rw-r--r-- | Libraries/LibWeb/Layout/LayoutListItem.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Libraries/LibWeb/Layout/LayoutListItem.cpp b/Libraries/LibWeb/Layout/LayoutListItem.cpp index 0be7366b74..2d14fb0ce6 100644 --- a/Libraries/LibWeb/Layout/LayoutListItem.cpp +++ b/Libraries/LibWeb/Layout/LayoutListItem.cpp @@ -40,6 +40,11 @@ LayoutListItem::~LayoutListItem() void LayoutListItem::layout() { + if (m_marker) { + remove_child(*m_marker); + m_marker = nullptr; + } + LayoutBlock::layout(); if (!m_marker) { |