[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75

vestbo at webkit.org vestbo at webkit.org
Thu Oct 29 20:31:50 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit 81b8fedee51040aafdf664fffd97cbf29822dcba
Author: vestbo at webkit.org <vestbo at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Sep 22 12:20:34 2009 +0000

    NPAPI/Mac: Don't paint plugins if we don't have a CGContextRef
    
    Reviewed by Simon Hausmann.
    
    * plugins/mac/PluginViewMac.cpp:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48628 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 7d87bd5..941e089 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,5 +1,13 @@
 2009-09-22  Tor Arne Vestbø  <tor.arne.vestbo at nokia.com>
 
+        Reviewed by Simon Hausmann.
+
+        NPAPI/Mac: Don't paint plugins if we don't have a CGContextRef
+
+        * plugins/mac/PluginViewMac.cpp:
+
+2009-09-22  Tor Arne Vestbø  <tor.arne.vestbo at nokia.com>
+
         Reivewed by Simon Hausmann.
 
         Fix the Qt/Mac build after r48604 (Implement new QWebPageClient class)
diff --git a/WebCore/plugins/mac/PluginViewMac.cpp b/WebCore/plugins/mac/PluginViewMac.cpp
index bf80672..226aab6 100644
--- a/WebCore/plugins/mac/PluginViewMac.cpp
+++ b/WebCore/plugins/mac/PluginViewMac.cpp
@@ -428,6 +428,14 @@ void PluginView::paint(GraphicsContext* context, const IntRect& rect)
 
     setNPWindowIfNeeded();
 
+    CGContextRef cgContext = m_npCgContext.context;
+    if (!cgContext)
+        return;
+
+    CGContextSaveGState(cgContext);
+    IntPoint offset = frameRect().location();
+    CGContextTranslateCTM(cgContext, offset.x(), offset.y());
+
     EventRecord event;
     event.what = updateEvt;
     event.message = (long unsigned int)m_npCgContext.window;
@@ -436,15 +444,10 @@ void PluginView::paint(GraphicsContext* context, const IntRect& rect)
     event.where.v = 0;
     event.modifiers = GetCurrentKeyModifiers();
 
-    CGContextRef cg = m_npCgContext.context;
-    CGContextSaveGState(cg);
-    IntPoint offset = frameRect().location();
-    CGContextTranslateCTM(cg, offset.x(), offset.y());
-
     if (!dispatchNPEvent(event))
         LOG(Events, "PluginView::paint(): Paint event not accepted");
 
-    CGContextRestoreGState(cg);
+    CGContextRestoreGState(cgContext);
 }
 
 void PluginView::invalidateRect(const IntRect& rect)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list