Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d16d7ec796839625be5b5a686c5c82b55ba620b3
      
https://github.com/WebKit/WebKit/commit/d16d7ec796839625be5b5a686c5c82b55ba620b3
  Author: Ryosuke Niwa <[email protected]>
  Date:   2022-11-13 (Sun, 13 Nov 2022)

  Changed paths:
    A 
LayoutTests/fast/forms/form-associated-element-removal-with-form-attribute-expected.txt
    A 
LayoutTests/fast/forms/form-associated-element-removal-with-form-attribute.html
    M 
LayoutTests/imported/w3c/web-platform-tests/shadow-dom/form-control-form-attribute-expected.txt
    M Source/WebCore/html/FormAssociatedElement.cpp

  Log Message:
  -----------
  Fix form association behavior when a form and a control with form= are 
removed from a document together
https://bugs.webkit.org/show_bug.cgi?id=247593

Reviewed by Darin Adler.

Fix the bug that a form associated element with form content attribute were not 
disassociated from
its form owner if both elements are removed together in a same subtree.

New behavior matches the spec as well as behaviors of Chrome and Firefox:
https://html.spec.whatwg.org/multipage/infrastructure.html#html-element-removing-steps
https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#reset-the-form-owner

* 
LayoutTests/fast/forms/form-associated-element-removal-with-form-attribute-expected.txt:
 Added.
* 
LayoutTests/fast/forms/form-associated-element-removal-with-form-attribute.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/shadow-dom/form-control-form-attribute-expected.txt:
 Rebaselined.

* Source/WebCore/html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::removedFromAncestor):

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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to