Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When table cell have inline children which change writing-mode, the c…
…ell overflows its contents When table cell have inline children which change writing-mode, the cell overflows its contents https://bugs.webkit.org/show_bug.cgi?id=112897 Reviewed by Alan Bujtas. Inspired from - https://src.chromium.org/viewvc/blink?view=revision&revision=163239 When writing-mode is changed at block element, Blink thinks the logical height as preferred logical width. This is done at RenderBlockFlow::computeBlockPreferredLogicalWidths(). However, RenderBlockFlow::computeInlinePreferredLogicalWidths() doesn't check writing-mode, and just uses child's preferred logical width as preferred logical width. If the height of a child is bigger than its preferred width, this make the width of table cell narrower than its child. We should check writing-mode of inline block. If the writing-mode is changed, we must use child's logical height as preferred logical width. * Source/WebCore/rendering/RenderBlockFlow.cpp: (RenderBlockFlow::computeInlinePreferredLogicalWidths): Add logic for accounting for writing mode * LayoutTests/fast/writing-mode/table-vertical-child-width.html: Added Test Case * LayoutTests/fast/writing-mode/table-vertical-child-width-expected.html: Added Test Case Expectations Canonical link: https://commits.webkit.org/255919@main
- Loading branch information
Showing 3 changed files with 40 additions and 2 deletions.