servo/components
Martin Robinson aa073c3dca
layout: Implement support for line-height and vertical-align (#30902)
* layout: Implement support for `line-height` and `vertical-align`

This is an initial implementation of proper `line-height` and
`vertical-align` support. While this change includes the bulk of the
work there are still many missing pieces for full support. In particular
some big missing things are:

 - Flex containers do not properly compute their baselines. The idea is
   to tackle this in a followup change. This causes various flex tests
   to start failing because everything used to be top aligned.
 - The implementation of the line-height quirks (only active in quirks
   mode) are incomplete. While the quirk works in many cases, there are
   still some cases where it is handled incorrectly. This requires more
   redesign and refinement, better suited for a followup.
 - Most of the features are CSS 3 such as precision control of the
   baseline and first and last baselines are not implemented. This
   change gets us close to CSS 2.x support.

While there are many new test passes with this change some tests are
starting to fail. An accounting of new failures:

Tests failing also in Layout 2013:
 - /css/css2/positioning/toogle-abspos-on-relpos-inline-child.html (only passes in Chrome)
 - /css/CSS2/fonts/font-applies-to-001.xht (potentially an issue with font size)

Invalid tests:
 - /css/CSS2/visudet/inline-block-baseline-003.xht
 - /css/CSS2/visudet/inline-block-baseline-004.xht
 - These are are failing in all browsers. See https://bugs.chromium.org/p/chromium/issues/detail?id=1222151.

Missing table support:
 - /_mozilla/mozilla/table_valign_middle.html

Missing `font-size-adjust` support :
 - /css/css-fonts/font-size-adjust-zero-2.html (also failing in 2013)

Incomplete form field support :
- /html/rendering/widgets/the-select-element/option-add-label-quirks.html (label isn't rendered so button isn't the right size in quirks mode due to line height quirk)

Need support for calculating flexbox baseline:
 - /css/css-flexbox/fieldset-baseline-alignment.html
 - /css/css-flexbox/flex-inline.html
 - /css/css-flexbox/flexbox-baseline-multi-line-horiz-001.html
 - /css/css-flexbox/flexbox-baseline-single-item-001a.html
 - /css/css-flexbox/flexbox-baseline-single-item-001b.html

Failing because we don't create anonymous inline boxes for text children of blocks:
- /css/CSS2/linebox/anonymous-inline-inherit-001.html

Passes locally (potentially related to fonts):
 - /css/CSS2/css1/c414-flt-fit-004.xht
 - /css/css-transforms/transform-input-017.html
 - /html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-min-intrinsic-size.html
 - /css/css-fonts/first-available-font-005.html
 - /css/css-fonts/first-available-font-006.html

* Some cleanups after live review with @mukilan

Also update results.
2024-01-08 14:49:50 +00:00
..
allocator Unfork and upgrade jemallocator (#30963) 2024-01-01 19:32:45 +00:00
atoms Further changes required by Servo 2023-11-06 09:35:57 +01:00
background_hang_monitor bhm: Fix a warning in the Linux sampler (#30924) 2023-12-28 11:20:47 +00:00
bluetooth Move *_traits and other shared types to shared 2023-11-03 15:38:18 +00:00
canvas Further changes required by Servo 2023-11-21 15:36:35 +01:00
compositing Add initial support for offscreen rendering (#30767) 2023-12-13 02:49:25 +00:00
config Add initial support for table box tree construction (#30799) 2023-12-05 11:10:45 +00:00
config_plugins Remove use of proc_macro_diagnostics feature (#30745) 2023-11-17 10:36:09 +00:00
constellation These changes fix #30843 (#30888) 2023-12-20 05:57:48 +00:00
deny_public_fields Strict import formatting (grouping and granularity) (#30325) 2023-09-11 19:16:54 +00:00
derive_common Further changes required by Servo 2023-11-24 08:57:14 +01:00
devtools Replace time with std::time in components/devtools (#30927) 2024-01-03 16:52:04 +00:00
dom_struct Replace script_plugins with a clippy like rustc driver (named crown) (#30508) 2023-12-01 15:50:52 +00:00
domobject_derive Strict import formatting (grouping and granularity) (#30325) 2023-09-11 19:16:54 +00:00
geometry Strict import formatting (grouping and granularity) (#30325) 2023-09-11 19:16:54 +00:00
gfx layout: Implement support for line-height and vertical-align (#30902) 2024-01-08 14:49:50 +00:00
hyper_serde Integrate hyper_serde into Servo source (#30803) 2023-12-14 11:43:10 +00:00
jstraceable_derive Update to syn 2 where possible (#30387) 2023-09-19 15:57:37 +00:00
layout Add support for table fixups (#30868) 2023-12-22 12:11:58 +00:00
layout_2020 layout: Implement support for line-height and vertical-align (#30902) 2024-01-08 14:49:50 +00:00
layout_thread Compile Servo with the latest version of rust stable (#30831) 2023-12-06 17:36:07 +00:00
layout_thread_2020 Compile Servo with the latest version of rust stable (#30831) 2023-12-06 17:36:07 +00:00
malloc_size_of style: Rustfmt servo/. r=zrhoffman 2023-11-24 08:57:14 +01:00
media Move *_traits and other shared types to shared 2023-11-03 15:38:18 +00:00
metrics Move *_traits and other shared types to shared 2023-11-03 15:38:18 +00:00
net Replace time with std::time in components/devtools (#30927) 2024-01-03 16:52:04 +00:00
pixels Strict import formatting (grouping and granularity) (#30325) 2023-09-11 19:16:54 +00:00
profile Unfork and upgrade jemallocator (#30963) 2024-01-01 19:32:45 +00:00
rand Strict import formatting (grouping and granularity) (#30325) 2023-09-11 19:16:54 +00:00
range Strict import formatting (grouping and granularity) (#30325) 2023-09-11 19:16:54 +00:00
remutex Strict import formatting (grouping and granularity) (#30325) 2023-09-11 19:16:54 +00:00
script Upgrade media / GStreamer / GLib (#30750) 2024-01-05 08:01:58 +00:00
selectors Further changes required by Servo 2023-11-24 08:57:14 +01:00
servo Upgrade media / GStreamer / GLib (#30750) 2024-01-05 08:01:58 +00:00
servo_arc style: Rustfmt servo/. r=zrhoffman 2023-11-24 08:57:14 +01:00
shared Replace time with std::time in components/devtools (#30927) 2024-01-03 16:52:04 +00:00
size_of_test Further changes required by Servo 2023-08-16 17:46:41 +02:00
style layout: Implement support for line-height and vertical-align (#30902) 2024-01-08 14:49:50 +00:00
style_derive Further changes required by Servo 2023-11-24 08:57:14 +01:00
style_traits style: Remove viewport rule code 2023-11-24 08:57:14 +01:00
to_shmem style: Rustfmt servo/. r=zrhoffman 2023-11-24 08:57:14 +01:00
to_shmem_derive Further changes required by Servo 2023-11-24 08:57:14 +01:00
url Strict import formatting (grouping and granularity) (#30325) 2023-09-11 19:16:54 +00:00
webdriver_server Move *_traits and other shared types to shared 2023-11-03 15:38:18 +00:00
webgpu WebGPU: always send exit message to script before exiting (#30989) 2024-01-03 17:19:50 +00:00
webrender_surfman Strict import formatting (grouping and granularity) (#30325) 2023-09-11 19:16:54 +00:00