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.
This commit is contained in:
Andreas Kling 2020-05-08 22:40:20 +02:00
parent 85a3678b4f
commit 6e9c57fcc3
Notes: sideshowbarker 2024-07-19 06:49:53 +09:00

View file

@ -40,6 +40,11 @@ LayoutListItem::~LayoutListItem()
void LayoutListItem::layout()
{
if (m_marker) {
remove_child(*m_marker);
m_marker = nullptr;
}
LayoutBlock::layout();
if (!m_marker) {