mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 07:41:01 +00:00
LibWeb/HTML: Update resource fetch algorithm to match current spec
Changes from https://github.com/whatwg/html/pull/10792 No code changes, only comments.
This commit is contained in:
parent
30d23ad090
commit
aa29a3ff6b
Notes:
github-actions[bot]
2024-12-18 19:23:48 +00:00
Author: https://github.com/AtkinsSJ
Commit: aa29a3ff6b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2967
1 changed files with 9 additions and 6 deletions
|
@ -936,17 +936,20 @@ WebIDL::ExceptionOr<void> HTMLMediaElement::fetch_resource(URL::URL const& url_r
|
||||||
auto& realm = this->realm();
|
auto& realm = this->realm();
|
||||||
auto& vm = realm.vm();
|
auto& vm = realm.vm();
|
||||||
|
|
||||||
// 1. If the algorithm was invoked with media provider object or a URL record whose blob URL entry is a blob URL entry whose object is a media provider
|
// 1. Let mode be remote.
|
||||||
// object, then let mode be local. Otherwise let mode be remote.
|
|
||||||
// FIXME: Detect media provider object / blob URLs with a media provider object.
|
|
||||||
auto mode = FetchMode::Remote;
|
auto mode = FetchMode::Remote;
|
||||||
|
|
||||||
// FIXME: 2. If mode is remote, then let the current media resource be the resource given by the URL record passed to this algorithm; otherwise, let the
|
// FIXME: 2. If the algorithm was invoked with media provider object, then set mode to local.
|
||||||
|
// Otherwise:
|
||||||
|
// 1. Let object be the result of obtaining a blob object using the URL record's blob URL entry and the media
|
||||||
|
// element's node document's relevant settings object.
|
||||||
|
// 2. If object is a media provider object, then set mode to local.
|
||||||
|
// FIXME: 3. If mode is remote, then let the current media resource be the resource given by the URL record passed to this algorithm; otherwise, let the
|
||||||
// current media resource be the resource given by the media provider object. Either way, the current media resource is now the element's media
|
// current media resource be the resource given by the media provider object. Either way, the current media resource is now the element's media
|
||||||
// resource.
|
// resource.
|
||||||
// FIXME: 3. Remove all media-resource-specific text tracks from the media element's list of pending text tracks, if any.
|
// FIXME: 4. Remove all media-resource-specific text tracks from the media element's list of pending text tracks, if any.
|
||||||
|
|
||||||
// 4. Run the appropriate steps from the following list:
|
// 5. Run the appropriate steps from the following list:
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
// -> If mode is remote
|
// -> If mode is remote
|
||||||
case FetchMode::Remote: {
|
case FetchMode::Remote: {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue