Title: [159047] releases/WebKitGTK/webkit-2.2/Source/WebKit2
Revision
159047
Author
carlo...@webkit.org
Date
2013-11-11 02:10:02 -0800 (Mon, 11 Nov 2013)

Log Message

Merge r159041 - [GTK] [WebKit2] Crash when printing to a file via _javascript_
https://bugs.webkit.org/show_bug.cgi?id=122801

Reviewed by Martin Robinson.

This crash is caused by a GTK+ bug, but we can work around it by
ensuring the print dialog is always shown with a valid
GtkPrintSettings object.

* UIProcess/API/gtk/WebKitPrintOperation.cpp:
(webkitPrintOperationRunDialog):

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.2/Source/WebKit2/ChangeLog (159046 => 159047)


--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/ChangeLog	2013-11-11 10:07:25 UTC (rev 159046)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/ChangeLog	2013-11-11 10:10:02 UTC (rev 159047)
@@ -1,3 +1,17 @@
+2013-11-10  Carlos Garcia Campos  <cgar...@igalia.com>
+
+        [GTK] [WebKit2] Crash when printing to a file via _javascript_
+        https://bugs.webkit.org/show_bug.cgi?id=122801
+
+        Reviewed by Martin Robinson.
+
+        This crash is caused by a GTK+ bug, but we can work around it by
+        ensuring the print dialog is always shown with a valid
+        GtkPrintSettings object.
+
+        * UIProcess/API/gtk/WebKitPrintOperation.cpp:
+        (webkitPrintOperationRunDialog):
+
 2013-10-04  Lorenzo Tilve  <lti...@igalia.com>
 
         [GTK] Enable text edition UndoOperations support in WebKit2

Modified: releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/WebKitPrintOperation.cpp (159046 => 159047)


--- releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/WebKitPrintOperation.cpp	2013-11-11 10:07:25 UTC (rev 159046)
+++ releases/WebKitGTK/webkit-2.2/Source/WebKit2/UIProcess/API/gtk/WebKitPrintOperation.cpp	2013-11-11 10:10:02 UTC (rev 159047)
@@ -228,8 +228,12 @@
                                                                                                  | GTK_PRINT_CAPABILITY_SCALE));
 
     WebKitPrintOperationPrivate* priv = printOperation->priv;
-    if (priv->printSettings)
-        gtk_print_unix_dialog_set_settings(printDialog, priv->printSettings.get());
+    // Make sure the initial settings of the GtkPrintUnixDialog is a valid
+    // GtkPrintSettings object to work around a crash happening in the GTK+
+    // file print backend. https://bugzilla.gnome.org/show_bug.cgi?id=703784.
+    if (!priv->printSettings)
+        priv->printSettings = adoptGRef(gtk_print_settings_new());
+    gtk_print_unix_dialog_set_settings(printDialog, priv->printSettings.get());
 
     if (priv->pageSetup)
         gtk_print_unix_dialog_set_page_setup(printDialog, priv->pageSetup.get());
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to