Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a05bfdbb6e9dd7af6c98eda21729514cbe479e39
      
https://github.com/WebKit/WebKit/commit/a05bfdbb6e9dd7af6c98eda21729514cbe479e39
  Author: Alan Baradlay <[email protected]>
  Date:   2026-09-14 (Mon, 14 Sep 2026)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-tables/caption-orthogonal-margin-in-table-block-axis-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-tables/caption-orthogonal-margin-in-table-block-axis.html
    M Source/WebCore/rendering/RenderTable.cpp

  Log Message:
  -----------
  [Table] Orthogonal caption's margins are missing from the table
https://bugs.webkit.org/show_bug.cgi?id=323897
<rdar://problem/187137359>

Reviewed by Antti Koivisto.

A caption takes up its own size plus its margins along the table's block axis, 
and the caption may
be written in a different mode than the table, so both have to be measured in 
the table's writing
mode. layoutCaption() converted the size but asked the caption for 
marginBefore() and marginAfter()
in the caption's own mode, and sumCaptionsLogicalHeight(), layoutBlock() and
adjustBorderBoxRectForPainting() converted neither, so a vertical-rl table with 
a horizontal-tb
caption reserved the caption's 10px top and bottom margins instead of its 40px 
left and right ones
and came out 60px short. Measure both through one captionLogicalHeight() helper 
that takes the
table's writing mode.

Test: 
imported/w3c/web-platform-tests/css/css-tables/caption-orthogonal-margin-in-table-block-axis.html

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-tables/caption-orthogonal-margin-in-table-block-axis-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-tables/caption-orthogonal-margin-in-table-block-axis.html:
 Added.
* Source/WebCore/rendering/RenderTable.cpp:
(WebCore::captionLogicalHeight):
(WebCore::RenderTable::layoutCaption):
(WebCore::RenderTable::sumCaptionsLogicalHeight):
(WebCore::RenderTable::layoutBlock):
(WebCore::RenderTable::adjustBorderBoxRectForPainting):

Canonical link: https://commits.webkit.org/321056@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to