Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1a91592d550067571bf491412e36dd1dd036a4d4
https://github.com/WebKit/WebKit/commit/1a91592d550067571bf491412e36dd1dd036a4d4
Author: Ahmad Saleem <[email protected]>
Date: 2026-08-10 (Mon, 10 Aug 2026)
Changed paths:
M Source/WebCore/Modules/mediasource/MediaSource.cpp
M Source/WebCore/page/Quirks.cpp
M Source/WebCore/page/Quirks.h
M Source/WebCore/page/QuirksData.h
Log Message:
-----------
Remove the dead NeedsVP9FullRangeFlagQuirk
https://bugs.webkit.org/show_bug.cgi?id=319212
rdar://182066464
Reviewed by Jean-Yves Avenard.
NeedsVP9FullRangeFlagQuirk (youtube.com, rdar://66242343) was meant to
complete a "vp09" codec string that carried the optional fields but omitted
the trailing videoFullRangeFlag, appending ".00" so that the
mutually-inclusive optional group parsed. It has never done so, and it is
no longer needed either way.
It never applied because countPeriods() in
addVP9FullRangeVideoFlagToContentType() advanced its scan cursor by a
single position after each match (++position) instead of moving past the
index the '.' was found at. String::find('.', position) returns the
absolute index of the next match at or after position, so the same period
was re-counted on every iteration until the cursor walked past it,
inflating the count: "vp09.00.41.08.01.01.01.00" (7 periods) counts as 23,
so the required `countPeriods(codec) != 7` check never matched and the
quirk was a no-op from its introduction in 227853@main.
It is also moot: youtube.com serves WebKit the complete 9-field form,
verified in Safari as "vp09.02.51.10.01.09.16.09.00", which already carries
videoFullRangeFlag. That has 8 periods rather than the 7 the quirk keyed on,
so a repaired countPeriods() would skip it, and parseVPCodecParameters()
accepts it unmodified. HDR VP9 (PQ/bt2020) plays at 2560x1440@60 in Safari
today with the quirk inert.
Eight years without a report of the underlying problem and no remaining
codec string to complete, so remove the quirk rather than repair it. This
is not a behavior change, and no new test is needed: rejection of the
8-field form is already covered by
platform/mac/media/media-source/is-type-supported-vp9-codec-check.html.
createSourceBufferPrivate() no longer needs to copy its ContentType
argument, and its Document lookup is now only used by the
MEDIA_RECORDER_WEBM Matroska quirk, so it moves inside that guard.
* Source/WebCore/Modules/mediasource/MediaSource.cpp:
(WebCore::addVP9FullRangeVideoFlagToContentType): Deleted.
(WebCore::MediaSource::addSourceBuffer):
(WebCore::MediaSource::isTypeSupported):
(WebCore::MediaSource::createSourceBufferPrivate):
* Source/WebCore/page/Quirks.cpp:
(WebCore::Quirks::needsVP9FullRangeFlagQuirk const): Deleted.
(WebCore::handleYouTubeQuirks):
* Source/WebCore/page/Quirks.h:
* Source/WebCore/page/QuirksData.h:
Canonical link: https://commits.webkit.org/318943@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications