Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ff16207ecb69620e761af9dc576eeaf5fe68db35
      
https://github.com/WebKit/WebKit/commit/ff16207ecb69620e761af9dc576eeaf5fe68db35
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-03-20 (Fri, 20 Mar 2026)

  Changed paths:
    R LayoutTests/platform/mac/svg/dom/path-parser-expected.png
    M LayoutTests/svg/dom/path-parser-expected.txt
    M LayoutTests/svg/dom/path-parser.html
    M Source/WebCore/svg/SVGParserUtilities.cpp

  Log Message:
  -----------
  genericParseNumber returns false instead of std::nullopt for exponent overflow
https://bugs.webkit.org/show_bug.cgi?id=310332
rdar://172984199

Reviewed by Rob Buis.

genericParseNumber incorrectly returned `false` instead of `std::nullopt`
when the parsed exponent exceeded the representable float range. Since the
return type is std::optional<FloatType>, `false` implicitly constructs a
successful result of 0 rather than signaling a parse failure.

This caused paths like "M0,50 h1e39" to silently produce "h0" instead of
being treated as malformed.

Also converts svg/dom/path-parser.html to testharness.js and adds
additional test coverage for repeated commands, trailing content after
close, and incomplete command sequences based on Blink's test suite
(svg_path_parser_test.cc).

* LayoutTests/platform/mac/svg/dom/path-parser-expected.png: Removed.
* LayoutTests/svg/dom/path-parser-expected.txt:
* LayoutTests/svg/dom/path-parser.html:
* Source/WebCore/svg/SVGParserUtilities.cpp:
(WebCore::genericParseNumber):

Canonical link: https://commits.webkit.org/309608@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to