Sam Atkins
b65ccb4dc6
LibWeb: Introduce color-function-specific style values
...
Instead of CSSColorValue holding a Gfx::Color, make it an abstract class
with subclasses for each different color function, to match the Typed-OM
spec. This means moving the color calculations from the parsing code to
the `to_color()` method on the style value.
This lets us have calc() inside a color function, instead of having to
fully resolve the color at parse time. The canvas fillStyle tests have
been updated to reflect this.
The other test change is Screenshot/css-color-functions.html: previously
we produced slightly different colors for an alpha of 0.5 and one of
50%, and this incorrect behavior was baked into the test. So now it's
more correct. :^)
(cherry picked from commit 3af6a69f1e13803c64466a9b24b7bd7d75d459df;
amended to:
* resolve a minor conflict in Parser.cpp due to upstream not having
https://github.com/LadybirdBrowser/ladybird/pull/385#issuecomment-2227130015
* rebaseline canvas-fillstyle-rgb.png since the diff didn't apply due to
us not having https://github.com/LadybirdBrowser/ladybird/pull/999
* remove css-color-functions-ref.png and instead update
css-color-functions-ref.html since that file is still a reftest due to us
not having https://github.com/LadybirdBrowser/ladybird/pull/736
Makes it much easier to see what actually changed.
)
2024-10-11 10:12:33 -04:00
..
2024-10-11 10:12:33 -04:00
2024-04-04 21:00:40 +02:00
2024-10-11 09:27:42 -04:00
2024-07-28 14:13:20 -04:00
2024-02-24 08:09:01 +01:00
2023-10-29 21:44:53 +01:00
2024-07-23 13:06:46 -04:00
2024-07-28 07:29:31 -04:00
2024-07-01 23:03:47 +02:00
2024-03-05 15:43:17 +01:00
2024-10-11 09:27:51 -04:00
2024-03-22 12:13:59 +01:00
2024-03-12 16:30:39 +01:00
2023-11-20 20:50:53 +01:00
2024-04-21 12:41:36 +02:00
2024-04-03 07:55:51 +02:00
2024-02-20 10:55:10 +01:00
2024-07-28 07:33:15 -04:00
2024-07-15 09:05:07 -04:00
2024-07-22 18:27:26 -04:00
2024-07-16 15:04:06 -04:00
2024-05-13 09:21:12 +02:00
2024-03-30 21:21:23 +01:00
2024-06-27 14:49:14 +02:00
2024-05-28 08:06:09 +02:00
2024-07-28 20:48:58 -04:00
2024-05-04 14:11:10 +02:00
2024-07-28 07:30:38 -04:00
2024-04-19 11:44:32 +02:00
2024-03-20 15:18:44 -04:00
2024-03-12 09:31:41 +01:00
2024-03-12 09:31:41 +01:00
2024-07-29 09:14:06 -04:00
2024-01-12 15:04:06 +01:00
2023-06-06 09:06:27 +02:00
2023-08-21 13:51:12 +02:00
2023-07-17 14:53:52 +01:00
2024-03-10 00:39:49 +01:00
2023-11-11 08:54:37 +01:00
2024-02-14 22:20:44 -05:00
2024-01-10 23:26:40 +01:00
2024-04-08 14:25:36 +02:00
2024-03-08 16:31:21 +01:00
2024-02-15 22:51:15 -05:00
2024-02-15 22:51:15 -05:00
2024-05-16 20:31:23 +02:00
2024-03-07 00:28:29 +01:00
2024-03-17 13:32:04 +01:00
2024-01-30 14:50:25 +01:00
2024-02-29 21:54:53 -05:00
2024-04-23 11:00:35 +02:00
2024-05-07 17:21:52 -06:00
2024-07-22 18:27:26 -04:00
2024-07-28 13:17:47 -04:00
2023-08-28 10:19:46 +02:00
2024-04-25 09:31:01 +02:00
2023-12-10 08:07:41 -05:00
2024-02-24 00:19:55 +01:00
2024-02-25 10:17:25 +01:00
2024-02-16 17:21:48 -05:00
2024-02-16 17:21:48 -05:00
2024-04-24 18:04:28 +02:00
2024-01-12 15:04:06 +01:00
2024-02-25 12:55:30 +01:00
2023-12-23 20:53:11 +01:00
2023-07-03 11:50:58 +02:00
2024-04-16 07:41:33 +02:00
2024-04-17 07:12:44 +02:00
2023-09-05 20:36:09 -04:00
2024-04-18 08:10:05 +00:00
2023-12-04 01:33:57 +01:00
2023-12-04 01:33:57 +01:00
2023-12-04 01:33:57 +01:00
2023-12-02 10:34:22 +01:00
2024-01-06 09:59:30 -07:00
2023-08-26 13:51:18 +02:00
2024-03-16 08:42:33 +01:00
2024-03-14 10:10:33 +01:00
2024-02-19 11:07:30 +01:00
2024-03-03 10:02:30 -05:00
2023-12-07 16:46:28 -05:00
2024-02-27 18:03:20 -05:00
2024-06-27 19:02:45 +02:00
2023-08-06 15:26:34 +02:00
2024-03-03 19:50:25 +01:00
2024-03-06 07:45:56 +01:00
2024-06-27 14:49:29 +02:00
2023-06-11 06:05:03 +02:00
2023-06-06 09:06:27 +02:00
2023-06-06 09:06:27 +02:00
2023-08-14 16:26:34 +02:00
2023-10-31 18:09:14 +01:00
2024-04-26 20:02:42 +02:00
2024-07-13 22:03:32 -04:00
2024-04-16 13:47:38 +02:00
2023-12-09 21:50:17 +01:00
2024-03-17 12:54:02 +01:00
2024-04-13 12:07:33 +02:00
2023-08-21 13:51:12 +02:00
2023-08-26 13:51:18 +02:00
2024-03-29 06:59:37 +01:00
2024-02-22 07:35:30 +01:00
2024-02-06 08:39:06 +01:00
2023-08-21 13:51:12 +02:00
2024-07-13 21:52:51 -04:00
2023-09-15 08:52:25 +02:00
2024-05-19 07:22:17 +02:00
2024-01-12 15:04:06 +01:00
2024-01-12 15:04:06 +01:00
2023-11-23 13:06:48 +01:00
2024-01-12 15:04:06 +01:00
2024-04-18 12:27:24 +02:00
2024-07-21 11:29:07 -04:00
2024-07-28 12:59:58 -04:00
2024-07-21 14:07:57 -04:00
2024-02-25 10:17:25 +01:00
2024-07-14 16:46:23 -04:00
2023-09-15 08:53:21 +02:00
2023-09-26 19:42:59 +02:00
2023-09-26 19:42:59 +02:00
2023-08-01 09:19:41 +02:00
2024-03-09 16:13:32 +01:00
2024-03-09 16:13:32 +01:00
2024-02-14 22:20:44 -05:00
2024-03-11 18:29:10 +01:00
2024-03-03 10:02:30 -05:00
2024-02-27 18:03:20 -05:00
2024-03-16 13:11:57 +01:00
2024-03-16 13:11:57 +01:00
2024-03-29 08:52:01 -04:00
2023-12-02 10:35:43 +01:00
2023-06-08 10:05:56 +02:00
2024-03-23 13:45:35 +01:00
2024-01-18 23:10:56 +01:00
2024-04-26 09:49:11 +02:00
2024-03-17 09:33:16 +01:00
2024-02-29 13:18:57 +01:00
2024-02-24 08:05:55 +01:00
2023-07-25 15:45:44 +02:00
2023-07-11 00:14:50 +02:00
2024-01-19 09:16:54 +01:00
2023-12-24 23:22:35 +01:00