Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9ac5864122deab73a189bdecf30d7ade963e8a0c
      
https://github.com/WebKit/WebKit/commit/9ac5864122deab73a189bdecf30d7ade963e8a0c
  Author: Ahmad Saleem <[email protected]>
  Date:   2025-11-29 (Sat, 29 Nov 2025)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/table-client-props-expected.txt
    M Source/WebCore/dom/Element.cpp

  Log Message:
  -----------
  [CSSOM-View] Include padding for content-box tables in clientWidth/Height
https://bugs.webkit.org/show_bug.cgi?id=303223
rdar://165515755

Reviewed by Alan Baradlay.

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

According to the CSSOM View specification, Element::clientWidth() and
clientHeight() should report the visible content box including padding, but
excluding scrollbars and borders. See spec: [1] and [2].

For tables with box-sizing: content-box, WebKit previously omitted padding,
returning incorrect client geometry. This patch updates clientWidth() and
clientHeight() to add padding for such tables.

References:
[1] https://drafts.csswg.org/cssom-view/#dom-element-clientwidth
[2] https://drafts.csswg.org/cssom-view/#dom-element-clientheight

* Source/WebCore/dom/Element.cpp:
(WebCore::Element::clientWidth):
(WebCore::Element::clientHeight):
* 
LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/table-client-props-expected.txt:
 Progression

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



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

Reply via email to