<?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>271891</bug_id>
          
          <creation_ts>2024-03-29 09:00:00 -0700</creation_ts>
          <short_desc>Device Orientation: deviceorientation requires more permissions policy tokens than specified</short_desc>
          <delta_ts>2024-03-31 22:38:28 -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>WebCore Misc.</component>
          <version>WebKit Nightly Build</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=271099</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=271098</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Raphael Kubo da Costa (:rakuco)">rakuco</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cdumez</cc>
    
    <cc>karlcow</cc>
    
    <cc>marcosc</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2024746</commentid>
    <comment_count>0</comment_count>
    <who name="Raphael Kubo da Costa (:rakuco)">rakuco</who>
    <bug_when>2024-03-29 09:00:00 -0700</bug_when>
    <thetext>Bug 221399 covered Permissions Policy support for the Device Orientation API. An effort was made to match Blink&apos;s implementation, which was the only existing one at the time.

Blink and the spec (https://w3c.github.io/deviceorientation/#permissions-policy-integration) require the following Permissions Policy feature names:
- devicemotion requires &quot;accelerometer&quot; and &quot;gyroscope&quot;
- deviceorientation requires &quot;accelerometer&quot; and &quot;gyroscope&quot;, and optionally &quot;magnetometer&quot; if one wants to allow a fallback to absolute orientation if the implementation cannot provide relative orientation
- deviceorientationabsolute requires &quot;accelerometer&quot;, &quot;gyroscope&quot; and &quot;magnetometer&quot;.

The WebKit implementation always requires &quot;accelerometer&quot;, &quot;gyroscope&quot; _and_ &quot;magnetometer&quot; for deviceorientation events, possibly as a consequence of the non-standard attributes that DeviceOrientationEvent.idl has on iOS: https://github.com/WebKit/WebKit/blob/5da0d35084007b85445975376a44c9fecb64e9ed/Source/WebCore/dom/DeviceOrientationEvent.idl#L38

I see some bugs that cover making the IDL more compliant with the standard (bug 271099, bug 271098) so hopefully this part can also be aligned with the spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2025057</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-03-31 22:37:41 -0700</bug_when>
    <thetext>&lt;rdar://problem/125701992&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>