Andreas Kling
492629e3d8
LibWeb: Don't resolve percentage heights against min-height
...
Per CSS 2.1 Section 10.5, percentage heights should only resolve when
the containing block's height is "specified explicitly". This means a
containing block with `height: auto` and `min-height: 50px` does NOT
provide a definite height for percentage resolution - the child's
`height: 100%` should be treated as `auto`.
Previously, we checked `available_space.height.is_indefinite()` to
determine if percentage heights should become auto. However, this
conflated "available layout space" with "containing block height for
percentage resolution" - these are distinct concepts.
Now we check the containing block's `has_definite_height()` flag, which
correctly reflects whether the containing block has an explicit height
property. This handles:
- Anonymous wrapper blocks (skip them to find real containing block)
- Quirks mode (has special percentage height handling)
- Absolutely positioned elements (excluded, different rules apply)
Also update `calculate_inner_height()` to use the containing block's
actual used height when resolving percentages with indefinite available
space, which fixes inline-block and similar cases.
2026-01-25 20:29:44 +01:00
..
2025-09-29 18:37:53 +02:00
2025-06-21 14:09:47 +02:00
2023-11-15 11:26:14 +01:00
2025-08-28 13:45:37 +02:00
2023-11-15 23:44:05 +01:00
2023-06-13 17:47:50 +02:00
2023-11-15 23:44:05 +01:00
2024-07-19 13:29:20 +01:00
2023-06-17 20:35:19 +02:00
2024-09-17 07:56:18 +02:00
2023-11-15 23:44:05 +01:00
2023-11-15 23:44:05 +01:00
2025-03-27 23:13:57 +00:00
2024-03-27 16:43:04 +01:00
2023-09-16 15:21:16 +02:00
2023-05-03 19:49:43 +02:00
2025-02-22 18:41:42 +01:00
2025-05-23 11:16:06 +02:00
2023-09-12 12:11:53 +02:00
2023-05-27 05:47:54 +02:00
2023-05-27 05:47:54 +02:00
2025-05-09 14:13:02 +02:00
2023-07-28 12:44:09 +02:00
2025-06-21 14:09:47 +02:00
2023-05-29 21:29:25 +02:00
2023-05-29 21:29:25 +02:00
2023-06-04 18:14:12 +02:00
2025-06-21 14:09:47 +02:00
2025-03-15 13:31:07 +01:00
2025-06-21 14:09:47 +02:00
2025-08-19 11:12:23 +02:00
2025-06-21 14:09:47 +02:00
2025-06-21 14:09:47 +02:00
2023-09-12 17:26:30 +02:00
2023-09-03 12:33:10 +02:00
2023-09-11 15:19:56 +02:00
2023-09-11 15:19:56 +02:00
2025-06-21 14:09:47 +02:00
2024-01-28 14:48:33 +01:00
2025-06-21 14:09:47 +02:00
2025-06-21 14:09:47 +02:00
2025-06-21 14:09:47 +02:00
2025-06-21 14:09:47 +02:00
2023-05-26 18:11:35 +02:00
2025-06-21 14:09:47 +02:00
2024-01-06 21:40:27 +01:00
2023-09-22 16:48:28 +02:00
2025-06-21 14:09:47 +02:00
2025-06-21 14:09:47 +02:00
2023-07-02 18:43:20 +02:00
2025-04-01 16:02:53 +02:00
2025-04-01 16:02:53 +02:00
2025-03-27 17:21:56 +00:00
2025-04-23 13:24:58 +02:00
2025-03-27 00:56:56 +00:00
2025-05-27 17:31:47 +02:00
2025-03-26 19:35:38 +00:00
2025-03-27 10:56:13 +00:00
2025-04-04 15:35:26 +02:00
2025-04-01 15:26:12 +02:00
2025-06-21 14:09:47 +02:00
2025-06-21 14:09:47 +02:00
2024-07-10 17:41:18 +02:00
2025-06-21 14:09:47 +02:00
2025-06-21 14:09:47 +02:00
2025-05-27 17:31:47 +02:00
2023-09-09 17:05:22 +02:00
2025-05-23 10:58:15 +02:00
2025-03-31 08:11:10 +01:00
2025-03-27 10:56:13 +00:00
2025-06-21 14:09:47 +02:00
2025-04-24 19:12:50 +02:00
2025-07-28 12:11:56 +02:00
2025-04-11 02:34:28 +01:00
2024-09-18 15:49:40 +02:00
2025-06-21 14:09:47 +02:00
2023-09-12 12:11:53 +02:00
2025-06-21 14:09:47 +02:00
2023-09-22 16:48:28 +02:00
2023-08-31 21:43:58 +02:00
2025-06-21 14:09:47 +02:00
2025-07-14 11:16:13 +02:00
2025-06-21 14:09:47 +02:00
2025-06-21 14:09:47 +02:00
2023-10-16 21:44:48 +02:00
2025-10-27 21:45:33 -07:00
2025-06-20 19:59:32 +02:00
2023-08-18 05:08:52 +02:00
2024-08-26 15:49:07 +02:00
2023-07-15 12:30:07 +02:00
2023-12-10 11:09:22 +01:00
2023-12-10 11:09:22 +01:00
2023-07-16 15:00:30 +02:00
2025-06-21 14:09:47 +02:00
2025-06-21 14:09:47 +02:00
2025-06-21 14:09:47 +02:00
2024-09-21 01:55:43 +02:00
2023-10-11 07:05:23 +02:00
2025-10-20 12:37:25 +01:00
2026-01-14 13:52:22 +01:00
2023-05-02 18:50:26 +02:00
2024-01-20 23:29:51 +01:00
2023-08-26 19:07:56 +02:00
2025-06-21 14:09:47 +02:00
2025-06-21 14:09:47 +02:00
2025-06-21 14:09:47 +02:00
2025-06-21 14:09:47 +02:00
2023-04-27 07:52:12 +02:00
2023-05-22 12:51:24 +02:00
2025-09-08 14:09:06 +02:00
2025-09-08 14:09:06 +02:00
2023-05-19 15:09:09 +02:00
2023-06-06 21:02:04 +02:00
2023-06-07 11:20:42 +02:00
2023-08-02 05:27:56 +02:00
2023-07-12 11:44:57 +02:00
2025-03-28 02:13:41 +00:00
2023-05-05 10:01:28 +02:00
2023-05-05 06:20:44 +02:00
2023-10-29 19:35:02 +01:00
2023-12-26 16:24:51 +01:00
2023-08-05 09:25:24 +02:00
2025-06-21 14:09:47 +02:00
2025-05-16 20:33:27 +02:00
2025-08-24 21:00:08 +02:00
2024-07-06 10:02:29 +02:00
2025-03-21 14:46:31 -05:00
2025-06-21 14:09:47 +02:00
2025-06-21 14:09:47 +02:00
2026-01-25 20:29:44 +01:00
2023-06-18 20:29:40 +02:00
2023-06-18 20:29:40 +02:00
2023-07-01 09:06:49 +02:00
2023-07-06 14:25:40 +01:00
2023-07-04 06:43:53 +02:00
2023-07-04 06:43:53 +02:00
2025-06-21 14:09:47 +02:00
2025-06-21 14:09:47 +02:00
2025-06-21 14:09:47 +02:00
2023-08-30 20:09:15 +02:00
2025-07-23 19:52:59 +02:00
2023-05-05 13:26:41 +02:00