diff options
author | Steve Block <steveblock@google.com> | 2011-05-25 19:08:45 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2011-06-08 13:51:31 +0100 |
commit | 2bde8e466a4451c7319e3a072d118917957d6554 (patch) | |
tree | 28f4a1b869a513e565c7760d0e6a06e7cf1fe95a /Source/WebKit/gtk/webkit/webkitwebframe.cpp | |
parent | 6939c99b71d9372d14a0c74a772108052e8c48c8 (diff) | |
download | external_webkit-2bde8e466a4451c7319e3a072d118917957d6554.zip external_webkit-2bde8e466a4451c7319e3a072d118917957d6554.tar.gz external_webkit-2bde8e466a4451c7319e3a072d118917957d6554.tar.bz2 |
Merge WebKit at r82507: Initial merge by git
Change-Id: I60ce9d780725b58b45e54165733a8ffee23b683e
Diffstat (limited to 'Source/WebKit/gtk/webkit/webkitwebframe.cpp')
-rw-r--r-- | Source/WebKit/gtk/webkit/webkitwebframe.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Source/WebKit/gtk/webkit/webkitwebframe.cpp b/Source/WebKit/gtk/webkit/webkitwebframe.cpp index fd90a6c..a0e40b3 100644 --- a/Source/WebKit/gtk/webkit/webkitwebframe.cpp +++ b/Source/WebKit/gtk/webkit/webkitwebframe.cpp @@ -44,6 +44,7 @@ #include "JSDOMBinding.h" #include "JSDOMWindow.h" #include "JSElement.h" +#include "PlatformContextCairo.h" #include "PrintContext.h" #include "RenderListItem.h" #include "RenderTreeAsText.h" @@ -765,17 +766,17 @@ static void begin_print_callback(GtkPrintOperation* op, GtkPrintContext* context gtk_print_operation_set_n_pages(op, printContext->pageCount()); } -static void draw_page_callback(GtkPrintOperation* op, GtkPrintContext* context, gint page_nr, gpointer user_data) +static void draw_page_callback(GtkPrintOperation*, GtkPrintContext* gtkPrintContext, gint pageNumber, PrintContext* corePrintContext) { - PrintContext* printContext = reinterpret_cast<PrintContext*>(user_data); - - if (page_nr >= static_cast<gint>(printContext->pageCount())) + if (pageNumber >= static_cast<gint>(corePrintContext->pageCount())) return; - cairo_t* cr = gtk_print_context_get_cairo_context(context); - GraphicsContext ctx(cr); - float width = gtk_print_context_get_width(context); - printContext->spoolPage(ctx, page_nr, width); + cairo_t* cr = gtk_print_context_get_cairo_context(gtkPrintContext); + float pageWidth = gtk_print_context_get_width(gtkPrintContext); + + PlatformContextCairo platformContext(cr); + GraphicsContext graphicsContext(&platformContext); + corePrintContext->spoolPage(graphicsContext, pageNumber, pageWidth); } static void end_print_callback(GtkPrintOperation* op, GtkPrintContext* context, gpointer user_data) |