<?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>162548</bug_id>
          
          <creation_ts>2016-09-26 01:10:29 -0700</creation_ts>
          <short_desc>[GTK] Require implementation of cpuDescriptionForUAString</short_desc>
          <delta_ts>2016-09-28 03:36:29 -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>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <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>142074</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Michael Catanzaro">mcatanzaro</assigned_to>
          <cc>berto</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>cgarcia</cc>
    
    <cc>clopez</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>tpopela</cc>
    
    <cc>zan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1233335</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-09-26 01:10:29 -0700</bug_when>
    <thetext>Require implementation of cpuDescriptionForUAString. Less-popular architectures would probably prefer to get a nice build error here than to wind up with a broken user agent.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1233336</commentid>
    <comment_count>1</comment_count>
      <attachid>289809</attachid>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-09-26 01:12:18 -0700</bug_when>
    <thetext>Created attachment 289809
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1233338</commentid>
    <comment_count>2</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2016-09-26 01:15:37 -0700</bug_when>
    <thetext>Is this ok for distros like debian that build on different platforms?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1233366</commentid>
    <comment_count>3</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2016-09-26 04:45:48 -0700</bug_when>
    <thetext>(In reply to comment #0)
&gt; Require implementation of cpuDescriptionForUAString. Less-popular
&gt; architectures would probably prefer to get a nice build error here than to
&gt; wind up with a broken user agent.


Why is having the CPU architecture relevant for a webpage to work or not? 

Why we don&apos;t just return &quot;Intel&quot; instead of &quot;unknown&quot; or causing an unneeded build failure?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1233481</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-09-26 11:32:23 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; Is this ok for distros like debian that build on different platforms?

I suggest we simply accept patches to add more conditionals here from people working on alternative architectures. If we know how to test for them (I don&apos;t) then we could do that now instead of waiting for patches to roll in.

(In reply to comment #3)
&gt; Why we don&apos;t just return &quot;Intel&quot; instead of &quot;unknown&quot; or causing an unneeded
&gt; build failure?

I guess we could, but is it really so hard to implement one function when using WebKit on a brand new architecture? This seems quite easy relative to other arch-enablement that might be required.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1233793</commentid>
    <comment_count>5</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2016-09-27 03:15:43 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; (In reply to comment #2)
&gt; &gt; Is this ok for distros like debian that build on different platforms?
&gt; 
&gt; I suggest we simply accept patches to add more conditionals here from people
&gt; working on alternative architectures. If we know how to test for them (I
&gt; don&apos;t) then we could do that now instead of waiting for patches to roll in.
&gt; 
&gt; (In reply to comment #3)
&gt; &gt; Why we don&apos;t just return &quot;Intel&quot; instead of &quot;unknown&quot; or causing an unneeded
&gt; &gt; build failure?
&gt; 
&gt; I guess we could, but is it really so hard to  implement one function when
&gt; using WebKit on a brand new architecture? This seems quite easy relative to
&gt; other arch-enablement that might be required.

The thing is that returning &quot;RISC-V&quot; or &quot;MIPS&quot; is as bad as returning &quot;Unknown&quot;.
If the goal is to have sites working on this architectures as best as possible we should just return &quot;Intel&quot; always, because is what sites expect to find.

I don&apos;t think a site can have architecture-specific html/css/javascript. So just return Intel instead of Unknown.

UA parsing is broken, so we can&apos;t do much about this than returning the more common possible UA string.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1233818</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-09-27 05:10:40 -0700</bug_when>
    <thetext>Yeah OK.

I wonder if we should do this for ARM too. In Endless we&apos;ve found that various sites send mobile versions if ARM is in the UA, which is terrible.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1233846</commentid>
    <comment_count>7</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2016-09-27 07:08:55 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; Yeah OK.
&gt; 
&gt; I wonder if we should do this for ARM too. In Endless we&apos;ve found that
&gt; various sites send mobile versions if ARM is in the UA, which is terrible.

Yes, i think so.  Returning &quot;Intel&quot; always without giving further details about the machine CPU architecture looks like a good idea to me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1234320</commentid>
    <comment_count>8</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2016-09-28 03:36:29 -0700</bug_when>
    <thetext>(In reply to comment #7)
&gt; (In reply to comment #6)
&gt; &gt; Yeah OK.
&gt; &gt; 
&gt; &gt; I wonder if we should do this for ARM too. In Endless we&apos;ve found that
&gt; &gt; various sites send mobile versions if ARM is in the UA, which is terrible.
&gt; 
&gt; Yes, i think so.  Returning &quot;Intel&quot; always without giving further details
&gt; about the machine CPU architecture looks like a good idea to me.

IMO this also helps with improving fingerprinting avoidance.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>289809</attachid>
            <date>2016-09-26 01:12:18 -0700</date>
            <delta_ts>2016-09-27 05:10:44 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-162548-20160926100921.patch</filename>
            <type>text/plain</type>
            <size>1439</size>
            <attacher name="Michael Catanzaro">mcatanzaro</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjA2MzYyCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggZTIyMDc5YzI3Y2YyMzQw
ZWQxOTMyNGUwMmNlZTY0MDU0ODcxYzhmNS4uZWIyNDc0YTJlYjBkNjUwYjhlYzdiYzFmMDgwZTA5
YzVlMWVmYWM5NSAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSwzICsxLDE2IEBACisyMDE2LTA5LTI2ICBNaWNo
YWVsIENhdGFuemFybyAgPG1jYXRhbnphcm9AaWdhbGlhLmNvbT4KKworICAgICAgICBbR1RLXSBS
ZXF1aXJlIGltcGxlbWVudGF0aW9uIG9mIGNwdURlc2NyaXB0aW9uRm9yVUFTdHJpbmcKKyAgICAg
ICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTE2MjU0OAorCisgICAg
ICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgIC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