зеркало из https://github.com/mozilla/pjs.git
Bug 399532 - "nsDisplayBackground::GetBounds() should take nsITheme overflow into account" [p=frnchfrgg-mozbugs@altern.org (_FrnchFrgg_) r+sr=roc a1.9=beltzner]
This commit is contained in:
Родитель
761871eb2a
Коммит
a371319e99
|
@ -461,7 +461,7 @@ void nsDisplayList::Sort(nsDisplayListBuilder* aBuilder,
|
|||
PRBool
|
||||
nsDisplayBackground::IsOpaque(nsDisplayListBuilder* aBuilder) {
|
||||
// theme background overrides any other background
|
||||
if (mFrame->IsThemed())
|
||||
if (mIsThemed)
|
||||
return PR_FALSE;
|
||||
|
||||
PRBool isCanvas;
|
||||
|
@ -479,7 +479,7 @@ nsDisplayBackground::IsOpaque(nsDisplayListBuilder* aBuilder) {
|
|||
PRBool
|
||||
nsDisplayBackground::IsUniform(nsDisplayListBuilder* aBuilder) {
|
||||
// theme background overrides any other background
|
||||
if (mFrame->IsThemed())
|
||||
if (mIsThemed)
|
||||
return PR_FALSE;
|
||||
|
||||
PRBool isCanvas;
|
||||
|
@ -532,6 +532,14 @@ nsDisplayBackground::Paint(nsDisplayListBuilder* aBuilder,
|
|||
mFrame->HonorPrintBackgroundSettings());
|
||||
}
|
||||
|
||||
nsRect
|
||||
nsDisplayBackground::GetBounds(nsDisplayListBuilder* aBuilder) {
|
||||
if (mIsThemed)
|
||||
return mFrame->GetOverflowRect() + aBuilder->ToReferenceFrame(mFrame);
|
||||
|
||||
return nsRect(aBuilder->ToReferenceFrame(mFrame), mFrame->GetSize());
|
||||
}
|
||||
|
||||
nsRect
|
||||
nsDisplayOutline::GetBounds(nsDisplayListBuilder* aBuilder) {
|
||||
return mFrame->GetOverflowRect() + aBuilder->ToReferenceFrame(mFrame);
|
||||
|
|
|
@ -958,6 +958,7 @@ public:
|
|||
class nsDisplayBackground : public nsDisplayItem {
|
||||
public:
|
||||
nsDisplayBackground(nsIFrame* aFrame) : nsDisplayItem(aFrame) {
|
||||
mIsThemed = mFrame->IsThemed();
|
||||
MOZ_COUNT_CTOR(nsDisplayBackground);
|
||||
}
|
||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||
|
@ -971,9 +972,13 @@ public:
|
|||
virtual PRBool IsVaryingRelativeToFrame(nsDisplayListBuilder* aBuilder,
|
||||
nsIFrame* aAncestorFrame);
|
||||
virtual PRBool IsUniform(nsDisplayListBuilder* aBuilder);
|
||||
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder);
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder, nsIRenderingContext* aCtx,
|
||||
const nsRect& aDirtyRect);
|
||||
NS_DISPLAY_DECL_NAME("Background")
|
||||
private:
|
||||
/* Used to cache mFrame->IsThemed() since it isn't a cheap call */
|
||||
PRPackedBool mIsThemed;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче