[webkit-changes] [WebKit/WebKit] e033f9: `input[type="range"]` handles inline-size incorrectly

Tim Nguyen noreply at github.com
Tue Jan 21 08:10:20 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e033f9b6245bb361ea48a705ec546044d2de6eea
      https://github.com/WebKit/WebKit/commit/e033f9b6245bb361ea48a705ec546044d2de6eea
  Author: Tim Nguyen <ntim at apple.com>
  Date:   2025-01-21 (Tue, 21 Jan 2025)

  Changed paths:
    A LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/forms/input-range-block-size-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/forms/input-range-block-size.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/forms/input-range-inline-size-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/forms/input-range-inline-size.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/forms/input-range-zero-inline-size-expected.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/forms/input-range-zero-inline-size-ref.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/forms/input-range-zero-inline-size.html
    M Source/WebCore/rendering/RenderSlider.cpp

  Log Message:
  -----------
  `input[type="range"]` handles inline-size incorrectly
https://bugs.webkit.org/show_bug.cgi?id=259602
rdar://113402515

Reviewed by Alan Baradlay.

There are two issues:
- width: 0; is not honored because there is a strict check against zero which is incorrect.
- `RenderSlider::computePreferredLogicalWidths` was using physical widths instead of logical widths.

Fix those issues to match the behavior in other browsers and add some WPT.

* LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/forms/input-range-block-size-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/forms/input-range-block-size.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/forms/input-range-inline-size-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/forms/input-range-inline-size.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/forms/input-range-zero-inline-size-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/forms/input-range-zero-inline-size-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/forms/input-range-zero-inline-size.html: Added.
* Source/WebCore/rendering/RenderSlider.cpp:
(WebCore::RenderSlider::computePreferredLogicalWidths):

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



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


More information about the webkit-changes mailing list