Bug 693938 - Force mark PuppetWidget root scroll layer as opaque. r=roc
authorOleg Romashin <romaxa@gmail.com>
Sun, 23 Oct 2011 10:57:47 +0200
changeset 79131 969648d5182542a4c7472a7e94a5d252f856a0b1
parent 79130 85be1cf6dd9e111473a5525bd23415ed3b783ed8
child 79132 a1b89b4913ca9d9e647eebc4858f695c74b2e2a8
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersroc
bugs693938
milestone10.0a1
Bug 693938 - Force mark PuppetWidget root scroll layer as opaque. r=roc
layout/base/nsDisplayList.cpp
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -615,16 +615,22 @@ void nsDisplayList::PaintForFrame(nsDisp
     if (content) {
       usingDisplayport = nsLayoutUtils::GetDisplayPort(content, &displayport);
     }
   }
   RecordFrameMetrics(aForFrame, rootScrollFrame,
                      root, mVisibleRect, mVisibleRect,
                      (usingDisplayport ? &displayport : nsnull), id,
                      containerParameters);
+  if (usingDisplayport &&
+      !(root->GetContentFlags() & Layer::CONTENT_OPAQUE)) {
+    // See bug 693938, attachment 567017
+    NS_WARNING("We don't support transparent content with displayports, force it to be opqaue");
+    root->SetContentFlags(Layer::CONTENT_OPAQUE);
+  }
 
   layerManager->SetRoot(root);
   aBuilder->LayerBuilder()->WillEndTransaction(layerManager);
   layerManager->EndTransaction(FrameLayerBuilder::DrawThebesLayer,
                                aBuilder);
   aBuilder->LayerBuilder()->DidEndTransaction(layerManager);
 
   if (aFlags & PAINT_FLUSH_LAYERS) {