Skip to content

Trigger media element resource selection algorithm from source element moving steps - #12880

Open
lukewarlow wants to merge 1 commit into
whatwg:mainfrom
lukewarlow:source-moving-steps-media
Open

Trigger media element resource selection algorithm from source element moving steps#12880
lukewarlow wants to merge 1 commit into
whatwg:mainfrom
lukewarlow:source-moving-steps-media

Conversation

@lukewarlow

@lukewarlow lukewarlow commented Sep 1, 2026

Copy link
Copy Markdown
Member

Trigger media element resource selection algorithm from source element moving steps

Fixes #12879

(See WHATWG Working Mode: Changes for more details.)

@lukewarlow
lukewarlow requested a review from noamr September 1, 2026 16:38
@noamr

noamr commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

@lukewarlow you asked for a review but it's still a draft... (?)

@lukewarlow

Copy link
Copy Markdown
Member Author

Apologies I didn't think it would ping you till I marked it as ready. I'll let you know once it's ready.

@lukewarlow
lukewarlow marked this pull request as ready for review September 3, 2026 13:21
@lukewarlow

Copy link
Copy Markdown
Member Author

Okay I've written tests as part of my WebKit PR (linked to the export above). I think this single line should be the only change needed.

@lukewarlow

Copy link
Copy Markdown
Member Author

I'm guessing regarding implementor interest the fact chrome and firefox already implement this is enough?

lukewarlow added a commit to lukewarlow/WebKit that referenced this pull request Sep 3, 2026
https://bugs.webkit.org/show_bug.cgi?id=320463

Reviewed by NOBODY (OOPS!).

Updates the moving steps for HTMLSourceElement to handle media elements and the model element.

The HTML spec doesn't include these as the model element isn't defined and
there's a spec bug regarding media elements.

Spec bug: whatwg/html#12879
Spec PR: whatwg/html#12880

Tests: imported/w3c/web-platform-tests/dom/nodes/moveBefore/resource-selection-move-source-between-media-elements.html
       imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-move-source-audio.html
       imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-move-source-in-div.html
       imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-move-source-in-namespace.html
       imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-move-source-not-in-document.html
       imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-move-source.html

* LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-move-source-audio-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-move-source-audio.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-move-source-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-move-source-in-div-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-move-source-in-div.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-move-source-in-namespace-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-move-source-in-namespace.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-move-source-not-in-document-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-move-source-not-in-document.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-move-source.html: Added.
* LayoutTests/model-element/model-element-source-expected.txt:
* LayoutTests/model-element/model-element-source.html:
* Source/WebCore/html/HTMLSourceElement.cpp:
(WebCore::HTMLSourceElement::movingSteps):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Source element missing moving steps for media elements

2 participants