Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 39e946b43d741aff6ba3f09fb442e22510e10027
      
https://github.com/WebKit/WebKit/commit/39e946b43d741aff6ba3f09fb442e22510e10027
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-04-30 (Thu, 30 Apr 2026)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/svg/animations/smil-clock-value-parsing-expected.txt
    M Source/WebCore/svg/animation/SVGSMILElement.cpp

  Log Message:
  -----------
  SMIL clock value parser rejects hours > 99 and accepts malformed seconds
https://bugs.webkit.org/show_bug.cgi?id=313318
rdar://175593583

Reviewed by Nikolas Zimmermann.

This patch aligns WebKit with Gecko / Firefox and Blink / Chromium.

The SMIL clock value parser had two issues:

1. Hours were limited to exactly 2 digits because colon positions were
 hardcoded, rejecting valid values like "101:00:01". The SMIL spec [1]
 defines Hours as DIGIT+ (one or more digits).

2. The seconds field was passed directly to parseNumber() without
 format validation, accepting malformed values like "9.9", ".9",
 and "009". The spec [1] requires exactly 2DIGIT optionally followed
 by "." and DIGIT+.

Fix by detecting Full-clock-value vs Partial-clock-value based on
colon count rather than fixed positions, using parseInteger<unsigned>
for variable-length hours, and adding seconds format validation.

[1] https://www.w3.org/TR/SMIL/smil-timing.html#q22

* Source/WebCore/svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::parseClockValue):
* 
LayoutTests/imported/w3c/web-platform-tests/svg/animations/smil-clock-value-parsing-expected.txt:
 Progressions

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



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

Reply via email to