[webkit-changes] [WebKit/WebKit] 1612e7: [IFC] Incorrect decorating box position in vertica...

Alan Baradlay noreply at github.com
Tue Apr 11 19:46:58 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1612e71a59048f783dcdc099c0a319223a41f76d
      https://github.com/WebKit/WebKit/commit/1612e71a59048f783dcdc099c0a319223a41f76d
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2023-04-11 (Tue, 11 Apr 2023)

  Changed paths:
    M LayoutTests/TestExpectations
    A LayoutTests/fast/inline/aligned-inline-box-decoration-in-vertical-writing-mode-expected.html
    A LayoutTests/fast/inline/aligned-inline-box-decoration-in-vertical-writing-mode.html
    M Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.h
    M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp

  Log Message:
  -----------
  [IFC] Incorrect decorating box position in vertical writing mode
https://bugs.webkit.org/show_bug.cgi?id=255256

Reviewed by Antti Koivisto.

Incorrect bidi logic found its way in to non-bidi layout at 247113 at main. Classic case of flipping coords twice incorrectly gets you the correct result in most cases.
This patch fixes them both.
1. When converting incoming visual geometry to logical we need to differentiate root box from participating inline level boxes.
e.g. a participating box's (visual) padding right always stretches the box to the logical top direction, while the root's padding right can either be a logical top or bottom constraint depending on the direction.
2. Always use line box's relative geometry flipping for inline content.

* LayoutTests/TestExpectations: These never worked (we were just lucky)
* LayoutTests/fast/inline/aligned-inline-box-decoration-in-vertical-writing-mode-expected.html: Added.
* LayoutTests/fast/inline/aligned-inline-box-decoration-in-vertical-writing-mode.html: Added.
* Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:
(WebCore::Layout::InlineDisplayContentBuilder::processNonBidiContent):
(WebCore::Layout::InlineDisplayContentBuilder::adjustVisualGeometryForDisplayBox):

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




More information about the webkit-changes mailing list