зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1156393
- Cache nsDisplayBorder bounds. r=roc
This commit is contained in:
Родитель
c8321737e0
Коммит
99aa852b73
|
@ -3097,6 +3097,14 @@ nsDisplayCaret::Paint(nsDisplayListBuilder* aBuilder,
|
|||
mCaret->PaintCaret(aBuilder, *aCtx->GetDrawTarget(), mFrame, ToReferenceFrame());
|
||||
}
|
||||
|
||||
nsDisplayBorder::nsDisplayBorder(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame)
|
||||
: nsDisplayItem(aBuilder, aFrame)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsDisplayBorder);
|
||||
|
||||
mBounds = CalculateBounds(*mFrame->StyleBorder());
|
||||
}
|
||||
|
||||
bool
|
||||
nsDisplayBorder::IsInvisibleInRect(const nsRect& aRect)
|
||||
{
|
||||
|
@ -3155,7 +3163,7 @@ nsRect
|
|||
nsDisplayBorder::GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap)
|
||||
{
|
||||
*aSnap = true;
|
||||
return CalculateBounds(*mFrame->StyleBorder());
|
||||
return mBounds;
|
||||
}
|
||||
|
||||
nsRect
|
||||
|
|
|
@ -2149,11 +2149,8 @@ protected:
|
|||
*/
|
||||
class nsDisplayBorder : public nsDisplayItem {
|
||||
public:
|
||||
nsDisplayBorder(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame) :
|
||||
nsDisplayItem(aBuilder, aFrame)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsDisplayBorder);
|
||||
}
|
||||
nsDisplayBorder(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame);
|
||||
|
||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||
virtual ~nsDisplayBorder() {
|
||||
MOZ_COUNT_DTOR(nsDisplayBorder);
|
||||
|
@ -2173,6 +2170,8 @@ public:
|
|||
|
||||
protected:
|
||||
nsRect CalculateBounds(const nsStyleBorder& aStyleBorder);
|
||||
|
||||
nsRect mBounds;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче