-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Delay creation of InputType and user agent shadow trees during cloning
https://bugs.webkit.org/show_bug.cgi?id=269900 Reviewed by Yusuke Suzuki. This PR delays the construction of InputType and user agent shadow tree when cloning an input element such that InputType is initialized after all the attributes are cloned, and its shadow tree is constructed as the element becomes connected to a document. * Source/WebCore/dom/Element.cpp: (WebCore::Element::parserSetAttributes): (WebCore::Element::cloneAttributesFromElement): Call initializeInputTypeAfterParsingOrCloning. (WebCore::Element::cloneDataFromElement): Added an assertion to make sure the UA shadow tree's construction has not happened yet. * Source/WebCore/html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::HTMLInputElement): (WebCore::HTMLInputElement::create): (WebCore::HTMLInputElement::cloneElementWithoutAttributesAndChildren): Added. (WebCore::HTMLInputElement::initializeInputTypeAfterParsingOrCloning): Renamed from parserInitializeInputType. (WebCore::HTMLInputElement::attributeChanged): (WebCore::HTMLInputElement::copyNonAttributePropertiesFromElement): Don't update the shadow tree unless we have already created it. * Source/WebCore/html/HTMLInputElement.h: * Source/WebCore/html/ValidatedFormListedElement.h: Canonical link: https://commits.webkit.org/275200@main
- Loading branch information
Showing
4 changed files
with
38 additions
and
18 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