Branch: refs/heads/webkitglib/2.44
Home: https://github.com/WebKit/WebKit
Commit: 208d709bf7604891c1b3f8a082cd29b95f83fef9
https://github.com/WebKit/WebKit/commit/208d709bf7604891c1b3f8a082cd29b95f83fef9
Author: Aditya Keerthi <[email protected]>
Date: 2024-05-13 (Mon, 13 May 2024)
Changed paths:
A
LayoutTests/fast/forms/email-input-type-value-and-multiple-attributes-set-expected.html
A
LayoutTests/fast/forms/email-input-type-value-and-multiple-attributes-set.html
M Source/WebCore/html/EmailInputType.cpp
Log Message:
-----------
Cherry-pick 276895@main (b52f2b8abac2).
https://bugs.webkit.org/show_bug.cgi?id=271043
REGRESSION (273461@main): The value attribute is not displayed in an input
field with type="email" and multiple attributes
https://bugs.webkit.org/show_bug.cgi?id=271043
rdar://125221858
Reviewed by Ryosuke Niwa.
273461@main deferred input element shadow tree construction outside of
attribute
parsing. However, when combined with an earlier change to sanitize the
value of
email inputs when the multiple attribute is set (263555@main), the deferral
of
shadow tree construction results in the value not being displayed at all.
The root cause of the issue is the use of `setValueFromRenderer` introduced
by
263555@main. The use of that method in `EmailInputType::attributeChanged`
has
always been inappropriate, as it is specifically meant for user
modifications.
However, in this case, the problem arises from the fact that
`setValueFromRenderer`
calls `setFormControlValueMatchesRenderer(true)`. This results in the
elision
of shadow tree construction in `TextFieldInputType::updateInnerTextValue`,
as
`HTMLTextFormControlElement::setInnerTextValue` is only called if
`formControlValueMatchesRenderer()` returns false. Before 273461@main, this
elision
was benign, as the shadow tree was constructed at attribute parse time.
Fix by using a more appropriate method to update the email input's value
when
the multiple attribute is changed.
A new regression test is added. The coverage for the issue fixed by
263555@main
continues to be provided by the WPT:
html/semantics/forms/the-input-element/email.html.
*
LayoutTests/fast/forms/email-input-type-value-and-multiple-attributes-set-expected.html:
Added.
*
LayoutTests/fast/forms/email-input-type-value-and-multiple-attributes-set.html:
Added.
* Source/WebCore/html/EmailInputType.cpp:
(WebCore::EmailInputType::attributeChanged):
Canonical link: https://commits.webkit.org/276895@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes