Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 91fe69be48d69ab36edafc1848089a15d33a4288
https://github.com/WebKit/WebKit/commit/91fe69be48d69ab36edafc1848089a15d33a4288
Author: Chris Dumez <[email protected]>
Date: 2026-04-21 (Tue, 21 Apr 2026)
Changed paths:
A
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-meter-element/meter-leading-plus-sign-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-meter-element/meter-leading-plus-sign.html
M Source/WebCore/html/parser/HTMLParserIdioms.cpp
Log Message:
-----------
parseHTMLFloatingPointNumberValue should return fallback value on parse
failure
https://bugs.webkit.org/show_bug.cgi?id=312869
Reviewed by Anne van Kesteren.
parseHTMLFloatingPointNumberValueInternal never checked parsedLength after
calling parseDouble, so when parsing failed entirely (e.g. for bare "+",
"-", or "."), it returned 0 instead of the caller-provided fallback value.
Fix by checking parsedLength and returning the fallback value on parse
failure. Note that parseDouble (backed by fast_float::from_chars) already
accepts leading '+' via the allow_leading_plus flag, so no special
handling of '+' is needed.
Test:
imported/w3c/web-platform-tests/html/semantics/forms/the-meter-element/meter-leading-plus-sign.html
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-meter-element/meter-leading-plus-sign-expected.txt:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-meter-element/meter-leading-plus-sign.html:
Added.
* Source/WebCore/html/parser/HTMLParserIdioms.cpp:
(WebCore::parseHTMLFloatingPointNumberValueInternal):
Canonical link: https://commits.webkit.org/311735@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications