<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>245611</bug_id>
          
          <creation_ts>2022-09-23 17:57:20 -0700</creation_ts>
          <short_desc>Align &quot;UA&quot; stylesheet for &quot;audio&quot; with Other browsers</short_desc>
          <delta_ts>2022-10-13 02:57:16 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>CSS</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=88105</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BrowserCompat, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ahmad Saleem">ahmad.saleem792</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>akeerthi</cc>
    
    <cc>annevk</cc>
    
    <cc>bfulgham</cc>
    
    <cc>karlcow</cc>
    
    <cc>rniwa</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1900804</commentid>
    <comment_count>0</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-09-23 17:57:20 -0700</bug_when>
    <thetext>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&apos;t:

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

--&gt; 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&apos;t find them but was thinking to align with other browsers, I think we can safely at the first one in &quot;html.css&quot; 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!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1900884</commentid>
    <comment_count>1</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2022-09-24 08:54:44 -0700</bug_when>
    <thetext>Hey Ahmad, thanks for filing this!

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

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

&quot;exposing a user interface&quot; is defined as such:

&gt; 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?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1900889</commentid>
    <comment_count>2</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-09-24 09:15:19 -0700</bug_when>
    <thetext>(In reply to Anne van Kesteren from comment #1)
&gt; Hey Ahmad, thanks for filing this!
&gt; 
&gt; From https://html.spec.whatwg.org/#embedded-content-rendering-rules:
&gt; 
&gt; &gt; When an audio element is not exposing a user interface, the user agent is expected to force its &apos;display&apos; property to compute to &apos;none&apos;, irrespective of CSS rules.
&gt; 
&gt; &quot;exposing a user interface&quot; is defined as such:
&gt; 
&gt; &gt; 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.
&gt; 
&gt; It seems the CSS in Blink and Gecko does not capture the scripting-related
&gt; requirement.
&gt; 
&gt; For `writing-mode` we should probably file an issue against whatwg/html to
&gt; discuss getting that standardized. Would you care to file that?

Done - https://github.com/whatwg/html/issues/8316</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1902562</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-09-30 17:58:17 -0700</bug_when>
    <thetext>&lt;rdar://problem/100644782&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>