mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
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:
parent
85a3678b4f
commit
6e9c57fcc3
Notes:
sideshowbarker
2024-07-19 06:49:53 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/6e9c57fcc30
1 changed files with 5 additions and 0 deletions
|
@ -40,6 +40,11 @@ LayoutListItem::~LayoutListItem()
|
|||
|
||||
void LayoutListItem::layout()
|
||||
{
|
||||
if (m_marker) {
|
||||
remove_child(*m_marker);
|
||||
m_marker = nullptr;
|
||||
}
|
||||
|
||||
LayoutBlock::layout();
|
||||
|
||||
if (!m_marker) {
|
||||
|
|
Loading…
Add table
Reference in a new issue