Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ac57a872b056af7db2743f4845e83dfb5f014069
      
https://github.com/WebKit/WebKit/commit/ac57a872b056af7db2743f4845e83dfb5f014069
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-10-05 (Mon, 05 Oct 2026)

  Changed paths:
    M LayoutTests/TestExpectations
    M Source/WebCore/rendering/RenderBox.cpp

  Log Message:
  -----------
  box-sizing: content-box is ignored for percentage-height CSS tables (display: 
table)
https://bugs.webkit.org/show_bug.cgi?id=155919
rdar://122587242

Reviewed by Alan Baradlay.

This patch aligns WebKit with Gecko / Firefox and Blink / Chromium.

RenderBox::computePercentageLogicalHeightGeneric() unconditionally subtracted
border+padding from a table's resolved percentage height whenever 
isRenderTable()
was true, i.e. it always treated the percentage as a border-box value. That is
only correct for the <table> element (which the UA stylesheet gives
box-sizing: border-box); a CSS table (display: table) defaults to content-box 
and
must honor it.

Gate the subtraction on box-sizing being border-box (still forcing it for
HTMLTableElement, matching the fixed-height path in
RenderTable::convertStyleLogicalHeightToComputedHeight), so display: table boxes
with the default content-box no longer have their padding swallowed

* LayoutTests/TestExpectations: Progression
* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::computePercentageLogicalHeightGeneric const):

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



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

Reply via email to