Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: f6dbc5c5c7258d5fd40c7010373c3eb3018b82d8 https://github.com/WebKit/WebKit/commit/f6dbc5c5c7258d5fd40c7010373c3eb3018b82d8 Author: Ryosuke Niwa <rn...@webkit.org> Date: 2024-02-22 (Thu, 22 Feb 2024)
Changed paths: M Source/WebCore/dom/Element.cpp M Source/WebCore/html/HTMLInputElement.cpp M Source/WebCore/html/HTMLInputElement.h M Source/WebCore/html/ValidatedFormListedElement.h Log Message: ----------- 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 To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes