Bug 221320

Summary: Avoid frequent calls to HTMLFormControlElement::updateValidity() when constructing form control elements
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: FormsAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, changseok, esprehn+autocc, ews-watchlist, ggaren, gyuyoung.kim, mifenton, rniwa, simon.fraser, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Simon Fraser (smfr)
Reported 2021-02-02 22:06:44 PST
Avoid frequent calls to HTMLFormControlElement::updateValidity() when constructing form control elements
Attachments
Patch (5.14 KB, patch)
2021-02-02 22:07 PST, Simon Fraser (smfr)
no flags
Simon Fraser (smfr)
Comment 1 2021-02-02 22:07:25 PST
Ryosuke Niwa
Comment 2 2021-02-03 15:05:24 PST
Comment on attachment 419107 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=419107&action=review > Source/WebCore/html/HTMLInputElement.cpp:826 > + DelayedUpdateValidityScope delayedUpdateValidityScope(*this); > + I don't think it's possible for this function to get called recursively. Why don't we just put a boolean like m_initializingParserSetAttributes instead?
Geoffrey Garen
Comment 3 2021-02-03 15:08:32 PST
Comment on attachment 419107 [details] Patch r=me
Simon Fraser (smfr)
Comment 4 2021-02-03 20:01:32 PST
I tried the boolean thing and it just feels uglier.
EWS
Comment 5 2021-02-03 20:09:31 PST
Committed r272354: <https://trac.webkit.org/changeset/272354> All reviewed patches have been landed. Closing bug and clearing flags on attachment 419107 [details].
Radar WebKit Bug Importer
Comment 6 2021-02-03 20:10:22 PST
Note You need to log in before you can comment on or make changes to this bug.