ladybird/Libraries/LibWeb/Painting
InvalidUsernameException 7c315ef67f Everywhere: Unify naming of RGBA-like colors
The `Bitmap` type was referring to to its internal pixel format by a
name that represents the order of the color components as they are layed
out in memory. Contrary, the `Color` type was using a naming that where
the name represents the order of the components from most to least
significant byte when viewed as a unsigned 32bit integer. This is
confusing as you have to keep remembering which mental model to use
depending on which code you work with.

To unify the two, the naming of RGBA-like colors in the `Color` type has
been adjusted to match the one from the Bitmap type. This seems to be
generally in line with how web APIs think about these types:
* `ImageData.pixelFormat` can be `rgba-8unorm` backed by a
  `Uint8ClamedArray`, but there is no pixel format backed by a 32bit
  unsigned type.
* WebGL can use format `RGBA` with type `UNSIGNED_BYTE`, but there is no
  such format with type `UNSIGNED_INT`.

Additionally, it appears that other browsers and browser-adjacent
libraries also think similarly about these types:
* Firefox:
  https://github.com/mozilla-firefox/firefox/blob/main/gfx/2d/Types.h
* WebKit:
  https://github.com/WebKit/WebKit/blob/main/Source/WebCore/platform/graphics/PixelFormat.h
* Skia:
  https://chromium.googlesource.com/skia/+/refs/heads/main/include/core/SkColorType.h

This has the not so nice side effect that APIs that interact with these
types through 32bit unsigned integers now have the component order
inverted due to little-endian byte order. E.g. specifying a color as hex
constant needs to be done as `0xAABBGGRR` if it is to be treated as
RGBA8888.

We could alleviate this by providing endian-independent APIs to callers.
But I suspect long-term we might want to think differently about bitmap
data anyway, e.g. to better support HDR in the future. However, such
changes would be more involved than just unifying the naming as done
here. So I considered that out of scope for now.
2025-11-28 18:32:48 +01:00
..
AudioPaintable.cpp LibWeb: Correct the early exit condition in AudioPaintable::paint() 2025-11-03 13:25:02 -06:00
AudioPaintable.h LibWeb: Delete AudioPaintable::layout_box() 2025-10-10 09:03:39 +02:00
BackgroundPainting.cpp LibWeb: Pass sizes instead of rects to to_gfx_scaling_mode() 2025-11-12 15:59:01 +01:00
BackgroundPainting.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
BackingStoreManager.cpp Everywhere: Avoid large rebuilds when editing (Immutable)Bitmap headers 2025-11-28 18:32:48 +01:00
BackingStoreManager.h LibWeb: Avoid including Navigable.h in headers 2025-10-20 10:16:55 +01:00
Blending.h LibWeb/CSS: Improved implementation of background-blend-mode 2025-04-01 13:38:00 +02:00
BorderPainting.cpp LibWeb+LibGfx: Remove Path::close_all_subpaths() 2025-09-25 21:42:52 +02:00
BorderPainting.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
BorderRadiiData.cpp LibWeb: Rename PaintContext to DisplayListRecordingContext 2025-08-01 05:25:56 -04:00
BorderRadiiData.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
BorderRadiusCornerClipper.cpp LibWeb: Rename PaintContext to DisplayListRecordingContext 2025-08-01 05:25:56 -04:00
BorderRadiusCornerClipper.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
BordersData.cpp LibWeb: Rename PaintContext to DisplayListRecordingContext 2025-08-01 05:25:56 -04:00
BordersData.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
BoxModelMetrics.cpp LibWeb: Store final box model metrics in paint tree, not layout tree 2025-02-17 18:28:29 +01:00
BoxModelMetrics.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
CanvasPaintable.cpp LibWeb: Pass sizes instead of rects to to_gfx_scaling_mode() 2025-11-12 15:59:01 +01:00
CanvasPaintable.h LibWeb: Delete CanvasPaintable::layout_box() 2025-10-10 09:03:39 +02:00
CheckBoxPaintable.cpp LibWeb: Delete CheckBoxPaintable::layout_box() 2025-10-10 09:03:39 +02:00
CheckBoxPaintable.h LibWeb: Delete CheckBoxPaintable::layout_box() 2025-10-10 09:03:39 +02:00
ClipFrame.cpp LibWeb: Use scroll state from snapshot while applying clip rectangles 2025-07-24 13:03:23 -04:00
ClipFrame.h Everywhere: Avoid large rebuilds when editing (Immutable)Bitmap headers 2025-11-28 18:32:48 +01:00
DevicePixelConverter.h LibWeb: Maintain rect positioning when rounding to device pixel rects 2025-08-19 21:53:46 +02:00
DisplayList.cpp LibWeb: Rename DisplayList's apply_filters to apply_filter 2025-11-18 15:10:58 +01:00
DisplayList.h Everywhere: Avoid large rebuilds when editing (Immutable)Bitmap headers 2025-11-28 18:32:48 +01:00
DisplayListCommand.cpp LibWeb: Show bounding_rect in PushStackingContext dump 2025-11-18 15:10:58 +01:00
DisplayListCommand.h Everywhere: Avoid large rebuilds when editing (Immutable)Bitmap headers 2025-11-28 18:32:48 +01:00
DisplayListPlayerSkia.cpp Everywhere: Avoid large rebuilds when editing (Immutable)Bitmap headers 2025-11-28 18:32:48 +01:00
DisplayListPlayerSkia.h LibWeb: Rename DisplayList's apply_filters to apply_filter 2025-11-18 15:10:58 +01:00
DisplayListRecorder.cpp Everywhere: Avoid large rebuilds when editing (Immutable)Bitmap headers 2025-11-28 18:32:48 +01:00
DisplayListRecorder.h Everywhere: Avoid large rebuilds when editing (Immutable)Bitmap headers 2025-11-28 18:32:48 +01:00
DisplayListRecordingContext.cpp LibWeb: Rename PaintContext to DisplayListRecordingContext 2025-08-01 05:25:56 -04:00
DisplayListRecordingContext.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
FieldSetPaintable.cpp LibWeb: Rename PaintContext to DisplayListRecordingContext 2025-08-01 05:25:56 -04:00
FieldSetPaintable.h LibWeb: Rename PaintContext to DisplayListRecordingContext 2025-08-01 05:25:56 -04:00
GradientData.h LibWeb: Remove unused include from GradientData.h 2025-10-22 10:45:18 +02:00
GradientPainting.cpp LibWeb/CSS: Support calculated angles in conic-gradient() 2025-11-21 11:36:28 +01:00
GradientPainting.h LibWeb: Rename PaintContext to DisplayListRecordingContext 2025-08-01 05:25:56 -04:00
ImagePaintable.cpp Everywhere: Avoid large rebuilds when editing (Immutable)Bitmap headers 2025-11-28 18:32:48 +01:00
ImagePaintable.h LibWeb: Rename PaintContext to DisplayListRecordingContext 2025-08-01 05:25:56 -04:00
InputColors.h LibWeb/CSS: Implement the color-scheme CSS property 2025-01-08 11:18:13 +00:00
LabelablePaintable.cpp LibWeb: Avoid including Navigable.h in headers 2025-10-20 10:16:55 +01:00
LabelablePaintable.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
MarkerPaintable.cpp LibWeb: Make DisplayListRecorder::draw_text() take text as UTF-16 2025-09-21 13:22:38 +02:00
MarkerPaintable.h LibWeb: Rename PaintContext to DisplayListRecordingContext 2025-08-01 05:25:56 -04:00
MediaPaintable.cpp Everywhere: Unify naming of RGBA-like colors 2025-11-28 18:32:48 +01:00
MediaPaintable.h LibWeb: Delete non-const layout_node_with_style_and_box_metrics() 2025-10-10 16:58:51 +02:00
NavigableContainerViewportPaintable.cpp LibWeb: Avoid including Navigable.h in headers 2025-10-20 10:16:55 +01:00
NavigableContainerViewportPaintable.h LibWeb: Delete NavigableContainerViewportPaintable::layout_box() 2025-10-10 09:03:39 +02:00
Paintable.cpp LibWeb: Implement CSS perspective-origin 2025-11-21 11:14:28 +00:00
Paintable.h LibWeb: Copy "is inert" attribute into Paintable 2025-10-14 11:23:29 +02:00
PaintableBox.cpp Everywhere: Avoid large rebuilds when editing (Immutable)Bitmap headers 2025-11-28 18:32:48 +01:00
PaintableBox.h Everywhere: Avoid large rebuilds when editing (Immutable)Bitmap headers 2025-11-28 18:32:48 +01:00
PaintableFragment.cpp LibWeb: Store correct text offsets in PaintableFragment 2025-09-12 15:34:09 -04:00
PaintableFragment.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
PaintBoxShadowParams.h Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
PaintStyle.h LibWeb: Implement the color-interpolation property for SVG gradients 2025-08-17 10:51:05 +02:00
RadioButtonPaintable.cpp LibWeb: Rename PaintContext to DisplayListRecordingContext 2025-08-01 05:25:56 -04:00
RadioButtonPaintable.h LibWeb: Rename PaintContext to DisplayListRecordingContext 2025-08-01 05:25:56 -04:00
ScrollFrame.cpp Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
ScrollFrame.h LibGfx+LibWeb: Delete unused Line class and Rect methods 2025-11-04 23:16:02 +01:00
ScrollState.cpp LibWeb: Save ScrollState snapshot in DisplayList to avoid race condition 2025-04-12 02:55:18 +02:00
ScrollState.h LibWeb: Misc. cleanup of code 2025-10-27 16:42:27 -07:00
ShadowData.h Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
ShadowPainting.cpp LibWeb: Disallow spread distance value when parsing text-shadow 2025-09-18 15:21:22 +01:00
ShadowPainting.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
ShouldAntiAlias.h LibWeb: Use shape-rendering to control anti aliasing for SVG paths 2025-08-19 09:47:28 +01:00
StackingContext.cpp LibWeb: Implement CSS perspective-origin 2025-11-21 11:14:28 +00:00
StackingContext.h LibWeb: Remove unused include from StackingContext 2025-11-18 15:10:58 +01:00
SVGClipPaintable.cpp LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
SVGClipPaintable.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
SVGForeignObjectPaintable.cpp LibWeb: Rename PaintContext to DisplayListRecordingContext 2025-08-01 05:25:56 -04:00
SVGForeignObjectPaintable.h Everywhere: Avoid large rebuilds when editing (Immutable)Bitmap headers 2025-11-28 18:32:48 +01:00
SVGGraphicsPaintable.cpp LibWeb: Delete unused SVGGraphicsPaintable::layout_box() 2025-10-10 09:03:39 +02:00
SVGGraphicsPaintable.h Everywhere: Avoid large rebuilds when editing (Immutable)Bitmap headers 2025-11-28 18:32:48 +01:00
SVGMaskable.cpp Everywhere: Avoid large rebuilds when editing (Immutable)Bitmap headers 2025-11-28 18:32:48 +01:00
SVGMaskable.h Everywhere: Avoid large rebuilds when editing (Immutable)Bitmap headers 2025-11-28 18:32:48 +01:00
SVGMaskPaintable.cpp LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
SVGMaskPaintable.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
SVGPaintable.cpp LibWeb: Use shape-rendering to control anti aliasing for SVG paths 2025-08-19 09:47:28 +01:00
SVGPaintable.h LibWeb: Use shape-rendering to control anti aliasing for SVG paths 2025-08-19 09:47:28 +01:00
SVGPathPaintable.cpp LibWeb: Resolve more calculated values in ComputedProperties 2025-11-10 12:11:36 +01:00
SVGPathPaintable.h LibWeb: Get rid of SVGPathPaintable::layout_box() 2025-10-14 11:23:29 +02:00
SVGSVGPaintable.cpp Everywhere: Avoid large rebuilds when editing (Immutable)Bitmap headers 2025-11-28 18:32:48 +01:00
SVGSVGPaintable.h LibWeb: Delete unused SVGSVGPaintable::layout_box() 2025-10-10 09:03:39 +02:00
TableBordersPainting.cpp LibWeb: Rename PaintContext to DisplayListRecordingContext 2025-08-01 05:25:56 -04:00
TableBordersPainting.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
TextPaintable.cpp LibWeb: Avoid including Navigable.h in headers 2025-10-20 10:16:55 +01:00
TextPaintable.h LibWeb: Paint inspector overlays as a separate pass 2025-09-19 10:17:56 +02:00
VideoPaintable.cpp Everywhere: Unify naming of RGBA-like colors 2025-11-28 18:32:48 +01:00
VideoPaintable.h LibWeb: Delete VideoPaintable::layout_box() 2025-10-10 09:03:39 +02:00
ViewportPaintable.cpp LibWeb: Apply own clip rect for background phase only when clip used 2025-11-19 18:17:42 +01:00
ViewportPaintable.h LibWeb: Move clip_frames from public to private in ViewportPaintable 2025-11-19 18:17:42 +01:00