[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
alex at webkit.org
alex at webkit.org
Wed Dec 22 15:14:47 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 311cf2102c727714839b5372bc4e3839f7ceb352
Author: alex at webkit.org <alex at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Oct 29 11:25:42 2010 +0000
2010-10-29 Alejandro G. Castro <alex at igalia.com>
Reviewed by Martin Robinson.
[GTK] Add the GtkScrollablePolicy property to the webview
https://bugs.webkit.org/show_bug.cgi?id=48357
Added the GtkScrollablePolicy properties to the webview widget, it
is now required for GtkScrollable widgets in GTK+ 3.x.
* webkit/webkitprivate.h:
* webkit/webkitwebview.cpp:
(setHorizontalScrollPolicy): Added.
(setVerticalScrollPolicy): Added.
(getHorizontalScrollPolicy): Added.
(getVerticalScrollPolicy): Added.
(webkit_web_view_get_property):
(webkit_web_view_set_property):
(webkit_web_view_class_init):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70861 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index 675f035..a6b98c7 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,3 +1,23 @@
+2010-10-29 Alejandro G. Castro <alex at igalia.com>
+
+ Reviewed by Martin Robinson.
+
+ [GTK] Add the GtkScrollablePolicy property to the webview
+ https://bugs.webkit.org/show_bug.cgi?id=48357
+
+ Added the GtkScrollablePolicy properties to the webview widget, it
+ is now required for GtkScrollable widgets in GTK+ 3.x.
+
+ * webkit/webkitprivate.h:
+ * webkit/webkitwebview.cpp:
+ (setHorizontalScrollPolicy): Added.
+ (setVerticalScrollPolicy): Added.
+ (getHorizontalScrollPolicy): Added.
+ (getVerticalScrollPolicy): Added.
+ (webkit_web_view_get_property):
+ (webkit_web_view_set_property):
+ (webkit_web_view_class_init):
+
2010-10-28 Sergio Villar Senin <svillar at igalia.com>
Reviewed by Martin Robinson.
diff --git a/WebKit/gtk/webkit/webkitprivate.h b/WebKit/gtk/webkit/webkitprivate.h
index 616ee6b..01b9a4e 100644
--- a/WebKit/gtk/webkit/webkitprivate.h
+++ b/WebKit/gtk/webkit/webkitprivate.h
@@ -154,6 +154,13 @@ extern "C" {
PlatformRefPtr<GtkAdjustment> horizontalAdjustment;
PlatformRefPtr<GtkAdjustment> verticalAdjustment;
+#ifndef GTK_API_VERSION_2
+ // GtkScrollablePolicy needs to be checked when
+ // driving the scrollable adjustment values
+ GtkScrollablePolicy horizontalScrollingPolicy;
+ GtkScrollablePolicy verticalScrollingPolicy;
+#endif
+
gboolean zoomFullContent;
WebKitLoadStatus loadStatus;
CString encoding;
diff --git a/WebKit/gtk/webkit/webkitwebview.cpp b/WebKit/gtk/webkit/webkitwebview.cpp
index 974b53f..e12f7ff 100644
--- a/WebKit/gtk/webkit/webkitwebview.cpp
+++ b/WebKit/gtk/webkit/webkitwebview.cpp
@@ -201,7 +201,9 @@ enum {
#else
PROP_VIEW_MODE,
PROP_HADJUSTMENT,
- PROP_VADJUSTMENT
+ PROP_VADJUSTMENT,
+ PROP_HSCROLL_POLICY,
+ PROP_VSCROLL_POLICY
#endif
};
@@ -430,6 +432,29 @@ static GtkAdjustment* getVerticalAdjustment(WebKitWebView* webView)
{
return webView->priv->verticalAdjustment.get();
}
+
+static void setHorizontalScrollPolicy(WebKitWebView* webView, GtkScrollablePolicy policy)
+{
+ webView->priv->horizontalScrollingPolicy = policy;
+ gtk_widget_queue_resize(GTK_WIDGET(webView));
+}
+
+static void setVerticalScrollPolicy(WebKitWebView* webView, GtkScrollablePolicy policy)
+{
+ webView->priv->verticalScrollingPolicy = policy;
+ gtk_widget_queue_resize(GTK_WIDGET(webView));
+}
+
+static GtkScrollablePolicy getHorizontalScrollPolicy(WebKitWebView* webView)
+{
+ return webView->priv->horizontalScrollingPolicy;
+}
+
+static GtkScrollablePolicy getVerticalScrollPolicy(WebKitWebView* webView)
+{
+ return webView->priv->verticalScrollingPolicy;
+}
+
#endif
static void webkit_web_view_get_property(GObject* object, guint prop_id, GValue* value, GParamSpec* pspec)
@@ -498,6 +523,12 @@ static void webkit_web_view_get_property(GObject* object, guint prop_id, GValue*
case PROP_VADJUSTMENT:
g_value_set_object(value, getVerticalAdjustment(webView));
break;
+ case PROP_HSCROLL_POLICY:
+ g_value_set_enum(value, getHorizontalScrollPolicy(webView));
+ break;
+ case PROP_VSCROLL_POLICY:
+ g_value_set_enum(value, getVerticalScrollPolicy(webView));
+ break;
#endif
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
@@ -540,6 +571,12 @@ static void webkit_web_view_set_property(GObject* object, guint prop_id, const G
case PROP_VADJUSTMENT:
setVerticalAdjustment(webView, static_cast<GtkAdjustment*>(g_value_get_object(value)));
break;
+ case PROP_HSCROLL_POLICY:
+ setHorizontalScrollPolicy(webView, static_cast<GtkScrollablePolicy>(g_value_get_enum(value)));
+ break;
+ case PROP_VSCROLL_POLICY:
+ setVerticalScrollPolicy(webView, static_cast<GtkScrollablePolicy>(g_value_get_enum(value)));
+ break;
#endif
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
@@ -2603,6 +2640,8 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
#else
g_object_class_override_property(objectClass, PROP_HADJUSTMENT, "hadjustment");
g_object_class_override_property(objectClass, PROP_VADJUSTMENT, "vadjustment");
+ g_object_class_override_property(objectClass, PROP_HSCROLL_POLICY, "hscroll-policy");
+ g_object_class_override_property(objectClass, PROP_VSCROLL_POLICY, "vscroll-policy");
#endif
/*
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list