- a/Source/WebKit2/ChangeLog +13 lines
Lines 1-5 a/Source/WebKit2/ChangeLog_sec1
1
2012-02-16  Carlos Garcia Campos  <cgarcia@igalia.com>
1
2012-02-16  Carlos Garcia Campos  <cgarcia@igalia.com>
2
2
3
        [GTK] Make sure print operation object is alive until printing finishes in WebKit2
4
        https://bugs.webkit.org/show_bug.cgi?id=78829
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        * UIProcess/API/gtk/WebKitPrintOperation.cpp:
9
        (drawPagesForPrintingCompleted): Adopt the WebKitPrintOperation
10
        reference so that it's released when the callback finishes.
11
        (webkitPrintOperationRunDialogForFrame): Pass a reference of
12
        WebKitPrintOperation to the printing callback.
13
14
2012-02-16  Carlos Garcia Campos  <cgarcia@igalia.com>
15
3
        Unreviewed. Fix WebKit2 GTK+ build after r107947.
16
        Unreviewed. Fix WebKit2 GTK+ build after r107947.
4
17
5
        * UIProcess/API/gtk/WebKitPrintOperation.cpp:
18
        * UIProcess/API/gtk/WebKitPrintOperation.cpp:
- a/Source/WebKit2/UIProcess/API/gtk/WebKitPrintOperation.cpp -3 / +3 lines
Lines 234-243 static bool webkitPrintOperationRunDialogWin32(WebKitPrintOperation*, GtkWindow* a/Source/WebKit2/UIProcess/API/gtk/WebKitPrintOperation.cpp_sec1
234
234
235
static void drawPagesForPrintingCompleted(WKErrorRef, void* context)
235
static void drawPagesForPrintingCompleted(WKErrorRef, void* context)
236
{
236
{
237
    WebKitPrintOperation* printOperation = WEBKIT_PRINT_OPERATION(context);
237
    GRefPtr<WebKitPrintOperation> printOperation = adoptGRef(WEBKIT_PRINT_OPERATION(context));
238
    WebPageProxy* page = webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(printOperation->priv->webView));
238
    WebPageProxy* page = webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(printOperation->priv->webView));
239
    page->endPrinting();
239
    page->endPrinting();
240
    g_signal_emit(printOperation, signals[DONE], 0, NULL);
240
    g_signal_emit(printOperation.get(), signals[DONE], 0, NULL);
241
}
241
}
242
242
243
void webkitPrintOperationRunDialogForFrame(WebKitPrintOperation* printOperation, GtkWindow* parent, WebFrameProxy* webFrame)
243
void webkitPrintOperationRunDialogForFrame(WebKitPrintOperation* printOperation, GtkWindow* parent, WebFrameProxy* webFrame)
Lines 262-268 void webkitPrintOperationRunDialogForFrame(WebKitPrintOperation* printOperation, a/Source/WebKit2/UIProcess/API/gtk/WebKitPrintOperation.cpp_sec2
262
262
263
    PrintInfo printInfo(priv->printSettings.get(), priv->pageSetup.get());
263
    PrintInfo printInfo(priv->printSettings.get(), priv->pageSetup.get());
264
    WebPageProxy* page = webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(priv->webView));
264
    WebPageProxy* page = webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(priv->webView));
265
    page->drawPagesForPrinting(webFrame, printInfo, VoidCallback::create(printOperation, &drawPagesForPrintingCompleted));
265
    page->drawPagesForPrinting(webFrame, printInfo, VoidCallback::create(g_object_ref(printOperation), &drawPagesForPrintingCompleted));
266
}
266
}
267
267
268
/**
268
/**

Return to Bug 78829