1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:28:12 +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:
Tobias Christiansen 2021-04-17 23:10:10 +02:00 committed by Andreas Kling
parent c09ac536c5
commit bfcfe84240
3 changed files with 13 additions and 3 deletions

View file

@ -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
@ -29,8 +30,10 @@
namespace Web::Layout {
ListItemMarkerBox::ListItemMarkerBox(DOM::Document& document)
ListItemMarkerBox::ListItemMarkerBox(DOM::Document& document, CSS::ListStyleType style_type, size_t index)
: Box(document, nullptr, CSS::StyleProperties::create())
, m_list_style_type(style_type)
, m_index(index)
{
}