Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b1286c345d237f025d733fae0bd38a4b4bdec004
      
https://github.com/WebKit/WebKit/commit/b1286c345d237f025d733fae0bd38a4b4bdec004
  Author: Sammy Gill <[email protected]>
  Date:   2026-07-13 (Mon, 13 Jul 2026)

  Changed paths:
    M Source/WebCore/inspector/InspectorOverlay.cpp
    M Source/WebCore/rendering/RenderGrid.cpp
    M Source/WebCore/rendering/RenderGrid.h
    M Source/WebCore/style/StyleExtractorCustom.h

  Log Message:
  -----------
  [Grid][Cleanup] Store resolved track listings separate from positions
https://bugs.webkit.org/show_bug.cgi?id=319134
rdar://problem/181952698

Reviewed by Alan Baradlay.

The resolved value of grid-template-columns / grid-template-rows for a grid
container is its used value: every track listed individually with its size
serialized as a length in pixels:
https://drafts.csswg.org/css-grid-2/#resolved-track-list.

We currently reverse engineer this value from the positions that were
computed during layout and then return it.

Instead, at the end of grid layout we can compute the values and store
them in a dedicated ResolvedTrackList struct that lives on the renderer.

One thing we also do is add an extra bit to keep track of whether this
value is stale or not. We mark this bit dirty at the beginning of layout
and assert that it is not stale whenever callers ask for it. One small
exception is that GFC does not set these values so we have to make sure
that we do not accidentally assert if we ran GFC. This will be fixed in
a follow up patch.

* Source/WebCore/inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::buildGridOverlay):
* Source/WebCore/style/StyleExtractorCustom.h:
(WebCore::Style::extractGridTemplateValue):
Some changes to make sure we get the value by reference in the above
functions so we don't make a copy when we don't need to.

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



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

Reply via email to