Commit 5a584a2b authored by xan@webkit.org's avatar xan@webkit.org
Browse files

2010-02-16 Xan Lopez <xlopez@igalia.com>

        Reviewed by Gustavo Noronha.

        Bump version to 1.1.22 so we can depend on it in applications.

        * configure.ac:

WebKit/gtk:

2010-02-16  Xan Lopez  <xlopez@igalia.com>

        Reviewed by Gustavo Noronha.

        Add a new WebKitWebSettings setting, 'auto-resize-window', set to
        FALSE by default, that when enabled will apply any resizes or
        moves done by a page through various DOM methods (moveTo,
        resizeTo, moveBy, resizeBy).

        * WebCoreSupport/ChromeClientGtk.cpp:
        * webkit/webkitwebsettings.cpp:
        (webkit_web_settings_class_init):
        (webkit_web_settings_set_property):
        (webkit_web_settings_get_property):
        (webkit_web_settings_copy):

WebKitTools:

2010-02-16  Xan Lopez  <xlopez@igalia.com>

        Reviewed by Gustavo Noronha.

        Enable 'auto-resize-window' in our DRT.

        * DumpRenderTree/gtk/DumpRenderTree.cpp:
        (resetDefaultsToConsistentValues):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54818 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e757880f
2010-02-16 Xan Lopez <xlopez@igalia.com>
Reviewed by Gustavo Noronha.
Bump version to 1.1.22 so we can depend on it in applications.
* configure.ac:
2010-02-12 Simon Hausmann <simon.hausmann@nokia.com>
Reviewed by Holger Freyther.
......
2010-02-16 Xan Lopez <xlopez@igalia.com>
Reviewed by Gustavo Noronha.
Add a new WebKitWebSettings setting, 'auto-resize-window', set to
FALSE by default, that when enabled will apply any resizes or
moves done by a page through various DOM methods (moveTo,
resizeTo, moveBy, resizeBy).
* WebCoreSupport/ChromeClientGtk.cpp:
* webkit/webkitwebsettings.cpp:
(webkit_web_settings_class_init):
(webkit_web_settings_set_property):
(webkit_web_settings_get_property):
(webkit_web_settings_copy):
2010-02-15 Emilio Pozuelo Monfort <pochu27@gmail.com>
Reviewed by Gustavo Noronha Silva.
......
......@@ -88,6 +88,23 @@ void ChromeClient::setWindowRect(const FloatRect& rect)
"width", intrect.width(),
"height", intrect.height(),
NULL);
gboolean autoResizeWindow;
WebKitWebSettings* settings = webkit_web_view_get_settings(m_webView);
g_object_get(settings, "auto-resize-window", &autoResizeWindow, NULL);
if (!autoResizeWindow)
return;
GtkWidget* window = gtk_widget_get_toplevel(GTK_WIDGET(m_webView));
#if GTK_CHECK_VERSION(2, 18, 0)
if (gtk_widget_is_toplevel(window)) {
#else
if (GTK_WIDGET_TOPLEVEL(window)) {
#endif
gtk_window_move(GTK_WINDOW(window), intrect.x(), intrect.y());
gtk_window_resize(GTK_WINDOW(window), intrect.width(), intrect.height());
}
}
FloatRect ChromeClient::pageRect()
......
......@@ -103,6 +103,7 @@ struct _WebKitWebSettingsPrivate {
gboolean enable_default_context_menu;
gboolean enable_site_specific_quirks;
gboolean enable_page_cache;
gboolean auto_resize_window;
};
#define WEBKIT_WEB_SETTINGS_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_WEB_SETTINGS, WebKitWebSettingsPrivate))
......@@ -147,7 +148,8 @@ enum {
PROP_TAB_KEY_CYCLES_THROUGH_ELEMENTS,
PROP_ENABLE_DEFAULT_CONTEXT_MENU,
PROP_ENABLE_SITE_SPECIFIC_QUIRKS,
PROP_ENABLE_PAGE_CACHE
PROP_ENABLE_PAGE_CACHE,
PROP_AUTO_RESIZE_WINDOW
};
// Create a default user agent string
......@@ -759,6 +761,27 @@ static void webkit_web_settings_class_init(WebKitWebSettingsClass* klass)
FALSE,
flags));
/**
* WebKitWebSettings:auto-resize-window:
*
* Web pages can request to modify the size and position of the
* window containing the #WebKitWebView through various DOM methods
* (resizeTo, moveTo, resizeBy, moveBy). By default WebKit will not
* honor this requests, but you can set this property to %TRUE if
* you'd like it to do so. If you wish to handle this manually, you
* can connect to the notify signal for the
* #WebKitWebWindowFeatures of your #WebKitWebView.
*
* Since: 1.1.22
*/
g_object_class_install_property(gobject_class,
PROP_AUTO_RESIZE_WINDOW,
g_param_spec_boolean("auto-resize-window",
_("Auto Resize Window"),
_("Automatically resize the toplevel window when a page requests it"),
FALSE,
flags));
g_type_class_add_private(klass, sizeof(WebKitWebSettingsPrivate));
}
......@@ -967,6 +990,9 @@ static void webkit_web_settings_set_property(GObject* object, guint prop_id, con
case PROP_ENABLE_PAGE_CACHE:
priv->enable_page_cache = g_value_get_boolean(value);
break;
case PROP_AUTO_RESIZE_WINDOW:
priv->auto_resize_window = g_value_get_boolean(value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
break;
......@@ -1093,6 +1119,9 @@ static void webkit_web_settings_get_property(GObject* object, guint prop_id, GVa
case PROP_ENABLE_PAGE_CACHE:
g_value_set_boolean(value, priv->enable_page_cache);
break;
case PROP_AUTO_RESIZE_WINDOW:
g_value_set_boolean(value, priv->auto_resize_window);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
break;
......@@ -1162,6 +1191,7 @@ WebKitWebSettings* webkit_web_settings_copy(WebKitWebSettings* web_settings)
"enable-default-context-menu", priv->enable_default_context_menu,
"enable-site-specific-quirks", priv->enable_site_specific_quirks,
"enable-page-cache", priv->enable_page_cache,
"auto-resize-window", priv->auto_resize_window,
NULL));
return copy;
......
2010-02-16 Xan Lopez <xlopez@igalia.com>
Reviewed by Gustavo Noronha.
Enable 'auto-resize-window' in our DRT.
* DumpRenderTree/gtk/DumpRenderTree.cpp:
(resetDefaultsToConsistentValues):
2010-02-15 Martin Robinson <mrobinson@webkit.org>
 
Reviewed by Darin Adler.
......
......@@ -335,6 +335,7 @@ static void resetDefaultsToConsistentValues()
"minimum-font-size", 1,
"enable-caret-browsing", FALSE,
"enable-page-cache", FALSE,
"auto-resize-window", TRUE,
NULL);
webkit_web_frame_clear_main_frame_name(mainFrame);
......
......@@ -2,7 +2,7 @@ AC_PREREQ(2.59)
m4_define([webkit_major_version], [1])
m4_define([webkit_minor_version], [1])
m4_define([webkit_micro_version], [21])
m4_define([webkit_micro_version], [22])
# This is the version we'll be using as part of our User-Agent string
# e.g., AppleWebKit/$(webkit_user_agent_version) ...
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment