[GTK] Google Calendar thinks we're mobile
authorkov@webkit.org <kov@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Jul 2011 14:49:38 +0000 (14:49 +0000)
committerkov@webkit.org <kov@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Jul 2011 14:49:38 +0000 (14:49 +0000)
commit66bd11bf6ffd11d0047b7edc4761008b979c60ad
tree5b642ce829579dabb902858665e1ba6407f68120
parent5e0cd3a43d8943dcf795fdc5086e35ee4f7df28a
[GTK] Google Calendar thinks we're mobile
https://bugs.webkit.org/show_bug.cgi?id=63994

Patch by Gustavo Noronha Silva  <gns@gnome.org> on 2011-07-11
Reviewed by Xan Lopez.

Further special-case Google Calendar, for it thinks WebKit+Linux
means mobile, so we also have to spoof the OS.

* WebCoreSupport/FrameLoaderClientGtk.cpp:
(WebKit::FrameLoaderClient::userAgent): use the new WebKitGTK+
private API that centralizes the logic now.
* tests/testwebsettings.c: Add tests to make sure the Google
special-cases only apply for the expected domains and when quirks
special-casing is enabled.
(test_non_quirky_user_agents):
(test_webkit_web_settings_user_agent):
* webkit/webkitwebsettings.cpp:
(webkitUserAgent): make it static.
(safariUserAgent): returns a fake Safari in Mac OS X User-Agent.
(initializeDomainsList): moved from FrameLoaderClientGtk.
(isGoogleDomain):ditto.
(isGoogleCalendar): ditto.
(userAgentForURL): ditto.
(webkitWebSettingsUserAgentForUri): centralize the whole
user agent spoofing logic in this new private API that can be used
by the browser to know what's going to happen for a specific URI
and also allows our API testing.
* webkit/webkitwebsettingsprivate.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@91253 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
Source/WebKit/gtk/tests/testwebsettings.c
Source/WebKit/gtk/webkit/webkitwebsettings.cpp
Source/WebKit/gtk/webkit/webkitwebsettingsprivate.h