Tables with vertical-lr writing-mode doesn't apply correctly vertical-align: baseline
authorjfernandez@igalia.com <jfernandez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Nov 2018 08:45:48 +0000 (08:45 +0000)
committerjfernandez@igalia.com <jfernandez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Nov 2018 08:45:48 +0000 (08:45 +0000)
commit6445ff73bbf312fff39a401a0da21892e9af8215
tree4926981015046a924481570dfc38c8816fe55549
parentb3fc956494fb2c5ac7deb4d8bf3eec0529b697b2
Tables with vertical-lr writing-mode doesn't apply correctly vertical-align: baseline
https://bugs.webkit.org/show_bug.cgi?id=191881

Reviewed by Manuel Rego Casasnovas.

Source/WebCore:

We should use the font's descent value when wriring-mode flips line flow (vertical-lr).

This change also fixes bug 170175, since Flexbox use the same code to determine the first
line baseline of a flex item.

Test: fast/writing-mode/vertical-align-table-baseline-latin.html

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::firstLineBaseline const):

LayoutTests:

Tests to verify that columns of a vertical-lr table vertically aligned by baseline work like
in the case of horizontal tables.
Also added tests to verify flexbox baseline alignment works as expected in vertical-lr mode.

The vertical-align-table-baseline.html test has been rebaselined due to the new behavior.

* fast/writing-mode/vertical-align-table-baseline-latin-expected.html: Added.
* fast/writing-mode/vertical-align-table-baseline-latin.html: Added.
* fast/writing-mode/vertical-align-flex-baseline-expected.html: Added.
* fast/writing-mode/vertical-align-flex-baseline-html: Added.
* platform/gtk/fast/writing-mode/vertical-align-table-baseline-expected.txt: Rebaseline.
* platform/gtk/fast/writing-mode/vertical-align-table-baseline-expected.png: Rebaseline.
* platform/win/fast/writing-mode/vertical-align-table-baseline-expected.txt: Rebaseline.
* platform/win/fast/writing-mode/vertical-align-table-baseline-expected.png: Rebaseline.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238441 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/writing-mode/vertical-align-flexbox-baseline-expected.html [new file with mode: 0644]
LayoutTests/fast/writing-mode/vertical-align-flexbox-baseline.html [new file with mode: 0644]
LayoutTests/fast/writing-mode/vertical-align-table-baseline-latin-expected.html [new file with mode: 0644]
LayoutTests/fast/writing-mode/vertical-align-table-baseline-latin.html [new file with mode: 0644]
LayoutTests/platform/gtk/fast/writing-mode/vertical-align-table-baseline-expected.png
LayoutTests/platform/gtk/fast/writing-mode/vertical-align-table-baseline-expected.txt
LayoutTests/platform/win/fast/writing-mode/vertical-align-table-baseline-expected.png
LayoutTests/platform/win/fast/writing-mode/vertical-align-table-baseline-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBlockFlow.cpp