Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3113b23fc2f96885d2e4d331a642c64f2004efe2
      
https://github.com/WebKit/WebKit/commit/3113b23fc2f96885d2e4d331a642c64f2004efe2
  Author: Anne van Kesteren <[email protected]>
  Date:   2026-09-23 (Wed, 23 Sep 2026)

  Changed paths:
    A 
LayoutTests/fast/forms/select/base/select-box-type-follows-preferred-size-expected.txt
    A 
LayoutTests/fast/forms/select/base/select-box-type-follows-preferred-size.html
    M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
    M Source/WebCore/html/HTMLOptGroupElement.cpp
    M Source/WebCore/html/HTMLOptionElement.cpp
    M Source/WebCore/html/HTMLSelectElement.cpp
    M Source/WebCore/html/HTMLSelectElement.h
    M Source/WebCore/rendering/updating/RenderTreeBuilderFormControls.cpp
    M Source/WebCore/style/StyleTreeResolver.cpp

  Log Message:
  -----------
  appearance: base-select should pick the box type from the preferred size
https://bugs.webkit.org/show_bug.cgi?id=324831

Reviewed by Ryosuke Niwa.

Preparation for the base appearance list box and multi-select dropdown box. 
With base
appearance the preferred size decides the box type rather than the multiple
attribute: 1 is a dropdown box and anything larger is a list box, whether or not
multiple is present. Natively multiple still decides, so boxType() falls back to
usesMenuList() without the preference, which makes every call site below answer
exactly as it did before.

usesMenuList() keeps its attribute-only meaning of "native dropdown box". It 
still
backs :-internal-uses-menulist, and scrollToSelection(), showPopup() and 
hostWindow()
still ask it, because those are about the native control rather than the box 
type.

Style invalidation for the multiple attribute follows the box type now. It used 
to
follow usesMenuList(), which never changes on iOS, so with the preference on 
toggling
multiple would have moved the preferred size between 1 and 4 without rebuilding 
the
renderer.

The preference is unstable and off by default. With it on the box type is 
chosen but
nothing else is in place yet, so a base appearance list box is still a 
RenderListBox
rather than laying its options out inline.

Test: fast/forms/select/base/select-box-type-follows-preferred-size.html
Canonical link: https://commits.webkit.org/321675@main



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

Reply via email to