Bug 1367503

Summary: webkitgtk seems incompatible with Google Maps API
Product: [Fedora] Fedora Reporter: Philippe Charpentier <philippe.charpenti>
Component: webkitgtk4Assignee: Tomas Popela <tpopela>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: huzaifas, kevin, klember, martin.sourada, mcatanzaro+wrong-account-do-not-cc, mtasaka, tpopela
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-16 16:08:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Philippe Charpentier 2016-08-16 14:35:01 UTC
Description of problem:
compatibility webkitgtk and Google Maps API

Version-Release number of selected component (if applicable): webkitgtk-2.4.11, webkitgtk3-2.4.11 webkitgtk4-2.12.3


How reproducible:


Steps to Reproduce:
run (for example)
MiniBrowser https://developers.google.com/maps/documentation/javascript/examples/icon-simple?hl=fr

Actual results:
the page is displayed correctly but when you put the mouse over the map
and you move the Mouse wheel, it scrolls the entire page rather than
zooming into the map. And if you click into the map and drags it, it
don't works.

Same problem with GtkLauncher (from webkitgtk or webkitgtk3), with 'midori --plain' and with epiphany.
I also have the same problem with a python program using pywebkitgtk.

midori (without the option --plain) doesn't show the problem.

On other sites similar problems appear with many functions defines in Google Maps API.

I asked on the webkit-gtk list and it appears that this is not a bug of webkitgtk (this behavior can't be reproduce on Debian) but of the WebKitGTK+ version shipped and packaged by Fedora.
Moreover, a developer of WebKitGTK tested a recent build of WebKit trunk on Fedora 24, and it doesn't show the problem.

Best regards.

Comment 1 Philippe Charpentier 2016-08-16 15:55:10 UTC
Carlos Alberto Lopez Perez (developer of webkitgtk) found the problem:

it is in the spec files (of each packages webkitgtk, webkitgtk3 and webkitgtk4): the lines

%if 0%{?fedora}
%global optflags %{optflags} -DUSER_AGENT_GTK_DISTRIBUTOR_NAME=\'\\"Fedora\\"\'
%endif

has to be removed (or at least changed)

because they imply that MiniBrowser and GtkLauncher  have this UA:

Mozilla/5.0 (Fedora; Linux arch) AppleWebKit/602.1 (KHTML, like Gecko) Version/8.0 Safari/602.1

and on Debian this UA:

Mozilla/5.0 (X11; Linux arch) AppleWebKit/602.1 (KHTML, like Gecko) Version/8.0 Safari/602.1

and Google Maps don't like the first UA.

Thus I tried MiniBrowser and GtkLauncher with the option --user-agent='Mozilla/5.0 (X11; Linux arch)' and everything went fine.

As (as far as I know) such an option cannot be used, via pywebkitgtk, in a python program, I think that these packages must be modify.

Regards

Comment 2 Michael Catanzaro 2016-08-16 16:08:05 UTC
Yup, thanks. I'll add Google Maps to our UA quirks list.