[webkit-changes] [WebKit/WebKit] bc94fc: synthesizedBaseline uses incorrect line under edge...

Sammy Gill noreply at github.com
Mon Oct 23 14:36:38 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: bc94fc496ea98de389ed201f55ab2b4f089a0f7e
      https://github.com/WebKit/WebKit/commit/bc94fc496ea98de389ed201f55ab2b4f089a0f7e
  Author: Sammy Gill <sammy.gill at apple.com>
  Date:   2023-10-23 (Mon, 23 Oct 2023)

  Changed paths:
    M LayoutTests/TestExpectations
    A LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/baseline-synthesis-vert-lr-line-under-expected.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/baseline-synthesis-vert-lr-line-under.html
    M LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-container-baseline-001-expected.txt
    M Source/WebCore/rendering/RenderBox.cpp

  Log Message:
  -----------
  synthesizedBaseline uses incorrect line under edge for vertical-lr and sideways items
https://bugs.webkit.org/show_bug.cgi?id=263461
rdar://117273063

Reviewed by Alan Baradlay.

To synthesize a baseline, the spec says the following: "synthesize the
alphabetic baseline from the line-under line, and the central baseline
by averaging the positions of the two edges or lines."

When the writing mode is vertical-lr and text-orientation is sideways,
we must synthesize the alphabetic baseline. This means that the baseline
for the item in this writing-mode is its block-start and not the
block-end like in vertical-rl writing mode.

We can first determine the baseline that we are synthesizing according
to the logic in: https://drafts.csswg.org/css-inline-3/#dominant-baseline-property
If the baseline type is alphabetic and we are in a vertical-lr writing
mode according to the formatting context root, then we can return 0_lu
for the synthesized baseline.

* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/baseline-synthesis-vert-lr-line-under-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/baseline-synthesis-vert-lr-line-under.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-container-baseline-001-expected.txt:
* Source/WebCore/rendering/RenderBox.cpp:
 (WebCore::synthesizedBaseline):

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




More information about the webkit-changes mailing list