[webkit-changes] [WebKit/WebKit] 66bf68: Element::parserSetAttributes shouldn't trigger sha...
Ryosuke Niwa
noreply at github.com
Wed Jan 24 18:54:40 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 66bf68c9f4593eecb8dc370eb0761cb7a0e1ae77
https://github.com/WebKit/WebKit/commit/66bf68c9f4593eecb8dc370eb0761cb7a0e1ae77
Author: Ryosuke Niwa <rniwa at webkit.org>
Date: 2024-01-24 (Wed, 24 Jan 2024)
Changed paths:
M Source/WebCore/html/HTMLInputElement.cpp
M Source/WebCore/html/HTMLTextFormControlElement.cpp
M Source/WebCore/html/TextFieldInputType.cpp
M Source/WebCore/testing/Internals.cpp
Log Message:
-----------
Element::parserSetAttributes shouldn't trigger shadow tree construction in TextFieldInputType::attributeChanged
https://bugs.webkit.org/show_bug.cgi?id=267936
Reviewed by Aditya Keerthi and Yusuke Suzuki.
Don't construct shadow tree in TextFieldInputType::attributeChanged.
* Source/WebCore/html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateType): Sanitize the value before calling createShadowSubtreeIfNeeded. Otherwise,
we can assert in NumberInputType::localizeValue for example.
* Source/WebCore/html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::setSelectionRange):
* Source/WebCore/html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::isEmptyValue const): Now checks visibleValue() when the shadow tree doesn't exist yet.
(WebCore::TextFieldInputType::createShadowSubtree): Update the inner text value after creating the shadow tree.
(WebCore::TextFieldInputType::attributeChanged): Fixed the code so that it no longer constructs the shadow tree.
* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::visiblePlaceholder): Update the style / layout so that the shadow tree will get created.
Canonical link: https://commits.webkit.org/273461@main
More information about the webkit-changes
mailing list