Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9094412c37e80ec0fb3762a6919a2e28086c9d1a
https://github.com/WebKit/WebKit/commit/9094412c37e80ec0fb3762a6919a2e28086c9d1a
Author: Ahmad Saleem <[email protected]>
Date: 2026-07-11 (Sat, 11 Jul 2026)
Changed paths:
M Source/WebCore/html/track/VTTCue.cpp
Log Message:
-----------
Remove redundant shadowing variable in VTTCue::determineTextDirection
https://bugs.webkit.org/show_bug.cgi?id=319156
rdar://181977722
Reviewed by Jer Noble.
determineTextDirection() declared a local `current` from paragraph[i]
and returned early when it was falsy, then immediately re-declared an
identical `current = paragraph[i]` inside an `if`, shadowing the outer
variable. Because the earlier check already returns on a falsy value,
that inner condition was always true and the extra declaration was dead
code that only triggered a shadowing warning.
Use the outer `current` directly. No change in behavior.
* Source/WebCore/html/track/VTTCue.cpp:
(WebCore::VTTCue::determineTextDirection):
Canonical link: https://commits.webkit.org/316975@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications