Bug 245611 - Align "UA" stylesheet for "audio" with Other browsers
Summary: Align "UA" stylesheet for "audio" with Other browsers
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2022-09-23 17:57 PDT by Ahmad Saleem
Modified: 2022-10-13 02:57 PDT (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2022-09-23 17:57:20 PDT
Hi Team,

Thanks for making Webkit awesome.

While looking into other browsers UA Style sheet, I noted both Blink and Gecko has following in their UA stylesheet, while we don't:

audio:not([controls]) {
  display: none !important;
}

--> Gecko goes even beyond and have following:

audio[controls] {
  /* This ensures that intrinsic sizing can reliably shrinkwrap our
      controls (which are also always horizontal) and produce a
      reasonable intrinsic size from them. */
  writing-mode: horizontal-tb !important;
}

______

I tried to find these references in HTML Specs but couldn't find them but was thinking to align with other browsers, I think we can safely at the first one in "html.css" and see through EWS and what happens, in case of other, appreciate input from others.

I also looked into HTML audio element tests and Safari do pass all of them similar to other browsers so I think either WPT does not have coverage or I am not familiar with related test.

Just wanted to have a bug report for any future discussion.

Thanks!
Comment 1 Anne van Kesteren 2022-09-24 08:54:44 PDT
Hey Ahmad, thanks for filing this!

From https://html.spec.whatwg.org/#embedded-content-rendering-rules:

> When an audio element is not exposing a user interface, the user agent is expected to force its 'display' property to compute to 'none', irrespective of CSS rules.

"exposing a user interface" is defined as such:

> If the [controls] attribute is present, or if scripting is disabled for the media element, then the user agent should expose a user interface to the user.

It seems the CSS in Blink and Gecko does not capture the scripting-related requirement.

For `writing-mode` we should probably file an issue against whatwg/html to discuss getting that standardized. Would you care to file that?
Comment 2 Ahmad Saleem 2022-09-24 09:15:19 PDT
(In reply to Anne van Kesteren from comment #1)
> Hey Ahmad, thanks for filing this!
> 
> From https://html.spec.whatwg.org/#embedded-content-rendering-rules:
> 
> > When an audio element is not exposing a user interface, the user agent is expected to force its 'display' property to compute to 'none', irrespective of CSS rules.
> 
> "exposing a user interface" is defined as such:
> 
> > If the [controls] attribute is present, or if scripting is disabled for the media element, then the user agent should expose a user interface to the user.
> 
> It seems the CSS in Blink and Gecko does not capture the scripting-related
> requirement.
> 
> For `writing-mode` we should probably file an issue against whatwg/html to
> discuss getting that standardized. Would you care to file that?

Done - https://github.com/whatwg/html/issues/8316
Comment 3 Radar WebKit Bug Importer 2022-09-30 17:58:17 PDT
<rdar://problem/100644782>