[webkit-gtk] webkitgtk and Google Maps API

Adrián Pérez de Castro aperez at igalia.com
Tue Aug 16 08:40:59 PDT 2016


Hi there,

Quoting Carlos Alberto Lopez Perez (2016-08-16 16:49:57)
> On 16/08/16 16:39, Carlos Alberto Lopez Perez wrote:
> > On 16/08/16 16:35, Michael Catanzaro wrote:
> >> On Tue, 2016-08-16 at 15:57 +0200, Philippe Charpentier wrote:
> >>> Thank you very much for testing it.
> >>> As you suggest I will report a bug to Fedora.
> >>
> >> Please don't, there's nothing we can do in Red Hat Bugzilla, I will
> >> just close it and say to report it upstream. Since it seems to be fixed
> >> in trunk, I guess we should just wait for 2.14 or hope to get lucky and
> >> that the fix will be backported.
> >>
> >> Michael
> > 
> > I think is not a matter of using 2.12.3 or trunk.
> > 
> > 2.12.3 from Debian don't shows this bug.
> > 
> > 
> 
> And I found the problem:
> 
> The Fedora SPEC file is passing this:
> 
>   -DUSER_AGENT_GTK_DISTRIBUTOR_NAME="Fedora"
> 
> This causes MiniBrowser to have this UA:
> 
> Mozilla/5.0 (Fedora; Linux x86_64) AppleWebKit/602.1 (KHTML, like Gecko) Version/8.0 Safari/602.1
> 
> Debian one, has instead this UA:
> 
> Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/602.1 (KHTML, like Gecko) Version/8.0 Safari/602.1
> 
> 
> And It seems Google maps don't like the first UA.

<rant>
Sadly, UA sniffing instead of feature testing is done extensively. In an ideal
world, browsers would stop sending UA strings completely and web developers
would be forced^W encouraged to level up their game and move on to testing
browser features. Neat side effect: less chances for users to be tracked.
</rant>

Anyway, forget about the rant: the fact is that we cannot reasonably break the
web like this. IMHO the -DUSER_AGENT_GTK_DISTRIBUTOR_NAME setting either:

 1. Does not change the UA string, or
 2. Is removed.

WebKitGTK+-based applications should all provide the same UA string, because
the rendering engine provides the same web features to them (for a given
WebKitGTK+ version). It seems like a bad idea that a build setting changes the
UA string.

> If you launch the MiniBrowser in Fedora like this, then it works:
> 
> /usr/bin/MiniBrowser \
>         --user-agent='Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/602.1 (KHTML, like Gecko) Version/8.0 Safari/602.1' \
>         'https://developers.google.com/maps/documentation/javascript/examples/icon-simple?hl=fr'
> 
> 
> 
> 
> 
> 
> _______________________________________________
> webkit-gtk mailing list
> webkit-gtk at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-gtk

--
 ☛ Adrián
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: signature
URL: <https://lists.webkit.org/pipermail/webkit-gtk/attachments/20160816/bf629fe4/attachment.sig>


More information about the webkit-gtk mailing list