<?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>218122</bug_id>
          
          <creation_ts>2020-10-23 06:07:11 -0700</creation_ts>
          <short_desc>[GTK] Chassis type check does not work in flatpak</short_desc>
          <delta_ts>2023-01-19 17:46:42 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=149496</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>218121</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>alicem</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>jan.brummer</cc>
    
    <cc>kdwkleung</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1700993</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2020-10-23 06:07:11 -0700</bug_when>
    <thetext>The chassis type check added in r264213 does not work in flatpak because it depends on /etc/machine-info, which is not available inside the sandbox. Jan-Michael proposed mounting it in the sandbox in https://github.com/flatpak/flatpak/pull/3727, but this was rejected upstream.

This means WebKit sends a desktop user agent even if a mobile user agent is required.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1700997</commentid>
    <comment_count>1</comment_count>
    <who name="Alice Mikhaylenko">alicem</who>
    <bug_when>2020-10-23 07:03:58 -0700</bug_when>
    <thetext>Hmm right. Can we access hostnamectl somehow?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1701006</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2020-10-23 07:56:33 -0700</bug_when>
    <thetext>I&apos;m not sure what would be acceptable for upstream flatpak.

My guess is a chassis type portal would probably be acceptable. We should figure out what upstream is willing to accept before we implement something.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1773748</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-06-30 08:11:37 -0700</bug_when>
    <thetext>Note this bug is really specific to flatpak only. It&apos;s not a problem for our bubblewrap sandbox because all of /etc is available in the bubblewrap sandbox.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1919141</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-12-14 05:59:18 -0800</bug_when>
    <thetext>We were discussing this today. Instead of implementing a portal to fix the ChassisType check, we should instead delete the code and stop using chassis type. Currently it&apos;s only used for setting a mobile user agent header. Instead, we should check window size and touchscreen presence to decide whether to pretend to be a mobile device.

However, WebKit itself does not have enough info to decide whether we are in mobile mode because it doesn&apos;t know what window size the browser uses as cutoff to switch between mobile UI vs. desktop UI. So I&apos;m not sure quite how to do this. Some new API will probably be needed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1919142</commentid>
    <comment_count>5</comment_count>
    <who name="Alice Mikhaylenko">alicem</who>
    <bug_when>2022-12-14 06:01:24 -0800</bug_when>
    <thetext>From my pov the ideal would be to just a flag to opt into using mobile UA for a particular tab. That&apos;s how it works in basically every single existing mobile browser, incl. Safari on iOS. Then the app can figure out if/when to show an option for it - e.g. when the window is small.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1926782</commentid>
    <comment_count>6</comment_count>
    <who name="Kdwk">kdwkleung</who>
    <bug_when>2023-01-19 17:46:42 -0800</bug_when>
    <thetext>https://gitlab.gnome.org/GNOME/epiphany/-/issues/1951</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>