Bug 1055585 - Make nsDisplayClearBackground force drawing into a transparent surface. r=roc

This commit is contained in:
Markus Stange 2014-08-20 17:24:39 +02:00
Родитель 956961d1a3
Коммит 5a3e2e40cf
2 изменённых файлов: 14 добавлений и 3 удалений

Просмотреть файл

@ -583,6 +583,11 @@ void nsDisplayListBuilder::SetContainsBlendMode(uint8_t aBlendMode)
mContainedBlendModes += gfx::CompositionOpForOp(op);
}
bool nsDisplayListBuilder::NeedToForceTransparentSurfaceForItem(nsDisplayItem* aItem)
{
return aItem == mGlassDisplayItem || aItem->ClearsBackground();
}
void nsDisplayListBuilder::MarkOutOfFlowFrameForDisplay(nsIFrame* aDirtyFrame,
nsIFrame* aFrame,
const nsRect& aDirtyRect)

Просмотреть файл

@ -679,9 +679,7 @@ public:
mGlassDisplayItem = aItem;
}
}
bool NeedToForceTransparentSurfaceForItem(nsDisplayItem* aItem) {
return aItem == mGlassDisplayItem;
}
bool NeedToForceTransparentSurfaceForItem(nsDisplayItem* aItem);
void SetContainsPluginItem() { mContainsPluginItem = true; }
bool ContainsPluginItem() { return mContainsPluginItem; }
@ -1065,6 +1063,9 @@ public:
virtual bool ShouldFixToViewport(LayerManager* aManager)
{ return false; }
virtual bool ClearsBackground()
{ return false; }
/**
* Returns true if all layers that can be active should be forced to be
* active. Requires setting the pref layers.force-active=true.
@ -2322,6 +2323,11 @@ public:
return true;
}
virtual bool ClearsBackground() MOZ_OVERRIDE
{
return true;
}
virtual LayerState GetLayerState(nsDisplayListBuilder* aBuilder,
LayerManager* aManager,
const ContainerLayerParameters& aParameters) MOZ_OVERRIDE