[Webkit-unassigned] [Bug 250535] Parsing input type=number should skip spaces
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jan 12 17:47:17 PST 2023
https://bugs.webkit.org/show_bug.cgi?id=250535
--- Comment #2 from Karl Dubost <karlcow at apple.com> ---
to Note that the current code is using.
String input = localized.stripWhiteSpace();
https://searchfox.org/wubkat/source/Source/WebCore/platform/text/PlatformLocale.cpp#300
which is
https://searchfox.org/wubkat/source/Source/WTF/wtf/text/WTFString.cpp#160
String String::stripWhiteSpace() const
{
// FIXME: Should this function, and the many others like it, be inlined?
// FIXME: This function needs a new name. For one thing, "whitespace" is a single
// word so the "s" should be lowercase. For another, it's not clear from this name
// that the function uses the Unicode definition of whitespace. Most WebKit callers
// don't want that and eventually we should consider deleting this.
return m_impl ? m_impl->stripWhiteSpace() : String { };
}
https://searchfox.org/wubkat/source/Source/WTF/wtf/text/StringImpl.cpp#744
Ref<StringImpl> StringImpl::stripWhiteSpace()
{
return stripMatchedCharacters(isSpaceOrNewline);
}
https://searchfox.org/wubkat/source/Source/WTF/wtf/text/StringImpl.cpp#717
and
inline bool isSpaceOrNewline(UChar32 character)
{
// Use isASCIISpace() for all Latin-1 characters. This will include newlines, which aren't included in Unicode DirWS.
return isLatin1(character) ? isASCIISpace(character) : u_charDirection(character) == U_WHITE_SPACE_NEUTRAL;
}
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230113/d45f10e9/attachment.htm>
More information about the webkit-unassigned
mailing list