The ListItemMarker gets its index 1-based while the
String::bijective_base_from expects its index to be 0-based. This patch
adjusts the index passed around accordingly.
Previously they were positioned with a fixed offset. However this lead
to wider markers with more than one character to collide with the
element itself.
Now the ListItemMarkerBox generates and stores the appropriate String
in its constructor and sets its own width according to that.
The ListItemBox then lays out the Marker taking this width into
account.
This also made the painting a lot easier since we don't generate the
needed Strings every time we repaint, just once.
Why exactly the linter didn't whine about this is a mystery. These
constants aren't needed anymore since the functionality moved to
AK/String a while ago.
This allows us to convert a number to a String given a bijective
(zero-less) alphabet.
So you count A,B,C,...,Y,Z,AA,AB,...
This was surprisingly very tricky!
This allows the ListItemMarker to be displayed with different (simple)
alphabets in the future.
This doesn't exactly do what you would think from its name: It surely
adds an extra leading zero to the front of a number, but only if the
number is less than 10. CSS is weird sometimes.
SPDX License Identifiers are a more compact / standardized
way of representing file license information.
See: https://spdx.dev/resources/use/#identifiers
This was done with the `ambr` search and replace tool.
ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
In the ListItemMarkerBox render the correct thing when painting.
This covers decimal counting for ordered lists as well as square,
disc, and circle for unordered lists. Thus all currently supported
list-style-types are displayed correctly.
This closes#2059
We'll want to remove the LibGUI dependency from the WebContent process.
This is the first basic step of removing unnecessary LibGUI includes
and swapping out GUI::Painter for Gfx::Painter.