Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 273c6381a3c34fc7fcba99f7873a9f76145d9a2b
      
https://github.com/WebKit/WebKit/commit/273c6381a3c34fc7fcba99f7873a9f76145d9a2b
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-01-07 (Wed, 07 Jan 2026)

  Changed paths:
    A LayoutTests/fast/table/table-colspan-mixed-percent-fixed-auto-expected.txt
    A LayoutTests/fast/table/table-colspan-mixed-percent-fixed-auto.html
    M Source/WebCore/rendering/AutoTableLayout.cpp

  Log Message:
  -----------
  Table layout: Fix min-width distribution for spanning cells across mixed 
percent/auto columns
https://[email protected]/show_bug.cgi?id=305042
rdar://167684748

Reviewed by Alan Baradlay.

This patch undo some renering progressions from 305120@main where we shipped
correct rendering but it broke distribution and caused tables to be wide
in linked test case (in bugzilla - also converted to regression test case).

i.e., table was ~770 pixel instead of 602 but with correct rendering.

This patch will give us same rendering albeit incorrect as of shipping Safari,
although it does not negate our 305120@main fully and we still progress a lot
of test cases - which is right step to do.

When a spanning cell covers columns with a mix of percentages, fixed widths,
and auto widths, the distribution logic needs to account for fixed-width
columns separately. The new code path for distributing min/max widths based
on effective percentages should only apply when there are no fixed-width
columns in the span.

The fix adds a check for fixedWidth <= 0 to ensure the new distribution
logic only runs when the span contains only percent and auto columns, allowing
the existing else block to handle the mixed fixed+percent+auto case correctly.

* Source/WebCore/rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
* LayoutTests/fast/table/table-colspan-mixed-percent-fixed-auto-expected.txt: 
Added.
* LayoutTests/fast/table/table-colspan-mixed-percent-fixed-auto.html: Added.

^ So we don't regress it in future. It checks width (not rendering).

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



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

Reply via email to