Bug 91573
| Summary: | Spec's suggested missing value default for preload attribute is metadata, not auto | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Daniel Davis <danield> |
| Component: | Media | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | ahmad.saleem792, danield, destra, eric.carlson, jer.noble |
| Priority: | P3 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://dev.w3.org/html5/spec/media-elements.html#attr-media-preload | ||
Daniel Davis
Comments within the HTMLMediaElement::parseAttribute function of WebCore/html/HTMLMediaElement.cpp say:
// The spec does not define an "invalid value default" but "auto" is suggested as the
// "missing value default", so use it for everything except "none" and "metadata"
however the HTML5 spec has since been changed. It currently reads:
"The attribute's missing value default is user-agent defined, though the Metadata state is suggested as a compromise between reducing server load and providing an optimal user experience."
For mobile and low-bandwidth users especially, WebKit's missing value default for the preload attribute should be changed from "auto" to "metadata" as the spec suggests.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Eric Carlson
(In reply to comment #0)
> Comments within the HTMLMediaElement::parseAttribute function of WebCore/html/HTMLMediaElement.cpp say:
>
> // The spec does not define an "invalid value default" but "auto" is suggested as the
> // "missing value default", so use it for everything except "none" and "metadata"
>
> however the HTML5 spec has since been changed. It currently reads:
>
> "The attribute's missing value default is user-agent defined, though the Metadata state is suggested as a compromise between reducing server load and providing an optimal user experience."
>
> For mobile and low-bandwidth users especially, WebKit's missing value default for the preload attribute should be changed from "auto" to "metadata" as the spec suggests.
The code near that comment is concerned with the "invalid value default", not the "missing value default".
If WebKit does change the default to "metadata", the initialization of m_preload to MediaPlayer::Auto would need to change.
Ahmad Saleem
We still have this:
https://searchfox.org/wubkat/source/Source/WebCore/html/HTMLMediaElement.cpp#808
// The spec does not define an "invalid value default" but "auto" is suggested as the
// "missing value default", so use it for everything except "none" and "metadata"
m_preload = MediaPlayer::Preload::Auto;
Ahmad Saleem
Web-Spec bug: https://www.w3.org/Bugs/Public/show_bug.cgi?id=28950 & https://github.com/whatwg/html/pull/51
Blink has it:
// The spec does not define an invalid value default:
// https://www.w3.org/Bugs/Public/show_bug.cgi?id=28950
UseCounter::Count(GetDocument(), WebFeature::kHTMLMediaElementPreloadDefault);
return WebMediaPlayer::kPreloadMetaData;
___
We have 'auto' while Blink has 'metadata'.
Changing status to 'New', since we need to investigate.