ladybird/Tests
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
..
AK AK: Avoid copying the iterable container in AK::enumerate 2025-11-18 13:31:52 +01:00
ClangPlugins Tests: Test that unvisited Templated members are caught by ClangPlugin 2025-08-23 21:21:04 +02:00
LibCompress CMake: Rename serenity_* helper functions/macros to ladybird_* 2025-07-03 23:19:41 +02:00
LibCore Tests: Enable ThreadedPromise tests on Windows 2025-10-22 17:32:45 -05:00
LibCrypto LibCrypto: SHA3 hashing algorithm 2025-11-26 22:01:00 -05:00
LibDiff CMake: Rename serenity_* helper functions/macros to ladybird_* 2025-07-03 23:19:41 +02:00
LibDNS Meta+RequestServer: Remove local download of ca-certificates 2025-07-07 09:10:05 +02:00
LibGC LibGC+LibWeb+LibJS: Remove workaround for Swift boolean bitfield issue 2025-04-04 13:06:53 -06:00
LibGfx Everywhere: Unify naming of RGBA-like colors 2025-11-28 18:32:48 +01:00
LibHTTP LibHTTP+LibWeb+RequestServer: Move Fetch's HTTP header infra to LibHTTP 2025-11-27 14:57:29 +01:00
LibJS LibJS: Have JS::Lexer take a JS::SourceCode as input 2025-11-09 12:14:03 +01:00
LibMedia Tests: Wait for PulseAudio context destruction in TestPlaybackStream 2025-11-25 13:13:32 -06:00
LibRegex LibRegex: Account for nested 'or' compare ops 2025-11-01 17:49:57 +01:00
LibTest CMake: Rename serenity_* helper functions/macros to ladybird_* 2025-07-03 23:19:41 +02:00
LibTextCodec CMake: Rename serenity_* helper functions/macros to ladybird_* 2025-07-03 23:19:41 +02:00
LibThreading CMake: Rename serenity_* helper functions/macros to ladybird_* 2025-07-03 23:19:41 +02:00
LibTLS Tests/LibTLS: Enable TestTLSHandshake in Windows CI 2025-08-23 18:35:45 -06:00
LibUnicode LibJS+LibUnicode: Port Intl.DisplayNames to UTF-16 strings 2025-07-24 10:39:52 +02:00
LibURL Tests: Add some basic public suffix tests 2025-10-23 15:01:13 +02:00
LibWasm LibWasm+LibWeb: Stub wasm-gc's heap reference types 2025-10-15 01:26:29 +02:00
LibWeb LibWeb: Prefer transitioned property values over important 2025-11-28 16:15:49 +00:00
LibWebView LibWebView: Add a bit of explicit handling for "localhost:port" URLs 2025-11-08 11:14:44 -05:00
LibXML CMake: Rename serenity_* helper functions/macros to ladybird_* 2025-07-03 23:19:41 +02:00
Resources Tests: Annotate configurationJSON in SwiftTestMain with noisolate 2024-11-26 11:00:48 +01:00
CMakeLists.txt LibHTTP+LibWeb+RequestServer: Move Fetch's HTTP header infra to LibHTTP 2025-11-27 14:57:29 +01:00