Bug 257500 - Use StringView more in ScriptElement and EmailInputType
Summary: Use StringView more in ScriptElement and EmailInputType
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Anne van Kesteren
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-05-30 10:36 PDT by Anne van Kesteren
Modified: 2023-05-31 09:43 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anne van Kesteren 2023-05-30 10:36:44 PDT
As suggested here https://github.com/WebKit/WebKit/pull/14467#pullrequestreview-1451367941.

The event and for attribute values are used for comparisons only, so StringView would be more efficient. Looks like there is no need to convert from AtomString to String for these either.

RegularExpression::match() already takes a StringView so updating isValidEmailAddress() should be straightforward.
Comment 1 Radar WebKit Bug Importer 2023-05-30 23:23:54 PDT
<rdar://problem/110047074>
Comment 2 Anne van Kesteren 2023-05-31 00:24:32 PDT
Pull request: https://github.com/WebKit/WebKit/pull/14527
Comment 3 EWS 2023-05-31 09:43:41 PDT
Committed 264736@main (f8eaba1e9189): <https://commits.webkit.org/264736@main>

Reviewed commits have been landed. Closing PR #14527 and removing active labels.