summaryrefslogtreecommitdiff
path: root/Source/WebKit/gtk
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/gtk')
-rw-r--r--Source/WebKit/gtk/ChangeLog182
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContext.h7
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp53
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h3
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp21
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h4
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp2
-rw-r--r--Source/WebKit/gtk/WebCoreSupport/FullscreenVideoController.h2
-rw-r--r--Source/WebKit/gtk/po/ChangeLog9
-rw-r--r--Source/WebKit/gtk/po/GNUmakefile.am14
-rw-r--r--Source/WebKit/gtk/tests/testcopyandpaste.c1
-rw-r--r--Source/WebKit/gtk/tests/testwebinspector.c51
-rw-r--r--Source/WebKit/gtk/tests/testwebview.c9
-rw-r--r--Source/WebKit/gtk/webkit/webkitwebframe.cpp43
-rw-r--r--Source/WebKit/gtk/webkit/webkitwebresource.cpp37
-rw-r--r--Source/WebKit/gtk/webkit/webkitwebsettings.cpp25
-rw-r--r--Source/WebKit/gtk/webkit/webkitwebsettingsprivate.h1
-rw-r--r--Source/WebKit/gtk/webkit/webkitwebview.cpp117
-rw-r--r--Source/WebKit/gtk/webkit/webkitwebviewprivate.h2
19 files changed, 408 insertions, 175 deletions
diff --git a/Source/WebKit/gtk/ChangeLog b/Source/WebKit/gtk/ChangeLog
index 59bb90acb..7940ca3cd 100644
--- a/Source/WebKit/gtk/ChangeLog
+++ b/Source/WebKit/gtk/ChangeLog
@@ -1,3 +1,185 @@
+2012-03-07 Kangil Han <kangil.han@samsung.com>
+
+ [DRT] Remove PlainTextController implementations.
+ https://bugs.webkit.org/show_bug.cgi?id=79959
+
+ Reviewed by Hajime Morita.
+
+ PlainTextController usages in existing tests have been
+ replaced by internals API by bug 78570.
+ So this patch will remove PlainTextController implementations
+ to avoid further usage in new tests.
+
+ * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+ * WebCoreSupport/DumpRenderTreeSupportGtk.h:
+ (DumpRenderTreeSupportGtk):
+
+2012-03-06 Martin Robinson <mrobinson@igalia.com>
+
+ Fix a compilation warning encountered during the GTK+ build.
+
+ Reviewed by Gustavo Noronha Silva.
+
+ * tests/testcopyandpaste.c:
+ (test_copy_and_paste): Cast the WebKitWebView to a GtkWidget.
+
+2012-03-06 Philippe Normand <pnormand@igalia.com>
+
+ [GTK] FrameLoader signals: gtk-doc fixes
+ https://bugs.webkit.org/show_bug.cgi?id=79495
+
+ Reviewed by Martin Robinson.
+
+ * webkit/webkitwebframe.cpp:
+ (webkit_web_frame_class_init):
+ * webkit/webkitwebresource.cpp:
+ (webkit_web_resource_class_init):
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_class_init):
+
+2012-01-26 Philippe Normand <pnormand@igalia.com>
+
+ [GStreamer] disable GStreamerGWorld when building against 0.11
+ https://bugs.webkit.org/show_bug.cgi?id=77088
+
+ Disable the FullscreenVideoController if we build against
+ GStreamer 0.11. This code depends on GStreamerGWorld which wasn't
+ ported to 0.11 because it will soon be removed anyway.
+
+ Reviewed by Martin Robinson.
+
+ * WebCoreSupport/FullscreenVideoController.cpp:
+ * WebCoreSupport/FullscreenVideoController.h:
+ * webkit/webkitwebview.cpp:
+ (webViewEnterFullscreen):
+ (webViewExitFullscreen):
+ * webkit/webkitwebviewprivate.h:
+ (_WebKitWebViewPrivate):
+
+2012-03-05 Zan Dobersek <zandobersek@gmail.com>
+
+ [GTK] plugins/netscape-plugin-page-cache-works.html fails
+ https://bugs.webkit.org/show_bug.cgi?id=74409
+
+ Reviewed by Martin Robinson.
+
+ Add a method to override page-cache-for-plugins preference.
+
+ * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+ (DumpRenderTreeSupportGtk::setPageCacheSupportsPlugins):
+ * WebCoreSupport/DumpRenderTreeSupportGtk.h:
+ (DumpRenderTreeSupportGtk):
+
+2012-03-04 Martin Robinson <mrobinson@igalia.com>
+
+ [GTK] "Console: undefined @0: ReferenceError: Can't find variable: WebInspector" during testwebinspector
+ https://bugs.webkit.org/show_bug.cgi?id=80235
+
+ Reviewed by Philippe Normand.
+
+ Wait to inspect the WebView until the page has finished loading. Also
+ clean up some minor style errors.
+
+ * tests/testwebinspector.c:
+ (closeInspector): Small style fixes.
+ (showInspector): Ditto.
+ (loadFinished): Ditto.
+ (test_webkit_web_inspector_close_and_inspect): Wait to inspect until the page has loaded.
+ (test_webkit_web_inspector_destroy_inspected_web_view): Ditto.
+ (main): Small style fixes.
+
+2012-03-04 Martin Robinson <mrobinson@igalia.com>
+
+ [GTK] REGRESSION: r108278 broke some tests that expect focus
+ https://bugs.webkit.org/show_bug.cgi?id=79084
+
+ Reviewed by Philippe Normand.
+
+ Grab focus before running the test. This ensures that if the
+ WebView lost focus, it has it before sending events.
+
+ * tests/testcopyandpaste.c:
+ (test_copy_and_paste): Grab focus.
+
+2012-02-18 Martin Robinson <mrobinson@igalia.com>
+
+ [GTK] [AC] Generalize WindowContextGL
+ https://bugs.webkit.org/show_bug.cgi?id=78969
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Use GLContext instead of WindowContextGL. Remove a few unnecessary
+ namespace specifiers in the implementation of AcceleratedCompositingContext.
+
+ * WebCoreSupport/AcceleratedCompositingContext.h: Now we find the GLContext
+ of our widget, which is cached in WebCore. Remove m_initialized as it isn't needed.
+ (AcceleratedCompositingContext):
+ * WebCoreSupport/AcceleratedCompositingContextGL.cpp:
+ (WebKit::AcceleratedCompositingContext::AcceleratedCompositingContext): No longer initialize
+ m_initialized.
+ (WebKit::AcceleratedCompositingContext::glContext): Added.
+ (WebKit::AcceleratedCompositingContext::renderLayersToWindow): Use glContext() now.
+ (WebKit::AcceleratedCompositingContext::attachRootGraphicsLayer): Ditto.
+ (WebKit::AcceleratedCompositingContext::notifyAnimationStarted): Remove unnecessary namespace specifier.
+ (WebKit::AcceleratedCompositingContext::notifySyncRequired): Ditto.
+ (WebKit::AcceleratedCompositingContext::paintContents): Ditto.
+ (WebKit::AcceleratedCompositingContext::showDebugBorders): Ditto.
+ (WebKit::AcceleratedCompositingContext::showRepaintCounter): Ditto.
+
+2012-03-02 Zan Dobersek <zandobersek@gmail.com>
+
+ [GTK] Smooth scrolling support
+ https://bugs.webkit.org/show_bug.cgi?id=16123
+
+ Reviewed by Martin Robinson.
+
+ Add a new settings option to enable smooth scrolling.
+
+ * webkit/webkitwebsettings.cpp:
+ (webkit_web_settings_class_init):
+ (webkit_web_settings_set_property):
+ (webkit_web_settings_get_property):
+ * webkit/webkitwebsettingsprivate.h:
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_update_settings):
+ (webkit_web_view_settings_notify):
+
+2012-03-01 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Simplify the code to adjust font sizes depending on screen DPI
+ https://bugs.webkit.org/show_bug.cgi?id=80032
+
+ Reviewed by Martin Robinson.
+
+ * webkit/webkitwebview.cpp:
+ (screenDPI): Helper function to get the DPI of a given
+ GdkScreen. Added also fallback code when gdk_screen_resolution
+ returns -1.
+ (webViewGetDPI): Use screenDPI() from WebCore.
+ (webViewConvertFontSizeToPixels): This is the existing
+ pixelsFromSize(), renamed and moved to be used also in
+ webkit_web_view_screen_changed().
+ (webkit_web_view_screen_changed): Use
+ webViewConvertFontSizeToPixels() instead of duplicating the code.
+ (webkit_web_view_settings_notify): Use
+ webViewConvertFontSizeToPixels() instead of pixelsFromSize().
+
+2012-02-27 Vincent Untz <vuntz@gnome.org>> and Gustavo Noronha Silva <gns@gnome.org>
+
+ Build fix for building with GTK+ 2.x.
+
+ * tests/testwebview.c:
+
+2012-02-26 Hajime Morrita <morrita@chromium.org>
+
+ Move ChromeClient::showContextMenu() to ContextMenuClient
+ https://bugs.webkit.org/show_bug.cgi?id=79427
+
+ Reviewed by Adam Barth.
+
+ * WebCoreSupport/ChromeClientGtk.h:
+ (ChromeClient):
+
2012-02-24 Shinya Kawanaka <shinyak@chromium.org>
SpellCheckRequest needs to know the context where the spellcheck happened.
diff --git a/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContext.h b/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContext.h
index cad47495d..b2567eb5f 100644
--- a/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContext.h
+++ b/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContext.h
@@ -28,8 +28,8 @@
#include <wtf/PassOwnPtr.h>
#if USE(TEXTURE_MAPPER_GL)
+#include "GLContext.h"
#include "TextureMapperLayer.h"
-#include "WindowGLContext.h"
#endif
#if USE(ACCELERATED_COMPOSITING)
@@ -69,11 +69,8 @@ private:
#if USE(CLUTTER)
GtkWidget* m_rootLayerEmbedder;
#elif USE(TEXTURE_MAPPER_GL)
- void initializeIfNecessary();
-
- bool m_initialized;
+ WebCore::GLContext* glContext();
WebCore::TextureMapperLayer* m_rootTextureMapperLayer;
- OwnPtr<WebCore::WindowGLContext> m_context;
OwnPtr<WebCore::TextureMapper> m_textureMapper;
#endif
diff --git a/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp b/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp
index 8c4300f27..6d338970a 100644
--- a/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp
+++ b/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp
@@ -42,7 +42,6 @@ namespace WebKit {
AcceleratedCompositingContext::AcceleratedCompositingContext(WebKitWebView* webView)
: m_webView(webView)
, m_syncTimerCallbackId(0)
- , m_initialized(false)
, m_rootTextureMapperLayer(0)
{
}
@@ -53,38 +52,30 @@ AcceleratedCompositingContext::~AcceleratedCompositingContext()
g_source_remove(m_syncTimerCallbackId);
}
-void AcceleratedCompositingContext::initializeIfNecessary()
-{
- if (m_initialized)
- return;
-
- m_initialized = true;
-
- // The GTK+ docs say that we can fail to create a native window.
- // FIXME: We should fall back to the ImageBuffer TextureMapper when it exists.
- if (!m_webView->priv->hasNativeWindow)
- return;
-
- m_context = WebCore::WindowGLContext::createContextWithGdkWindow(gtk_widget_get_window(GTK_WIDGET(m_webView)));
-}
-
bool AcceleratedCompositingContext::enabled()
{
return m_rootTextureMapperLayer && m_textureMapper;
}
+GLContext* AcceleratedCompositingContext::glContext()
+{
+ GLContext* context = GLContext::getContextForWidget(GTK_WIDGET(m_webView));
+ if (!context->canRenderToDefaultFramebuffer())
+ return 0;
+ return context;
+}
bool AcceleratedCompositingContext::renderLayersToWindow(const IntRect& clipRect)
{
if (!enabled())
return false;
- // We initialize the context lazily here so that we know that the GdkWindow realized.
- initializeIfNecessary();
- if (!m_context)
+ GLContext* context = glContext();
+ if (!context)
return false;
- m_context->startDrawing();
+ if (!context->makeContextCurrent())
+ return false;
GtkAllocation allocation;
gtk_widget_get_allocation(GTK_WIDGET(m_webView), &allocation);
@@ -94,7 +85,7 @@ bool AcceleratedCompositingContext::renderLayersToWindow(const IntRect& clipRect
m_rootTextureMapperLayer->paint();
m_textureMapper->endPainting();
- m_context->finishDrawing();
+ context->swapBuffers();
return true;
}
@@ -114,14 +105,14 @@ void AcceleratedCompositingContext::attachRootGraphicsLayer(GraphicsLayer* graph
m_rootGraphicsLayer->setNeedsDisplay();
m_rootGraphicsLayer->setSize(core(m_webView)->mainFrame()->view()->frameRect().size());
- // We initialize the context lazily here so that we know that the GdkWindow realized.
- initializeIfNecessary();
- if (!m_context)
+ GLContext* context = glContext();
+ if (!context)
return;
// The context needs to be active when creating the texture mapper. It's fine to
- // avoid calling endDrawing here, because it will just initialize shaders.
- m_context->startDrawing();
+ // avoid calling swapBuffers here, because it will just initialize shaders.
+ if (!context->makeContextCurrent())
+ return;
GtkAllocation allocation;
gtk_widget_get_allocation(GTK_WIDGET(m_webView), &allocation);
@@ -188,28 +179,28 @@ void AcceleratedCompositingContext::syncLayersTimeout()
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)
+void AcceleratedCompositingContext::notifyAnimationStarted(const GraphicsLayer*, double time)
{
}
-void AcceleratedCompositingContext::notifySyncRequired(const WebCore::GraphicsLayer*)
+void AcceleratedCompositingContext::notifySyncRequired(const GraphicsLayer*)
{
}
-void AcceleratedCompositingContext::paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext& context, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& rectToPaint)
+void AcceleratedCompositingContext::paintContents(const GraphicsLayer*, GraphicsContext& context, GraphicsLayerPaintingPhase, const IntRect& rectToPaint)
{
cairo_t* cr = context.platformContext()->cr();
copyRectFromCairoSurfaceToContext(m_webView->priv->backingStore->cairoSurface(), cr,
IntSize(), rectToPaint);
}
-bool AcceleratedCompositingContext::showDebugBorders(const WebCore::GraphicsLayer*) const
+bool AcceleratedCompositingContext::showDebugBorders(const GraphicsLayer*) const
{
return false;
}
-bool AcceleratedCompositingContext::showRepaintCounter(const WebCore::GraphicsLayer*) const
+bool AcceleratedCompositingContext::showRepaintCounter(const GraphicsLayer*) const
{
return false;
}
diff --git a/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h b/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
index 5905f5679..dcea2f0c4 100644
--- a/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
+++ b/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
@@ -125,9 +125,6 @@ namespace WebKit {
#endif
virtual void reachedMaxAppCacheSize(int64_t spaceNeeded);
virtual void reachedApplicationCacheOriginQuota(SecurityOrigin*, int64_t totalSpaceNeeded);
-#if ENABLE(CONTEXT_MENUS)
- virtual void showContextMenu() { }
-#endif
virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>);
virtual void loadIconForFiles(const Vector<WTF::String>&, FileIconLoader*);
diff --git a/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp b/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
index 8e6e26b14..80437ffe5 100644
--- a/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
+++ b/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
@@ -46,7 +46,6 @@
#include "JSElement.h"
#include "JSLock.h"
#include "JSNodeList.h"
-#include "JSRange.h"
#include "JSValue.h"
#include "NodeList.h"
#include "PageGroup.h"
@@ -60,7 +59,6 @@
#include "Settings.h"
#include "TextIterator.h"
#include "WebKitAccessibleWrapperAtk.h"
-#include "WebKitDOMRangePrivate.h"
#include "WebKitMutationObserver.h"
#include "WorkerThread.h"
#include "webkitglobalsprivate.h"
@@ -131,20 +129,6 @@ JSValueRef DumpRenderTreeSupportGtk::nodesFromRect(JSContextRef context, JSValue
return toRef(exec, toJS(exec, jsDocument->globalObject(), nodes.get()));
}
-WebKitDOMRange* DumpRenderTreeSupportGtk::jsValueToDOMRange(JSContextRef context, JSValueRef value)
-{
- if (!value)
- return 0;
-
- JSLock lock(SilenceAssertionsOnly);
- ExecState* exec = toJS(context);
-
- Range* range = toRange(toJS(exec, value));
- if (!range)
- return 0;
- return kit(range);
-}
-
/**
* getFrameChildren:
* @frame: a #WebKitWebFrame
@@ -894,6 +878,11 @@ void DumpRenderTreeSupportGtk::setHixie76WebSocketProtocolEnabled(WebKitWebView*
#endif
}
+void DumpRenderTreeSupportGtk::setPageCacheSupportsPlugins(WebKitWebView* webView, bool enabled)
+{
+ core(webView)->settings()->setPageCacheSupportsPlugins(enabled);
+}
+
bool DumpRenderTreeSupportGtk::elementDoesAutoCompleteForElementWithId(WebKitWebFrame* frame, JSStringRef id)
{
Frame* coreFrame = core(frame);
diff --git a/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h b/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
index 02b80c476..41ab40fff 100644
--- a/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
+++ b/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
@@ -23,7 +23,6 @@
#include <atk/atk.h>
#include <glib.h>
#include <webkit/webkitdefines.h>
-#include <webkit/webkitdomdefines.h>
#include <wtf/text/CString.h>
namespace WebKit {
@@ -59,8 +58,6 @@ public:
static void clearOpener(WebKitWebFrame*);
- static WebKitDOMRange* jsValueToDOMRange(JSContextRef, JSValueRef);
-
// FIXME: Move these to webkitwebframe.h once their API has been discussed.
static GSList* getFrameChildren(WebKitWebFrame*);
static WTF::CString getInnerText(WebKitWebFrame*);
@@ -128,6 +125,7 @@ public:
static int numberOfPendingGeolocationPermissionRequests(WebKitWebView*);
static void setHixie76WebSocketProtocolEnabled(WebKitWebView*, bool enabled);
+ static void setPageCacheSupportsPlugins(WebKitWebView*, bool enabled);
static void deliverAllMutationsIfNecessary();
diff --git a/Source/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp b/Source/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp
index 3300fe133..d14dc9754 100644
--- a/Source/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp
+++ b/Source/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp
@@ -19,7 +19,7 @@
#include "config.h"
-#if ENABLE(VIDEO)
+#if ENABLE(VIDEO) && !defined(GST_API_VERSION_1)
#include "FullscreenVideoController.h"
diff --git a/Source/WebKit/gtk/WebCoreSupport/FullscreenVideoController.h b/Source/WebKit/gtk/WebCoreSupport/FullscreenVideoController.h
index 3fb8b16f6..cbc5c2552 100644
--- a/Source/WebKit/gtk/WebCoreSupport/FullscreenVideoController.h
+++ b/Source/WebKit/gtk/WebCoreSupport/FullscreenVideoController.h
@@ -20,7 +20,7 @@
#ifndef FullscreenVideoController_h
#define FullscreenVideoController_h
-#if ENABLE(VIDEO)
+#if ENABLE(VIDEO) && !defined(GST_API_VERSION_1)
#include "GRefPtr.h"
#include "GStreamerGWorld.h"
diff --git a/Source/WebKit/gtk/po/ChangeLog b/Source/WebKit/gtk/po/ChangeLog
index 1a0a97921..6cd5910a0 100644
--- a/Source/WebKit/gtk/po/ChangeLog
+++ b/Source/WebKit/gtk/po/ChangeLog
@@ -1,3 +1,12 @@
+2012-03-02 Alexandre Rostovtsev <tetromino@gentoo.org>
+
+ Make webkit-gtk translations respect LINGUAS
+ https://bugs.webkit.org/show_bug.cgi?id=79605
+
+ Reviewed by Martin Robinson.
+
+ * GNUmakefile.am:
+
2011-11-09 Philippe Normand <pnormand@igalia.com>
Esperanto-translation
diff --git a/Source/WebKit/gtk/po/GNUmakefile.am b/Source/WebKit/gtk/po/GNUmakefile.am
index 1c5598dfa..3eddaac2b 100644
--- a/Source/WebKit/gtk/po/GNUmakefile.am
+++ b/Source/WebKit/gtk/po/GNUmakefile.am
@@ -27,7 +27,15 @@ MSGMERGE_UPDATE := $(MSGMERGE) --update
POFILES += $(shell ls $(srcdir)/Source/WebKit/gtk/po/*.po)
-MOFILES += $(shell echo $(POFILES) | tr ' ' '\n' | sed "s,^$(srcdir)/,,g" | sed 's/\.po/.mo/g')
+PO_LINGUAS += $(patsubst $(srcdir)/Source/WebKit/gtk/po/%.po,%,$(POFILES))
+
+USER_LINGUAS += $(filter $(LINGUAS),$(PO_LINGUAS))
+
+USE_LINGUAS += $(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else LLINGUAS="$(PO_LINGUAS)"; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
+
+MOFILES += $(USE_LINGUAS:%=Source/WebKit/gtk/po/%.mo)
+
+ALL_MOFILES := $(shell echo $(POFILES) | tr ' ' '\n' | sed "s,^$(srcdir)/,,g" | sed 's/\.po/.mo/g')
.po.mo:
test -d Source/WebKit/gtk/po/ || mkdir -p Source/WebKit/gtk/po/
@@ -124,11 +132,11 @@ CLEANFILES += \
$(top_builddir)/stamp-po
MAINTAINERCLEANFILES += \
- $(MOFILES) \
+ $(ALL_MOFILES) \
$(top_builddir)/Source/WebKit/gtk/po/$(DOMAIN).pot
DISTCLEANFILES += \
- $(MOFILES) \
+ $(ALL_MOFILES) \
$(top_builddir)/Source/WebKit/gtk/po/$(DOMAIN).pot
po-install-data-local: all
diff --git a/Source/WebKit/gtk/tests/testcopyandpaste.c b/Source/WebKit/gtk/tests/testcopyandpaste.c
index 7d8dd8f0d..f25969a73 100644
--- a/Source/WebKit/gtk/tests/testcopyandpaste.c
+++ b/Source/WebKit/gtk/tests/testcopyandpaste.c
@@ -126,6 +126,7 @@ static void test_copy_and_paste(CopyAndPasteFixture* fixture, gconstpointer data
gtk_widget_show(fixture->window);
gtk_widget_show(GTK_WIDGET(fixture->webView));
gtk_window_present(GTK_WINDOW(fixture->window));
+ gtk_widget_grab_focus(GTK_WIDGET(fixture->webView));
g_signal_connect(fixture->webView, "notify::load-status",
G_CALLBACK(load_status_cb), fixture);
diff --git a/Source/WebKit/gtk/tests/testwebinspector.c b/Source/WebKit/gtk/tests/testwebinspector.c
index 40aa55334..86a35b937 100644
--- a/Source/WebKit/gtk/tests/testwebinspector.c
+++ b/Source/WebKit/gtk/tests/testwebinspector.c
@@ -62,7 +62,7 @@ static WebKitWebView* inspectElementCallback(WebKitWebInspector *inspector, WebK
return WEBKIT_WEB_VIEW(newWebView);
}
-static gboolean closeInspector (WebKitWebInspector *inspector, int *timesClosed)
+static gboolean closeInspector(WebKitWebInspector *inspector, int *timesClosed)
{
*timesClosed = *timesClosed + 1;
@@ -70,23 +70,33 @@ static gboolean closeInspector (WebKitWebInspector *inspector, int *timesClosed)
return TRUE;
}
-static gboolean showInspector (WebKitWebInspector *inspector, gpointer data)
+static gboolean showInspector(WebKitWebInspector *inspector, gpointer data)
{
g_idle_add(quitLoop, NULL);
return TRUE;
}
+static void loadFinished(WebKitWebView *webView, WebKitWebFrame *frame, gboolean *isLoadFinished)
+{
+ *isLoadFinished = TRUE;
+ if (g_main_loop_is_running(loop))
+ g_main_loop_quit(loop);
+}
+
static void test_webkit_web_inspector_close_and_inspect()
{
WebKitWebView *webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+ loop = g_main_loop_new(NULL, TRUE);
- WebKitWebSettings *settings = webkit_web_view_get_settings(webView);
- g_object_set(settings, "enable-developer-extras", TRUE, NULL);
-
- webkit_web_view_load_string (webView,
- "<html><body><p>woohoo</p></body></html>",
- "text/html", "UTF-8", "file://");
+ gboolean isLoadFinished = FALSE;
+ g_signal_connect(webView, "load-finished", G_CALLBACK(loadFinished), &isLoadFinished);
+ webkit_web_view_load_string(webView,
+ "<html><body><p>woohoo</p></body></html>",
+ "text/html", "UTF-8", "file://");
+ if (!isLoadFinished)
+ g_main_loop_run(loop);
+ g_object_set(webkit_web_view_get_settings(webView), "enable-developer-extras", TRUE, NULL);
WebKitWebInspector *inspector = webkit_web_view_get_inspector(webView);
int timesElementInspected = 0;
@@ -100,7 +110,6 @@ static void test_webkit_web_inspector_close_and_inspect()
webkit_web_inspector_inspect_coordinates(inspector, 0.0, 0.0);
g_assert_cmpint(timesElementInspected, ==, 1);
- loop = g_main_loop_new(NULL, TRUE);
g_main_loop_run(loop);
webkit_web_inspector_close(inspector);
@@ -120,14 +129,17 @@ static void test_webkit_web_inspector_close_and_inspect()
static void test_webkit_web_inspector_destroy_inspected_web_view()
{
WebKitWebView *webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+ loop = g_main_loop_new(NULL, TRUE);
- WebKitWebSettings *settings = webkit_web_view_get_settings(webView);
- g_object_set(settings, "enable-developer-extras", TRUE, NULL);
-
- webkit_web_view_load_string (webView,
- "<html><body><p>woohoo</p></body></html>",
- "text/html", "UTF-8", "file://");
+ gboolean isLoadFinished = FALSE;
+ g_signal_connect(webView, "load-finished", G_CALLBACK(loadFinished), &isLoadFinished);
+ webkit_web_view_load_string(webView,
+ "<html><body><p>woohoo</p></body></html>",
+ "text/html", "UTF-8", "file://");
+ if (!isLoadFinished)
+ g_main_loop_run(loop);
+ g_object_set(webkit_web_view_get_settings(webView), "enable-developer-extras", TRUE, NULL);
WebKitWebInspector *inspector = webkit_web_view_get_inspector(webView);
int timesElementInspected = 0;
@@ -141,7 +153,6 @@ static void test_webkit_web_inspector_destroy_inspected_web_view()
webkit_web_inspector_inspect_coordinates(inspector, 0.0, 0.0);
g_assert_cmpint(timesElementInspected, ==, 1);
- loop = g_main_loop_new(NULL, TRUE);
g_main_loop_run(loop);
gtk_widget_destroy(GTK_WIDGET(webView));
@@ -154,17 +165,11 @@ int main(int argc, char** argv)
{
gtk_test_init(&argc, &argv, NULL);
- testutils_relative_chdir("Programs/resources/inspector/inspector.html", argv[0]);
-
- char *currentDir = g_get_current_dir();
- g_setenv("WEBKIT_INSPECTOR_PATH", currentDir, TRUE);
- g_free(currentDir);
-
g_test_bug_base("https://bugs.webkit.org/");
g_test_add_func("/webkit/webinspector/destroy-inspected-web-view", test_webkit_web_inspector_destroy_inspected_web_view);
g_test_add_func("/webkit/webinspector/close-and-inspect", test_webkit_web_inspector_close_and_inspect);
- return g_test_run ();
+ return g_test_run();
}
#else
diff --git a/Source/WebKit/gtk/tests/testwebview.c b/Source/WebKit/gtk/tests/testwebview.c
index ab3bd5576..22dff131c 100644
--- a/Source/WebKit/gtk/tests/testwebview.c
+++ b/Source/WebKit/gtk/tests/testwebview.c
@@ -27,6 +27,8 @@
#include <glib.h>
#include <glib/gstdio.h>
+#include <gdk/gdk.h>
+#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#include <webkit/webkit.h>
@@ -389,7 +391,12 @@ static void test_webkit_web_view_does_not_steal_focus()
GtkWidget *window = gtk_offscreen_window_new();
GtkWidget *webView = webkit_web_view_new();
GtkWidget *entry = gtk_entry_new();
+
+#ifdef GTK_API_VERSION_2
+ GtkWidget *box = gtk_hbox_new(FALSE, 0);
+#else
GtkWidget *box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
+#endif
gtk_container_add(GTK_CONTAINER(box), webView);
gtk_container_add(GTK_CONTAINER(box), entry);
@@ -424,8 +431,10 @@ static gboolean emitKeyStroke(WebKitWebView* webView)
pressEvent->key.window = window;
g_object_ref(pressEvent->key.window);
+#ifndef GTK_API_VERSION_2
GdkDeviceManager* manager = gdk_display_get_device_manager(gdk_window_get_display(window));
gdk_event_set_device(pressEvent, gdk_device_manager_get_client_pointer(manager));
+#endif
// When synthesizing an event, an invalid hardware_keycode value
// can cause it to be badly processed by Gtk+.
diff --git a/Source/WebKit/gtk/webkit/webkitwebframe.cpp b/Source/WebKit/gtk/webkit/webkitwebframe.cpp
index 4de192704..39bdbb3aa 100644
--- a/Source/WebKit/gtk/webkit/webkitwebframe.cpp
+++ b/Source/WebKit/gtk/webkit/webkitwebframe.cpp
@@ -351,13 +351,13 @@ static void webkit_web_frame_class_init(WebKitWebFrameClass* frameClass)
WEBKIT_TYPE_NETWORK_REQUEST,
WEBKIT_TYPE_NETWORK_RESPONSE);
- /*
- * WebKitWebFrame::resource-response-received
- * @webFrame: the #WebKitWebFrame the response was received for
- * @webResource: the #WebKitWebResource being loaded
+ /**
+ * WebKitWebFrame::resource-response-received:
+ * @web_frame: the #WebKitWebFrame the response was received for
+ * @web_resource: the #WebKitWebResource being loaded
* @response: the #WebKitNetworkResponse that was received.
*
- * Emitted when the first byte of data arrives
+ * Emitted when the response is received from the server.
*
* Since: 1.7.5
*/
@@ -371,10 +371,10 @@ static void webkit_web_frame_class_init(WebKitWebFrameClass* frameClass)
WEBKIT_TYPE_WEB_RESOURCE,
WEBKIT_TYPE_NETWORK_RESPONSE);
- /*
- * WebKitWebFrame::resource-load-finished
- * @webFrame: the #WebKitWebFrame the response was received for
- * @webResource: the #WebKitWebResource being loaded
+ /**
+ * WebKitWebFrame::resource-load-finished:
+ * @web_frame: the #WebKitWebFrame the response was received for
+ * @web_resource: the #WebKitWebResource being loaded
*
* Emitted when all the data for the resource was loaded.
*
@@ -389,13 +389,16 @@ static void webkit_web_frame_class_init(WebKitWebFrameClass* frameClass)
G_TYPE_NONE, 1,
WEBKIT_TYPE_WEB_RESOURCE);
- /*
- * WebKitWebFrame::resource-content-length-received
- * @webFrame: the #WebKitWebFrame the response was received for
- * @webResource: the #WebKitWebResource that was loaded
- * @lengthReceived: the resource data length in bytes
+ /**
+ * WebKitWebFrame::resource-content-length-received:
+ * @web_frame: the #WebKitWebFrame the response was received for
+ * @web_resource: the #WebKitWebResource that was loaded
+ * @length_received: the amount of data received since the last signal emission
*
- * Emitted when all the data for the resource was loaded.
+ * Emitted when new resource data has been received. The
+ * @length_received variable stores the amount of bytes received
+ * since the last time this signal was emitted. This is useful to
+ * provide progress information about the resource load operation.
*
* Since: 1.7.5
*/
@@ -409,11 +412,11 @@ static void webkit_web_frame_class_init(WebKitWebFrameClass* frameClass)
WEBKIT_TYPE_WEB_RESOURCE,
G_TYPE_INT);
- /*
- * WebKitWebFrame::resource-load-failed
- * @webFrame: the #WebKitWebFrame the response was received for
- * @webResource: the #WebKitWebResource that was loaded
- * @webError: the #GError that was triggered
+ /**
+ * WebKitWebFrame::resource-load-failed:
+ * @web_frame: the #WebKitWebFrame the response was received for
+ * @web_resource: the #WebKitWebResource that was loaded
+ * @error: the #GError that was triggered
*
* Invoked when a resource failed to load.
*
diff --git a/Source/WebKit/gtk/webkit/webkitwebresource.cpp b/Source/WebKit/gtk/webkit/webkitwebresource.cpp
index f3239626b..4bd198077 100644
--- a/Source/WebKit/gtk/webkit/webkitwebresource.cpp
+++ b/Source/WebKit/gtk/webkit/webkitwebresource.cpp
@@ -122,12 +122,12 @@ static void webkit_web_resource_class_init(WebKitWebResourceClass* webResourceCl
gobject_class->get_property = webkit_web_resource_get_property;
gobject_class->set_property = webkit_web_resource_set_property;
- /*
- * WebKitWebResource::response-received
- * @webResource: the #WebKitWebResource being loaded
+ /**
+ * WebKitWebResource::response-received:
+ * @web_resource: the #WebKitWebResource being loaded
* @response: the #WebKitNetworkResponse that was received
*
- * Emitted when the first byte of data arrives
+ * Emitted when the response is received from the server.
*
* Since: 1.7.5
*/
@@ -140,12 +140,12 @@ static void webkit_web_resource_class_init(WebKitWebResourceClass* webResourceCl
G_TYPE_NONE, 1,
WEBKIT_TYPE_NETWORK_RESPONSE);
- /*
- * WebKitWebResource::load-failed
- * @webResource: the #WebKitWebResource that was loaded
- * @webError: the #GError that was triggered
+ /**
+ * WebKitWebResource::load-failed:
+ * @web_resource: the #WebKitWebResource that was loaded
+ * @error: the #GError that was triggered
*
- * Invoked when a resource failed to load
+ * Invoked when the @web_resource failed to load
*
* Since: 1.7.5
*/
@@ -158,9 +158,9 @@ static void webkit_web_resource_class_init(WebKitWebResourceClass* webResourceCl
G_TYPE_NONE, 1,
G_TYPE_POINTER);
- /*
- * WebKitWebResource::load-finished
- * @webResource: the #WebKitWebResource being loaded
+ /**
+ * WebKitWebResource::load-finished:
+ * @web_resource: the #WebKitWebResource being loaded
*
* Emitted when all the data for the resource was loaded
*
@@ -174,12 +174,15 @@ static void webkit_web_resource_class_init(WebKitWebResourceClass* webResourceCl
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
- /*
- * WebKitWebResource::content-length-received
- * @webResource: the #WebKitWebResource that was loaded
- * @lengthReceived: the resource data length in bytes
+ /**
+ * WebKitWebResource::content-length-received:
+ * @web_resource: the #WebKitWebResource that was loaded
+ * @length_received: the amount of data received since the last signal emission
*
- * Emitted when all the data for the resource was loaded
+ * Emitted when new resource data has been received. The
+ * @length_received variable stores the amount of bytes received
+ * since the last time this signal was emitted. This is useful to
+ * provide progress information about the resource load operation.
*
* Since: 1.7.5
*/
diff --git a/Source/WebKit/gtk/webkit/webkitwebsettings.cpp b/Source/WebKit/gtk/webkit/webkitwebsettings.cpp
index bf6ff600d..2531258b3 100644
--- a/Source/WebKit/gtk/webkit/webkitwebsettings.cpp
+++ b/Source/WebKit/gtk/webkit/webkitwebsettings.cpp
@@ -120,7 +120,8 @@ enum {
PROP_ENABLE_DNS_PREFETCHING,
PROP_ENABLE_WEBGL,
PROP_ENABLE_WEB_AUDIO,
- PROP_ENABLE_ACCELERATED_COMPOSITING
+ PROP_ENABLE_ACCELERATED_COMPOSITING,
+ PROP_ENABLE_SMOOTH_SCROLLING
};
// Create a default user agent string
@@ -953,6 +954,22 @@ static void webkit_web_settings_class_init(WebKitWebSettingsClass* klass)
_("Whether WebKit prefetches domain names"),
TRUE,
flags));
+
+ /**
+ * WebKitWebSettings:enable-smooth-scrolling
+ *
+ * Enable or disable support for smooth scrolling. The current implementation relies upon
+ * CPU work to produce a smooth scrolling experience.
+ *
+ * Since: 1.9.0
+ */
+ g_object_class_install_property(gobject_class,
+ PROP_ENABLE_SMOOTH_SCROLLING,
+ g_param_spec_boolean("enable-smooth-scrolling",
+ _("Enable smooth scrolling"),
+ _("Whether to enable smooth scrolling"),
+ FALSE,
+ flags));
}
static void webkit_web_settings_init(WebKitWebSettings* web_settings)
@@ -1128,6 +1145,9 @@ static void webkit_web_settings_set_property(GObject* object, guint prop_id, con
case PROP_ENABLE_ACCELERATED_COMPOSITING:
priv->enableAcceleratedCompositing = g_value_get_boolean(value);
break;
+ case PROP_ENABLE_SMOOTH_SCROLLING:
+ priv->enableSmoothScrolling = g_value_get_boolean(value);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
break;
@@ -1293,6 +1313,9 @@ static void webkit_web_settings_get_property(GObject* object, guint prop_id, GVa
case PROP_ENABLE_ACCELERATED_COMPOSITING:
g_value_set_boolean(value, priv->enableAcceleratedCompositing);
break;
+ case PROP_ENABLE_SMOOTH_SCROLLING:
+ g_value_set_boolean(value, priv->enableSmoothScrolling);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
break;
diff --git a/Source/WebKit/gtk/webkit/webkitwebsettingsprivate.h b/Source/WebKit/gtk/webkit/webkitwebsettingsprivate.h
index d7d082e5b..240d79fad 100644
--- a/Source/WebKit/gtk/webkit/webkitwebsettingsprivate.h
+++ b/Source/WebKit/gtk/webkit/webkitwebsettingsprivate.h
@@ -80,6 +80,7 @@ struct _WebKitWebSettingsPrivate {
gboolean enableWebgl;
gboolean enableWebAudio;
gboolean enableAcceleratedCompositing;
+ gboolean enableSmoothScrolling;
};
WEBKIT_API void webkit_web_settings_add_extra_plugin_directory(WebKitWebView*, const gchar* directory);
diff --git a/Source/WebKit/gtk/webkit/webkitwebview.cpp b/Source/WebKit/gtk/webkit/webkitwebview.cpp
index 89b9c228f..880f24438 100644
--- a/Source/WebKit/gtk/webkit/webkitwebview.cpp
+++ b/Source/WebKit/gtk/webkit/webkitwebview.cpp
@@ -1416,6 +1416,19 @@ static AtkObject* webkit_web_view_get_accessible(GtkWidget* widget)
return axRoot;
}
+static double screenDPI(GdkScreen* screen)
+{
+ // gdk_screen_get_resolution() returns -1 when no DPI is set.
+ double dpi = gdk_screen_get_resolution(screen);
+ if (dpi != -1)
+ return dpi;
+
+ static const double kMillimetresPerInch = 25.4;
+ double diagonalSizeInPixels = hypot(gdk_screen_get_width(screen), gdk_screen_get_height(screen));
+ double diagonalSizeInInches = hypot(gdk_screen_get_width_mm(screen), gdk_screen_get_height_mm(screen)) / kMillimetresPerInch;
+ return diagonalSizeInPixels / diagonalSizeInInches;
+}
+
static gdouble webViewGetDPI(WebKitWebView* webView)
{
if (webView->priv->webSettings->priv->enforce96DPI)
@@ -1423,12 +1436,12 @@ static gdouble webViewGetDPI(WebKitWebView* webView)
static const double defaultDPI = 96;
GdkScreen* screen = gtk_widget_has_screen(GTK_WIDGET(webView)) ? gtk_widget_get_screen(GTK_WIDGET(webView)) : gdk_screen_get_default();
- if (!screen)
- return defaultDPI;
+ return screen ? screenDPI(screen) : defaultDPI;
+}
- // gdk_screen_get_resolution() returns -1 when no DPI is set.
- gdouble DPI = gdk_screen_get_resolution(screen);
- return DPI != -1 ? DPI : defaultDPI;
+static inline gint webViewConvertFontSizeToPixels(WebKitWebView* webView, double fontSize)
+{
+ return fontSize / 72.0 * webViewGetDPI(webView);
}
static void webkit_web_view_screen_changed(GtkWidget* widget, GdkScreen* previousScreen)
@@ -1441,8 +1454,6 @@ static void webkit_web_view_screen_changed(GtkWidget* widget, GdkScreen* previou
WebKitWebSettings* webSettings = priv->webSettings.get();
Settings* settings = core(webView)->settings();
- gdouble DPI = webViewGetDPI(webView);
-
guint defaultFontSize, defaultMonospaceFontSize, minimumFontSize, minimumLogicalFontSize;
g_object_get(webSettings,
@@ -1452,10 +1463,10 @@ static void webkit_web_view_screen_changed(GtkWidget* widget, GdkScreen* previou
"minimum-logical-font-size", &minimumLogicalFontSize,
NULL);
- settings->setDefaultFontSize(defaultFontSize / 72.0 * DPI);
- settings->setDefaultFixedFontSize(defaultMonospaceFontSize / 72.0 * DPI);
- settings->setMinimumFontSize(minimumFontSize / 72.0 * DPI);
- settings->setMinimumLogicalFontSize(minimumLogicalFontSize / 72.0 * DPI);
+ settings->setDefaultFontSize(webViewConvertFontSizeToPixels(webView, defaultFontSize));
+ settings->setDefaultFixedFontSize(webViewConvertFontSizeToPixels(webView, defaultMonospaceFontSize));
+ settings->setMinimumFontSize(webViewConvertFontSizeToPixels(webView, minimumFontSize));
+ settings->setMinimumLogicalFontSize(webViewConvertFontSizeToPixels(webView, minimumLogicalFontSize));
}
static void webkit_web_view_drag_end(GtkWidget* widget, GdkDragContext* context)
@@ -2520,8 +2531,8 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
* purpose, to make them not be catched by gtk-doc.
*/
- /*
- * WebKitWebView::document-load-finished
+ /**
+ * WebKitWebView::document-load-finished:
* @web_view: the object which received the signal
* @web_frame: the #WebKitWebFrame whose load dispatched this request
*
@@ -2537,8 +2548,8 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
G_TYPE_NONE, 1,
WEBKIT_TYPE_WEB_FRAME);
- /*
- * WebKitWebView::frame-created
+ /**
+ * WebKitWebView::frame-created:
* @web_view: the object which received the signal
* @web_frame: the #WebKitWebFrame which was just created.
*
@@ -2720,11 +2731,11 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
webkit_marshal_BOOLEAN__OBJECT,
G_TYPE_BOOLEAN, 1, WEBKIT_TYPE_DOM_HTML_ELEMENT);
- /*
- * WebKitWebView::resource-response-received
- * @webView: the object which received the signal
- * @webFrame: the #WebKitWebFrame the response was received for
- * @webResource: the #WebKitWebResource being loaded
+ /**
+ * WebKitWebView::resource-response-received:
+ * @web_view: the object which received the signal
+ * @web_frame: the #WebKitWebFrame the response was received for
+ * @web_resource: the #WebKitWebResource being loaded
* @response: the #WebKitNetworkResponse that was received
*
* Emitted when the first byte of data arrives
@@ -2742,11 +2753,11 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
WEBKIT_TYPE_WEB_RESOURCE,
WEBKIT_TYPE_NETWORK_RESPONSE);
- /*
- * WebKitWebView::resource-load-finished
- * @webView: the object which received the signal
- * @webFrame: the #WebKitWebFrame the response was received for
- * @webResource: the #WebKitWebResource that was loaded
+ /**
+ * WebKitWebView::resource-load-finished:
+ * @web_view: the object which received the signal
+ * @web_frame: the #WebKitWebFrame the response was received for
+ * @web_resource: the #WebKitWebResource that was loaded
*
* Emitted when all the data for the resource was loaded
*
@@ -2762,15 +2773,17 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
WEBKIT_TYPE_WEB_FRAME,
WEBKIT_TYPE_WEB_RESOURCE);
- /*
- * WebKitWebView::resource-content-length-received
- * @webView: the object which received the signal
- * @webFrame: the #WebKitWebFrame the response was received for
- * @webResource: the #WebKitWebResource that was loaded
- * @lengthReceived: the resource data length in bytes
+ /**
+ * WebKitWebView::resource-content-length-received:
+ * @web_view: the object which received the signal
+ * @web_frame: the #WebKitWebFrame the response was received for
+ * @web_resource: the #WebKitWebResource that was loaded
+ * @length_received: the amount of data received since the last signal emission
*
- * Emitted when the HTTP Content-Length response header has been
- * received and parsed successfully.
+ * Emitted when new resource data has been received. The
+ * @length_received variable stores the amount of bytes received
+ * since the last time this signal was emitted. This is useful to
+ * provide progress information about the resource load operation.
*
* Since: 1.7.5
*/
@@ -2785,12 +2798,12 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
WEBKIT_TYPE_WEB_RESOURCE,
G_TYPE_INT);
- /*
- * WebKitWebView::resource-load-failed
- * @webView: the object which received the signal
- * @webFrame: the #WebKitWebFrame the response was received for
- * @webResource: the #WebKitWebResource that was loaded
- * @webError: the #GError that was triggered
+ /**
+ * WebKitWebView::resource-load-failed:
+ * @web_view: the object which received the signal
+ * @web_frame: the #WebKitWebFrame the response was received for
+ * @web_resource: the #WebKitWebResource that was loaded
+ * @error: the #GError that was triggered
*
* Invoked when a resource failed to load
*
@@ -3330,17 +3343,16 @@ static void webkit_web_view_update_settings(WebKitWebView* webView)
coreSettings->setUseHixie76WebSocketProtocol(false);
#endif
+#if ENABLE(SMOOTH_SCROLLING)
+ coreSettings->setEnableScrollAnimator(settingsPrivate->enableSmoothScrolling);
+#endif
+
if (Page* page = core(webView))
page->setTabKeyCyclesThroughElements(settingsPrivate->tabKeyCyclesThroughElements);
webkit_web_view_screen_changed(GTK_WIDGET(webView), NULL);
}
-static inline gint pixelsFromSize(WebKitWebView* webView, gint size)
-{
- return size / 72.0 * webViewGetDPI(webView);
-}
-
static void webkit_web_view_settings_notify(WebKitWebSettings* webSettings, GParamSpec* pspec, WebKitWebView* webView)
{
Settings* settings = core(webView)->settings();
@@ -3365,13 +3377,13 @@ static void webkit_web_view_settings_notify(WebKitWebSettings* webSettings, GPar
else if (name == g_intern_string("serif-font-family"))
settings->setSerifFontFamily(g_value_get_string(&value));
else if (name == g_intern_string("default-font-size"))
- settings->setDefaultFontSize(pixelsFromSize(webView, g_value_get_int(&value)));
+ settings->setDefaultFontSize(webViewConvertFontSizeToPixels(webView, g_value_get_int(&value)));
else if (name == g_intern_string("default-monospace-font-size"))
- settings->setDefaultFixedFontSize(pixelsFromSize(webView, g_value_get_int(&value)));
+ settings->setDefaultFixedFontSize(webViewConvertFontSizeToPixels(webView, g_value_get_int(&value)));
else if (name == g_intern_string("minimum-font-size"))
- settings->setMinimumFontSize(pixelsFromSize(webView, g_value_get_int(&value)));
+ settings->setMinimumFontSize(webViewConvertFontSizeToPixels(webView, g_value_get_int(&value)));
else if (name == g_intern_string("minimum-logical-font-size"))
- settings->setMinimumLogicalFontSize(pixelsFromSize(webView, g_value_get_int(&value)));
+ settings->setMinimumLogicalFontSize(webViewConvertFontSizeToPixels(webView, g_value_get_int(&value)));
else if (name == g_intern_string("enforce-96-dpi"))
webkit_web_view_screen_changed(GTK_WIDGET(webView), NULL);
else if (name == g_intern_string("auto-load-images"))
@@ -3464,6 +3476,11 @@ static void webkit_web_view_settings_notify(WebKitWebSettings* webSettings, GPar
settings->setWebAudioEnabled(g_value_get_boolean(&value));
#endif
+#if ENABLE(SMOOTH_SCROLLING)
+ else if (name == g_intern_string("enable-smooth-scrolling"))
+ settings->setEnableScrollAnimator(g_value_get_boolean(&value));
+#endif
+
else if (!g_object_class_find_property(G_OBJECT_GET_CLASS(webSettings), name))
g_warning("Unexpected setting '%s'", name);
g_value_unset(&value);
@@ -5099,7 +5116,7 @@ void webViewEnterFullscreen(WebKitWebView* webView, Node* node)
if (!node->hasTagName(HTMLNames::videoTag))
return;
-#if ENABLE(VIDEO)
+#if ENABLE(VIDEO) && !defined(GST_API_VERSION_1)
HTMLMediaElement* videoElement = static_cast<HTMLMediaElement*>(node);
WebKitWebViewPrivate* priv = webView->priv;
@@ -5115,7 +5132,7 @@ void webViewEnterFullscreen(WebKitWebView* webView, Node* node)
void webViewExitFullscreen(WebKitWebView* webView)
{
-#if ENABLE(VIDEO)
+#if ENABLE(VIDEO) && !defined(GST_API_VERSION_1)
WebKitWebViewPrivate* priv = webView->priv;
if (priv->fullscreenVideoController)
priv->fullscreenVideoController->exitFullscreen();
diff --git a/Source/WebKit/gtk/webkit/webkitwebviewprivate.h b/Source/WebKit/gtk/webkit/webkitwebviewprivate.h
index 75ba14cbe..2967da92f 100644
--- a/Source/WebKit/gtk/webkit/webkitwebviewprivate.h
+++ b/Source/WebKit/gtk/webkit/webkitwebviewprivate.h
@@ -80,7 +80,7 @@ struct _WebKitWebViewPrivate {
gboolean disposing;
-#if ENABLE(VIDEO)
+#if ENABLE(VIDEO) && !defined(GST_API_VERSION_1)
FullscreenVideoController* fullscreenVideoController;
#endif