Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f55b9f50a0d6935def78b06ebe81cbbd5da11ffa
      
https://github.com/WebKit/WebKit/commit/f55b9f50a0d6935def78b06ebe81cbbd5da11ffa
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-07-09 (Thu, 09 Jul 2026)

  Changed paths:
    M Source/WebCore/html/MediaFragmentURIParser.cpp

  Log Message:
  -----------
  [MediaFragmentURIParser] Remove two dead branches in parseNPTTime
https://bugs.webkit.org/show_bug.cgi?id=318939
rdar://181783474

Reviewed by Eric Carlson.

Two conditionals in MediaFragmentURIParser::parseNPTTime() are
unreachable and can be removed with no behavior change:

- The `if (offset == timeString.size()) return true;` guard inside the
  fractional-seconds ('.') branch. Just above it, the earlier check
  `if (offset >= timeString.size() || timeString[offset] == ',')`
  already returns, so reaching this point guarantees
  offset < timeString.size(); the equality can never hold.

- The `if (digits1.length() < 1) return false;` check. The function's
  entry guard `if (offset >= timeString.size() || !isASCIIDigit(...))`
  ensures the current character is a digit before collectDigits() runs,
  so digits1 always contains at least one digit.

* Source/WebCore/html/MediaFragmentURIParser.cpp:
(WebCore::MediaFragmentURIParser::parseNPTTime):

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



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

Reply via email to