Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 05312edae65cc510f2534e97e393e7f7d398c3e5
      
https://github.com/WebKit/WebKit/commit/05312edae65cc510f2534e97e393e7f7d398c3e5
  Author: Sammy Gill <[email protected]>
  Date:   2026-09-30 (Wed, 30 Sep 2026)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-item-first-line-001-expected.xht
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-item-first-line-001.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-item-first-line-002-expected.xht
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-item-first-line-002.html
    M Source/WebCore/layout/integration/LayoutIntegrationBoxTreeUpdater.cpp

  Log Message:
  -----------
  [GFC][Integration] Grid items ignore their ::first-line style
https://bugs.webkit.org/process_bug.cgi
rdar://problem/188830233

Reviewed by Alan Baradlay.

Currently the GFC integration code clones the grid item renderer's style
and stores it on any newly created layout boxes. One problem with this
was that there may have been an associated firstLineStyle on that
renderer that did not get set on the LayoutBox. As a result, any
first-line style that was set on the grid item would have no effect on
the associated IFC.

To fix this instead of cloning the style ourselves in the GFC
integration code we can reuse createLayoutBox which was already being
used for IFC.

Interestingly, if the content mutated the style in a way that changed
the first line style then that new style would end up being reflected.
This is due to code that was have in RenderElement::styleDidChange
that would update the style for any associated layout box via
LayoutIntegration::LineLayout::updateStyle.

Tests: 
imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-item-first-line-001.html
       
imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-item-first-line-002.html
       
imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-item-first-line-003.html

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



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

Reply via email to