Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 27f39d2af63b080177a28aab15cde66714cc1c7a
https://github.com/WebKit/WebKit/commit/27f39d2af63b080177a28aab15cde66714cc1c7a
Author: Aleksei Marchenko <[email protected]>
Date: 2026-07-02 (Thu, 02 Jul 2026)
Changed paths:
A LayoutTests/model-element/model-element-source-media-expected.txt
A LayoutTests/model-element/model-element-source-media.html
M Source/WebCore/Modules/model-element/HTMLModelElement.cpp
M Source/WebCore/html/HTMLSourceElement.cpp
Log Message:
-----------
Model does not change current src based on the media attribute
https://bugs.webkit.org/show_bug.cgi?id=318468
rdar://172688994
Reviewed by Mike Wyrzykowski.
Honor the <source> media attribute when selecting a <model>'s source,
matching HTMLMediaElement (<video>) resource selection: the media query
is evaluated at selection time only — on load and on explicit source/
attribute changes — not dynamically on viewport changes like <picture>.
The dynamic approach is intentionally avoided due to memory concerns.
* LayoutTests/model-element/model-element-source-media-expected.txt: Added.
* LayoutTests/model-element/model-element-source-media.html: Added.
* Source/WebCore/Modules/model-element/HTMLModelElement.cpp:
(WebCore::HTMLModelElement::selectModelSource const):
* Source/WebCore/html/HTMLSourceElement.cpp:
(WebCore::HTMLSourceElement::attributeChanged):
Canonical link: https://commits.webkit.org/316452@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications