mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 09:45:41 +00:00
Backed out changeset 4c6c850d0fa1 (bug 1619245) for assertion failures on nsDisplayList.cpp.
CLOSED TREE
This commit is contained in:
parent
08c093a203
commit
496c36ef17
@ -3935,10 +3935,17 @@ nsDisplayBackgroundImage::nsDisplayBackgroundImage(
|
||||
mIsRasterImage(aInitData.isRasterImage),
|
||||
mShouldFixToViewport(aInitData.shouldFixToViewport),
|
||||
mImageFlags(0),
|
||||
mAssociatedImage(false),
|
||||
mTriedToAssociateImage(false) {
|
||||
mAssociatedImage(false) {
|
||||
MOZ_COUNT_CTOR(nsDisplayBackgroundImage);
|
||||
|
||||
if (mBackgroundStyle && mBackgroundStyle != aFrame->Style()) {
|
||||
MOZ_ASSERT(aFrame->IsCanvasFrame() || aFrame->IsTableCellFrame());
|
||||
auto& layer = mBackgroundStyle->StyleBackground()->mImage.mLayers[mLayer];
|
||||
if (aFrame->AssociateImage(layer.mImage)) {
|
||||
mAssociatedImage = true;
|
||||
}
|
||||
}
|
||||
|
||||
mBounds = GetBoundsInternal(aInitData.builder, aFrameForBounds);
|
||||
if (mShouldFixToViewport) {
|
||||
mAnimatedGeometryRoot =
|
||||
@ -4521,8 +4528,6 @@ bool nsDisplayBackgroundImage::CreateWebRenderCommands(
|
||||
mozilla::wr::IpcResourceUpdateQueue& aResources,
|
||||
const StackingContextHelper& aSc, RenderRootStateManager* aManager,
|
||||
nsDisplayListBuilder* aDisplayListBuilder) {
|
||||
AssociateImageIfNeeded();
|
||||
|
||||
if (!CanBuildWebRenderDisplayItems(aManager->LayerManager(),
|
||||
aDisplayListBuilder)) {
|
||||
return false;
|
||||
@ -4668,20 +4673,6 @@ bool nsDisplayBackgroundImage::RenderingMightDependOnPositioningAreaSizeChange()
|
||||
return false;
|
||||
}
|
||||
|
||||
void nsDisplayBackgroundImage::AssociateImageIfNeeded() {
|
||||
if (mTriedToAssociateImage) {
|
||||
return;
|
||||
}
|
||||
mTriedToAssociateImage = true;
|
||||
if (mBackgroundStyle && mBackgroundStyle != mFrame->Style()) {
|
||||
MOZ_ASSERT(mFrame->IsCanvasFrame() || mFrame->IsTableCellFrame());
|
||||
auto& layer = mBackgroundStyle->StyleBackground()->mImage.mLayers[mLayer];
|
||||
if (mFrame->AssociateImage(layer.mImage)) {
|
||||
mAssociatedImage = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void nsDisplayBackgroundImage::Paint(nsDisplayListBuilder* aBuilder,
|
||||
gfxContext* aCtx) {
|
||||
PaintInternal(aBuilder, aCtx, GetPaintRect(), &mBounds);
|
||||
@ -4691,7 +4682,6 @@ void nsDisplayBackgroundImage::PaintInternal(nsDisplayListBuilder* aBuilder,
|
||||
gfxContext* aCtx,
|
||||
const nsRect& aBounds,
|
||||
nsRect* aClipRect) {
|
||||
AssociateImageIfNeeded();
|
||||
gfxContext* ctx = aCtx;
|
||||
StyleGeometryBox clip =
|
||||
mBackgroundStyle->StyleBackground()->mImage.mLayers[mLayer].mClip;
|
||||
|
@ -4668,7 +4668,6 @@ class nsDisplayBackgroundImage : public nsDisplayImageContainer {
|
||||
nsRect GetBoundsInternal(nsDisplayListBuilder* aBuilder,
|
||||
nsIFrame* aFrameForBounds = nullptr);
|
||||
|
||||
void AssociateImageIfNeeded();
|
||||
void DisassociateImage();
|
||||
|
||||
void PaintInternal(nsDisplayListBuilder* aBuilder, gfxContext* aCtx,
|
||||
@ -4700,7 +4699,6 @@ class nsDisplayBackgroundImage : public nsDisplayImageContainer {
|
||||
bool mShouldFixToViewport;
|
||||
uint32_t mImageFlags;
|
||||
bool mAssociatedImage;
|
||||
bool mTriedToAssociateImage;
|
||||
};
|
||||
|
||||
enum class TableType : uint8_t {
|
||||
|
Loading…
Reference in New Issue
Block a user