ladybird/Libraries/LibWeb/Painting
Jelle Raaijmakers 115e5f42af LibWeb: Improve graphical list item marker positioning
While 788d5368a7 took care of better text
marker positioning, this improves graphical marker positioning instead.

By looking at how Firefox and Chrome render markers, it's clear that
there are three parts to positioning a graphical marker:

  * The containing space that the marker resides in;
  * The marker dimensions;
  * The distance between the marker and the start of the list item.

The space that the marker can be contained in, is the area to the left
of the list item with a height of the marker's line-height. The marker
dimensions are relative to the marker's font's pixel size: most of them
are a square at 35% of the font size, but the disclosure markers are
sized at 50% instead. Finally, the marker distance is always gauged at
50% of the font size.

So for example, a list item with `list-style-type: disc` and `font-size:
20px`, has 10px between its start and the right side of the marker, and
the marker's dimensions are 7x7.

The percentages I've chosen closely resemble how Firefox lays out its
list item markers.
2025-07-17 09:35:09 +01:00
..
AudioPaintable.cpp
AudioPaintable.h
BackgroundPainting.cpp LibWeb: Separate device pixel conversion helpers from PaintContext 2025-07-14 15:48:28 +02:00
BackgroundPainting.h LibWeb/CSS: Improved implementation of background-blend-mode 2025-04-01 13:38:00 +02:00
BackingStoreManager.cpp LibWeb: Skip backing store allocation for traversables created for SVG 2025-07-13 00:06:30 +02:00
BackingStoreManager.h LibWeb: Rearrange code such that a lot less files include Command.h 2025-07-11 17:37:27 +02:00
Blending.h LibWeb/CSS: Improved implementation of background-blend-mode 2025-04-01 13:38:00 +02:00
BorderPainting.cpp LibWeb: Don't resolve colors with unresolved components 2025-07-16 13:05:33 +01:00
BorderPainting.h
BorderRadiiData.cpp LibWeb: Separate device pixel conversion helpers from PaintContext 2025-07-14 15:48:28 +02:00
BorderRadiiData.h LibWeb: Separate device pixel conversion helpers from PaintContext 2025-07-14 15:48:28 +02:00
BorderRadiusCornerClipper.cpp LibWeb: Separate device pixel conversion helpers from PaintContext 2025-07-14 15:48:28 +02:00
BorderRadiusCornerClipper.h LibWeb: Stop clipping the root element's background 2025-07-04 16:18:57 +01:00
BordersData.cpp
BordersData.h
BoxModelMetrics.cpp
BoxModelMetrics.h
CanvasPaintable.cpp LibWeb: Rearrange code such that a lot less files include Command.h 2025-07-11 17:37:27 +02:00
CanvasPaintable.h
CheckBoxPaintable.cpp
CheckBoxPaintable.h
ClipFrame.cpp
ClipFrame.h LibWeb: Expand ClipFrame into clip rectangles during display list replay 2025-07-14 15:48:28 +02:00
Command.cpp LibWeb: Add internals call to dump display list 2025-07-13 19:15:05 +02:00
Command.h LibWeb: Add internals call to dump display list 2025-07-13 19:15:05 +02:00
DevicePixelConverter.h LibWeb: Separate device pixel conversion helpers from PaintContext 2025-07-14 15:48:28 +02:00
DisplayList.cpp LibWeb: Expand ClipFrame into clip rectangles during display list replay 2025-07-14 15:48:28 +02:00
DisplayList.h LibWeb: Expand ClipFrame into clip rectangles during display list replay 2025-07-14 15:48:28 +02:00
DisplayListPlayerSkia.cpp LibWeb: Cache compiled shaders for masks in DisplayListPlayerSkia 2025-07-09 19:21:31 +02:00
DisplayListPlayerSkia.h LibWeb: Rearrange code such that a lot less files include Command.h 2025-07-11 17:37:27 +02:00
DisplayListRecorder.cpp LibWeb: Expand ClipFrame into clip rectangles during display list replay 2025-07-14 15:48:28 +02:00
DisplayListRecorder.h LibWeb: Expand ClipFrame into clip rectangles during display list replay 2025-07-14 15:48:28 +02:00
FieldSetPaintable.cpp LibWeb: Separate device pixel conversion helpers from PaintContext 2025-07-14 15:48:28 +02:00
FieldSetPaintable.h
GradientData.h
GradientPainting.cpp LibWeb: Don't resolve colors with unresolved components 2025-07-16 13:05:33 +01:00
GradientPainting.h
ImagePaintable.cpp LibWeb: Remove unnecessary apply_own_clip_rect() in ImagePaintable 2025-07-06 21:56:02 +01:00
ImagePaintable.h
InputColors.h
LabelablePaintable.cpp
LabelablePaintable.h
MarkerPaintable.cpp LibWeb: Improve graphical list item marker positioning 2025-07-17 09:35:09 +01:00
MarkerPaintable.h
MediaPaintable.cpp LibWeb: Update the media display when the hovered component changes 2025-04-23 13:22:56 +02:00
MediaPaintable.h LibWeb: Update the media display when the hovered component changes 2025-04-23 13:22:56 +02:00
NavigableContainerViewportPaintable.cpp LibWeb: Rearrange code such that a lot less files include Command.h 2025-07-11 17:37:27 +02:00
NavigableContainerViewportPaintable.h
Paintable.cpp LibWeb: Store visibility for Paintables 2025-06-17 11:55:28 +02:00
Paintable.h LibWeb: Make apply{clear}_clip_overflow_rect non-virtual 2025-07-07 18:55:30 +02:00
PaintableBox.cpp LibWeb: Expand ClipFrame into clip rectangles during display list replay 2025-07-14 15:48:28 +02:00
PaintableBox.h LibWeb: Expand ClipFrame into clip rectangles during display list replay 2025-07-14 15:48:28 +02:00
PaintableFragment.cpp LibWeb: Skip update_associated_selection() when there's no selection 2025-07-03 22:16:39 +02:00
PaintableFragment.h LibWeb: Skip update_associated_selection() when there's no selection 2025-07-03 22:16:39 +02:00
PaintBoxShadowParams.h
PaintContext.cpp LibWeb: Separate device pixel conversion helpers from PaintContext 2025-07-14 15:48:28 +02:00
PaintContext.h LibWeb: Separate device pixel conversion helpers from PaintContext 2025-07-14 15:48:28 +02:00
PaintStyle.h LibWeb: Make SVGGradientPaintStyle be atomically ref-counted 2025-05-26 19:46:05 +02:00
RadioButtonPaintable.cpp LibWeb: Fix typos - act II 2025-04-09 15:05:20 +01:00
RadioButtonPaintable.h
ScrollFrame.cpp
ScrollFrame.h LibWeb: Save ScrollState snapshot in DisplayList to avoid race condition 2025-04-12 02:55:18 +02:00
ScrollState.cpp LibWeb: Save ScrollState snapshot in DisplayList to avoid race condition 2025-04-12 02:55:18 +02:00
ScrollState.h LibWeb: Save ScrollState snapshot in DisplayList to avoid race condition 2025-04-12 02:55:18 +02:00
ShadowData.h
ShadowPainting.cpp LibWeb: Separate device pixel conversion helpers from PaintContext 2025-07-14 15:48:28 +02:00
ShadowPainting.h
StackingContext.cpp LibWeb: Allow <svg> to establish a stacking context 2025-07-12 11:01:15 +02:00
StackingContext.h test-web: Dump stacking context tree in layout test output 2025-07-09 14:36:08 +02:00
SVGClipPaintable.cpp
SVGClipPaintable.h
SVGForeignObjectPaintable.cpp LibWeb/Painting: Don't paint invisible paintables 2025-07-03 12:39:05 +02:00
SVGForeignObjectPaintable.h
SVGGraphicsPaintable.cpp
SVGGraphicsPaintable.h
SVGMaskable.cpp LibWeb: Save ScrollState snapshot in DisplayList to avoid race condition 2025-04-12 02:55:18 +02:00
SVGMaskable.h
SVGMaskPaintable.cpp
SVGMaskPaintable.h
SVGPaintable.cpp LibWeb: Allow <svg> to establish a stacking context 2025-07-12 11:01:15 +02:00
SVGPaintable.h LibWeb: Allow <svg> to establish a stacking context 2025-07-12 11:01:15 +02:00
SVGPathPaintable.cpp
SVGPathPaintable.h
SVGSVGPaintable.cpp LibWeb: Allow <svg> to establish a stacking context 2025-07-12 11:01:15 +02:00
SVGSVGPaintable.h LibWeb: Allow <svg> to establish a stacking context 2025-07-12 11:01:15 +02:00
TableBordersPainting.cpp LibWeb: Separate device pixel conversion helpers from PaintContext 2025-07-14 15:48:28 +02:00
TableBordersPainting.h
TextPaintable.cpp
TextPaintable.h LibWeb: Invalidate text-decoration-thickness as paint-only property 2025-03-16 22:25:26 +01:00
VideoPaintable.cpp
VideoPaintable.h
ViewportPaintable.cpp LibWeb: Remove unnecessary const_cast in ViewportPaintable 2025-07-07 22:04:25 +02:00
ViewportPaintable.h LibWeb: Don't traverse entire layout tree in every HTML::EventLoop tick 2025-06-11 16:25:42 +02:00