Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2967511185676aaa332f76507b2e1813f67f235d
      
https://github.com/WebKit/WebKit/commit/2967511185676aaa332f76507b2e1813f67f235d
  Author: Alan Baradlay <[email protected]>
  Date:   2026-05-04 (Mon, 04 May 2026)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-align/blocks/align-content-block-in-inline-001-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-align/blocks/align-content-block-in-inline-001-ref.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-align/blocks/align-content-block-in-inline-001.html
    M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp

  Log Message:
  -----------
  [block-in-inline] mercedes-benz.com: `arrow` next to text in menu drop-down 
is not on same baseline
https://bugs.webkit.org/show_bug.cgi?id=313879

Reviewed by Antti Koivisto.

When a block container has align-content: center, WebKit shifts all line
positions down so content appears centered vertically. This works by calling
shiftLinesByInBlockDirection, which moves line boxes and also updates the
actual render position of atomic inline boxes (like images or inline-blocks).

But it did not update block-level boxes that appear inside inline elements
(the "block-in-inline" case, like <span><div>X</div></span>). The display
box position in the inline content tree was shifted correctly, but the
RenderBox position -- which is what painting uses -- stayed at (0,0). So the
content appeared at the top instead of centered.

The fix adds block-level boxes to the same condition that already handles
atomic inline boxes, so their renderer position gets shifted too.

Tests: 
imported/w3c/web-platform-tests/css/css-align/blocks/align-content-block-in-inline-001.html

* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::shiftLinesByInBlockDirection):

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



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

Reply via email to