Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: dc59d6076359c9f99233d4a9d3a9b63aafd75c7d
      
https://github.com/WebKit/WebKit/commit/dc59d6076359c9f99233d4a9d3a9b63aafd75c7d
  Author: Anuj Panta <[email protected]>
  Date:   2026-05-08 (Fri, 08 May 2026)

  Changed paths:
    A 
LayoutTests/fast/forms/number/number-field-sizing-content-placeholder-expected.html
    A LayoutTests/fast/forms/number/number-field-sizing-content-placeholder.html
    M 
LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/field-sizing-input-text-expected.txt
    M Source/WebCore/rendering/RenderTextControl.cpp

  Log Message:
  -----------
  CSS `field-sizing: content` clips the placeholder value on a number input
https://bugs.webkit.org/show_bug.cgi?id=314214
rdar://175883299

Reviewed by Alan Baradlay.

The placeholder and the decoration-bearing container (inner-text + spin
button) are siblings in the UA shadow tree. Block-flow intrinsic width
takes the max across siblings, so when the placeholder is wider than the
empty inner-text, the control sizes to the placeholder alone — leaving
no room for the spin button. The spinner then paints over the
placeholder text, clipping it.

After the block-flow computation, grow the intrinsic width to fit
placeholder + decorationWidth so both can coexist.

Test: fast/forms/number/number-field-sizing-content-placeholder.html

* 
LayoutTests/fast/forms/number/number-field-sizing-content-placeholder-expected.html:
 Added.
* LayoutTests/fast/forms/number/number-field-sizing-content-placeholder.html: 
Added.
* 
LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/field-sizing-input-text-expected.txt:
* Source/WebCore/rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::computeIntrinsicLogicalWidths const):

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



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

Reply via email to