1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 18:07:34 +00:00

LibWeb: Create list-item markers during layout tree construction

Previously, these were added during layout. This didn't fit into the new
world where layout doesn't mutate the tree incrementally, so this patch
adds logic to Layout::TreeBuilder for adding a marker to each list-item
box after its children have been constructed.
This commit is contained in:
Andreas Kling 2022-02-21 01:43:37 +01:00
parent c9700e100e
commit 92266d2247
8 changed files with 65 additions and 54 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2018-2022, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021, Tobias Christiansen <tobyase@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
@ -18,9 +18,11 @@ public:
virtual void paint(PaintContext&, PaintPhase) override;
Gfx::Bitmap const* list_style_image_bitmap() const;
String const& text() const { return m_text; }
private:
virtual bool can_have_children() const override { return false; }
Gfx::Bitmap const* list_style_image_bitmap() const;
CSS::ListStyleType m_list_style_type { CSS::ListStyleType::None };
size_t m_index;