Clear OOP CGContext for transparent plug-ins. b=557534 r=josh
authorBenoit Girard <b56girard@gmail.com>
Tue, 06 Apr 2010 15:02:54 -0400
changeset 40494 1b80c3d9412f84b7d60fac9bae6b92e694db365c
parent 40493 466f5249ac336b9e94fa3098474f47e2a3a26ec4
child 40495 989b9eef7518006f456a55264fc4090d0ba1f363
push idunknown
push userunknown
push dateunknown
reviewersjosh
bugs557534
milestone1.9.3a4pre
Clear OOP CGContext for transparent plug-ins. b=557534 r=josh
dom/plugins/PluginInstanceChild.cpp
--- a/dom/plugins/PluginInstanceChild.cpp
+++ b/dom/plugins/PluginInstanceChild.cpp
@@ -620,16 +620,18 @@ PluginInstanceChild::AnswerNPP_HandleEve
     
             if (!mShContext) {
                 PLUGIN_LOG_DEBUG(("Could not allocate CGBitmapContext."));
                 *handled = false;
                 *rtnmem = mem;
                 return true;
             }
         }
+        CGRect clearRect = ::CGRectMake(0, 0, mWindow.width, mWindow.height);
+        ::CGContextClearRect(mShContext, clearRect);
         evcopy.data.draw.context = mShContext; 
     } else {
         PLUGIN_LOG_DEBUG(("Invalid event type for AnswerNNP_HandleEvent_Shmem."));
         *handled = false;
         *rtnmem = mem;
         return true;
     }