[webkit-changes] [WebKit/WebKit] d86fed: REGRESSION (255086 at main): Safari 16.4 and above do...

Aditya Keerthi noreply at github.com
Mon Apr 10 16:22:29 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d86fed1a2d3d34c612802f1e640341dd5656a665
      https://github.com/WebKit/WebKit/commit/d86fed1a2d3d34c612802f1e640341dd5656a665
  Author: Aditya Keerthi <akeerthi at apple.com>
  Date:   2023-04-10 (Mon, 10 Apr 2023)

  Changed paths:
    A LayoutTests/fast/forms/select/selected-option-update-inner-html-expected.html
    A LayoutTests/fast/forms/select/selected-option-update-inner-html.html
    M Source/WebCore/html/HTMLSelectElement.cpp

  Log Message:
  -----------
  REGRESSION (255086 at main): Safari 16.4 and above does not render <option> label/text updates until <select> is focused
https://bugs.webkit.org/show_bug.cgi?id=255230
rdar://107838336

Reviewed by Chris Dumez.

255086 at main removed the call to `HTMLSelectElement::setRecalcListItems` in
`HTMLSelectElement::optionElementChildrenChanged` so that updating the text
inside an <option> element does not reset the <select> element's selected option.

However, this broke rendering of the option's new text, since
`setRecalcListItems` contained logic to update the rendered text. Fix by
reintroducing the logic that is responsible for ensuring the displayed text
matches the <option> element's text.

Add a regression (reference) test which would have caught this issue.

* LayoutTests/fast/forms/select/selected-option-update-inner-html-expected.html: Added.
* LayoutTests/fast/forms/select/selected-option-update-inner-html.html: Added.
* Source/WebCore/html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::optionElementChildrenChanged):

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




More information about the webkit-changes mailing list