зеркало из https://github.com/mozilla/gecko-dev.git
Bug 959847. Part 8. Don't let ProcessDisplayItems set the clip on subdocument items when they are being used to draw the display port content. r=roc
This commit is contained in:
Родитель
1055974519
Коммит
7d49d25691
|
@ -2452,8 +2452,6 @@ ContainerState::ProcessDisplayItems(const nsDisplayList& aList,
|
|||
continue;
|
||||
}
|
||||
|
||||
bool setVisibleRegion = (itemType != nsDisplayItem::TYPE_TRANSFORM) &&
|
||||
(itemType != nsDisplayItem::TYPE_SCROLL_LAYER);
|
||||
if (itemType == nsDisplayItem::TYPE_TRANSFORM) {
|
||||
mParameters.mAncestorClipRect = itemClip.HasClip() ? &clipRect : nullptr;
|
||||
} else {
|
||||
|
@ -2526,7 +2524,7 @@ ContainerState::ProcessDisplayItems(const nsDisplayList& aList,
|
|||
}
|
||||
}
|
||||
itemVisibleRect.MoveBy(mParameters.mOffset);
|
||||
if (setVisibleRegion) {
|
||||
if (item->SetVisibleRegionOnLayer()) {
|
||||
SetVisibleRegionForLayer(ownLayer, ownLayer->GetVisibleRegion(), itemVisibleRect);
|
||||
}
|
||||
|
||||
|
|
|
@ -1233,6 +1233,11 @@ public:
|
|||
mClip = aBuilder->AllocateDisplayItemClip(aClip);
|
||||
}
|
||||
|
||||
// If we return false here it means that if this item creates a layer then
|
||||
// ProcessDisplayItems will not set the visible region on the layer. The item
|
||||
// should set the visible region, usually in BuildContainerLayer.
|
||||
virtual bool SetVisibleRegionOnLayer() { return true; }
|
||||
|
||||
protected:
|
||||
friend class nsDisplayList;
|
||||
|
||||
|
@ -2715,6 +2720,9 @@ public:
|
|||
virtual already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
|
||||
LayerManager* aManager,
|
||||
const ContainerLayerParameters& aContainerParameters) MOZ_OVERRIDE;
|
||||
|
||||
virtual bool SetVisibleRegionOnLayer() MOZ_OVERRIDE { return !(mFlags & GENERATE_SCROLLABLE_LAYER); }
|
||||
|
||||
NS_DISPLAY_DECL_NAME("SubDocument", TYPE_SUBDOCUMENT)
|
||||
};
|
||||
|
||||
|
@ -2844,6 +2852,8 @@ public:
|
|||
virtual nsIFrame* GetScrollFrame() { return mScrollFrame; }
|
||||
virtual nsIFrame* GetScrolledFrame() { return mScrolledFrame; }
|
||||
|
||||
virtual bool SetVisibleRegionOnLayer() MOZ_OVERRIDE { return false; }
|
||||
|
||||
#ifdef MOZ_DUMP_PAINTING
|
||||
virtual void WriteDebugInfo(nsACString& aTo) MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
@ -3202,6 +3212,8 @@ public:
|
|||
bool aLogAnimations = false);
|
||||
bool CanUseAsyncAnimations(nsDisplayListBuilder* aBuilder) MOZ_OVERRIDE;
|
||||
|
||||
virtual bool SetVisibleRegionOnLayer() MOZ_OVERRIDE { return false; }
|
||||
|
||||
private:
|
||||
static gfx3DMatrix GetResultingTransformMatrixInternal(const FrameTransformProperties& aProperties,
|
||||
const nsPoint& aOrigin,
|
||||
|
|
Загрузка…
Ссылка в новой задаче