mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 695763. Part 2. Invalidate list style images if they are not decoded and we are asked to do a sync decode. r=roc
This commit is contained in:
parent
4e6ae6ecfa
commit
79aee060df
@ -242,6 +242,15 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
nsCOMPtr<imgIContainer> image = f->GetImage();
|
||||
if (aBuilder->ShouldSyncDecodeImages() && image && !image->IsDecoded()) {
|
||||
// If we are going to do a sync decode and we are not decoded then we are
|
||||
// going to be drawing something different from what is currently there,
|
||||
// so we add our bounds to the invalid region.
|
||||
bool snap;
|
||||
aInvalidRegion->Or(*aInvalidRegion, GetBounds(aBuilder, &snap));
|
||||
}
|
||||
|
||||
return nsDisplayItem::ComputeInvalidationRegion(aBuilder, aGeometry, aInvalidRegion);
|
||||
}
|
||||
};
|
||||
@ -1614,6 +1623,18 @@ nsBulletFrame::SetFontSizeInflation(float aInflation)
|
||||
Properties().Set(FontSizeInflationProperty(), u.p);
|
||||
}
|
||||
|
||||
already_AddRefed<imgIContainer>
|
||||
nsBulletFrame::GetImage() const
|
||||
{
|
||||
if (mImageRequest && StyleList()->GetListStyleImage()) {
|
||||
nsCOMPtr<imgIContainer> imageCon;
|
||||
mImageRequest->GetImage(getter_AddRefs(imageCon));
|
||||
return imageCon.forget();
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nscoord
|
||||
nsBulletFrame::GetBaseline() const
|
||||
{
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "imgIRequest.h"
|
||||
#include "imgINotificationObserver.h"
|
||||
|
||||
class imgIContainer;
|
||||
class imgRequestProxy;
|
||||
|
||||
#define BULLET_FRAME_IMAGE_LOADING NS_FRAME_STATE_BIT(63)
|
||||
@ -101,6 +102,8 @@ public:
|
||||
|
||||
int32_t GetOrdinal() { return mOrdinal; }
|
||||
|
||||
already_AddRefed<imgIContainer> GetImage() const;
|
||||
|
||||
protected:
|
||||
nsresult OnStartContainer(imgIRequest *aRequest, imgIContainer *aImage);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user