Title: [292904] trunk
Revision
292904
Author
[email protected]
Date
2022-04-15 04:41:51 -0700 (Fri, 15 Apr 2022)

Log Message

[GTK] Default initialize GTK-specific print info in WebKit::PrintInfo
https://bugs.webkit.org/show_bug.cgi?id=196542

Reviewed by Adrian Perez de Castro.

Source/WebKit:

printInfoFromWKPrintInfo() will not initialize GTK-specific bits,
leading to problems down the road with IPC encoders, so add default values.

* Shared/PrintInfo.h:

LayoutTests:

* LayoutTests/platform/gtk/TestExpectations: Remove now passing tests
* platform/gtk/editing/execCommand/print-expected.png: Update expectations
* platform/gtk/editing/execCommand/print-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (292903 => 292904)


--- trunk/LayoutTests/ChangeLog	2022-04-15 09:53:12 UTC (rev 292903)
+++ trunk/LayoutTests/ChangeLog	2022-04-15 11:41:51 UTC (rev 292904)
@@ -1,3 +1,14 @@
+2022-04-14  Claudio Saavedra  <[email protected]>
+
+        [GTK] Default initialize GTK-specific print info in WebKit::PrintInfo
+        https://bugs.webkit.org/show_bug.cgi?id=196542
+
+        Reviewed by Adrian Perez de Castro.
+
+        * LayoutTests/platform/gtk/TestExpectations: Remove now passing tests
+        * platform/gtk/editing/execCommand/print-expected.png: Update expectations
+        * platform/gtk/editing/execCommand/print-expected.txt:
+
 2022-04-14  Antoine Quint  <[email protected]>
 
         [model] ASVInlinePreview objects don't get cleared when the model source changes

Modified: trunk/LayoutTests/platform/gtk/TestExpectations (292903 => 292904)


--- trunk/LayoutTests/platform/gtk/TestExpectations	2022-04-15 09:53:12 UTC (rev 292903)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2022-04-15 11:41:51 UTC (rev 292904)
@@ -174,10 +174,6 @@
 webkit.org/b/218349 mathml/presentation/href-enter.html [ ImageOnlyFailure ]
 webkit.org/b/218349 mathml/presentation/href-style.html [ ImageOnlyFailure ]
 
-# Printing
-webkit.org/b/196542 printing/crash-while-formatting-subframe-for-printing.html [ Crash ]
-webkit.org/b/196542 printing/printing-events.html [ Crash ]
-
 # ResourceLoading
 webkit.org/b/201270 [ Release ] http/tests/security/navigate-when-restoring-cached-page.html [ Timeout ]
 webkit.org/b/201270 [ Debug ] http/tests/security/navigate-when-restoring-cached-page.html [ Crash ]
@@ -937,10 +933,6 @@
 
 webkit.org/b/212232 editing/async-clipboard/clipboard-read-while-pasting.html [ Crash ]
 
-webkit.org/b/225921 editing/execCommand/print.html [ Crash ]
-webkit.org/b/225921 fast/media/print-restores-previous-mediatype.html [ Crash ]
-webkit.org/b/225921 printing/print-close-crash.html [ Crash ]
-
 #////////////////////////////////////////////////////////////////////////////////////////
 # End of Crashing tests
 #////////////////////////////////////////////////////////////////////////////////////////

Modified: trunk/LayoutTests/platform/gtk/editing/execCommand/print-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/gtk/editing/execCommand/print-expected.txt (292903 => 292904)


--- trunk/LayoutTests/platform/gtk/editing/execCommand/print-expected.txt	2022-04-15 09:53:12 UTC (rev 292903)
+++ trunk/LayoutTests/platform/gtk/editing/execCommand/print-expected.txt	2022-04-15 11:41:51 UTC (rev 292904)
@@ -11,19 +11,19 @@
           RenderInline {SPAN} at (0,0) size 693x53
             RenderText {#text} at (0,0) size 693x53
               text run at (0,0) width 687: "\"The quick brown fox jumps over the lazy dog\" uses every letter in the"
-              text run at (687,0) width 6: " "
+              text run at (686,0) width 7: " "
               text run at (0,27) width 170: "english language."
         RenderBlock (anonymous) at (14,92) size 756x216
           RenderBlock {P} at (0,0) size 756x216
             RenderText {#text} at (0,0) size 756x215
               text run at (0,0) width 462: "Here's to the crazy ones, the misfits, the rebels, "
-              text run at (462,0) width 193: "the trouble makers, "
-              text run at (655,0) width 92: "the round"
-              text run at (747,0) width 6: " "
+              text run at (461,0) width 194: "the trouble makers, "
+              text run at (654,0) width 93: "the round"
+              text run at (746,0) width 7: " "
               text run at (0,27) width 243: "pegs in the square holes, "
-              text run at (243,27) width 350: "the ones who see things differently. "
-              text run at (593,27) width 144: "There not fond"
-              text run at (737,27) width 6: " "
+              text run at (243,27) width 349: "the ones who see things differently. "
+              text run at (591,27) width 145: "There not fond"
+              text run at (735,27) width 7: " "
               text run at (0,54) width 510: "of rules, and they have no respect for the status quo, "
               text run at (510,54) width 190: "you can quote then,"
               text run at (0,81) width 197: "disagree with them, "

Modified: trunk/Source/WebKit/ChangeLog (292903 => 292904)


--- trunk/Source/WebKit/ChangeLog	2022-04-15 09:53:12 UTC (rev 292903)
+++ trunk/Source/WebKit/ChangeLog	2022-04-15 11:41:51 UTC (rev 292904)
@@ -1,3 +1,15 @@
+2022-04-14  Claudio Saavedra  <[email protected]>
+
+        [GTK] Default initialize GTK-specific print info in WebKit::PrintInfo
+        https://bugs.webkit.org/show_bug.cgi?id=196542
+
+        Reviewed by Adrian Perez de Castro.
+
+        printInfoFromWKPrintInfo() will not initialize GTK-specific bits,
+        leading to problems down the road with IPC encoders, so add default values.
+
+        * Shared/PrintInfo.h:
+
 2022-04-15  Zan Dobersek  <[email protected]>
 
         [GTK][WPE] Remove exclusive build guards around GPU process preferences, code

Modified: trunk/Source/WebKit/Shared/PrintInfo.h (292903 => 292904)


--- trunk/Source/WebKit/Shared/PrintInfo.h	2022-04-15 09:53:12 UTC (rev 292903)
+++ trunk/Source/WebKit/Shared/PrintInfo.h	2022-04-15 11:41:51 UTC (rev 292904)
@@ -31,8 +31,7 @@
 #if USE(APPKIT)
 OBJC_CLASS NSPrintInfo;
 #elif PLATFORM(GTK)
-typedef struct _GtkPrintSettings GtkPrintSettings;
-typedef struct _GtkPageSetup GtkPageSetup;
+#include <gtk/gtk.h>
 #include <wtf/glib/GRefPtr.h>
 #else
 // FIXME: This should use the windows equivalent.
@@ -69,8 +68,8 @@
 #endif
 
 #if PLATFORM(GTK)
-    GRefPtr<GtkPrintSettings> printSettings;
-    GRefPtr<GtkPageSetup> pageSetup;
+    GRefPtr<GtkPrintSettings> printSettings { adoptGRef(gtk_print_settings_new()) };
+    GRefPtr<GtkPageSetup> pageSetup { adoptGRef(gtk_page_setup_new()) };
     PrintMode printMode { PrintModeAsync };
 #endif
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to