Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0ef598ee826388e11f018a8647adb2c58144c2f1
      
https://github.com/WebKit/WebKit/commit/0ef598ee826388e11f018a8647adb2c58144c2f1
  Author: Chris Dumez <[email protected]>
  Date:   2026-04-15 (Wed, 15 Apr 2026)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/html/semantics/selectors/pseudo-classes/invalid-after-clone-expected.txt
    M Source/WebCore/html/HTMLInputElement.cpp
    M Source/WebCore/html/HTMLTextAreaElement.cpp

  Log Message:
  -----------
  Cloned input/textarea elements should preserve m_wasModifiedByUser
https://bugs.webkit.org/show_bug.cgi?id=312346

Reviewed by Darin Adler.

When cloning an input or textarea element, the m_wasModifiedByUser flag was not
being preserved. This caused tooLong constraint validation to incorrectly pass
on clones, since tooLong requires the value to have been modified by the user.

HTMLInputElement::copyNonAttributePropertiesFromElement was explicitly resetting
m_wasModifiedByUser to false, and 
HTMLTextAreaElement::copyNonAttributePropertiesFromElement
was not copying it at all.

No new tests, rebaselined existing WPT test that was already passing in
Chrome and Firefox.

* 
LayoutTests/imported/w3c/web-platform-tests/html/semantics/selectors/pseudo-classes/invalid-after-clone-expected.txt:
* Source/WebCore/html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::copyNonAttributePropertiesFromElement):
* Source/WebCore/html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::copyNonAttributePropertiesFromElement):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to