[webkit-changes] [WebKit/WebKit] 6e4ae0: [iOS] Render <hr>-in-<select> as separator

Aditya Keerthi noreply at github.com
Mon Nov 6 15:24:14 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6e4ae062086ea05880c62c7313096daba801b4d5
      https://github.com/WebKit/WebKit/commit/6e4ae062086ea05880c62c7313096daba801b4d5
  Author: Aditya Keerthi <akeerthi at apple.com>
  Date:   2023-11-06 (Mon, 06 Nov 2023)

  Changed paths:
    A LayoutTests/fast/forms/ios/select-multiple-options-with-hr-expected.txt
    A LayoutTests/fast/forms/ios/select-multiple-options-with-hr.html
    A LayoutTests/fast/forms/ios/select-options-with-hr-expected.txt
    A LayoutTests/fast/forms/ios/select-options-with-hr.html
    M Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm

  Log Message:
  -----------
  [iOS] Render <hr>-in-<select> as separator
https://bugs.webkit.org/show_bug.cgi?id=264232
rdar://108783915

Reviewed by Wenson Hsieh.

263624 at main added support for <hr>-in-<select> at a parser level. macOS has
long supporting rendering a separator in this scenario but iOS does not.

Render a separator when an <hr> is encountered by adding an empty group to the
data model sent to the UI process. UIKit only supports showing a separator when
using sub-menus with `UIMenuOptionsDisplayInline`. Since this is the default
option used for <optgroup>s in WebKit, an empty group is all that's needed to
display a separator.

It is not possible to test the appearance of the native picker, but tests that
verify selection still works as expected in this scenario have been added.

* LayoutTests/fast/forms/ios/select-multiple-options-with-hr-expected.txt: Added.
* LayoutTests/fast/forms/ios/select-multiple-options-with-hr.html: Added.
* LayoutTests/fast/forms/ios/select-options-with-hr-expected.txt: Added.
* LayoutTests/fast/forms/ios/select-options-with-hr.html: Added.
* Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::focusedElementInformation):

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




More information about the webkit-changes mailing list