Diff
Modified: releases/WebKitGTK/webkit-1.8/GNUmakefile.am (108528 => 108529)
--- releases/WebKitGTK/webkit-1.8/GNUmakefile.am 2012-02-22 19:37:26 UTC (rev 108528)
+++ releases/WebKitGTK/webkit-1.8/GNUmakefile.am 2012-02-22 19:43:26 UTC (rev 108529)
@@ -80,9 +80,7 @@
webkitgtk_gdom_built_sources :=
webkitgtk_built_sources :=
webkitgtk_built_nosources :=
-webkit2_sources :=
webkit2_built_sources :=
-webkit2_plugin_process_sources :=
webkit2_plugin_process_built_sources :=
webkittestrunner_built_sources :=
libwebcoreinternals_built_sources :=
Modified: releases/WebKitGTK/webkit-1.8/LayoutTests/ChangeLog (108528 => 108529)
--- releases/WebKitGTK/webkit-1.8/LayoutTests/ChangeLog 2012-02-22 19:37:26 UTC (rev 108528)
+++ releases/WebKitGTK/webkit-1.8/LayoutTests/ChangeLog 2012-02-22 19:43:26 UTC (rev 108529)
@@ -1,13 +1,3 @@
-2012-02-22 Carlos Garcia Campos <[email protected]>
-
- 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
-
- * platform/gtk/Skipped:
-
2012-02-20 Martin Robinson <[email protected]>
[UNIX] Plugin information fields are not interpreted as UTF-8
Modified: releases/WebKitGTK/webkit-1.8/LayoutTests/platform/gtk/Skipped (108528 => 108529)
--- releases/WebKitGTK/webkit-1.8/LayoutTests/platform/gtk/Skipped 2012-02-22 19:37:26 UTC (rev 108528)
+++ releases/WebKitGTK/webkit-1.8/LayoutTests/platform/gtk/Skipped 2012-02-22 19:43:26 UTC (rev 108529)
@@ -930,35 +930,9 @@
canvas/philip/tests/2d.pattern.paint.repeaty.coord1.html
canvas/philip/tests/2d.pattern.paint.repeaty.outside.html
-# Tests that user modal dialogs fail in the DRT for some reason.
-# https://bugs.webkit.org/show_bug.cgi?id=53600
-fast/animation/request-animation-frame-during-modal.html
+# This modal dialog test still fails because the blur event is not dispatched on the opener
+# window when running the modal dialog.
fast/events/show-modal-dialog-onblur-onfocus.html
-fast/events/scroll-event-during-modal-dialog.html
-fast/harness/show-modal-dialog.html
-inspector/console/console-long-eval-crash.html
-sputnik/Conformance/10_Execution_Contexts/10.2_Entering_An_Execution_Context/10.2.2_Eval_Code/S10.2.2_A1.2_T10.html
-sputnik/Conformance/10_Execution_Contexts/10.2_Entering_An_Execution_Context/10.2.2_Eval_Code/S10.2.2_A1.1_T11.html
-sputnik/Conformance/10_Execution_Contexts/10.2_Entering_An_Execution_Context/10.2.2_Eval_Code/S10.2.2_A1.1_T2.html
-sputnik/Conformance/10_Execution_Contexts/10.2_Entering_An_Execution_Context/10.2.2_Eval_Code/S10.2.2_A1.2_T2.html
-sputnik/Conformance/10_Execution_Contexts/10.2_Entering_An_Execution_Context/10.2.2_Eval_Code/S10.2.2_A1.1_T4.html
-sputnik/Conformance/10_Execution_Contexts/10.2_Entering_An_Execution_Context/10.2.2_Eval_Code/S10.2.2_A1.2_T4.html
-sputnik/Conformance/10_Execution_Contexts/10.2_Entering_An_Execution_Context/10.2.2_Eval_Code/S10.2.2_A1.1_T6.html
-sputnik/Conformance/10_Execution_Contexts/10.2_Entering_An_Execution_Context/10.2.2_Eval_Code/S10.2.2_A1.2_T6.html
-sputnik/Conformance/10_Execution_Contexts/10.2_Entering_An_Execution_Context/10.2.2_Eval_Code/S10.2.2_A1.1_T8.html
-sputnik/Conformance/10_Execution_Contexts/10.2_Entering_An_Execution_Context/10.2.2_Eval_Code/S10.2.2_A1.2_T8.html
-sputnik/Conformance/10_Execution_Contexts/10.2_Entering_An_Execution_Context/10.2.2_Eval_Code/S10.2.2_A1.1_T10.html
-sputnik/Conformance/10_Execution_Contexts/10.2_Entering_An_Execution_Context/10.2.2_Eval_Code/S10.2.2_A1.2_T11.html
-sputnik/Conformance/10_Execution_Contexts/10.2_Entering_An_Execution_Context/10.2.2_Eval_Code/S10.2.2_A1.1_T1.html
-sputnik/Conformance/10_Execution_Contexts/10.2_Entering_An_Execution_Context/10.2.2_Eval_Code/S10.2.2_A1.2_T1.html
-sputnik/Conformance/10_Execution_Contexts/10.2_Entering_An_Execution_Context/10.2.2_Eval_Code/S10.2.2_A1.1_T3.html
-sputnik/Conformance/10_Execution_Contexts/10.2_Entering_An_Execution_Context/10.2.2_Eval_Code/S10.2.2_A1.2_T3.html
-sputnik/Conformance/10_Execution_Contexts/10.2_Entering_An_Execution_Context/10.2.2_Eval_Code/S10.2.2_A1.1_T5.html
-sputnik/Conformance/10_Execution_Contexts/10.2_Entering_An_Execution_Context/10.2.2_Eval_Code/S10.2.2_A1.2_T5.html
-sputnik/Conformance/10_Execution_Contexts/10.2_Entering_An_Execution_Context/10.2.2_Eval_Code/S10.2.2_A1.1_T7.html
-sputnik/Conformance/10_Execution_Contexts/10.2_Entering_An_Execution_Context/10.2.2_Eval_Code/S10.2.2_A1.2_T7.html
-sputnik/Conformance/10_Execution_Contexts/10.2_Entering_An_Execution_Context/10.2.2_Eval_Code/S10.2.2_A1.1_T9.html
-sputnik/Conformance/10_Execution_Contexts/10.2_Entering_An_Execution_Context/10.2.2_Eval_Code/S10.2.2_A1.2_T9.html
# pastes a space instead of a tab
# https://bugs.webkit.org/show_bug.cgi?id=38437
Modified: releases/WebKitGTK/webkit-1.8/Source/WebCore/GNUmakefile.am (108528 => 108529)
--- releases/WebKitGTK/webkit-1.8/Source/WebCore/GNUmakefile.am 2012-02-22 19:37:26 UTC (rev 108528)
+++ releases/WebKitGTK/webkit-1.8/Source/WebCore/GNUmakefile.am 2012-02-22 19:43:26 UTC (rev 108529)
@@ -787,24 +787,20 @@
# it includes an empty command list (the semicolon).
DerivedSources/WebCore/JS%.cpp: DerivedSources/WebCore/JS%.h;
+SUPPLEMENTAL_DEPENDENCY_FILE = $(top_builddir)/DerivedSources/WebCore/supplemental_dependency.tmp
+IDL_FILES_TMP = $(top_builddir)/DerivedSources/WebCore/idl_files.tmp
+
.SECONDARY:
-DerivedSources/WebCore/idl_supplemental_dependencies: $(SCRIPTS_FOR_RESOLVE_SUPPLEMENTAL) $(dom_binding_idls)
- $(AM_V_at)echo -n > $(top_builddir)/DerivedSources/WebCore/idl_files_list
- $(AM_V_at)($(foreach idl, $(dom_binding_idls), echo $(idl) &&) echo -n) >> $(top_builddir)/DerivedSources/WebCore/idl_files_list
- $(AM_V_at)$(PERL) -I$(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/resolve-supplemental.pl --defines "LANGUAGE_JAVASCRIPT=1 $(FEATURE_DEFINES)" --idlFilesList $(top_builddir)/DerivedSources/WebCore/idl_files_list --supplementalDependencyFile $@
+$(SUPPLEMENTAL_DEPENDENCY_FILE): $(SCRIPTS_FOR_RESOLVE_SUPPLEMENTAL) $(dom_binding_idls)
+ $(AM_V_GEN)
+ $(AM_V_at)echo -n > $(IDL_FILES_TMP)
+ $(AM_V_at)($(foreach idl, $(dom_binding_idls), echo $(idl) &&) echo -n) >> $(IDL_FILES_TMP)
+ $(AM_V_at)$(PERL) -I$(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/resolve-supplemental.pl --defines "LANGUAGE_JAVASCRIPT=1 $(FEATURE_DEFINES)" --idlFilesList $(IDL_FILES_TMP) --supplementalDependencyFile $@
.SECONDARY:
-DerivedSources/WebCore/JS%.h: %.idl $(SCRIPTS_FOR_GENERATE_BINDINGS) $(WebCore)/bindings/scripts/CodeGeneratorJS.pm DerivedSources/WebCore/idl_supplemental_dependencies
- $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/generate-bindings.pl $(IDL_PATH:%=--include "%") --outputDir "$(GENSOURCES_WEBCORE)" --defines "LANGUAGE_JAVASCRIPT=1 $(FEATURE_DEFINES)" --generator JS --supplementalDependencyFile $(top_builddir)/DerivedSources/WebCore/idl_supplemental_dependencies $<
+DerivedSources/WebCore/JS%.h: %.idl $(SCRIPTS_FOR_GENERATE_BINDINGS) $(WebCore)/bindings/scripts/CodeGeneratorJS.pm $(SUPPLEMENTAL_DEPENDENCY_FILE)
+ $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/generate-bindings.pl $(IDL_PATH:%=--include "%") --outputDir "$(GENSOURCES_WEBCORE)" --defines "LANGUAGE_JAVASCRIPT=1 $(FEATURE_DEFINES)" --generator JS --supplementalDependencyFile $(SUPPLEMENTAL_DEPENDENCY_FILE) $<
-# See https://bugs.webkit.org/show_bug.cgi?id=76388
-# We need to introduce a manual dependency to prevent non-generated sources from
-# trying to build before the generated ones. This can happen if the supplemental
-# IDL generation takes a long time. The pipe represents an order-only dependency,
-# which means that GNUmake will only try to build the dependencies first, but
-# not rebuild all the targets if the dependencies change.
-$(webkitgtk_sources) $(webkit2_sources) $(webkit2_plugin_process_sources) $(webcore_sources) $(webcoregtk_sources) : | DerivedSources/WebCore/idl_supplemental_dependencies $(webcore_built_sources)
-
noinst_LTLIBRARIES += \
libWebCore.la
Modified: releases/WebKitGTK/webkit-1.8/Source/WebCore/bindings/gobject/GNUmakefile.am (108528 => 108529)
--- releases/WebKitGTK/webkit-1.8/Source/WebCore/bindings/gobject/GNUmakefile.am 2012-02-22 19:37:26 UTC (rev 108528)
+++ releases/WebKitGTK/webkit-1.8/Source/WebCore/bindings/gobject/GNUmakefile.am 2012-02-22 19:43:26 UTC (rev 108529)
@@ -460,5 +460,5 @@
# Filter out SVG and IndexedDB for now
gdom_feature_defines := $(filter-out ENABLE_INDEXED_DATABASE=1, $(filter-out ENABLE_SVG%, $(FEATURE_DEFINES)))
-DerivedSources/webkit/WebKitDOM%.cpp DerivedSources/webkit/WebKitDOM%.h DerivedSources/webkit/WebKitDOM%Private.h: %.idl $(SCRIPTS_FOR_GENERATE_BINDINGS) $(WebCore)/bindings/scripts/CodeGeneratorGObject.pm $(WebCore)/bindings/gobject/GNUmakefile.am $(top_builddir)/DerivedSources/WebCore/idl_supplemental_dependencies
- $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/generate-bindings.pl --include $(WebCore)/dom --include $(WebCore)/html --include $(WebCore)/css --include $(WebCore)/page --include $(WebCore)/xml --include $(WebCore)/svg --outputDir "$(GENSOURCES_WEBKIT)" --defines "LANGUAGE_GOBJECT=1 $(gdom_feature_defines)" --generator GObject --supplementalDependencyFile $(top_builddir)/DerivedSources/WebCore/idl_supplemental_dependencies $<
+DerivedSources/webkit/WebKitDOM%.cpp DerivedSources/webkit/WebKitDOM%.h DerivedSources/webkit/WebKitDOM%Private.h: %.idl $(SCRIPTS_FOR_GENERATE_BINDINGS) $(WebCore)/bindings/scripts/CodeGeneratorGObject.pm $(WebCore)/bindings/gobject/GNUmakefile.am $(SUPPLEMENTAL_DEPENDENCY_FILE)
+ $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/generate-bindings.pl --include $(WebCore)/dom --include $(WebCore)/html --include $(WebCore)/css --include $(WebCore)/page --include $(WebCore)/xml --include $(WebCore)/svg --outputDir "$(GENSOURCES_WEBKIT)" --defines "LANGUAGE_GOBJECT=1 $(gdom_feature_defines)" --generator GObject --supplementalDependencyFile $(SUPPLEMENTAL_DEPENDENCY_FILE) $<
Modified: releases/WebKitGTK/webkit-1.8/Source/WebKit/gtk/ChangeLog (108528 => 108529)
--- releases/WebKitGTK/webkit-1.8/Source/WebKit/gtk/ChangeLog 2012-02-22 19:37:26 UTC (rev 108528)
+++ releases/WebKitGTK/webkit-1.8/Source/WebKit/gtk/ChangeLog 2012-02-22 19:43:26 UTC (rev 108529)
@@ -1,21 +1,3 @@
-2012-02-22 Carlos Garcia Campos <[email protected]>
-
- 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-20 Martin Robinson <[email protected]>
Fix GTK+ unit tests after r108281.
Modified: releases/WebKitGTK/webkit-1.8/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp (108528 => 108529)
--- releases/WebKitGTK/webkit-1.8/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp 2012-02-22 19:37:26 UTC (rev 108528)
+++ releases/WebKitGTK/webkit-1.8/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp 2012-02-22 19:43:26 UTC (rev 108529)
@@ -79,6 +79,7 @@
: m_webView(webView)
, m_adjustmentWatcher(webView)
, m_closeSoonTimer(0)
+ , m_modalLoop(0)
, m_displayTimer(this, &ChromeClient::paint)
, m_lastDisplayTime(0)
, m_repaintSoonSourceId(0)
@@ -94,6 +95,9 @@
if (m_repaintSoonSourceId)
g_source_remove(m_repaintSoonSourceId);
+ if (m_modalLoop)
+ g_main_loop_quit(m_modalLoop);
+
delete this;
}
@@ -180,13 +184,26 @@
bool ChromeClient::canRunModal()
{
- notImplemented();
- return false;
+ return true;
}
void ChromeClient::runModal()
{
- notImplemented();
+ gboolean isHandled = false;
+ g_signal_emit_by_name(m_webView, "run-modal-dialog", &isHandled);
+ if (!isHandled)
+ return;
+
+ GMainContext* threadDefaultContext = g_main_context_ref_thread_default();
+ g_main_context_acquire(threadDefaultContext);
+
+ m_modalLoop = g_main_loop_new(threadDefaultContext, FALSE);
+ g_main_loop_run(m_modalLoop);
+ g_main_loop_unref(m_modalLoop);
+ m_modalLoop = 0;
+
+ g_main_context_release(threadDefaultContext);
+ g_main_context_unref(threadDefaultContext);
}
void ChromeClient::setToolbarsVisible(bool visible)
Modified: releases/WebKitGTK/webkit-1.8/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h (108528 => 108529)
--- releases/WebKitGTK/webkit-1.8/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h 2012-02-22 19:37:26 UTC (rev 108528)
+++ releases/WebKitGTK/webkit-1.8/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h 2012-02-22 19:43:26 UTC (rev 108529)
@@ -177,6 +177,7 @@
GtkAdjustmentWatcher m_adjustmentWatcher;
KURL m_hoveredLinkURL;
unsigned int m_closeSoonTimer;
+ GMainLoop* m_modalLoop;
Timer <ChromeClient> m_displayTimer;
Region m_dirtyRegion;
Modified: releases/WebKitGTK/webkit-1.8/Source/WebKit/gtk/webkit/webkitwebview.cpp (108528 => 108529)
--- releases/WebKitGTK/webkit-1.8/Source/WebKit/gtk/webkit/webkitwebview.cpp 2012-02-22 19:37:26 UTC (rev 108528)
+++ releases/WebKitGTK/webkit-1.8/Source/WebKit/gtk/webkit/webkitwebview.cpp 2012-02-22 19:43:26 UTC (rev 108529)
@@ -212,6 +212,7 @@
RESOURCE_LOAD_FINISHED,
RESOURCE_CONTENT_LENGTH_RECEIVED,
RESOURCE_LOAD_FAILED,
+ RUN_MODAL_DIALOG,
LAST_SIGNAL
};
@@ -2743,6 +2744,27 @@
G_TYPE_POINTER);
/*
+ * WebKitWebView::run-modal-dialog
+ * @webView: the object which received the signal
+ *
+ * Invoked when the @webView should be run in the modal mode. This can be
+ * avoided if FALSE is returned in the signal handler. Otherwise, the
+ * @webView (or its toplevel window) should be made transient for its parent,
+ * set as a modal window, and TRUE should be returned in the signal handler.
+ * After that, a loop will be created and run until the @webView is closed
+ * (i.e. its chrome is destroyed).
+ *
+ * Since: 1.7.6
+ */
+ webkit_web_view_signals[RESOURCE_LOAD_FAILED] = g_signal_new("run-modal-dialog",
+ G_TYPE_FROM_CLASS(webViewClass),
+ G_SIGNAL_RUN_LAST,
+ 0,
+ g_signal_accumulator_true_handled, NULL,
+ webkit_marshal_BOOLEAN__VOID,
+ G_TYPE_BOOLEAN, 0);
+
+ /*
* implementations of virtual methods
*/
webViewClass->create_web_view = webkit_web_view_real_create_web_view;
Modified: releases/WebKitGTK/webkit-1.8/Source/WebKit2/GNUmakefile.am (108528 => 108529)
--- releases/WebKitGTK/webkit-1.8/Source/WebKit2/GNUmakefile.am 2012-02-22 19:37:26 UTC (rev 108528)
+++ releases/WebKitGTK/webkit-1.8/Source/WebKit2/GNUmakefile.am 2012-02-22 19:43:26 UTC (rev 108529)
@@ -195,7 +195,7 @@
nodist_libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
$(webkit2_built_sources)
-webkit2_sources += \
+libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
Source/WebKit2/config.h \
Source/WebKit2/Platform/CoreIPC/ArgumentCoder.h \
Source/WebKit2/Platform/CoreIPC/ArgumentCoders.cpp \
@@ -959,9 +959,6 @@
Source/WebKit2/WebProcess/WebProcess.cpp \
Source/WebKit2/WebProcess/WebProcess.h
-libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
- $(webkit2_sources)
-
libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CPPFLAGS = \
-fno-strict-aliasing \
$(global_cppflags) \
@@ -1387,7 +1384,7 @@
nodist_Programs_WebKitPluginProcess_SOURCES = $(webkit2_plugin_process_built_sources)
BUILT_SOURCES += $(nodist_Programs_WebKitPluginProcess_SOURCES)
-webkit2_plugin_process_sources += \
+Programs_WebKitPluginProcess_SOURCES = \
Source/WebKit2/Platform/CoreIPC/ArgumentCoder.h \
Source/WebKit2/Platform/CoreIPC/ArgumentCoders.h \
Source/WebKit2/Platform/CoreIPC/ArgumentCoders.cpp \
@@ -1475,8 +1472,6 @@
Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.h \
Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp \
Source/WebKit2/gtk/PluginMainGtk.cpp
-Programs_WebKitPluginProcess_SOURCES = \
- $(webkit2_plugin_process_sources)
Programs_WebKitPluginProcess_LDADD = \
-lpthread \
Modified: releases/WebKitGTK/webkit-1.8/Tools/ChangeLog (108528 => 108529)
--- releases/WebKitGTK/webkit-1.8/Tools/ChangeLog 2012-02-22 19:37:26 UTC (rev 108528)
+++ releases/WebKitGTK/webkit-1.8/Tools/ChangeLog 2012-02-22 19:43:26 UTC (rev 108529)
@@ -1,19 +1,3 @@
-2012-02-22 Carlos Garcia Campos <[email protected]>
-
- 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
-
- * DumpRenderTree/gtk/DumpRenderTree.cpp:
- (createWebView):
- * GtkLauncher/main.c:
- (createWebViewCb):
- (createBrowser):
- (createWindow):
- (main):
-
2012-02-20 Martin Robinson <[email protected]>
[UNIX] Plugin information fields are not interpreted as UTF-8
Modified: releases/WebKitGTK/webkit-1.8/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp (108528 => 108529)
--- releases/WebKitGTK/webkit-1.8/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp 2012-02-22 19:37:26 UTC (rev 108528)
+++ releases/WebKitGTK/webkit-1.8/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp 2012-02-22 19:43:26 UTC (rev 108529)
@@ -957,6 +957,15 @@
return TRUE;
}
+static gboolean webViewRunModalDialog(WebKitWebView* view)
+{
+ GtkWindow* viewTopLevel = GTK_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(view)));
+ gtk_window_set_transient_for(GTK_WINDOW(viewTopLevel), GTK_WINDOW(window));
+ gtk_window_set_modal(GTK_WINDOW(viewTopLevel), TRUE);
+
+ return TRUE;
+}
+
static void databaseQuotaExceeded(WebKitWebView* view, WebKitWebFrame* frame, WebKitWebDatabase *database)
{
ASSERT(view);
@@ -1282,6 +1291,7 @@
"signal::status-bar-text-changed", webViewStatusBarTextChanged, 0,
"signal::create-web-view", webViewCreate, 0,
"signal::close-web-view", webViewClose, 0,
+ "signal::run-modal-dialog", webViewRunModalDialog, 0,
"signal::database-quota-exceeded", databaseQuotaExceeded, 0,
"signal::document-load-finished", webViewDocumentLoadFinished, 0,
"signal::geolocation-policy-decision-requested", geolocationPolicyDecisionRequested, 0,
Modified: releases/WebKitGTK/webkit-1.8/Tools/GtkLauncher/main.c (108528 => 108529)
--- releases/WebKitGTK/webkit-1.8/Tools/GtkLauncher/main.c 2012-02-22 19:37:26 UTC (rev 108528)
+++ releases/WebKitGTK/webkit-1.8/Tools/GtkLauncher/main.c 2012-02-22 19:43:26 UTC (rev 108529)
@@ -33,7 +33,7 @@
static gint windowCount = 0;
-static GtkWidget* createWindow(WebKitWebView** outWebView);
+static GtkWidget* createWindow(WebKitWebView** outWebView, GtkWidget* openerWindow);
static void activateUriEntryCb(GtkWidget* entry, gpointer data)
{
@@ -105,7 +105,7 @@
createWebViewCb(WebKitWebView* webView, WebKitWebFrame* web_frame, GtkWidget* window)
{
WebKitWebView *newWebView;
- createWindow(&newWebView);
+ createWindow(&newWebView, window);
webkit_web_view_set_settings(newWebView, webkit_web_view_get_settings(webView));
return newWebView;
}
@@ -123,8 +123,19 @@
return TRUE;
}
-static GtkWidget* createBrowser(GtkWidget* window, GtkWidget* uriEntry, GtkWidget* statusbar, WebKitWebView* webView)
+static gboolean runModalDialogCb(WebKitWebView* webView, GtkWidget* openerWindow)
{
+ if (!openerWindow)
+ return FALSE;
+
+ GtkWidget *window = gtk_widget_get_toplevel(GTK_WIDGET(webView));
+ gtk_window_set_transient_for(GTK_WINDOW(window), GTK_WINDOW(openerWindow));
+ gtk_window_set_modal(GTK_WINDOW(window), TRUE);
+ return TRUE;
+}
+
+static GtkWidget* createBrowser(GtkWidget* window, GtkWidget* uriEntry, GtkWidget* statusbar, WebKitWebView* webView, GtkWidget* openerWindow)
+{
GtkWidget *scrolledWindow = gtk_scrolled_window_new(NULL, NULL);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledWindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
@@ -137,6 +148,7 @@
g_signal_connect(webView, "create-web-view", G_CALLBACK(createWebViewCb), window);
g_signal_connect(webView, "web-view-ready", G_CALLBACK(webViewReadyCb), window);
g_signal_connect(webView, "close-web-view", G_CALLBACK(closeWebViewCb), window);
+ g_signal_connect(webView, "run-modal-dialog", G_CALLBACK(runModalDialogCb), openerWindow);
return scrolledWindow;
}
@@ -190,7 +202,7 @@
return toolbar;
}
-static GtkWidget* createWindow(WebKitWebView** outWebView)
+static GtkWidget* createWindow(WebKitWebView** outWebView, GtkWidget* openerWindow)
{
WebKitWebView *webView;
GtkWidget *vbox;
@@ -214,7 +226,7 @@
#endif
statusbar = createStatusbar(webView);
gtk_box_pack_start(GTK_BOX(vbox), createToolbar(uriEntry, webView), FALSE, FALSE, 0);
- gtk_box_pack_start(GTK_BOX(vbox), createBrowser(window, uriEntry, statusbar, webView), TRUE, TRUE, 0);
+ gtk_box_pack_start(GTK_BOX(vbox), createBrowser(window, uriEntry, statusbar, webView, openerWindow), TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(vbox), statusbar, FALSE, FALSE, 0);
gtk_container_add(GTK_CONTAINER(window), vbox);
@@ -417,7 +429,7 @@
#endif
WebKitWebView *webView;
- GtkWidget *main_window = createWindow(&webView);
+ GtkWidget *main_window = createWindow(&webView, 0);
if (webkitSettings) {
webkit_web_view_set_settings(WEBKIT_WEB_VIEW(webView), webkitSettings);