-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Element::parserSetAttributes shouldn't trigger shadow tree constructi…
…on 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
- Loading branch information
Showing
4 changed files
with
14 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters