Bug 738392 - Fix plugins not rendering inside CSS transform on Mac OSX r=roc,a=akeybl
authorEdwin Flores <eflores@mozilla.com>
Fri, 23 Mar 2012 11:21:57 -0700
changeset 91966 8b82d6245ac1a22fd09cc5baa7bd1c134b4c6959
parent 91965 662cd575c01a9bc89d9a20fb094c46f9ded9745c
child 91967 1441fec02ec67ea047b2558609efe8e1a5077fce
push id783
push userlsblakk@mozilla.com
push dateTue, 24 Apr 2012 17:33:42 +0000
treeherdermozilla-beta@11faed19f136 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc, akeybl
bugs738392
milestone13.0a2
Bug 738392 - Fix plugins not rendering inside CSS transform on Mac OSX r=roc,a=akeybl
layout/base/nsPresContext.cpp
layout/generic/nsObjectFrame.cpp
layout/generic/nsObjectFrame.h
--- a/layout/base/nsPresContext.cpp
+++ b/layout/base/nsPresContext.cpp
@@ -2482,17 +2482,17 @@ RecoverPluginGeometry(nsDisplayListBuild
       // Ignore plugins which aren't supposed to be affected by this
       // operation --- their bounds will not have been included in the
       // display list computations so the visible region computed for them
       // would be incorrect
       nsPtrHashKey<nsObjectFrame>* entry =
         aClosure->mAffectedPlugins.GetEntry(f);
       // Windowed plugins in transforms are always ignored, we don't
       // create configurations for them
-      if (entry && (!aInTransform || !f->GetWidget())) {
+      if (entry && (!aInTransform || f->PaintedByGecko())) {
         displayPlugin->GetWidgetConfiguration(aBuilder,
                                               aClosure->mOutputConfigurations);
         // we've dealt with this plugin now
         aClosure->mAffectedPlugins.RawRemoveEntry(entry);
       }
       break;
     }
     case nsDisplayItem::TYPE_TRANSFORM: {
--- a/layout/generic/nsObjectFrame.cpp
+++ b/layout/generic/nsObjectFrame.cpp
@@ -2172,9 +2172,19 @@ nsObjectFrame::EndSwapDocShells(nsIConte
 }
 
 nsIFrame*
 NS_NewObjectFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
 {
   return new (aPresShell) nsObjectFrame(aContext);
 }
 
+bool
+nsObjectFrame::PaintedByGecko()
+{
+#ifdef XP_MACOSX
+  return true;
+#else
+  return !mWidget;
+#endif
+}
+
 NS_IMPL_FRAMEARENA_HELPERS(nsObjectFrame)
--- a/layout/generic/nsObjectFrame.h
+++ b/layout/generic/nsObjectFrame.h
@@ -187,16 +187,18 @@ public:
    */
   static void BeginSwapDocShells(nsIContent* aContent, void*);
   /**
    * If aContent has a nsObjectFrame, then set it up after a DocShell swap.
    * @see nsSubDocumentFrame::EndSwapDocShells.
    */
   static void EndSwapDocShells(nsIContent* aContent, void*);
 
+  bool PaintedByGecko();
+
   nsIWidget* GetWidget() { return mWidget; }
 
   /**
    * Adjust the plugin's idea of its size, using aSize as its new size.
    * (aSize must be in twips)
    */
   void FixupWindow(const nsSize& aSize);