mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:27:45 +00:00
LibWeb: Make the ListItemMarkerBox index-aware.
In the ListItemBox we get the index of the current <li> element in the parent and pass it to the ListItemMarkerBox. This patch is work towards #2059
This commit is contained in:
parent
c09ac536c5
commit
bfcfe84240
3 changed files with 13 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2021, Tobias Christiansen <tobi@tobyase.de>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -32,10 +33,14 @@ namespace Web::Layout {
|
|||
|
||||
class ListItemMarkerBox final : public Box {
|
||||
public:
|
||||
explicit ListItemMarkerBox(DOM::Document&);
|
||||
explicit ListItemMarkerBox(DOM::Document&, CSS::ListStyleType, size_t index);
|
||||
virtual ~ListItemMarkerBox() override;
|
||||
|
||||
virtual void paint(PaintContext&, PaintPhase) override;
|
||||
|
||||
private:
|
||||
CSS::ListStyleType m_list_style_type { CSS::ListStyleType::None };
|
||||
size_t m_index;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue