summaryrefslogtreecommitdiff
path: root/Source/WebKit/gtk
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/gtk')
-rw-r--r--Source/WebKit/gtk/ChangeLog451
-rw-r--r--Source/WebKit/gtk/GNUmakefile.am8
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContext.h8
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextClutter.cpp19
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp39
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp67
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h5
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp52
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h4
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp4
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.h2
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp9
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/FrameNetworkingContextGtk.cpp35
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/FrameNetworkingContextGtk.h1
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/GeolocationClientGtk.cpp5
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp44
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/TextCheckerClientGtk.h2
-rw-r--r--Source/WebKit/gtk/org.webkitgtk.gschema.xml.in32
-rw-r--r--Source/WebKit/gtk/tests/testcopyandpaste.c3
-rw-r--r--Source/WebKit/gtk/tests/testkeyevents.c2
-rw-r--r--Source/WebKit/gtk/tests/testwebplugindatabase.c4
-rw-r--r--Source/WebKit/gtk/tests/testwebview.c118
-rw-r--r--Source/WebKit/gtk/webkit/webkitglobals.cpp6
-rw-r--r--Source/WebKit/gtk/webkit/webkitwebinspector.cpp39
-rw-r--r--Source/WebKit/gtk/webkit/webkitwebinspectorprivate.h4
-rw-r--r--Source/WebKit/gtk/webkit/webkitwebsettings.cpp2
-rw-r--r--Source/WebKit/gtk/webkit/webkitwebview.cpp82
-rw-r--r--Source/WebKit/gtk/webkit/webkitwebview.h4
28 files changed, 847 insertions, 204 deletions
diff --git a/Source/WebKit/gtk/ChangeLog b/Source/WebKit/gtk/ChangeLog
index 8c59bb93f..59bb90acb 100644
--- a/Source/WebKit/gtk/ChangeLog
+++ b/Source/WebKit/gtk/ChangeLog
@@ -1,3 +1,454 @@
+2012-02-24 Shinya Kawanaka <shinyak@chromium.org>
+
+ SpellCheckRequest needs to know the context where the spellcheck happened.
+ https://bugs.webkit.org/show_bug.cgi?id=79320
+
+ Reviewed by Hajime Morita.
+
+ * WebCoreSupport/TextCheckerClientGtk.h:
+ (WebKit::TextCheckerClientGtk::requestCheckingOfString):
+
+2012-02-23 ChangSeok Oh <shivamidow@gmail.com>
+
+ [GTK] DRT doesn't support scheduleAsynchronousKeyDown.
+ https://bugs.webkit.org/show_bug.cgi?id=78481
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Added a new API to deliver all mutations explicitly.
+
+ * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+ (DumpRenderTreeSupportGtk::deliverAllMutationsIfNecessary):
+ * WebCoreSupport/DumpRenderTreeSupportGtk.h:
+ (DumpRenderTreeSupportGtk):
+
+2012-02-23 Philippe Normand <pnormand@igalia.com>
+
+ [GTK] FullScreen signals
+ https://bugs.webkit.org/show_bug.cgi?id=76181
+
+ Reviewed by Martin Robinson.
+
+ Added entering-fullscreen and leaving-fullscreen signals, meant to
+ be used by the user agent to be notified when an element requests
+ full screen display and when the full screen display is to be
+ disabled.
+
+ * WebCoreSupport/ChromeClientGtk.cpp:
+ (WebKit::ChromeClient::supportsFullScreenForElement):
+ (WebKit::onFullscreenGtkKeyPressEvent):
+ (WebKit::ChromeClient::cancelFullScreen):
+ (WebKit::ChromeClient::enterFullScreenForElement):
+ (WebKit::ChromeClient::exitFullScreenForElement):
+ * WebCoreSupport/ChromeClientGtk.h:
+ * tests/testwebview.c:
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_real_entering_fullscreen):
+ (webkit_web_view_real_leaving_fullscreen):
+ (webkit_web_view_class_init):
+ * webkit/webkitwebview.h:
+
+2012-02-21 Ryosuke Niwa <rniwa@webkit.org>
+
+ Remove the remaining uses of CSSStyleDeclaration in Editor
+ https://bugs.webkit.org/show_bug.cgi?id=78939
+
+ Reviewed by Enrica Casucci.
+
+ * WebCoreSupport/EditorClientGtk.cpp:
+ (WebKit::EditorClient::shouldApplyStyle):
+ * WebCoreSupport/EditorClientGtk.h:
+ (EditorClient):
+
+2012-02-22 Philippe Normand <pnormand@igalia.com>
+
+ Unreviewed, rolling out r108522.
+ http://trac.webkit.org/changeset/108522
+ https://bugs.webkit.org/show_bug.cgi?id=76181
+
+ Broke 4 fullscreen tests on GTK.
+
+ * WebCoreSupport/ChromeClientGtk.cpp:
+ (WebKit::ChromeClient::supportsFullScreenForElement):
+ (WebKit::ChromeClient::enterFullScreenForElement):
+ (WebKit::ChromeClient::exitFullScreenForElement):
+ * WebCoreSupport/ChromeClientGtk.h:
+ (ChromeClient):
+ * tests/testwebview.c:
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_class_init):
+ * webkit/webkitwebview.h:
+ (_WebKitWebViewClass):
+
+2012-02-20 Philippe Normand <pnormand@igalia.com>
+
+ [GTK] FullScreen signals
+ https://bugs.webkit.org/show_bug.cgi?id=76181
+
+ Reviewed by Martin Robinson.
+
+ Added entering-fullscreen and leaving-fullscreen signals, meant to
+ be used by the user agent to be notified when an element requests
+ full screen display and when the full screen display is to be
+ disabled.
+
+ * WebCoreSupport/ChromeClientGtk.cpp:
+ (WebKit::ChromeClient::supportsFullScreenForElement):
+ (WebKit::onFullscreenGtkKeyPressEvent):
+ (WebKit::ChromeClient::cancelFullScreen):
+ (WebKit::ChromeClient::enterFullScreenForElement):
+ (WebKit::ChromeClient::exitFullScreenForElement):
+ * WebCoreSupport/ChromeClientGtk.h:
+ * tests/testwebview.c:
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_real_entering_fullscreen):
+ (webkit_web_view_real_leaving_fullscreen):
+ (webkit_web_view_class_init):
+ * webkit/webkitwebview.h:
+
+2012-02-22 Ryosuke Niwa <rniwa@webkit.org>
+
+ Remove the remaining uses of CSSStyleDeclaration in Editor
+ https://bugs.webkit.org/show_bug.cgi?id=78939
+
+ Reviewed by Enrica Casucci.
+
+ * WebCoreSupport/EditorClientGtk.cpp:
+ (WebKit::EditorClient::shouldApplyStyle):
+ * WebCoreSupport/EditorClientGtk.h:
+ (EditorClient):
+
+2012-02-22 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ Unreviewed, rolling out r107351.
+ http://trac.webkit.org/changeset/107351
+ https://bugs.webkit.org/show_bug.cgi?id=53600
+
+ Several issues introduced in WebKitGTK+ API
+
+ * WebCoreSupport/ChromeClientGtk.cpp:
+ (WebKit::ChromeClient::ChromeClient):
+ (WebKit::ChromeClient::chromeDestroyed):
+ (WebKit::ChromeClient::canRunModal):
+ (WebKit::ChromeClient::runModal):
+ * WebCoreSupport/ChromeClientGtk.h:
+ (ChromeClient):
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_class_init):
+
+2012-02-21 Philippe Normand <pnormand@igalia.com>
+
+ Fix one more GTK+ unit test after r108278.
+
+ Reviewed by Alejandro G. Castro.
+
+ * tests/testkeyevents.c:
+ (map_event_cb): No longer grab focus here.
+ (setup_keyevent_test): Grabbing focus here seems to be late enough in the process.
+
+2012-02-20 Martin Robinson <mrobinson@igalia.com>
+
+ Fix GTK+ unit tests after r108281.
+
+ Reviewed by Alejandro G. Castro.
+
+ * tests/testwebplugindatabase.c:
+ (test_webkit_web_plugin_database_get_plugins): Update the description used
+ in the test.
+
+2012-02-20 Martin Robinson <mrobinson@igalia.com>
+
+ Fix GTK+ unit tests after r108278.
+
+ Reviewed by Alejandro G. Castro.
+
+ Now that WebCore is no longer stealing focus, we need to
+ adjust where we grab focus to ensure that it actually succeeds.
+
+ * tests/testcopyandpaste.c:
+ (map_event_cb): No longer grab focus here.
+ (runPasteTestCallback): Grabbing focus here seems to be late enough in the process.
+
+2012-02-20 Martin Robinson <mrobinson@igalia.com>
+
+ [GTK] Web content oftens steals focus from other widgets
+ https://bugs.webkit.org/show_bug.cgi?id=77791
+
+ Reviewed by Gustavo Noronha Silva.
+
+ * tests/testwebview.c: Added a WebKit1 test to verify this behavior.
+
+2012-02-20 Gustavo Noronha Silva <gns@gnome.org>
+
+ [GTK] Needs to claim being a more up-to-date Chrome
+ https://bugs.webkit.org/show_bug.cgi?id=79044
+
+ Reviewed by Martin Robinson.
+
+ * webkit/webkitwebsettings.cpp:
+ (chromeUserAgent): update the version of Chrome we claim to be
+ to avoid warnings from sites such as Wordpress saying that our
+ browser is outdated.
+
+2012-02-19 Paweł Forysiuk <tuxator@o2.pl>
+ [GTK] Can't find webinspector and error page redirection on Windows
+ https://bugs.webkit.org/show_bug.cgi?id=51616
+
+ Use an abstraction for finding shared resources on Windows.
+
+ Reviewed by Martin Robinson.
+
+ * WebCoreSupport/FrameLoaderClientGtk.cpp:
+ (WebKit::FrameLoaderClient::dispatchDidFailLoad):
+ * WebCoreSupport/InspectorClientGtk.cpp:
+ (WebKit::InspectorClient::inspectorFilesPath):
+
+2012-02-19 Gustavo Noronha Silva <gns@gnome.org>
+
+ Unreviewed. Remove gsettings schema from EXTRA_DIST.
+
+ * GNUmakefile.am:
+
+2012-02-19 Gustavo Noronha Silva <gns@gnome.org>
+
+ [GTK] Remove unused GSettings stuff
+ https://bugs.webkit.org/show_bug.cgi?id=78995
+
+ Reviewed by Martin Robinson.
+
+ * GNUmakefile.am: remove GSettings-related stuff.
+ * WebCoreSupport/InspectorClientGtk.cpp:
+ (WebKit): Remove unused code.
+ * org.webkitgtk.gschema.xml.in: Removed.
+ * webkit/webkitwebinspector.cpp:
+ (webkit_web_inspector_execute_script): remove gsettings-related helper.
+ * webkit/webkitwebinspectorprivate.h: Ditto.
+
+2012-02-17 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ [GTK] change the way of registering DeviceOrientation clients.
+ https://bugs.webkit.org/show_bug.cgi?id=78680
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Bug 78085 removed deviceOrientationClient and deviceMotionClient from PageClients. Instead,
+ DeviceOrientationClient and DeviceMotionClient should be registered by PageSupplement class.
+ Chromium, mac and qt ports are already changed by Bug 78085.
+
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_init):
+
+2012-02-16 Martin Robinson <mrobinson@igalia.com>
+
+ [GTK] [AC] Events can starve accelerated compositing updates
+ https://bugs.webkit.org/show_bug.cgi?id=78826
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Instead of using a WebCore timer, which can be starved by GdkEvents,
+ use a raw GLib timer with GDK_PRIORITY_EVENTS to drive AC updates.
+ This prevents dragging from blocking rendering.
+
+ * WebCoreSupport/AcceleratedCompositingContext.h:
+ (AcceleratedCompositingContext): Store a GLib source tag instead of a WebCore timer.
+ * WebCoreSupport/AcceleratedCompositingContextClutter.cpp:
+ (WebKit::AcceleratedCompositingContext::AcceleratedCompositingContext):
+ (WebKit::AcceleratedCompositingContext::AcceleratedCompositingContext):
+ Remove the timer upon destruction.
+ (WebKit::syncLayersTimeoutCallback): Added this callback for the GLib timer.
+ (WebKit::AcceleratedCompositingContext::markForSync): Use a GLib timer.
+ (WebKit::AcceleratedCompositingContext::syncLayersTimeout): Ditto.
+ * WebCoreSupport/AcceleratedCompositingContextGL.cpp:
+ (WebKit::AcceleratedCompositingContext::AcceleratedCompositingContext):
+ (WebKit::AcceleratedCompositingContext::~AcceleratedCompositingContext):
+ Remove the timer upon destruction.
+ (WebKit::syncLayersTimeoutCallback): Added this callback for the GLib timer.
+ (WebKit::AcceleratedCompositingContext::markForSync): Use a GLib timer.
+ (WebKit::AcceleratedCompositingContext::syncLayersTimeout): Ditto.
+
+2012-02-16 Adam Barth <abarth@webkit.org>
+
+ Attempt to fix the GTK build.
+
+ * WebCoreSupport/GeolocationClientGtk.cpp:
+ (WebKit::GeolocationClient::requestPermission):
+ (WebKit::GeolocationClient::cancelPermissionRequest):
+
+2012-02-16 Sergio Villar Senin <svillar@igalia.com>
+
+ [soup] Move important SoupSession feature initialization to WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=68602
+
+ Reviewed by Martin Robinson.
+
+ Moved content sniffer and decoder initialization from WebKit to
+ WebCore because network stuff will not work as expected without
+ them.
+
+ No new tests required as we're just moving stuff from WebKit to
+ WebCore.
+
+ * webkit/webkitglobals.cpp:
+ (webkitInit):
+
+2012-02-16 Philippe Normand <pnormand@igalia.com>
+
+ Unreviewed, rolling out r107941.
+ http://trac.webkit.org/changeset/107941
+ https://bugs.webkit.org/show_bug.cgi?id=68602
+
+ Broke 23 http tests on GTK
+
+ * webkit/webkitglobals.cpp:
+ (webkitInit):
+
+2012-02-16 Sergio Villar Senin <svillar@igalia.com>
+
+ [soup] Move important SoupSession feature initialization to WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=68602
+
+ Reviewed by Martin Robinson.
+
+ Moved content sniffer and decoder initialization from WebKit to
+ WebCore because network stuff will not work as expected without
+ them.
+
+ No new tests required as we're just moving stuff from WebKit to
+ WebCore.
+
+ * webkit/webkitglobals.cpp:
+ (webkitInit):
+
+2012-01-31 Raphael Kubo da Costa <kubo@profusion.mobi>
+
+ [soup] Add support for multiple SoupSessions.
+ https://bugs.webkit.org/show_bug.cgi?id=77341
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Adapt to the changes to FrameNetworkingContext in WebCore.
+
+ * GNUmakefile.am:
+ * WebCoreSupport/FrameNetworkingContextGtk.cpp: Copied from Source/WebKit/gtk/WebCoreSupport/FrameNetworkingContextGtk.h.
+ (WebKit):
+ (WebKit::FrameNetworkingContextGtk::soupSession): Always return ResourceHandle::defaultSession().
+ * WebCoreSupport/FrameNetworkingContextGtk.h:
+ (FrameNetworkingContextGtk):
+
+2012-02-15 Sadrul Habib Chowdhury <sadrul@chromium.org>
+
+ Notify ChromeClient when touch-event handlers are installed/removed.
+ https://bugs.webkit.org/show_bug.cgi?id=77440
+
+ Reviewed by Darin Fisher and Ryosuke Niwa.
+
+ * WebCoreSupport/ChromeClientGtk.h:
+ (WebKit::ChromeClient::numTouchEventHandlersChanged):
+
+2012-02-15 No'am Rosenthal <noam.rosenthal@nokia.com>
+
+ [Texmap] Divide TextureMapperNode.cpp to 3 files.
+ https://bugs.webkit.org/show_bug.cgi?id=76660
+
+ Rename TextureMapperNode to TextureMapperLayer.
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * WebCoreSupport/AcceleratedCompositingContext.h:
+ (AcceleratedCompositingContext):
+ * WebCoreSupport/AcceleratedCompositingContextGL.cpp:
+ (WebKit::AcceleratedCompositingContext::AcceleratedCompositingContext):
+ (WebKit::AcceleratedCompositingContext::enabled):
+ (WebKit::AcceleratedCompositingContext::renderLayersToWindow):
+ (WebKit::AcceleratedCompositingContext::attachRootGraphicsLayer):
+ (WebKit::AcceleratedCompositingContext::syncLayersTimeout):
+
+2012-02-11 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Convert svg/animations to use SMIL methods for driving the timeline
+ https://bugs.webkit.org/show_bug.cgi?id=78422
+
+ Reviewed by Dirk Schulze.
+
+ Remove SVG animation sampling functionality provided for DRT, which no longer uses it.
+ Instead we switched the svg/animations tests to use SVGSVGElement.setCurrentTime.
+
+ * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+ * WebCoreSupport/DumpRenderTreeSupportGtk.h:
+ (DumpRenderTreeSupportGtk):
+
+2012-02-13 Mario Sanchez Prada <msanchez@igalia.com>
+
+ [GTK] Add GSList to the list of GObject types in GOwnPtr
+ https://bugs.webkit.org/show_bug.cgi?id=78487
+
+ Reviewed by Philippe Normand.
+
+ * WebCoreSupport/ChromeClientGtk.cpp:
+ (WebKit::ChromeClient::runOpenPanel): Use GOwnPtr<GSList> for the
+ list of filenames returned by gtk_file_chooser_get_filenames().
+
+2012-02-09 Zan Dobersek <zandobersek@gmail.com>
+
+ [GTK] Add DRT support for modal dialogs
+ https://bugs.webkit.org/show_bug.cgi?id=53600
+
+ Reviewed by Martin Robinson.
+
+ Add support for running modal dialogs.
+
+ A new signal is added to the WebKitWebView. When emitted, the web view
+ is requesting to be displayed as a modal dialog. If accepted, the
+ ChromeClient then establishes a loop that is run until the chrome is destroyed.
+ If denied, nothing is done.
+
+ * WebCoreSupport/ChromeClientGtk.cpp:
+ (WebKit::ChromeClient::ChromeClient):
+ (WebKit::ChromeClient::chromeDestroyed):
+ (WebKit::ChromeClient::canRunModal):
+ (WebKit::ChromeClient::runModal):
+ * WebCoreSupport/ChromeClientGtk.h:
+ (ChromeClient):
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_class_init):
+
+2012-02-09 Zan Dobersek <zandobersek@gmail.com>
+
+ [Gtk] security/set-form-autocomplete-attribute.html fails
+ https://bugs.webkit.org/show_bug.cgi?id=78261
+
+ Reviewed by Martin Robinson.
+
+ Add a helper function to DumpRenderTreeSupportGtk, returning
+ whether or not an element does perform autocompletion.
+
+ * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+ (DumpRenderTreeSupportGtk::elementDoesAutoCompleteForElementWithId):
+ * WebCoreSupport/DumpRenderTreeSupportGtk.h:
+ (DumpRenderTreeSupportGtk):
+
+2012-02-09 Martin Robinson <mrobinson@igalia.com>
+
+ Build fix for GTK+ 2.x after my previous commit.
+
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_expose_event): The name of the event is expose_event and not expose.
+
+2012-02-08 Dan Vrátil <dvratil@redhat.com>, Milan Crha <mcrha@redhat.com>
+
+ [GTK] Embedded GtkWidgets are not drawn
+ https://bugs.webkit.org/show_bug.cgi?id=63451
+
+ Insert plugin widgets to WebKitWebView container as it's children.
+ Chain up to parent in webkit_web_view_draw() to ensure the child widgets are drawn.
+
+ Reviewed by Martin Robinson.
+
+ * WebCoreSupport/FrameLoaderClientGtk.cpp:
+ (WebKit::FrameLoaderClient::createPlugin):
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_draw):
+
2012-02-08 Mario Sanchez Prada <msanchez@igalia.com>
[Gtk] atk_text_get_text_at_offset() fails to provide the correct line for list items whose text wraps
diff --git a/Source/WebKit/gtk/GNUmakefile.am b/Source/WebKit/gtk/GNUmakefile.am
index 38d2bb02a..069b5b0a5 100644
--- a/Source/WebKit/gtk/GNUmakefile.am
+++ b/Source/WebKit/gtk/GNUmakefile.am
@@ -204,6 +204,7 @@ webkitgtk_sources += \
Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.h \
Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp \
Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h \
+ Source/WebKit/gtk/WebCoreSupport/FrameNetworkingContextGtk.cpp \
Source/WebKit/gtk/WebCoreSupport/FrameNetworkingContextGtk.h \
Source/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp \
Source/WebKit/gtk/WebCoreSupport/FullscreenVideoController.h \
@@ -384,10 +385,6 @@ $(GENSOURCES_WEBKIT)/webkitenumtypes.cpp: $(webkitgtk_h_api) $(WebKit)/GNUmakefi
&& cp xgen-gtc $@ \
&& rm -f xgen-gtc
-# GSettings
-gsettings_SCHEMAS = $(top_builddir)/Source/WebKit/gtk/org.webkitgtk-@WEBKITGTK_API_VERSION@.gschema.xml
-@GSETTINGS_RULES@
-
EXTRA_DIST += \
$(WebKit)/ChangeLog \
$(WebKit)/NEWS \
@@ -400,8 +397,7 @@ EXTRA_DIST += \
$(WebKit)/po/* \
$(WebKit)/resources/* \
$(WebKit)/tests/resources/* \
- $(WebKit)/tests/test_utils.h \
- $(WebKit)/org.webkitgtk.gschema.xml.in
+ $(WebKit)/tests/test_utils.h
# extra resource files
resourcesdir = ${datadir}/webkitgtk-@WEBKITGTK_API_VERSION@/resources
diff --git a/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContext.h b/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContext.h
index 42a5f24b6..cad47495d 100644
--- a/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContext.h
+++ b/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContext.h
@@ -28,7 +28,7 @@
#include <wtf/PassOwnPtr.h>
#if USE(TEXTURE_MAPPER_GL)
-#include "TextureMapperNode.h"
+#include "TextureMapperLayer.h"
#include "WindowGLContext.h"
#endif
@@ -48,7 +48,7 @@ public:
void attachRootGraphicsLayer(WebCore::GraphicsLayer*);
void scheduleRootLayerRepaint(const WebCore::IntRect&);
void markForSync();
- void syncLayersTimeout(WebCore::Timer<AcceleratedCompositingContext>*);
+ void syncLayersTimeout();
void syncLayersNow();
void resizeRootLayer(const WebCore::IntSize&);
bool renderLayersToWindow(const WebCore::IntRect& clipRect);
@@ -64,7 +64,7 @@ public:
private:
WebKitWebView* m_webView;
OwnPtr<WebCore::GraphicsLayer> m_rootGraphicsLayer;
- WebCore::Timer<AcceleratedCompositingContext> m_syncTimer;
+ unsigned int m_syncTimerCallbackId;
#if USE(CLUTTER)
GtkWidget* m_rootLayerEmbedder;
@@ -72,7 +72,7 @@ private:
void initializeIfNecessary();
bool m_initialized;
- WebCore::TextureMapperNode* m_rootTextureMapperNode;
+ WebCore::TextureMapperLayer* m_rootTextureMapperLayer;
OwnPtr<WebCore::WindowGLContext> m_context;
OwnPtr<WebCore::TextureMapper> m_textureMapper;
#endif
diff --git a/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextClutter.cpp b/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextClutter.cpp
index b52b409e5..2e95fc56e 100644
--- a/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextClutter.cpp
+++ b/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextClutter.cpp
@@ -36,13 +36,15 @@ namespace WebKit {
AcceleratedCompositingContext::AcceleratedCompositingContext(WebKitWebView* webView)
: m_webView(webView)
, m_rootGraphicsLayer(0)
- , m_syncTimer(this, &AcceleratedCompositingContext::syncLayersTimeout)
+ , m_syncTimerCallbackId(0)
, m_rootLayerEmbedder(0)
{
}
AcceleratedCompositingContext::~AcceleratedCompositingContext()
{
+ if (m_syncTimerCallbackId)
+ g_source_remove(m_syncTimerCallbackId);
}
bool AcceleratedCompositingContext::enabled()
@@ -109,14 +111,23 @@ void AcceleratedCompositingContext::resizeRootLayer(const IntSize& size)
gtk_widget_size_allocate(GTK_WIDGET(m_webView->priv->rootLayerEmbedder), &allocation);
}
+static gboolean syncLayersTimeoutCallback(AcceleratedCompositingContext* context)
+{
+ context->syncLayersTimeout();
+ return FALSE;
+}
+
void AcceleratedCompositingContext::markForSync()
{
- if (m_syncTimer.isActive())
+ if (m_syncTimerCallbackId)
return;
- m_syncTimer.startOneShot(0);
+
+ // We use a GLib timer because otherwise GTK+ event handling during
+ // dragging can starve WebCore timers, which have a lower priority.
+ m_syncTimerCallbackId = g_timeout_add_full(GDK_PRIORITY_EVENTS, 0, reinterpret_cast<GSourceFunc>(syncLayersTimeoutCallback), this, 0);
}
-void AcceleratedCompositingContext::syncLayersTimeout(Timer<AcceleratedCompositingContext>*)
+void AcceleratedCompositingContext::syncLayersTimeout()
{
core(m_webView)->mainFrame()->view()->syncCompositingStateIncludingSubframes();
}
diff --git a/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp b/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp
index 9bfa3d0fe..8c4300f27 100644
--- a/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp
+++ b/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp
@@ -28,7 +28,7 @@
#include "FrameView.h"
#include "PlatformContextCairo.h"
#include "TextureMapperGL.h"
-#include "TextureMapperNode.h"
+#include "TextureMapperLayer.h"
#include "webkitwebviewprivate.h"
#include <GL/gl.h>
#include <cairo.h>
@@ -41,15 +41,16 @@ namespace WebKit {
AcceleratedCompositingContext::AcceleratedCompositingContext(WebKitWebView* webView)
: m_webView(webView)
- , m_syncTimer(this, &AcceleratedCompositingContext::syncLayersTimeout)
+ , m_syncTimerCallbackId(0)
, m_initialized(false)
- , m_rootTextureMapperNode(0)
+ , m_rootTextureMapperLayer(0)
{
}
AcceleratedCompositingContext::~AcceleratedCompositingContext()
{
-
+ if (m_syncTimerCallbackId)
+ g_source_remove(m_syncTimerCallbackId);
}
void AcceleratedCompositingContext::initializeIfNecessary()
@@ -69,7 +70,7 @@ void AcceleratedCompositingContext::initializeIfNecessary()
bool AcceleratedCompositingContext::enabled()
{
- return m_rootTextureMapperNode && m_textureMapper;
+ return m_rootTextureMapperLayer && m_textureMapper;
}
@@ -90,7 +91,7 @@ bool AcceleratedCompositingContext::renderLayersToWindow(const IntRect& clipRect
glViewport(0, 0, allocation.width, allocation.height);
m_textureMapper->beginPainting();
- m_rootTextureMapperNode->paint();
+ m_rootTextureMapperLayer->paint();
m_textureMapper->endPainting();
m_context->finishDrawing();
@@ -101,12 +102,12 @@ void AcceleratedCompositingContext::attachRootGraphicsLayer(GraphicsLayer* graph
{
if (!graphicsLayer) {
m_rootGraphicsLayer.clear();
- m_rootTextureMapperNode = 0;
+ m_rootTextureMapperLayer = 0;
return;
}
m_rootGraphicsLayer = GraphicsLayer::create(this);
- m_rootTextureMapperNode = toTextureMapperNode(m_rootGraphicsLayer.get());
+ m_rootTextureMapperLayer = toTextureMapperLayer(m_rootGraphicsLayer.get());
m_rootGraphicsLayer->addChild(graphicsLayer);
m_rootGraphicsLayer->setDrawsContent(true);
m_rootGraphicsLayer->setMasksToBounds(false);
@@ -127,7 +128,7 @@ void AcceleratedCompositingContext::attachRootGraphicsLayer(GraphicsLayer* graph
glViewport(0, 0, allocation.width, allocation.height);
m_textureMapper = TextureMapperGL::create();
- m_rootTextureMapperNode->setTextureMapper(m_textureMapper.get());
+ m_rootTextureMapperLayer->setTextureMapper(m_textureMapper.get());
m_rootGraphicsLayer->syncCompositingStateForThisLayerOnly();
}
@@ -150,11 +151,20 @@ void AcceleratedCompositingContext::resizeRootLayer(const IntSize& size)
m_rootGraphicsLayer->setNeedsDisplay();
}
+static gboolean syncLayersTimeoutCallback(AcceleratedCompositingContext* context)
+{
+ context->syncLayersTimeout();
+ return FALSE;
+}
+
void AcceleratedCompositingContext::markForSync()
{
- if (m_syncTimer.isActive())
+ if (m_syncTimerCallbackId)
return;
- m_syncTimer.startOneShot(0);
+
+ // We use a GLib timer because otherwise GTK+ event handling during
+ // dragging can starve WebCore timers, which have a lower priority.
+ m_syncTimerCallbackId = g_timeout_add_full(GDK_PRIORITY_EVENTS, 0, reinterpret_cast<GSourceFunc>(syncLayersTimeoutCallback), this, 0);
}
void AcceleratedCompositingContext::syncLayersNow()
@@ -165,16 +175,17 @@ void AcceleratedCompositingContext::syncLayersNow()
core(m_webView)->mainFrame()->view()->syncCompositingStateIncludingSubframes();
}
-void AcceleratedCompositingContext::syncLayersTimeout(Timer<AcceleratedCompositingContext>*)
+void AcceleratedCompositingContext::syncLayersTimeout()
{
+ m_syncTimerCallbackId = 0;
syncLayersNow();
if (!m_rootGraphicsLayer)
return;
renderLayersToWindow(IntRect());
- if (toTextureMapperNode(m_rootGraphicsLayer.get())->descendantsOrSelfHaveRunningAnimations())
- m_syncTimer.startOneShot(1.0 / 60.0);
+ if (toTextureMapperLayer(m_rootGraphicsLayer.get())->descendantsOrSelfHaveRunningAnimations())
+ m_syncTimerCallbackId = g_timeout_add_full(GDK_PRIORITY_EVENTS, 1000.0 / 60.0, reinterpret_cast<GSourceFunc>(syncLayersTimeoutCallback), this, 0);
}
void AcceleratedCompositingContext::notifyAnimationStarted(const WebCore::GraphicsLayer*, double time)
diff --git a/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp b/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
index 955c166a9..d282f290a 100644
--- a/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
+++ b/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
@@ -51,6 +51,8 @@
#include "RefPtrCairo.h"
#include "SearchPopupMenuGtk.h"
#include "SecurityOrigin.h"
+#include "WebKitDOMBinding.h"
+#include "WebKitDOMHTMLElementPrivate.h"
#include "WindowFeatures.h"
#include "webkitgeolocationpolicydecision.h"
#include "webkitgeolocationpolicydecisionprivate.h"
@@ -61,6 +63,8 @@
#include "webkitwebview.h"
#include "webkitwebviewprivate.h"
#include "webkitwebwindowfeaturesprivate.h"
+#include <gdk/gdk.h>
+#include <gdk/gdkkeysyms.h>
#include <glib.h>
#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
@@ -807,15 +811,14 @@ void ChromeClient::runOpenPanel(Frame*, PassRefPtr<FileChooser> prpFileChooser)
if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) {
if (gtk_file_chooser_get_select_multiple(GTK_FILE_CHOOSER(dialog))) {
- GSList* filenames = gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(dialog));
+ GOwnPtr<GSList> filenames(gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(dialog)));
Vector<String> names;
- for (GSList* item = filenames ; item ; item = item->next) {
+ for (GSList* item = filenames.get() ; item ; item = item->next) {
if (!item->data)
continue;
names.append(filenameToString(static_cast<char*>(item->data)));
g_free(item->data);
}
- g_slist_free(filenames);
chooser->chooseFiles(names);
} else {
gchar* filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
@@ -922,29 +925,69 @@ void ChromeClient::exitFullscreenForNode(Node* node)
#if ENABLE(FULLSCREEN_API)
bool ChromeClient::supportsFullScreenForElement(const WebCore::Element* element, bool withKeyboard)
{
- return true;
+ return !withKeyboard;
+}
+
+static gboolean onFullscreenGtkKeyPressEvent(GtkWidget* widget, GdkEventKey* event, ChromeClient* chromeClient)
+{
+ switch (event->keyval) {
+ case GDK_KEY_Escape:
+ case GDK_KEY_f:
+ case GDK_KEY_F:
+ chromeClient->cancelFullScreen();
+ return TRUE;
+ default:
+ break;
+ }
+
+ return FALSE;
+}
+
+void ChromeClient::cancelFullScreen()
+{
+ ASSERT(m_fullScreenElement);
+ m_fullScreenElement->document()->webkitCancelFullScreen();
}
void ChromeClient::enterFullScreenForElement(WebCore::Element* element)
{
+ gboolean returnValue;
+ GRefPtr<WebKitDOMHTMLElement> kitElement(adoptGRef(kit(reinterpret_cast<HTMLElement*>(element))));
+ g_signal_emit_by_name(m_webView, "entering-fullscreen", kitElement.get(), &returnValue);
+ if (returnValue)
+ return;
+
+ GtkWidget* window = gtk_widget_get_toplevel(GTK_WIDGET(m_webView));
+ if (!widgetIsOnscreenToplevelWindow(window))
+ return;
+
+ g_signal_connect(window, "key-press-event", G_CALLBACK(onFullscreenGtkKeyPressEvent), this);
+
+ m_fullScreenElement = element;
+
element->document()->webkitWillEnterFullScreenForElement(element);
m_adjustmentWatcher.disableAllScrollbars();
-#if ENABLE(VIDEO)
- if (element->tagName() == "VIDEO")
- enterFullscreenForNode(static_cast<Node*>(element));
-#endif
+ gtk_window_fullscreen(GTK_WINDOW(window));
element->document()->webkitDidEnterFullScreenForElement(element);
}
void ChromeClient::exitFullScreenForElement(WebCore::Element* element)
{
+ gboolean returnValue;
+ GRefPtr<WebKitDOMHTMLElement> kitElement(adoptGRef(kit(reinterpret_cast<HTMLElement*>(element))));
+ g_signal_emit_by_name(m_webView, "leaving-fullscreen", kitElement.get(), &returnValue);
+ if (returnValue)
+ return;
+
+ GtkWidget* window = gtk_widget_get_toplevel(GTK_WIDGET(m_webView));
+ ASSERT(widgetIsOnscreenToplevelWindow(window));
+ g_signal_handlers_disconnect_by_func(window, reinterpret_cast<void*>(onFullscreenGtkKeyPressEvent), this);
+
element->document()->webkitWillExitFullScreenForElement(element);
+ gtk_window_unfullscreen(GTK_WINDOW(window));
m_adjustmentWatcher.enableAllScrollbars();
-#if ENABLE(VIDEO)
- if (element->tagName() == "VIDEO")
- webViewExitFullscreen(m_webView);
-#endif
element->document()->webkitDidExitFullScreenForElement(element);
+ m_fullScreenElement.clear();
}
#endif
diff --git a/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h b/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
index 8c7c89233..5905f5679 100644
--- a/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
+++ b/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
@@ -155,10 +155,12 @@ namespace WebKit {
virtual bool supportsFullScreenForElement(const Element*, bool withKeyboard);
virtual void enterFullScreenForElement(Element*);
virtual void exitFullScreenForElement(Element*);
+ void cancelFullScreen();
#endif
virtual bool shouldRubberBandInDirection(ScrollDirection) const { return true; }
virtual void numWheelEventHandlersChanged(unsigned) { }
+ virtual void numTouchEventHandlersChanged(unsigned) { }
#if USE(ACCELERATED_COMPOSITING)
virtual void attachRootGraphicsLayer(Frame*, GraphicsLayer*);
@@ -185,6 +187,9 @@ namespace WebKit {
unsigned int m_repaintSoonSourceId;
void invalidateWidgetRect(const IntRect&);
+#if ENABLE(FULLSCREEN_API)
+ RefPtr<Element> m_fullScreenElement;
+#endif
};
}
diff --git a/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp b/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
index c59e1f792..8e6e26b14 100644
--- a/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
+++ b/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
@@ -61,6 +61,7 @@
#include "TextIterator.h"
#include "WebKitAccessibleWrapperAtk.h"
#include "WebKitDOMRangePrivate.h"
+#include "WebKitMutationObserver.h"
#include "WorkerThread.h"
#include "webkitglobalsprivate.h"
#include "webkitwebframe.h"
@@ -69,11 +70,6 @@
#include "webkitwebviewprivate.h"
#include <JavaScriptCore/APICast.h>
-#if ENABLE(SVG)
-#include "SVGDocumentExtensions.h"
-#include "SVGSMILElement.h"
-#endif
-
using namespace JSC;
using namespace WebCore;
using namespace WebKit;
@@ -395,22 +391,6 @@ bool DumpRenderTreeSupportGtk::pauseTransition(WebKitWebFrame* frame, const char
return core(frame)->animation()->pauseTransitionAtTime(coreElement->renderer(), AtomicString(name), time);
}
-bool DumpRenderTreeSupportGtk::pauseSVGAnimation(WebKitWebFrame* frame, const char* animationId, double time, const char* elementId)
-{
- ASSERT(core(frame));
-#if ENABLE(SVG)
- Document* document = core(frame)->document();
- if (!document || !document->svgExtensions())
- return false;
- Element* coreElement = document->getElementById(AtomicString(animationId));
- if (!coreElement || !SVGSMILElement::isSMILElement(coreElement))
- return false;
- return document->accessSVGExtensions()->sampleAnimationAtTime(elementId, static_cast<SVGSMILElement*>(coreElement), time);
-#else
- return false;
-#endif
-}
-
CString DumpRenderTreeSupportGtk::markerTextForListItem(WebKitWebFrame* frame, JSContextRef context, JSValueRef nodeObject)
{
JSC::ExecState* exec = toJS(context);
@@ -913,3 +893,33 @@ void DumpRenderTreeSupportGtk::setHixie76WebSocketProtocolEnabled(WebKitWebView*
UNUSED_PARAM(enabled);
#endif
}
+
+bool DumpRenderTreeSupportGtk::elementDoesAutoCompleteForElementWithId(WebKitWebFrame* frame, JSStringRef id)
+{
+ Frame* coreFrame = core(frame);
+ if (!coreFrame)
+ return false;
+
+ Document* document = coreFrame->document();
+ ASSERT(document);
+
+ size_t bufferSize = JSStringGetMaximumUTF8CStringSize(id);
+ GOwnPtr<gchar> idBuffer(static_cast<gchar*>(g_malloc(bufferSize)));
+ JSStringGetUTF8CString(id, idBuffer.get(), bufferSize);
+ Node* coreNode = document->getElementById(String::fromUTF8(idBuffer.get()));
+ if (!coreNode || !coreNode->renderer())
+ return false;
+
+ HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(coreNode);
+ if (!inputElement)
+ return false;
+
+ return inputElement->isTextField() && !inputElement->isPasswordField() && inputElement->shouldAutocomplete();
+}
+
+void DumpRenderTreeSupportGtk::deliverAllMutationsIfNecessary()
+{
+#if ENABLE(MUTATION_OBSERVERS)
+ WebKitMutationObserver::deliverAllMutations();
+#endif
+}
diff --git a/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h b/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
index 06d30070a..02b80c476 100644
--- a/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
+++ b/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
@@ -75,7 +75,6 @@ public:
static guint getPendingUnloadEventCount(WebKitWebFrame*);
static bool pauseAnimation(WebKitWebFrame*, const char* name, double time, const char* element);
static bool pauseTransition(WebKitWebFrame*, const char* name, double time, const char* element);
- static bool pauseSVGAnimation(WebKitWebFrame*, const char* animationId, double time, const char* elementId);
static WTF::CString markerTextForListItem(WebKitWebFrame*, JSContextRef, JSValueRef nodeObject);
static unsigned int numberOfActiveAnimations(WebKitWebFrame*);
static void suspendAnimations(WebKitWebFrame*);
@@ -87,6 +86,7 @@ public:
static void setAutofilled(JSContextRef, JSValueRef, bool);
static void setValueForUser(JSContextRef, JSValueRef, JSStringRef);
static bool shouldClose(WebKitWebFrame*);
+ static bool elementDoesAutoCompleteForElementWithId(WebKitWebFrame*, JSStringRef);
// WebKitWebView
static void executeCoreCommandByName(WebKitWebView*, const gchar* name, const gchar* value);
@@ -129,6 +129,8 @@ public:
static void setHixie76WebSocketProtocolEnabled(WebKitWebView*, bool enabled);
+ static void deliverAllMutationsIfNecessary();
+
private:
static bool s_drtRun;
static bool s_linksIncludedInTabChain;
diff --git a/Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp b/Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
index 913b0df8e..b8e160e28 100644
--- a/Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
+++ b/Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
@@ -235,10 +235,10 @@ bool EditorClient::shouldChangeSelectedRange(Range* fromRange, Range* toRange, E
return accept;
}
-bool EditorClient::shouldApplyStyle(WebCore::CSSStyleDeclaration* declaration, WebCore::Range* range)
+bool EditorClient::shouldApplyStyle(WebCore::StylePropertySet* set, WebCore::Range* range)
{
gboolean accept = TRUE;
- GRefPtr<WebKitDOMCSSStyleDeclaration> kitDeclaration(kit(declaration));
+ GRefPtr<WebKitDOMCSSStyleDeclaration> kitDeclaration(kit(set->ensureCSSStyleDeclaration()));
GRefPtr<WebKitDOMRange> kitRange(adoptGRef(kit(range)));
g_signal_emit_by_name(m_webView, "should-apply-style", kitDeclaration.get(), kitRange.get(), &accept);
return accept;
diff --git a/Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.h b/Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.h
index 2533c1644..ef159c646 100644
--- a/Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.h
+++ b/Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.h
@@ -94,7 +94,7 @@ class EditorClient : public WebCore::EditorClient {
virtual bool shouldInsertText(const WTF::String&, WebCore::Range*, WebCore::EditorInsertAction);
virtual bool shouldChangeSelectedRange(WebCore::Range* fromRange, WebCore::Range* toRange, WebCore::EAffinity, bool stillSelecting);
- virtual bool shouldApplyStyle(WebCore::CSSStyleDeclaration*, WebCore::Range*);
+ virtual bool shouldApplyStyle(WebCore::StylePropertySet*, WebCore::Range*);
virtual bool shouldMoveRangeAfterDelete(WebCore::Range*, WebCore::Range*);
diff --git a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp b/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
index 60b00e893..42a494583 100644
--- a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
+++ b/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
@@ -33,6 +33,7 @@
#include "DocumentLoader.h"
#include "DocumentLoaderGtk.h"
#include "ErrorsGtk.h"
+#include "FileSystem.h"
#include "FormState.h"
#include "FrameLoader.h"
#include "FrameNetworkingContextGtk.h"
@@ -482,8 +483,10 @@ PassRefPtr<Widget> FrameLoaderClient::createPlugin(const IntSize& pluginSize, HT
GtkWidget* gtkWidget = 0;
g_signal_emit_by_name(getViewFromFrame(m_frame), "create-plugin-widget",
mimeTypeString.data(), urlString.data(), hash.get(), &gtkWidget);
- if (gtkWidget)
+ if (gtkWidget) {
+ gtk_container_add(GTK_CONTAINER(getViewFromFrame(m_frame)), gtkWidget);
return adoptRef(new GtkPluginWidget(gtkWidget));
+ }
RefPtr<PluginView> pluginView = PluginView::create(core(m_frame), pluginSize, element, url, paramNames, paramValues, mimeType, loadManually);
@@ -1103,7 +1106,9 @@ void FrameLoaderClient::dispatchDidFailLoad(const ResourceError& error)
String content;
gchar* fileContent = 0;
- gchar* errorURI = g_filename_to_uri(DATA_DIR"/webkit-1.0/resources/error.html", NULL, NULL);
+ GOwnPtr<gchar> errorPath(g_build_filename(sharedResourcesPath().data(), "resources", "error.html", NULL));
+ gchar* errorURI = g_filename_to_uri(errorPath.get(), 0, 0);
+
GFile* errorFile = g_file_new_for_uri(errorURI);
g_free(errorURI);
diff --git a/Source/WebKit/gtk/WebCoreSupport/FrameNetworkingContextGtk.cpp b/Source/WebKit/gtk/WebCoreSupport/FrameNetworkingContextGtk.cpp
new file mode 100644
index 000000000..4b9d12491
--- /dev/null
+++ b/Source/WebKit/gtk/WebCoreSupport/FrameNetworkingContextGtk.cpp
@@ -0,0 +1,35 @@
+/*
+ Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ Copyright (C) 2012 ProFUSION embedded systems
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "config.h"
+#include "FrameNetworkingContextGtk.h"
+
+#include "ResourceHandle.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+SoupSession* FrameNetworkingContextGtk::soupSession() const
+{
+ return ResourceHandle::defaultSession();
+}
+
+}
diff --git a/Source/WebKit/gtk/WebCoreSupport/FrameNetworkingContextGtk.h b/Source/WebKit/gtk/WebCoreSupport/FrameNetworkingContextGtk.h
index 8e4c2148d..a59a94099 100644
--- a/Source/WebKit/gtk/WebCoreSupport/FrameNetworkingContextGtk.h
+++ b/Source/WebKit/gtk/WebCoreSupport/FrameNetworkingContextGtk.h
@@ -32,6 +32,7 @@ public:
}
WebCore::Frame* coreFrame() const { return frame(); }
+ virtual SoupSession* soupSession() const;
private:
FrameNetworkingContextGtk(WebCore::Frame* frame)
diff --git a/Source/WebKit/gtk/WebCoreSupport/GeolocationClientGtk.cpp b/Source/WebKit/gtk/WebCoreSupport/GeolocationClientGtk.cpp
index fac1d73af..06e9fbd3f 100644
--- a/Source/WebKit/gtk/WebCoreSupport/GeolocationClientGtk.cpp
+++ b/Source/WebKit/gtk/WebCoreSupport/GeolocationClientGtk.cpp
@@ -24,6 +24,7 @@
#if ENABLE(CLIENT_BASED_GEOLOCATION)
#include "Chrome.h"
+#include "ChromeClient.h"
#include "Geolocation.h"
#include "GeolocationController.h"
#include "GeolocationError.h"
@@ -137,12 +138,12 @@ WebCore::GeolocationPosition* GeolocationClient::lastPosition()
void GeolocationClient::requestPermission(WebCore::Geolocation* geolocation)
{
- core(m_webView)->chrome()->requestGeolocationPermissionForFrame(geolocation->frame(), geolocation);
+ core(m_webView)->chrome()->client()->requestGeolocationPermissionForFrame(geolocation->frame(), geolocation);
}
void GeolocationClient::cancelPermissionRequest(WebCore::Geolocation* geolocation)
{
- core(m_webView)->chrome()->cancelGeolocationPermissionRequestForFrame(geolocation->frame(), geolocation);
+ core(m_webView)->chrome()->client()->cancelGeolocationPermissionRequestForFrame(geolocation->frame(), geolocation);
}
void GeolocationClient::positionChanged(GeocluePosition*, GeocluePositionFields fields, int timestamp, double latitude, double longitude, double altitude, GeoclueAccuracy* accuracy)
diff --git a/Source/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp b/Source/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
index d4d321d93..c1dd9b911 100644
--- a/Source/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
+++ b/Source/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
@@ -20,6 +20,7 @@
#include "config.h"
#include "InspectorClientGtk.h"
+#include "FileSystem.h"
#include "Frame.h"
#include "InspectorController.h"
#include "NotImplemented.h"
@@ -48,55 +49,16 @@ public:
virtual ~InspectorFrontendSettingsGtk() { }
private:
-#ifdef HAVE_GSETTINGS
- static bool shouldIgnoreSetting(const String& key)
- {
- // GSettings considers trying to fetch or set a setting that is
- // not backed by a schema as programmer error, and aborts the
- // program's execution. We check here to avoid having an unhandled
- // setting as a fatal error.
- LOG_VERBOSE(NotYetImplemented, "Unknown key ignored: %s", key.ascii().data());
- return true;
- }
-
virtual String getProperty(const String& name)
{
- if (shouldIgnoreSetting(name))
- return String();
-
- GSettings* settings = inspectorGSettings();
- if (!settings)
- return String();
-
- GRefPtr<GVariant> variant = adoptGRef(g_settings_get_value(settings, name.utf8().data()));
- return String(g_variant_get_string(variant.get(), 0));
- }
-
- virtual void setProperty(const String& name, const String& value)
- {
- // Avoid setting unknown keys to avoid aborting the execution.
- if (shouldIgnoreSetting(name))
- return;
-
- GSettings* settings = inspectorGSettings();
- if (!settings)
- return;
-
- GRefPtr<GVariant> variant = adoptGRef(g_variant_new_string(value.utf8().data()));
- g_settings_set_value(settings, name.utf8().data(), variant.get());
- }
-#else
- virtual String getProperty(const String&)
- {
notImplemented();
return String();
}
- virtual void setProperty(const String&, const String&)
+ virtual void setProperty(const String& name, const String& value)
{
notImplemented();
}
-#endif // HAVE_GSETTINGS
};
} // namespace
@@ -202,7 +164,7 @@ const char* InspectorClient::inspectorFilesPath()
if (environmentPath && g_file_test(environmentPath, G_FILE_TEST_IS_DIR))
m_inspectorFilesPath.set(g_strdup(environmentPath));
else
- m_inspectorFilesPath.set(g_build_filename(DATA_DIR, "webkitgtk-"WEBKITGTK_API_VERSION_STRING, "webinspector", NULL));
+ m_inspectorFilesPath.set(g_build_filename(sharedResourcesPath().data(), "webinspector", NULL));
return m_inspectorFilesPath.get();
}
diff --git a/Source/WebKit/gtk/WebCoreSupport/TextCheckerClientGtk.h b/Source/WebKit/gtk/WebCoreSupport/TextCheckerClientGtk.h
index e5390bcc9..b3fa04994 100644
--- a/Source/WebKit/gtk/WebCoreSupport/TextCheckerClientGtk.h
+++ b/Source/WebKit/gtk/WebCoreSupport/TextCheckerClientGtk.h
@@ -48,7 +48,7 @@ class TextCheckerClientGtk : public WebCore::TextCheckerClient {
virtual WTF::String getAutoCorrectSuggestionForMisspelledWord(const WTF::String&);
virtual void checkGrammarOfString(const UChar*, int length, WTF::Vector<WebCore::GrammarDetail>&, int* badGrammarLocation, int* badGrammarLength);
virtual void getGuessesForWord(const WTF::String& word, const WTF::String& context, WTF::Vector<WTF::String>& guesses);
- virtual void requestCheckingOfString(WebCore::SpellChecker*, int, WebCore::TextCheckingTypeMask, const WTF::String&) {}
+ virtual void requestCheckingOfString(WebCore::SpellChecker*, const WebCore::TextCheckingRequest&) { }
void updateSpellCheckingLanguage(const char*);
private:
diff --git a/Source/WebKit/gtk/org.webkitgtk.gschema.xml.in b/Source/WebKit/gtk/org.webkitgtk.gschema.xml.in
deleted file mode 100644
index 17063f4b8..000000000
--- a/Source/WebKit/gtk/org.webkitgtk.gschema.xml.in
+++ /dev/null
@@ -1,32 +0,0 @@
-<schemalist>
- <schema id="org.webkitgtk-@WEBKITGTK_API_VERSION@" path="/system/webkitgtk/">
- <child schema="org.webkitgtk-@WEBKITGTK_API_VERSION@.inspector" name="inspector"/>
- </schema>
- <schema id="org.webkitgtk-@WEBKITGTK_API_VERSION@.inspector" path="/system/webkitgtk/inspector/">
- <key name="resource-tracking-enabled" type="b">
- <default>false</default>
- <summary>Resource Tracking Enabled</summary>
- <description>Whether the Resource Tracking panel is always enabled.</description>
- </key>
- <key name="xhr-monitor-enabled" type="b">
- <default>false</default>
- <summary>XHR Monitor Enabled</summary>
- <description>Whether the XHR monitor is always enabled.</description>
- </key>
- <key name="debugger-enabled" type="b">
- <default>false</default>
- <summary>Debugger Enabled</summary>
- <description>Whether the debugger is always enabled.</description>
- </key>
- <key name="profiler-enabled" type="b">
- <default>false</default>
- <summary>Profiler Enabled</summary>
- <description>Whether the profiler is always enabled.</description>
- </key>
- <key name="frontend-settings" type="s">
- <default>''</default>
- <summary>Misc Inspector Frontend Settings</summary>
- <description>Miscelaneous Settings managed by the Inspector Frontend</description>
- </key>
- </schema>
-</schemalist>
diff --git a/Source/WebKit/gtk/tests/testcopyandpaste.c b/Source/WebKit/gtk/tests/testcopyandpaste.c
index 6d1b48080..7d8dd8f0d 100644
--- a/Source/WebKit/gtk/tests/testcopyandpaste.c
+++ b/Source/WebKit/gtk/tests/testcopyandpaste.c
@@ -111,7 +111,6 @@ static void load_status_cb(WebKitWebView* webView, GParamSpec* spec, gpointer da
gboolean map_event_cb(GtkWidget *widget, GdkEvent* event, gpointer data)
{
- gtk_widget_grab_focus(widget);
CopyAndPasteFixture* fixture = (CopyAndPasteFixture*)data;
webkit_web_view_load_string(fixture->webView, fixture->info->page,
"text/html", "utf-8", "file://");
@@ -137,6 +136,8 @@ static void test_copy_and_paste(CopyAndPasteFixture* fixture, gconstpointer data
static CopyAndPasteFixture* currentFixture;
static JSValueRef runPasteTestCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
+ gtk_widget_grab_focus(GTK_WIDGET(currentFixture->webView));
+
// Simulate a paste keyboard sequence.
GdkEvent* event = gdk_event_new(GDK_KEY_PRESS);
event->key.keyval = gdk_unicode_to_keyval('v');
diff --git a/Source/WebKit/gtk/tests/testkeyevents.c b/Source/WebKit/gtk/tests/testkeyevents.c
index cf33d4abe..b55b4bcaf 100644
--- a/Source/WebKit/gtk/tests/testkeyevents.c
+++ b/Source/WebKit/gtk/tests/testkeyevents.c
@@ -118,7 +118,6 @@ static void test_keypress_events_load_status_cb(WebKitWebView* webView, GParamSp
gboolean map_event_cb(GtkWidget *widget, GdkEvent* event, gpointer data)
{
- gtk_widget_grab_focus(widget);
KeyEventFixture* fixture = (KeyEventFixture*)data;
webkit_web_view_load_string(fixture->webView, fixture->info->page,
"text/html", "utf-8", "file://");
@@ -131,6 +130,7 @@ static void setup_keyevent_test(KeyEventFixture* fixture, gconstpointer data, GC
g_signal_connect(fixture->window, "map-event",
G_CALLBACK(map_event_cb), fixture);
+ gtk_widget_grab_focus(GTK_WIDGET(fixture->webView));
gtk_widget_show(fixture->window);
gtk_widget_show(GTK_WIDGET(fixture->webView));
gtk_window_present(GTK_WINDOW(fixture->window));
diff --git a/Source/WebKit/gtk/tests/testwebplugindatabase.c b/Source/WebKit/gtk/tests/testwebplugindatabase.c
index db2529f3a..f5e23d08a 100644
--- a/Source/WebKit/gtk/tests/testwebplugindatabase.c
+++ b/Source/WebKit/gtk/tests/testwebplugindatabase.c
@@ -44,7 +44,7 @@ static void test_webkit_web_plugin_database_get_plugins()
for (p = pluginList; p; p = p->next) {
WebKitWebPlugin* plugin = (WebKitWebPlugin*)p->data;
if (!g_strcmp0(webkit_web_plugin_get_name(plugin), "WebKit Test PlugIn") &&
- !g_strcmp0(webkit_web_plugin_get_description(plugin), "Simple Netscape plug-in that handles test content for WebKit")) {
+ !g_strcmp0(webkit_web_plugin_get_description(plugin), "Simple Netscape® plug-in that handles test content for WebKit")) {
found = TRUE;
enabled = webkit_web_plugin_get_enabled(plugin);
webkit_web_plugin_set_enabled(plugin, FALSE);
@@ -60,7 +60,7 @@ static void test_webkit_web_plugin_database_get_plugins()
for (p = pluginList; p; p = p->next) {
WebKitWebPlugin* plugin = (WebKitWebPlugin*)p->data;
if (!g_strcmp0(webkit_web_plugin_get_name(plugin), "WebKit Test PlugIn") &&
- !g_strcmp0(webkit_web_plugin_get_description(plugin), "Simple Netscape plug-in that handles test content for WebKit"))
+ !g_strcmp0(webkit_web_plugin_get_description(plugin), "Simple Netscape® plug-in that handles test content for WebKit"))
enabled = webkit_web_plugin_get_enabled(plugin);
}
webkit_web_plugin_database_plugins_list_free(pluginList);
diff --git a/Source/WebKit/gtk/tests/testwebview.c b/Source/WebKit/gtk/tests/testwebview.c
index 41cf308f6..ab3bd5576 100644
--- a/Source/WebKit/gtk/tests/testwebview.c
+++ b/Source/WebKit/gtk/tests/testwebview.c
@@ -382,6 +382,121 @@ static void test_webkit_web_view_in_offscreen_window_does_not_crash()
g_main_loop_unref(loop);
}
+static void test_webkit_web_view_does_not_steal_focus()
+{
+ loop = g_main_loop_new(NULL, TRUE);
+
+ GtkWidget *window = gtk_offscreen_window_new();
+ GtkWidget *webView = webkit_web_view_new();
+ GtkWidget *entry = gtk_entry_new();
+ GtkWidget *box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
+
+ gtk_container_add(GTK_CONTAINER(box), webView);
+ gtk_container_add(GTK_CONTAINER(box), entry);
+ gtk_container_add(GTK_CONTAINER(window), box);
+ gtk_widget_show_all(window);
+
+ gtk_widget_grab_focus(entry);
+ g_assert(gtk_widget_is_focus(entry));
+
+ g_signal_connect(webView, "notify::load-status", G_CALLBACK(idle_quit_loop_cb), NULL);
+ webkit_web_view_load_html_string(WEBKIT_WEB_VIEW(webView),
+ "<html><body>"
+ " <input id=\"entry\" type=\"text\"/>"
+ " <script>"
+ " document.getElementById(\"entry\").focus();"
+ " </script>"
+ "</body></html>", "file://");
+
+ g_main_loop_run(loop);
+
+ g_assert(gtk_widget_is_focus(entry));
+
+ gtk_widget_destroy(window);
+ g_main_loop_unref(loop);
+}
+
+static gboolean emitKeyStroke(WebKitWebView* webView)
+{
+ GdkEvent* pressEvent = gdk_event_new(GDK_KEY_PRESS);
+ pressEvent->key.keyval = GDK_KEY_f;
+ GdkWindow* window = gtk_widget_get_window(GTK_WIDGET(webView));
+ pressEvent->key.window = window;
+ g_object_ref(pressEvent->key.window);
+
+ GdkDeviceManager* manager = gdk_display_get_device_manager(gdk_window_get_display(window));
+ gdk_event_set_device(pressEvent, gdk_device_manager_get_client_pointer(manager));
+
+ // When synthesizing an event, an invalid hardware_keycode value
+ // can cause it to be badly processed by Gtk+.
+ GdkKeymapKey* keys;
+ gint n_keys;
+ if (gdk_keymap_get_entries_for_keyval(gdk_keymap_get_default(), GDK_KEY_f, &keys, &n_keys)) {
+ pressEvent->key.hardware_keycode = keys[0].keycode;
+ g_free(keys);
+ }
+
+ GdkEvent* releaseEvent = gdk_event_copy(pressEvent);
+ gtk_main_do_event(pressEvent);
+ gdk_event_free(pressEvent);
+ releaseEvent->key.type = GDK_KEY_RELEASE;
+ gtk_main_do_event(releaseEvent);
+ gdk_event_free(releaseEvent);
+
+ return FALSE;
+}
+
+static gboolean entering_fullscreen_cb(WebKitWebView* webView, GObject* element, gboolean blocked)
+{
+ if (blocked)
+ g_main_loop_quit(loop);
+ else
+ g_timeout_add(200, (GSourceFunc) emitKeyStroke, webView);
+ return blocked;
+}
+
+static gboolean leaving_fullscreen_cb(WebKitWebView* webView, GObject* element, gpointer data)
+{
+ g_main_loop_quit(loop);
+ return FALSE;
+}
+
+static void test_webkit_web_view_fullscreen(gconstpointer blocked)
+{
+ GtkWidget* window;
+ GtkWidget* web_view;
+ WebKitWebSettings *settings;
+
+ window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+ web_view = webkit_web_view_new();
+
+ settings = webkit_web_view_get_settings(WEBKIT_WEB_VIEW(web_view));
+ g_object_set(settings, "enable-fullscreen", TRUE, NULL);
+ webkit_web_view_set_settings(WEBKIT_WEB_VIEW(web_view), settings);
+
+ gtk_container_add(GTK_CONTAINER(window), web_view);
+
+ gtk_widget_show_all(window);
+
+ loop = g_main_loop_new(NULL, TRUE);
+
+ g_signal_connect(web_view, "entering-fullscreen", G_CALLBACK(entering_fullscreen_cb), (gpointer) blocked);
+ g_signal_connect(web_view, "leaving-fullscreen", G_CALLBACK(leaving_fullscreen_cb), NULL);
+
+ webkit_web_view_load_string(WEBKIT_WEB_VIEW(web_view), "<html><body>"
+ "<script>"
+ "var eventName = 'keypress';"
+ "document.addEventListener(eventName, function () {"
+ " document.documentElement.webkitRequestFullScreen();"
+ "}, false);"
+ "</script></body></html>", NULL, NULL, NULL);
+
+ g_timeout_add(100, (GSourceFunc) emitKeyStroke, WEBKIT_WEB_VIEW(web_view));
+ g_main_loop_run(loop);
+
+ gtk_widget_destroy(window);
+}
+
int main(int argc, char** argv)
{
SoupServer* server;
@@ -410,6 +525,9 @@ int main(int argc, char** argv)
g_test_add_func("/webkit/webview/grab_focus", test_webkit_web_view_grab_focus);
g_test_add_func("/webkit/webview/window-features", test_webkit_web_view_window_features);
g_test_add_func("/webkit/webview/webview-in-offscreen-window-does-not-crash", test_webkit_web_view_in_offscreen_window_does_not_crash);
+ g_test_add_func("/webkit/webview/webview-does-not-steal-focus", test_webkit_web_view_does_not_steal_focus);
+ g_test_add_data_func("/webkit/webview/fullscreen", GINT_TO_POINTER(FALSE), test_webkit_web_view_fullscreen);
+ g_test_add_data_func("/webkit/webview/fullscreen-blocked", GINT_TO_POINTER(TRUE), test_webkit_web_view_fullscreen);
return g_test_run ();
}
diff --git a/Source/WebKit/gtk/webkit/webkitglobals.cpp b/Source/WebKit/gtk/webkit/webkitglobals.cpp
index 3967c6376..bc5d72604 100644
--- a/Source/WebKit/gtk/webkit/webkitglobals.cpp
+++ b/Source/WebKit/gtk/webkit/webkitglobals.cpp
@@ -336,12 +336,6 @@ void webkitInit()
soup_session_add_feature(session, authDialog);
g_object_unref(authDialog);
- SoupSessionFeature* sniffer = static_cast<SoupSessionFeature*>(g_object_new(SOUP_TYPE_CONTENT_SNIFFER, NULL));
- soup_session_add_feature(session, sniffer);
- g_object_unref(sniffer);
-
- soup_session_add_feature_by_type(session, SOUP_TYPE_CONTENT_DECODER);
-
#if USE(CLUTTER)
gtk_clutter_init(0, 0);
#endif
diff --git a/Source/WebKit/gtk/webkit/webkitwebinspector.cpp b/Source/WebKit/gtk/webkit/webkitwebinspector.cpp
index c93c2bdb2..692079f68 100644
--- a/Source/WebKit/gtk/webkit/webkitwebinspector.cpp
+++ b/Source/WebKit/gtk/webkit/webkitwebinspector.cpp
@@ -577,42 +577,3 @@ void webkit_web_inspector_execute_script(WebKitWebInspector* webInspector, long
WebKitWebInspectorPrivate* priv = webInspector->priv;
priv->page->inspectorController()->evaluateForTestInFrontend(callId, script);
}
-
-#ifdef HAVE_GSETTINGS
-static bool isSchemaAvailable(const char* schemaID)
-{
- const char* const* availableSchemas = g_settings_list_schemas();
- char* const* iter = const_cast<char* const*>(availableSchemas);
-
- while (*iter) {
- if (g_str_equal(schemaID, *iter))
- return true;
- iter++;
- }
-
- return false;
-}
-
-GSettings* inspectorGSettings()
-{
- static GSettings* settings = 0;
- if (settings)
- return settings;
-
- // Unfortunately GSettings will abort the process execution if the schema is not
- // installed, which is the case for when running tests, or even the introspection dump
- // at build time, so check if we have the schema before trying to initialize it.
- const gchar* schemaID = "org.webkitgtk-"WEBKITGTK_API_VERSION_STRING".inspector";
- if (!isSchemaAvailable(schemaID)) {
-
- // This warning is very common on the build bots, which hides valid warnings.
- // Skip printing it if we are running inside DumpRenderTree.
- if (!DumpRenderTreeSupportGtk::dumpRenderTreeModeEnabled())
- g_warning("GSettings schema not found - settings will not be used or saved.");
- return 0;
- }
-
- settings = g_settings_new(schemaID);
- return settings;
-}
-#endif
diff --git a/Source/WebKit/gtk/webkit/webkitwebinspectorprivate.h b/Source/WebKit/gtk/webkit/webkitwebinspectorprivate.h
index 46d57b0b8..64ba09a5d 100644
--- a/Source/WebKit/gtk/webkit/webkitwebinspectorprivate.h
+++ b/Source/WebKit/gtk/webkit/webkitwebinspectorprivate.h
@@ -25,10 +25,6 @@
extern "C" {
-#ifdef HAVE_GSETTINGS
-GSettings* inspectorGSettings();
-#endif
-
void webkit_web_inspector_set_inspector_client(WebKitWebInspector*, WebCore::Page*);
void webkit_web_inspector_set_web_view(WebKitWebInspector*, WebKitWebView*);
diff --git a/Source/WebKit/gtk/webkit/webkitwebsettings.cpp b/Source/WebKit/gtk/webkit/webkitwebsettings.cpp
index d91c3bbf3..bf6ff600d 100644
--- a/Source/WebKit/gtk/webkit/webkitwebsettings.cpp
+++ b/Source/WebKit/gtk/webkit/webkitwebsettings.cpp
@@ -183,7 +183,7 @@ static String chromeUserAgent()
DEFINE_STATIC_LOCAL(const String, uaVersion, (makeString(String::number(WEBKIT_USER_AGENT_MAJOR_VERSION), '.', String::number(WEBKIT_USER_AGENT_MINOR_VERSION), '+')));
DEFINE_STATIC_LOCAL(const String, staticUA, (makeString("Mozilla/5.0 (", webkitPlatform(), webkitOSVersion(), ") AppleWebKit/", uaVersion) +
- makeString(" (KHTML, like Gecko) Chromium/15.0.874.120 Chrome/15.0.874.120 Safari/", uaVersion)));
+ makeString(" (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/", uaVersion)));
return staticUA;
}
diff --git a/Source/WebKit/gtk/webkit/webkitwebview.cpp b/Source/WebKit/gtk/webkit/webkitwebview.cpp
index c22461c74..89b9c228f 100644
--- a/Source/WebKit/gtk/webkit/webkitwebview.cpp
+++ b/Source/WebKit/gtk/webkit/webkitwebview.cpp
@@ -212,6 +212,8 @@ enum {
RESOURCE_LOAD_FINISHED,
RESOURCE_CONTENT_LENGTH_RECEIVED,
RESOURCE_LOAD_FAILED,
+ ENTERING_FULLSCREEN,
+ LEAVING_FULLSCREEN,
LAST_SIGNAL
};
@@ -639,6 +641,9 @@ static gboolean webkit_web_view_expose_event(GtkWidget* widget, GdkEventExpose*
copyRectFromCairoSurfaceToContext(WEBKIT_WEB_VIEW(widget)->priv->backingStore->cairoSurface(),
cr.get(), IntSize(), IntRect(rects.get()[i]));
}
+
+ // Chaining up to the parent forces child widgets to be drawn.
+ GTK_WIDGET_CLASS(webkit_web_view_parent_class)->expose_event(widget, event);
return FALSE;
}
#else
@@ -667,6 +672,8 @@ static gboolean webkit_web_view_draw(GtkWidget* widget, cairo_t* cr)
}
cairo_rectangle_list_destroy(rectList);
+ // Chaining up to the parent forces child widgets to be drawn.
+ GTK_WIDGET_CLASS(webkit_web_view_parent_class)->draw(widget, cr);
return FALSE;
}
#endif // GTK_API_VERSION_2
@@ -1295,6 +1302,16 @@ static gboolean webkit_web_view_real_should_allow_editing_action(WebKitWebView*)
return TRUE;
}
+static gboolean webkit_web_view_real_entering_fullscreen(WebKitWebView* webView)
+{
+ return FALSE;
+}
+
+static gboolean webkit_web_view_real_leaving_fullscreen(WebKitWebView* webView)
+{
+ return FALSE;
+}
+
static void webkit_web_view_dispose(GObject* object)
{
WebKitWebView* webView = WEBKIT_WEB_VIEW(object);
@@ -2650,6 +2667,59 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
G_TYPE_NONE, 1,
WEBKIT_TYPE_VIEWPORT_ATTRIBUTES);
+ /**
+ * WebKitWebView::entering-fullscreen:
+ * @web_view: the #WebKitWebView on which the signal is emitted.
+ * @element: the #WebKitDOMHTMLElement which has requested full screen display.
+ *
+ * Emitted when JavaScript code calls
+ * <function>element.webkitRequestFullScreen</function>. If the
+ * signal is not handled the WebView will proceed to full screen
+ * its top level window. This signal can be used by client code to
+ * request permission to the user prior doing the full screen
+ * transition and eventually prepare the top-level window
+ * (e.g. hide some widgets that would otherwise be part of the
+ * full screen window).
+ *
+ * Returns: %TRUE to stop other handlers from being invoked for the event.
+ * %FALSE to continue emission of the event.
+ *
+ * Since: 1.9.0
+ */
+ webkit_web_view_signals[ENTERING_FULLSCREEN] =
+ g_signal_new("entering-fullscreen",
+ G_TYPE_FROM_CLASS(webViewClass),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET(WebKitWebViewClass, entering_fullscreen),
+ g_signal_accumulator_true_handled, 0,
+ webkit_marshal_BOOLEAN__OBJECT,
+ G_TYPE_BOOLEAN, 1, WEBKIT_TYPE_DOM_HTML_ELEMENT);
+
+
+ /**
+ * WebKitWebView::leaving-fullscreen:
+ * @web_view: the #WebKitWebView on which the signal is emitted.
+ * @element: the #WebKitDOMHTMLElement which is currently displayed full screen.
+ *
+ * Emitted when the WebView is about to restore its top level
+ * window out of its full screen state. This signal can be used by
+ * client code to restore widgets hidden during the
+ * entering-fullscreen stage for instance.
+ *
+ * Returns: %TRUE to stop other handlers from being invoked for the event.
+ * %FALSE to continue emission of the event.
+ *
+ * Since: 1.9.0
+ */
+ webkit_web_view_signals[LEAVING_FULLSCREEN] =
+ g_signal_new("leaving-fullscreen",
+ G_TYPE_FROM_CLASS(webViewClass),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET(WebKitWebViewClass, leaving_fullscreen),
+ g_signal_accumulator_true_handled, 0,
+ webkit_marshal_BOOLEAN__OBJECT,
+ G_TYPE_BOOLEAN, 1, WEBKIT_TYPE_DOM_HTML_ELEMENT);
+
/*
* WebKitWebView::resource-response-received
* @webView: the object which received the signal
@@ -2758,6 +2828,8 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
webViewClass->redo = webkit_web_view_real_redo;
webViewClass->move_cursor = webkit_web_view_real_move_cursor;
webViewClass->should_allow_editing_action = webkit_web_view_real_should_allow_editing_action;
+ webViewClass->entering_fullscreen = webkit_web_view_real_entering_fullscreen;
+ webViewClass->leaving_fullscreen = webkit_web_view_real_leaving_fullscreen;
GObjectClass* objectClass = G_OBJECT_CLASS(webViewClass);
objectClass->dispose = webkit_web_view_dispose;
@@ -3417,11 +3489,6 @@ static void webkit_web_view_init(WebKitWebView* webView)
pageClients.dragClient = new WebKit::DragClient(webView);
pageClients.inspectorClient = new WebKit::InspectorClient(webView);
-#if ENABLE(DEVICE_ORIENTATION)
- pageClients.deviceMotionClient = static_cast<WebCore::DeviceMotionClient*>(new DeviceMotionClientGtk);
- pageClients.deviceOrientationClient = static_cast<WebCore::DeviceOrientationClient*>(new DeviceOrientationClientGtk);
-#endif
-
#if ENABLE(CLIENT_BASED_GEOLOCATION)
if (DumpRenderTreeSupportGtk::dumpRenderTreeModeEnabled())
pageClients.geolocationClient = new GeolocationClientMock;
@@ -3431,6 +3498,11 @@ static void webkit_web_view_init(WebKitWebView* webView)
priv->corePage = new Page(pageClients);
+#if ENABLE(DEVICE_ORIENTATION)
+ WebCore::provideDeviceMotionTo(priv->corePage, new DeviceMotionClientGtk);
+ WebCore::provideDeviceOrientationTo(priv->corePage, new DeviceOrientationClientGtk);
+#endif
+
#if ENABLE(CLIENT_BASED_GEOLOCATION)
if (DumpRenderTreeSupportGtk::dumpRenderTreeModeEnabled())
static_cast<GeolocationClientMock*>(pageClients.geolocationClient)->setController(priv->corePage->geolocationController());
diff --git a/Source/WebKit/gtk/webkit/webkitwebview.h b/Source/WebKit/gtk/webkit/webkitwebview.h
index 678e32966..2a15b53c6 100644
--- a/Source/WebKit/gtk/webkit/webkitwebview.h
+++ b/Source/WebKit/gtk/webkit/webkitwebview.h
@@ -176,11 +176,11 @@ struct _WebKitWebViewClass {
void (* undo) (WebKitWebView *web_view);
void (* redo) (WebKitWebView *web_view);
gboolean (* should_allow_editing_action) (WebKitWebView *web_view);
+ gboolean (* entering_fullscreen) (WebKitWebView *web_view);
+ gboolean (* leaving_fullscreen) (WebKitWebView *web_view);
/* Padding for future expansion */
void (*_webkit_reserved0) (void);
- void (*_webkit_reserved1) (void);
- void (*_webkit_reserved2) (void);
};
WEBKIT_API GType