From b0d7eaf526659be48d6274bef3b55d31c96c9d74 Mon Sep 17 00:00:00 2001 From: Oriol Brufau Date: Thu, 9 Jan 2025 05:26:03 -0800 Subject: [PATCH] layout: Minor tweaks for table layout (#34921) - Fix a typo in a comment. - Get the writing mode of the table in a less convoluted way. - Check `is_horizontal()` instead of `!is_vertical()` Signed-off-by: Oriol Brufau --- components/layout_2020/table/layout.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/layout_2020/table/layout.rs b/components/layout_2020/table/layout.rs index 32241ef4ef5..3f5b7fc2082 100644 --- a/components/layout_2020/table/layout.rs +++ b/components/layout_2020/table/layout.rs @@ -2101,14 +2101,14 @@ impl<'a> TableLayout<'a> { // // This rectangle is an offset between the row fragment and the other table // part rectangle (row group, column, column group). Everything between them - // is laid out in a left-to-right fashion, but respecting the veritcality of + // is laid out in a left-to-right fashion, but respecting the verticality of // the writing mode. This is why below, only the axes are flipped, but the // rectangle is not flipped for RTL. let make_relative_to_row_start = |mut rect: LogicalRect| { rect.start_corner -= row_fragment_layout.rect.start_corner; - let writing_mode = row_fragment_layout.containing_block.style.writing_mode; + let writing_mode = self.table.style.writing_mode; PhysicalRect::new( - if !writing_mode.is_vertical() { + if writing_mode.is_horizontal() { PhysicalPoint::new(rect.start_corner.inline, rect.start_corner.block) } else { PhysicalPoint::new(rect.start_corner.block, rect.start_corner.inline)