Repository navigation
Conversation
|
What do implementations do today? I'm pretty sure WebKit doesn't have a "set once" special case. |
|
Chromium reacts to Gecko seems to look at the WebKit has a tri-state optional bool |
|
For Gecko, the |
|
I see, perhaps observing the That would require changing the |
The purpose of this is to limit the cases where the muted IDL attribute can change without a volumechange event firing. The notion that user agents may remember volume and muted is removed as it would require additional muted states to handle correctly, but could be reinstated if there is implementer interest.
|
@annevk that works for me, I've updated this PR and tests in https://crrev.com/c/7857861 to match. |
annevk
left a comment
There was a problem hiding this comment.
What about the WebKit case of taking the muted content attribute into account when loading a new media resource?
rdar://184148295 https://bugs.webkit.org/show_bug.cgi?id=321113 Reviewed by Jean-Yves Avenard. The "Test :muted matches .muted for content attribute" sub-test tries to validate that setting the "muted" content attribute correctly reflects to the .muted DOM property as well as the :muted pseudo selector. However, the behavior of the "muted" content attribute is such that it does not universally reflect to the DOM and CSS; specifically, all three UAs will collapse the "default" mute state to an explicit value at different points. There is a proposal in whatwg/html/pull/12473 to make this collapse point explicit: either during the load algorithm or during the post connection steps. Modify the sound-state.html test to validate that the :muted CSS pseudo selector matches the .muted IDL attribute by splitting the existing content attribute test into three separate tests. This- ensures that the desired functionality (that the IDL and CSS match) is equally well tested both before the proposed post-connection change is merged and after. * LayoutTests/imported/w3c/web-platform-tests/css/selectors/media/sound-state-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/selectors/media/sound-state.html: Canonical link: https://commits.webkit.org/319299@main
|
Summary of Opus + Codex review: 1. Attribute order in the markup becomes observableThe parser appends a token's attributes one at a time, and each <video muted src=x></video> <!-- RSA sees muted → muted state true -->
<video src=x muted></video> <!-- RSA runs first → muted state false -->The post-connection steps do not rescue the second case: by the time the element is inserted the state is already false, so the hook does nothing. The same applies to script: const v = document.createElement("video");
v.src = x; // resource selection algorithm runs here, no muted attribute yet
v.setAttribute("muted", ""); // too late
document.body.append(v); // post-connection steps: state is already false
v.muted; // false
2.
|
The purpose of this is to limit the cases where the muted IDL attribute
can change without a volumechange event firing.
The notion that user agents may remember volume and muted is removed as
it would require additional muted states to handle correctly, but could
be reinstated if there is implementer interest.
(See WHATWG Working Mode: Changes for more details.)
/media.html ( diff )