2011-03-01 Joone Hur <joone.hur@collabora.co.uk>
authorjoone.hur@collabora.co.uk <joone.hur@collabora.co.uk@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Mar 2011 08:46:21 +0000 (08:46 +0000)
committerjoone.hur@collabora.co.uk <joone.hur@collabora.co.uk@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Mar 2011 08:46:21 +0000 (08:46 +0000)
        Reviewed by Martin Robinson.

        [GTK] Convert use of cairo_t to RefPtr<cairo_t> in webkitwebiew.cpp
        https://bugs.webkit.org/show_bug.cgi?id=55437

        * webkit/webkitwebview.cpp: Convert use of cairo_t to RefPtr<cairo_t>.
        (webkit_web_view_expose_event):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@79977 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/webkit/webkitwebview.cpp

index 0854505..fd44c01 100644 (file)
@@ -1,3 +1,13 @@
+2011-03-01  Joone Hur  <joone.hur@collabora.co.uk>
+
+        Reviewed by Martin Robinson.
+
+        [GTK] Convert use of cairo_t to RefPtr<cairo_t> in webkitwebiew.cpp
+        https://bugs.webkit.org/show_bug.cgi?id=55437
+
+        * webkit/webkitwebview.cpp: Convert use of cairo_t to RefPtr<cairo_t>.
+        (webkit_web_view_expose_event): 
+
 2011-02-28  Chang Shu  <cshu@webkit.org>
 
         Reviewed by Ryosuke Niwa.
index 4c00ac0..79665a9 100644 (file)
@@ -708,9 +708,8 @@ static gboolean webkit_web_view_expose_event(GtkWidget* widget, GdkEventExpose*
     if (frame->contentRenderer() && frame->view()) {
         frame->view()->updateLayoutAndStyleIfNeededRecursive();
 
-        cairo_t* cr = gdk_cairo_create(event->window);
-        GraphicsContext ctx(cr);
-        cairo_destroy(cr);
+        RefPtr<cairo_t> cr = adoptRef(gdk_cairo_create(event->window));
+        GraphicsContext ctx(cr.get());
         ctx.setGdkExposeEvent(event);
 
         int rectCount;