[webkit-changes] [WebKit/WebKit] 9d9588: Fix form associated behavior for option.form when ...

Ryosuke Niwa noreply at github.com
Sat Nov 12 15:08:53 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9d95887793091302a86a3dcc627c213d6b1080a7
      https://github.com/WebKit/WebKit/commit/9d95887793091302a86a3dcc627c213d6b1080a7
  Author: Ryosuke Niwa <rniwa at webkit.org>
  Date:   2022-11-12 (Sat, 12 Nov 2022)

  Changed paths:
    A LayoutTests/fast/forms/option-form-expected.txt
    A LayoutTests/fast/forms/option-form.html
    M Source/WebCore/html/HTMLOptionElement.cpp
    M Source/WebCore/html/HTMLOptionElement.h

  Log Message:
  -----------
  Fix form associated behavior for option.form when it is select on "select" element parent
https://bugs.webkit.org/show_bug.cgi?id=247651

Reviewed by Wenson Hsieh.

Make HTMLOptionElement's form IDL attribute return null when it's not associated with a select element.
New behavior matches the specification and the behaviors of Firefox and Chrome.

Spec: https://html.spec.whatwg.org/multipage/form-elements.html#dom-option-form

* LayoutTests/fast/forms/option-form-expected.txt: Added.
* LayoutTests/fast/forms/option-form.html: Added.
* Source/WebCore/html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::form const):
* Source/WebCore/html/HTMLOptionElement.h:

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




More information about the webkit-changes mailing list