layout: Treat <audio> as replaced and do not display when there is no controls attribute#41262
layout: Treat <audio> as replaced and do not display when there is no controls attribute#41262Loirooriol merged 1 commit intoservo:mainfrom
<audio> as replaced and do not display when there is no controls attribute#41262Conversation
|
🔨 Triggering try run (#20215300818) for Linux (WPT) |
|
Test results for linux-wpt from try job (#20215300818): Flaky unexpected result (39)
Stable unexpected results that are known to be intermittent (26)
Stable unexpected results (18)
|
|
|
|
Actually, better just treat it as replaced after all. |
|
🔨 Triggering try run (#20216151144) for Linux (WPT) |
|
Test results for linux-wpt from try job (#20216151144): Flaky unexpected result (41)
Stable unexpected results that are known to be intermittent (24)
Stable unexpected results (1)
|
|
|
|
With this change, the test-case given in #40693 should be also fixed, if i understand correctly. |
|
🔨 Triggering try run (#20229729677) for Linux (WPT) |
<audio> rendering<audio> as replaced and do not display when there is no controls attribute
|
Test results for linux-wpt from try job (#20229729677): Flaky unexpected result (20)
Stable unexpected results that are known to be intermittent (34)
|
|
✨ Try run (#20229729677) succeeded. |
Add an important UA style to ensure that `<audio>` isn't displayed at all when it doesn't have the `controls` attribute. This matches Gecko, Blink and WebKit. When it does have the attribute, then treat it as replaced. For example, this means that it won't stretch by default if it's block-level, that it will be atomic if inline-level, and that it won't generate `::before` or `::after`. Previously we were generating `::before` and `::after`, but there was a bug: if they had some replaced content, the controls of the `<audio>` would be duplicated, and also appear on the pseudo-element. Then, since the various boxes for the controls would be backed by the same elements, Servo could panic because of a double borrow. This is now avoided. Signed-off-by: Oriol Brufau <[email protected]>
|
🤖 Opened new upstream WPT pull request (web-platform-tests/wpt#56739) with upstreamable changes. |
|
✍ Updated existing upstream WPT pull request (web-platform-tests/wpt#56739) title and body. |
|
⛔ Failed to properly merge the upstream pull request (web-platform-tests/wpt#56739). Please address any CI issues and try to merge manually. |
Add an important UA style to ensure that
<audio>isn't displayed at all when it doesn't have thecontrolsattribute. This matches Gecko, Blink and WebKit.When it does have the attribute, then treat it as replaced. For example, this means that it won't stretch by default if it's block-level, that it will be atomic if inline-level, and that it won't generate boxes for its children (including
::beforeand::after).Previously we were generating
::beforeand::after, but there was a bug: if they had some replaced content, the controls of the<audio>would be duplicated, and also appear on the pseudo-element. Then, since the various boxes for the controls would be backed by the same elements, Servo could panic because of a double borrow. This is now avoided.Testing: Some WPT are now passing, also adding a new crashtest. There is one failure about
innerText, but the test is probably wrong, now we match other browsers.Fixes: #40693
Fixes: #41183