[webkit-changes] [WebKit/WebKit] a232aa: [iOS] <option> label attribute is not rendered

Aditya Keerthi noreply at github.com
Thu May 18 21:43:01 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a232aa69a5c61fab67aa22472c48df37ba6e038b
      https://github.com/WebKit/WebKit/commit/a232aa69a5c61fab67aa22472c48df37ba6e038b
  Author: Aditya Keerthi <akeerthi at apple.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    A LayoutTests/fast/forms/ios/select-option-label-expected.txt
    A LayoutTests/fast/forms/ios/select-option-label-quirks-mode-expected.txt
    A LayoutTests/fast/forms/ios/select-option-label-quirks-mode.html
    A LayoutTests/fast/forms/ios/select-option-label.html
    M LayoutTests/resources/ui-helper.js
    M Source/WebCore/html/HTMLOptionElement.h
    M Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
    M Source/WebKit/UIProcess/ios/forms/WKFormSelectControl.h
    M Source/WebKit/UIProcess/ios/forms/WKFormSelectControl.mm
    M Source/WebKit/UIProcess/ios/forms/WKFormSelectPicker.mm
    M Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm

  Log Message:
  -----------
  [iOS] <option> label attribute is not rendered
https://bugs.webkit.org/show_bug.cgi?id=200469
rdar://53989128

Reviewed by Wenson Hsieh.

Use `HTMLOptionElement::displayLabel` rather than `::text` to supply the
option's title to the UI process. This method is spec-compliant, as it uses
the label attribute when available, and uses the element's text content in
quirks mode.

Add testing hooks to validate the behavior.

* LayoutTests/fast/forms/ios/select-option-label-expected.txt: Added.
* LayoutTests/fast/forms/ios/select-option-label-quirks-mode-expected.txt: Added.
* LayoutTests/fast/forms/ios/select-option-label-quirks-mode.html: Added.
* LayoutTests/fast/forms/ios/select-option-label.html: Added.
* LayoutTests/resources/ui-helper.js:
(window.UIHelper.selectMenuItems):
* Source/WebCore/html/HTMLOptionElement.h:
* Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _contentsOfUserInterfaceItem:]):
* Source/WebKit/UIProcess/ios/forms/WKFormSelectControl.h:
* Source/WebKit/UIProcess/ios/forms/WKFormSelectControl.mm:
(-[WKFormSelectControl menuItemTitles]):
* Source/WebKit/UIProcess/ios/forms/WKFormSelectPicker.mm:
(-[WKSelectPicker menuItemTitles]):
* Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::focusedElementInformation):

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




More information about the webkit-changes mailing list