зеркало из https://github.com/mozilla/pjs.git
bug 512260 - part 6 - lock images in nsStyleList::SetListStyleImage.r=dbaron,a=blocker
This commit is contained in:
Родитель
bb37093329
Коммит
e0dcecfe1e
|
@ -646,9 +646,9 @@ nsStyleList::~nsStyleList()
|
|||
nsStyleList::nsStyleList(const nsStyleList& aSource)
|
||||
: mListStyleType(aSource.mListStyleType),
|
||||
mListStylePosition(aSource.mListStylePosition),
|
||||
mListStyleImage(aSource.mListStyleImage),
|
||||
mImageRegion(aSource.mImageRegion)
|
||||
{
|
||||
SetListStyleImage(aSource.GetListStyleImage());
|
||||
MOZ_COUNT_CTOR(nsStyleList);
|
||||
}
|
||||
|
||||
|
|
|
@ -1050,13 +1050,18 @@ struct nsStyleList {
|
|||
imgIRequest* GetListStyleImage() const { return mListStyleImage; }
|
||||
void SetListStyleImage(imgIRequest* aReq)
|
||||
{
|
||||
if (mListStyleImage)
|
||||
mListStyleImage->UnlockImage();
|
||||
mListStyleImage = aReq;
|
||||
if (mListStyleImage)
|
||||
mListStyleImage->LockImage();
|
||||
}
|
||||
|
||||
PRUint8 mListStyleType; // [inherited] See nsStyleConsts.h
|
||||
PRUint8 mListStylePosition; // [inherited]
|
||||
private:
|
||||
nsCOMPtr<imgIRequest> mListStyleImage; // [inherited]
|
||||
nsStyleList& operator=(const nsStyleList& aOther); // Not to be implemented
|
||||
public:
|
||||
nsRect mImageRegion; // [inherited] the rect to use within an image
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче