Bug 584282. Use nsDisplayItem::ToReferenceFrame() instead of calling nsDisplayListBuilder::ToReferenceFrame, wherever possible. r=tnikkel,a=dbaron

This commit is contained in:
Robert O'Callahan 2010-08-13 22:01:58 +12:00
Родитель 1f7b01e1c2
Коммит e028060919
31 изменённых файлов: 78 добавлений и 82 удалений

Просмотреть файл

@ -808,7 +808,7 @@ nsDisplayBackground::IsFixedAndCoveringViewport(nsDisplayListBuilder* aBuilder)
void void
nsDisplayBackground::Paint(nsDisplayListBuilder* aBuilder, nsDisplayBackground::Paint(nsDisplayListBuilder* aBuilder,
nsIRenderingContext* aCtx) { nsIRenderingContext* aCtx) {
nsPoint offset = aBuilder->ToReferenceFrame(mFrame); nsPoint offset = ToReferenceFrame();
PRUint32 flags = aBuilder->GetBackgroundPaintFlags(); PRUint32 flags = aBuilder->GetBackgroundPaintFlags();
nsDisplayItem* nextItem = GetAbove(); nsDisplayItem* nextItem = GetAbove();
if (nextItem && nextItem->GetUnderlyingFrame() == mFrame && if (nextItem && nextItem->GetUnderlyingFrame() == mFrame &&
@ -824,21 +824,21 @@ nsDisplayBackground::Paint(nsDisplayListBuilder* aBuilder,
nsRect nsRect
nsDisplayBackground::GetBounds(nsDisplayListBuilder* aBuilder) { nsDisplayBackground::GetBounds(nsDisplayListBuilder* aBuilder) {
if (mIsThemed) if (mIsThemed)
return mFrame->GetOverflowRect() + aBuilder->ToReferenceFrame(mFrame); return mFrame->GetOverflowRect() + ToReferenceFrame();
return nsRect(aBuilder->ToReferenceFrame(mFrame), mFrame->GetSize()); return nsRect(ToReferenceFrame(), mFrame->GetSize());
} }
nsRect nsRect
nsDisplayOutline::GetBounds(nsDisplayListBuilder* aBuilder) { nsDisplayOutline::GetBounds(nsDisplayListBuilder* aBuilder) {
return mFrame->GetOverflowRect() + aBuilder->ToReferenceFrame(mFrame); return mFrame->GetOverflowRect() + ToReferenceFrame();
} }
void void
nsDisplayOutline::Paint(nsDisplayListBuilder* aBuilder, nsDisplayOutline::Paint(nsDisplayListBuilder* aBuilder,
nsIRenderingContext* aCtx) { nsIRenderingContext* aCtx) {
// TODO join outlines together // TODO join outlines together
nsPoint offset = aBuilder->ToReferenceFrame(mFrame); nsPoint offset = ToReferenceFrame();
nsCSSRendering::PaintOutline(mFrame->PresContext(), *aCtx, mFrame, nsCSSRendering::PaintOutline(mFrame->PresContext(), *aCtx, mFrame,
mVisibleRect, mVisibleRect,
nsRect(offset, mFrame->GetSize()), nsRect(offset, mFrame->GetSize()),
@ -852,7 +852,7 @@ nsDisplayOutline::ComputeVisibility(nsDisplayListBuilder* aBuilder,
return PR_FALSE; return PR_FALSE;
const nsStyleOutline* outline = mFrame->GetStyleOutline(); const nsStyleOutline* outline = mFrame->GetStyleOutline();
nsRect borderBox(aBuilder->ToReferenceFrame(mFrame), mFrame->GetSize()); nsRect borderBox(ToReferenceFrame(), mFrame->GetSize());
if (borderBox.Contains(aVisibleRegion->GetBounds()) && if (borderBox.Contains(aVisibleRegion->GetBounds()) &&
!nsLayoutUtils::HasNonZeroCorner(outline->mOutlineRadius)) { !nsLayoutUtils::HasNonZeroCorner(outline->mOutlineRadius)) {
if (outline->mOutlineOffset >= 0) { if (outline->mOutlineOffset >= 0) {
@ -870,7 +870,7 @@ nsDisplayCaret::Paint(nsDisplayListBuilder* aBuilder,
nsIRenderingContext* aCtx) { nsIRenderingContext* aCtx) {
// Note: Because we exist, we know that the caret is visible, so we don't // Note: Because we exist, we know that the caret is visible, so we don't
// need to check for the caret's visibility. // need to check for the caret's visibility.
mCaret->PaintCaret(aBuilder, aCtx, mFrame, aBuilder->ToReferenceFrame(mFrame)); mCaret->PaintCaret(aBuilder, aCtx, mFrame, ToReferenceFrame());
} }
PRBool PRBool
@ -880,7 +880,7 @@ nsDisplayBorder::ComputeVisibility(nsDisplayListBuilder* aBuilder,
return PR_FALSE; return PR_FALSE;
nsRect paddingRect = mFrame->GetPaddingRect() - mFrame->GetPosition() + nsRect paddingRect = mFrame->GetPaddingRect() - mFrame->GetPosition() +
aBuilder->ToReferenceFrame(mFrame); ToReferenceFrame();
const nsStyleBorder *styleBorder; const nsStyleBorder *styleBorder;
if (paddingRect.Contains(aVisibleRegion->GetBounds()) && if (paddingRect.Contains(aVisibleRegion->GetBounds()) &&
!(styleBorder = mFrame->GetStyleBorder())->IsBorderImageLoaded() && !(styleBorder = mFrame->GetStyleBorder())->IsBorderImageLoaded() &&
@ -900,7 +900,7 @@ nsDisplayBorder::ComputeVisibility(nsDisplayListBuilder* aBuilder,
void void
nsDisplayBorder::Paint(nsDisplayListBuilder* aBuilder, nsDisplayBorder::Paint(nsDisplayListBuilder* aBuilder,
nsIRenderingContext* aCtx) { nsIRenderingContext* aCtx) {
nsPoint offset = aBuilder->ToReferenceFrame(mFrame); nsPoint offset = ToReferenceFrame();
nsCSSRendering::PaintBorder(mFrame->PresContext(), *aCtx, mFrame, nsCSSRendering::PaintBorder(mFrame->PresContext(), *aCtx, mFrame,
mVisibleRect, mVisibleRect,
nsRect(offset, mFrame->GetSize()), nsRect(offset, mFrame->GetSize()),
@ -942,7 +942,7 @@ ComputeDisjointRectangles(const nsRegion& aRegion,
void void
nsDisplayBoxShadowOuter::Paint(nsDisplayListBuilder* aBuilder, nsDisplayBoxShadowOuter::Paint(nsDisplayListBuilder* aBuilder,
nsIRenderingContext* aCtx) { nsIRenderingContext* aCtx) {
nsPoint offset = aBuilder->ToReferenceFrame(mFrame); nsPoint offset = ToReferenceFrame();
nsRect borderRect = nsRect(offset, mFrame->GetSize()); nsRect borderRect = nsRect(offset, mFrame->GetSize());
nsPresContext* presContext = mFrame->PresContext(); nsPresContext* presContext = mFrame->PresContext();
nsAutoTArray<nsRect,10> rects; nsAutoTArray<nsRect,10> rects;
@ -959,7 +959,7 @@ nsDisplayBoxShadowOuter::Paint(nsDisplayListBuilder* aBuilder,
nsRect nsRect
nsDisplayBoxShadowOuter::GetBounds(nsDisplayListBuilder* aBuilder) { nsDisplayBoxShadowOuter::GetBounds(nsDisplayListBuilder* aBuilder) {
return mFrame->GetOverflowRect() + aBuilder->ToReferenceFrame(mFrame); return mFrame->GetOverflowRect() + ToReferenceFrame();
} }
PRBool PRBool
@ -971,7 +971,7 @@ nsDisplayBoxShadowOuter::ComputeVisibility(nsDisplayListBuilder* aBuilder,
// Store the actual visible region // Store the actual visible region
mVisibleRegion.And(*aVisibleRegion, mVisibleRect); mVisibleRegion.And(*aVisibleRegion, mVisibleRect);
nsPoint origin = aBuilder->ToReferenceFrame(mFrame); nsPoint origin = ToReferenceFrame();
nsRect visibleBounds = aVisibleRegion->GetBounds(); nsRect visibleBounds = aVisibleRegion->GetBounds();
nsRect frameRect(origin, mFrame->GetSize()); nsRect frameRect(origin, mFrame->GetSize());
if (!frameRect.Contains(visibleBounds)) if (!frameRect.Contains(visibleBounds))
@ -993,7 +993,7 @@ nsDisplayBoxShadowOuter::ComputeVisibility(nsDisplayListBuilder* aBuilder,
void void
nsDisplayBoxShadowInner::Paint(nsDisplayListBuilder* aBuilder, nsDisplayBoxShadowInner::Paint(nsDisplayListBuilder* aBuilder,
nsIRenderingContext* aCtx) { nsIRenderingContext* aCtx) {
nsPoint offset = aBuilder->ToReferenceFrame(mFrame); nsPoint offset = ToReferenceFrame();
nsRect borderRect = nsRect(offset, mFrame->GetSize()); nsRect borderRect = nsRect(offset, mFrame->GetSize());
nsPresContext* presContext = mFrame->PresContext(); nsPresContext* presContext = mFrame->PresContext();
nsAutoTArray<nsRect,10> rects; nsAutoTArray<nsRect,10> rects;
@ -1541,7 +1541,7 @@ already_AddRefed<Layer> nsDisplayTransform::BuildLayer(nsDisplayListBuilder *aBu
LayerManager *aManager) LayerManager *aManager)
{ {
gfxMatrix newTransformMatrix = gfxMatrix newTransformMatrix =
GetResultingTransformMatrix(mFrame, aBuilder->ToReferenceFrame(mFrame), GetResultingTransformMatrix(mFrame, ToReferenceFrame(),
mFrame->PresContext()->AppUnitsPerDevPixel(), mFrame->PresContext()->AppUnitsPerDevPixel(),
nsnull); nsnull);
if (newTransformMatrix.IsSingular()) if (newTransformMatrix.IsSingular())
@ -1577,7 +1577,7 @@ PRBool nsDisplayTransform::ComputeVisibility(nsDisplayListBuilder *aBuilder,
* untransform the visible rect, since we want everything that's painting to * untransform the visible rect, since we want everything that's painting to
* think that it's painting in its original rectangular coordinate space. */ * think that it's painting in its original rectangular coordinate space. */
nsRegion untransformedVisible = nsRegion untransformedVisible =
UntransformRect(mVisibleRect, mFrame, aBuilder->ToReferenceFrame(mFrame)); UntransformRect(mVisibleRect, mFrame, ToReferenceFrame());
mStoredList.ComputeVisibility(aBuilder, &untransformedVisible); mStoredList.ComputeVisibility(aBuilder, &untransformedVisible);
return PR_TRUE; return PR_TRUE;
@ -1602,7 +1602,7 @@ void nsDisplayTransform::HitTest(nsDisplayListBuilder *aBuilder,
*/ */
float factor = nsPresContext::AppUnitsPerCSSPixel(); float factor = nsPresContext::AppUnitsPerCSSPixel();
gfxMatrix matrix = gfxMatrix matrix =
GetResultingTransformMatrix(mFrame, aBuilder->ToReferenceFrame(mFrame), GetResultingTransformMatrix(mFrame, ToReferenceFrame(),
factor, nsnull); factor, nsnull);
if (matrix.IsSingular()) if (matrix.IsSingular())
return; return;
@ -1660,7 +1660,7 @@ void nsDisplayTransform::HitTest(nsDisplayListBuilder *aBuilder,
*/ */
nsRect nsDisplayTransform::GetBounds(nsDisplayListBuilder *aBuilder) nsRect nsDisplayTransform::GetBounds(nsDisplayListBuilder *aBuilder)
{ {
return mFrame->GetOverflowRect() + aBuilder->ToReferenceFrame(mFrame); return mFrame->GetOverflowRect() + ToReferenceFrame();
} }
/* The transform is opaque iff the transform consists solely of scales and /* The transform is opaque iff the transform consists solely of scales and

Просмотреть файл

@ -501,8 +501,7 @@ public:
* contains the area drawn by this display item * contains the area drawn by this display item
*/ */
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder) { virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder) {
nsIFrame* f = GetUnderlyingFrame(); return nsRect(ToReferenceFrame(), GetUnderlyingFrame()->GetSize());
return nsRect(aBuilder->ToReferenceFrame(f), f->GetSize());
} }
/** /**
* @return PR_TRUE if the item is definitely opaque --- i.e., paints * @return PR_TRUE if the item is definitely opaque --- i.e., paints
@ -640,6 +639,9 @@ public:
PRBool RecomputeVisibility(nsDisplayListBuilder* aBuilder, PRBool RecomputeVisibility(nsDisplayListBuilder* aBuilder,
nsRegion* aVisibleRegion); nsRegion* aVisibleRegion);
/**
* Returns the result of aBuilder->ToReferenceFrame(GetUnderlyingFrame())
*/
const nsPoint& ToReferenceFrame() { const nsPoint& ToReferenceFrame() {
NS_ASSERTION(mFrame, "No frame?"); NS_ASSERTION(mFrame, "No frame?");
return mToReferenceFrame; return mToReferenceFrame;
@ -1083,7 +1085,7 @@ public:
#endif #endif
virtual void Paint(nsDisplayListBuilder* aBuilder, nsIRenderingContext* aCtx) { virtual void Paint(nsDisplayListBuilder* aBuilder, nsIRenderingContext* aCtx) {
mPaint(mFrame, aCtx, mVisibleRect, aBuilder->ToReferenceFrame(mFrame)); mPaint(mFrame, aCtx, mVisibleRect, ToReferenceFrame());
} }
NS_DISPLAY_DECL_NAME(mName, mType) NS_DISPLAY_DECL_NAME(mName, mType)
protected: protected:
@ -1125,7 +1127,7 @@ public:
#endif #endif
virtual void Paint(nsDisplayListBuilder* aBuilder, nsIRenderingContext* aCtx) { virtual void Paint(nsDisplayListBuilder* aBuilder, nsIRenderingContext* aCtx) {
nsPoint pt = aBuilder->ToReferenceFrame(mFrame); nsPoint pt = ToReferenceFrame();
nsIRenderingContext::AutoPushTranslation translate(aCtx, pt.x, pt.y); nsIRenderingContext::AutoPushTranslation translate(aCtx, pt.x, pt.y);
mFrame->PresContext()->PresShell()->PaintCount(mFrameName, aCtx, mFrame->PresContext()->PresShell()->PaintCount(mFrameName, aCtx,
mFrame->PresContext(), mFrame->PresContext(),
@ -1193,7 +1195,7 @@ public:
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder) { virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder) {
// The caret returns a rect in the coordinates of mFrame. // The caret returns a rect in the coordinates of mFrame.
return mCaret->GetCaretRect() + aBuilder->ToReferenceFrame(mFrame); return mCaret->GetCaretRect() + ToReferenceFrame();
} }
virtual void Paint(nsDisplayListBuilder* aBuilder, nsIRenderingContext* aCtx); virtual void Paint(nsDisplayListBuilder* aBuilder, nsIRenderingContext* aCtx);
NS_DISPLAY_DECL_NAME("Caret", TYPE_CARET) NS_DISPLAY_DECL_NAME("Caret", TYPE_CARET)

Просмотреть файл

@ -114,13 +114,13 @@ private:
nsRect nsRect
nsDisplayButtonBoxShadowOuter::GetBounds(nsDisplayListBuilder* aBuilder) { nsDisplayButtonBoxShadowOuter::GetBounds(nsDisplayListBuilder* aBuilder) {
return mFrame->GetOverflowRect() + aBuilder->ToReferenceFrame(mFrame); return mFrame->GetOverflowRect() + ToReferenceFrame();
} }
void void
nsDisplayButtonBoxShadowOuter::Paint(nsDisplayListBuilder* aBuilder, nsDisplayButtonBoxShadowOuter::Paint(nsDisplayListBuilder* aBuilder,
nsIRenderingContext* aCtx) { nsIRenderingContext* aCtx) {
nsRect frameRect = nsRect(aBuilder->ToReferenceFrame(mFrame), mFrame->GetSize()); nsRect frameRect = nsRect(ToReferenceFrame(), mFrame->GetSize());
nsRect buttonRect; nsRect buttonRect;
mBFR->GetButtonRect(frameRect, buttonRect); mBFR->GetButtonRect(frameRect, buttonRect);
@ -178,7 +178,7 @@ void nsDisplayButtonBorderBackground::Paint(nsDisplayListBuilder* aBuilder,
{ {
NS_ASSERTION(mFrame, "No frame?"); NS_ASSERTION(mFrame, "No frame?");
nsPresContext* pc = mFrame->PresContext(); nsPresContext* pc = mFrame->PresContext();
nsRect r = nsRect(aBuilder->ToReferenceFrame(mFrame), mFrame->GetSize()); nsRect r = nsRect(ToReferenceFrame(), mFrame->GetSize());
// draw the border and background inside the focus and outline borders // draw the border and background inside the focus and outline borders
mBFR->PaintBorderAndBackground(pc, *aCtx, mVisibleRect, r, mBFR->PaintBorderAndBackground(pc, *aCtx, mVisibleRect, r,
@ -193,7 +193,7 @@ void nsDisplayButtonForeground::Paint(nsDisplayListBuilder* aBuilder,
if (!mFrame->IsThemed(disp) || if (!mFrame->IsThemed(disp) ||
!presContext->GetTheme()->ThemeDrawsFocusForWidget(presContext, mFrame, disp->mAppearance)) { !presContext->GetTheme()->ThemeDrawsFocusForWidget(presContext, mFrame, disp->mAppearance)) {
// draw the focus and outline borders // draw the focus and outline borders
nsRect r = nsRect(aBuilder->ToReferenceFrame(mFrame), mFrame->GetSize()); nsRect r = nsRect(ToReferenceFrame(), mFrame->GetSize());
mBFR->PaintOutlineAndFocusBorders(presContext, *aCtx, mVisibleRect, r); mBFR->PaintOutlineAndFocusBorders(presContext, *aCtx, mVisibleRect, r);
} }
} }

Просмотреть файл

@ -1333,7 +1333,7 @@ void nsDisplayComboboxFocus::Paint(nsDisplayListBuilder* aBuilder,
nsIRenderingContext* aCtx) nsIRenderingContext* aCtx)
{ {
static_cast<nsComboboxControlFrame*>(mFrame) static_cast<nsComboboxControlFrame*>(mFrame)
->PaintFocus(*aCtx, aBuilder->ToReferenceFrame(mFrame)); ->PaintFocus(*aCtx, ToReferenceFrame());
} }
NS_IMETHODIMP NS_IMETHODIMP

Просмотреть файл

@ -208,7 +208,7 @@ nsDisplayFieldSetBorderBackground::Paint(nsDisplayListBuilder* aBuilder,
nsIRenderingContext* aCtx) nsIRenderingContext* aCtx)
{ {
static_cast<nsFieldSetFrame*>(mFrame)-> static_cast<nsFieldSetFrame*>(mFrame)->
PaintBorderBackground(*aCtx, aBuilder->ToReferenceFrame(mFrame), PaintBorderBackground(*aCtx, ToReferenceFrame(),
mVisibleRect, aBuilder->GetBackgroundPaintFlags()); mVisibleRect, aBuilder->GetBackgroundPaintFlags());
} }

Просмотреть файл

@ -207,7 +207,7 @@ void nsDisplayBullet::Paint(nsDisplayListBuilder* aBuilder,
nsIRenderingContext* aCtx) nsIRenderingContext* aCtx)
{ {
static_cast<nsBulletFrame*>(mFrame)-> static_cast<nsBulletFrame*>(mFrame)->
PaintBullet(*aCtx, aBuilder->ToReferenceFrame(mFrame), mVisibleRect); PaintBullet(*aCtx, ToReferenceFrame(), mVisibleRect);
} }
NS_IMETHODIMP NS_IMETHODIMP

Просмотреть файл

@ -254,7 +254,7 @@ nsDisplayCanvasBackground::Paint(nsDisplayListBuilder* aBuilder,
nsIRenderingContext* aCtx) nsIRenderingContext* aCtx)
{ {
nsCanvasFrame* frame = static_cast<nsCanvasFrame*>(mFrame); nsCanvasFrame* frame = static_cast<nsCanvasFrame*>(mFrame);
nsPoint offset = aBuilder->ToReferenceFrame(mFrame); nsPoint offset = ToReferenceFrame();
nsRect bgClipRect = frame->CanvasArea() + offset; nsRect bgClipRect = frame->CanvasArea() + offset;
if (NS_GET_A(mExtraBackgroundColor) > 0) { if (NS_GET_A(mExtraBackgroundColor) > 0) {
@ -289,14 +289,14 @@ public:
{ {
// This is an overestimate, but that's not a problem. // This is an overestimate, but that's not a problem.
nsCanvasFrame* frame = static_cast<nsCanvasFrame*>(mFrame); nsCanvasFrame* frame = static_cast<nsCanvasFrame*>(mFrame);
return frame->CanvasArea() + aBuilder->ToReferenceFrame(mFrame); return frame->CanvasArea() + ToReferenceFrame();
} }
virtual void Paint(nsDisplayListBuilder* aBuilder, virtual void Paint(nsDisplayListBuilder* aBuilder,
nsIRenderingContext* aCtx) nsIRenderingContext* aCtx)
{ {
nsCanvasFrame* frame = static_cast<nsCanvasFrame*>(mFrame); nsCanvasFrame* frame = static_cast<nsCanvasFrame*>(mFrame);
frame->PaintFocus(*aCtx, aBuilder->ToReferenceFrame(mFrame)); frame->PaintFocus(*aCtx, ToReferenceFrame());
} }
NS_DISPLAY_DECL_NAME("CanvasFocus", TYPE_CANVAS_FOCUS) NS_DISPLAY_DECL_NAME("CanvasFocus", TYPE_CANVAS_FOCUS)

Просмотреть файл

@ -196,7 +196,7 @@ public:
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder) virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder)
{ {
nsCanvasFrame* frame = static_cast<nsCanvasFrame*>(mFrame); nsCanvasFrame* frame = static_cast<nsCanvasFrame*>(mFrame);
return frame->CanvasArea() + aBuilder->ToReferenceFrame(mFrame); return frame->CanvasArea() + ToReferenceFrame();
} }
virtual void Paint(nsDisplayListBuilder* aBuilder, virtual void Paint(nsDisplayListBuilder* aBuilder,

Просмотреть файл

@ -1643,7 +1643,7 @@ void nsDisplayFramesetBorder::Paint(nsDisplayListBuilder* aBuilder,
nsIRenderingContext* aCtx) nsIRenderingContext* aCtx)
{ {
static_cast<nsHTMLFramesetBorderFrame*>(mFrame)-> static_cast<nsHTMLFramesetBorderFrame*>(mFrame)->
PaintBorder(*aCtx, aBuilder->ToReferenceFrame(mFrame)); PaintBorder(*aCtx, ToReferenceFrame());
} }
NS_IMETHODIMP NS_IMETHODIMP
@ -1838,6 +1838,7 @@ public:
virtual void Paint(nsDisplayListBuilder* aBuilder, nsIRenderingContext* aCtx); virtual void Paint(nsDisplayListBuilder* aBuilder, nsIRenderingContext* aCtx);
NS_DISPLAY_DECL_NAME("FramesetBlank", TYPE_FRAMESET_BLANK) NS_DISPLAY_DECL_NAME("FramesetBlank", TYPE_FRAMESET_BLANK)
}; };
void nsDisplayFramesetBlank::Paint(nsDisplayListBuilder* aBuilder, void nsDisplayFramesetBlank::Paint(nsDisplayListBuilder* aBuilder,
nsIRenderingContext* aCtx) nsIRenderingContext* aCtx)
{ {

Просмотреть файл

@ -1540,7 +1540,7 @@ InvalidateFixedBackgroundFramesFromList(nsDisplayListBuilder* aBuilder,
if (item->IsFixedAndCoveringViewport(aBuilder)) { if (item->IsFixedAndCoveringViewport(aBuilder)) {
// FrameLayerBuilder takes care of scrolling these // FrameLayerBuilder takes care of scrolling these
} else { } else {
f->Invalidate(item->GetVisibleRect() - aBuilder->ToReferenceFrame(f)); f->Invalidate(item->GetVisibleRect() - item->ToReferenceFrame());
} }
} }
} }

Просмотреть файл

@ -85,7 +85,7 @@ public:
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder) { virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder) {
nsHTMLCanvasFrame* f = static_cast<nsHTMLCanvasFrame*>(GetUnderlyingFrame()); nsHTMLCanvasFrame* f = static_cast<nsHTMLCanvasFrame*>(GetUnderlyingFrame());
return f->GetInnerArea() + aBuilder->ToReferenceFrame(f); return f->GetInnerArea() + ToReferenceFrame();
} }
virtual already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder, virtual already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
@ -241,7 +241,7 @@ nsHTMLCanvasFrame::BuildLayer(nsDisplayListBuilder* aBuilder,
LayerManager* aManager, LayerManager* aManager,
nsDisplayItem* aItem) nsDisplayItem* aItem)
{ {
nsRect area = GetContentRect() + aBuilder->ToReferenceFrame(GetParent()); nsRect area = GetContentRect() - GetPosition() + aItem->ToReferenceFrame();
nsHTMLCanvasElement* element = static_cast<nsHTMLCanvasElement*>(GetContent()); nsHTMLCanvasElement* element = static_cast<nsHTMLCanvasElement*>(GetContent());
nsIntSize canvasSize = GetCanvasSize(); nsIntSize canvasSize = GetCanvasSize();

Просмотреть файл

@ -131,8 +131,7 @@ nsDisplayTextDecoration::Paint(nsDisplayListBuilder* aBuilder,
ascent = metrics.maxAscent; ascent = metrics.maxAscent;
} }
nsPoint pt = aBuilder->ToReferenceFrame(mFrame); nsPoint pt = ToReferenceFrame();
nsHTMLContainerFrame* f = static_cast<nsHTMLContainerFrame*>(mFrame); nsHTMLContainerFrame* f = static_cast<nsHTMLContainerFrame*>(mFrame);
if (mDecoration == NS_STYLE_TEXT_DECORATION_UNDERLINE) { if (mDecoration == NS_STYLE_TEXT_DECORATION_UNDERLINE) {
gfxFloat underlineOffset = fontGroup->GetUnderlineOffset(); gfxFloat underlineOffset = fontGroup->GetUnderlineOffset();
@ -153,7 +152,7 @@ nsDisplayTextDecoration::Paint(nsDisplayListBuilder* aBuilder,
nsRect nsRect
nsDisplayTextDecoration::GetBounds(nsDisplayListBuilder* aBuilder) nsDisplayTextDecoration::GetBounds(nsDisplayListBuilder* aBuilder)
{ {
return mFrame->GetOverflowRect() + aBuilder->ToReferenceFrame(mFrame); return mFrame->GetOverflowRect() + ToReferenceFrame();
} }
class nsDisplayTextShadow : public nsDisplayItem { class nsDisplayTextShadow : public nsDisplayItem {
@ -268,7 +267,7 @@ nsDisplayTextShadow::Paint(nsDisplayListBuilder* aBuilder,
nscolor shadowColor = nscolor shadowColor =
shadow->mHasColor ? shadow->mColor : mFrame->GetStyleColor()->mColor; shadow->mHasColor ? shadow->mColor : mFrame->GetStyleColor()->mColor;
nsPoint pt = aBuilder->ToReferenceFrame(mFrame) + nsPoint pt = ToReferenceFrame() +
nsPoint(shadow->mXOffset, shadow->mYOffset); nsPoint(shadow->mXOffset, shadow->mYOffset);
nsPoint linePt; nsPoint linePt;
if (mLine) { if (mLine) {
@ -325,7 +324,7 @@ nsRect
nsDisplayTextShadow::GetBounds(nsDisplayListBuilder* aBuilder) nsDisplayTextShadow::GetBounds(nsDisplayListBuilder* aBuilder)
{ {
// Shadows are always painted in the overflow rect // Shadows are always painted in the overflow rect
return mFrame->GetOverflowRect() + aBuilder->ToReferenceFrame(mFrame); return mFrame->GetOverflowRect() + ToReferenceFrame();
} }
nsresult nsresult

Просмотреть файл

@ -1150,7 +1150,7 @@ void
nsDisplayImage::Paint(nsDisplayListBuilder* aBuilder, nsDisplayImage::Paint(nsDisplayListBuilder* aBuilder,
nsIRenderingContext* aCtx) { nsIRenderingContext* aCtx) {
static_cast<nsImageFrame*>(mFrame)-> static_cast<nsImageFrame*>(mFrame)->
PaintImage(*aCtx, aBuilder->ToReferenceFrame(mFrame), mVisibleRect, mImage, PaintImage(*aCtx, ToReferenceFrame(), mVisibleRect, mImage,
aBuilder->ShouldSyncDecodeImages() aBuilder->ShouldSyncDecodeImages()
? (PRUint32) imgIContainer::FLAG_SYNC_DECODE ? (PRUint32) imgIContainer::FLAG_SYNC_DECODE
: (PRUint32) imgIContainer::FLAG_NONE); : (PRUint32) imgIContainer::FLAG_NONE);

Просмотреть файл

@ -1175,8 +1175,8 @@ nsObjectFrame::PaintPrintPlugin(nsIFrame* aFrame, nsIRenderingContext* aCtx,
nsRect nsRect
nsDisplayPlugin::GetBounds(nsDisplayListBuilder* aBuilder) nsDisplayPlugin::GetBounds(nsDisplayListBuilder* aBuilder)
{ {
return mFrame->GetContentRect() + return mFrame->GetContentRect() - mFrame->GetPosition() +
aBuilder->ToReferenceFrame(mFrame->GetParent()); ToReferenceFrame();
} }
void void
@ -1208,7 +1208,7 @@ nsDisplayPlugin::GetWidgetConfiguration(nsDisplayListBuilder* aBuilder,
{ {
nsObjectFrame* f = static_cast<nsObjectFrame*>(mFrame); nsObjectFrame* f = static_cast<nsObjectFrame*>(mFrame);
nsPoint pluginOrigin = mFrame->GetUsedBorderAndPadding().TopLeft() + nsPoint pluginOrigin = mFrame->GetUsedBorderAndPadding().TopLeft() +
aBuilder->ToReferenceFrame(mFrame); ToReferenceFrame();
f->ComputeWidgetGeometry(mVisibleRegion, pluginOrigin, aConfigurations); f->ComputeWidgetGeometry(mVisibleRegion, pluginOrigin, aConfigurations);
} }

Просмотреть файл

@ -3939,11 +3939,11 @@ public:
#endif #endif
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder) { virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder) {
return mFrame->GetOverflowRect() + aBuilder->ToReferenceFrame(mFrame); return mFrame->GetOverflowRect() + ToReferenceFrame();
} }
virtual void HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect, virtual void HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect,
HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames) { HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames) {
if (nsRect(aBuilder->ToReferenceFrame(mFrame), mFrame->GetSize()).Intersects(aRect)) { if (nsRect(ToReferenceFrame(), mFrame->GetSize()).Intersects(aRect)) {
aOutFrames->AppendElement(mFrame); aOutFrames->AppendElement(mFrame);
} }
} }
@ -3962,7 +3962,7 @@ nsDisplayText::Paint(nsDisplayListBuilder* aBuilder,
nscoord appUnitsPerDevPixel = mFrame->PresContext()->AppUnitsPerDevPixel(); nscoord appUnitsPerDevPixel = mFrame->PresContext()->AppUnitsPerDevPixel();
extraVisible.Inflate(appUnitsPerDevPixel, appUnitsPerDevPixel); extraVisible.Inflate(appUnitsPerDevPixel, appUnitsPerDevPixel);
static_cast<nsTextFrame*>(mFrame)-> static_cast<nsTextFrame*>(mFrame)->
PaintText(aCtx, aBuilder->ToReferenceFrame(mFrame), extraVisible); PaintText(aCtx, ToReferenceFrame(), extraVisible);
} }
NS_IMETHODIMP NS_IMETHODIMP

Просмотреть файл

@ -180,7 +180,7 @@ nsVideoFrame::BuildLayer(nsDisplayListBuilder* aBuilder,
LayerManager* aManager, LayerManager* aManager,
nsDisplayItem* aItem) nsDisplayItem* aItem)
{ {
nsRect area = GetContentRect() + aBuilder->ToReferenceFrame(GetParent()); nsRect area = GetContentRect() - GetPosition() + aItem->ToReferenceFrame();
nsHTMLVideoElement* element = static_cast<nsHTMLVideoElement*>(GetContent()); nsHTMLVideoElement* element = static_cast<nsHTMLVideoElement*>(GetContent());
nsIntSize videoSize = element->GetVideoSize(nsIntSize(0, 0)); nsIntSize videoSize = element->GetVideoSize(nsIntSize(0, 0));
if (videoSize.width <= 0 || videoSize.height <= 0 || area.IsEmpty()) if (videoSize.width <= 0 || videoSize.height <= 0 || area.IsEmpty())
@ -380,7 +380,7 @@ public:
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder) virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder)
{ {
nsIFrame* f = GetUnderlyingFrame(); nsIFrame* f = GetUnderlyingFrame();
return f->GetContentRect() + aBuilder->ToReferenceFrame(f->GetParent()); return f->GetContentRect() - f->GetPosition() + ToReferenceFrame();
} }
virtual already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder, virtual already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,

Просмотреть файл

@ -1893,7 +1893,7 @@ void nsDisplayMathMLSelectionRect::Paint(nsDisplayListBuilder* aBuilder,
mFrame->PresContext()->LookAndFeel()-> mFrame->PresContext()->LookAndFeel()->
GetColor(nsILookAndFeel::eColor_TextSelectBackground, bgColor); GetColor(nsILookAndFeel::eColor_TextSelectBackground, bgColor);
aCtx->SetColor(bgColor); aCtx->SetColor(bgColor);
aCtx->FillRect(mRect + aBuilder->ToReferenceFrame(mFrame)); aCtx->FillRect(mRect + ToReferenceFrame());
} }
class nsDisplayMathMLCharBackground : public nsDisplayItem { class nsDisplayMathMLCharBackground : public nsDisplayItem {
@ -1922,7 +1922,7 @@ void nsDisplayMathMLCharBackground::Paint(nsDisplayListBuilder* aBuilder,
nsIRenderingContext* aCtx) nsIRenderingContext* aCtx)
{ {
const nsStyleBorder* border = mStyleContext->GetStyleBorder(); const nsStyleBorder* border = mStyleContext->GetStyleBorder();
nsRect rect(mRect + aBuilder->ToReferenceFrame(mFrame)); nsRect rect(mRect + ToReferenceFrame());
nsCSSRendering::PaintBackgroundWithSC(mFrame->PresContext(), *aCtx, mFrame, nsCSSRendering::PaintBackgroundWithSC(mFrame->PresContext(), *aCtx, mFrame,
mVisibleRect, rect, mVisibleRect, rect,
mStyleContext, *border, mStyleContext, *border,
@ -1946,8 +1946,7 @@ public:
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder) { virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder) {
nsRect rect; nsRect rect;
mChar->GetRect(rect); mChar->GetRect(rect);
nsPoint offset = nsPoint offset = ToReferenceFrame() + rect.TopLeft();
aBuilder->ToReferenceFrame(mFrame) + rect.TopLeft();
nsBoundingMetrics bm; nsBoundingMetrics bm;
mChar->GetBoundingMetrics(bm); mChar->GetBoundingMetrics(bm);
return nsRect(offset.x + bm.leftBearing, offset.y, return nsRect(offset.x + bm.leftBearing, offset.y,
@ -1958,7 +1957,7 @@ public:
nsIRenderingContext* aCtx) nsIRenderingContext* aCtx)
{ {
mChar->PaintForeground(mFrame->PresContext(), *aCtx, mChar->PaintForeground(mFrame->PresContext(), *aCtx,
aBuilder->ToReferenceFrame(mFrame), mIsSelected); ToReferenceFrame(), mIsSelected);
} }
NS_DISPLAY_DECL_NAME("MathMLCharForeground", TYPE_MATHML_CHAR_FOREGROUND) NS_DISPLAY_DECL_NAME("MathMLCharForeground", TYPE_MATHML_CHAR_FOREGROUND)
@ -1997,7 +1996,7 @@ void nsDisplayMathMLCharDebug::Paint(nsDisplayListBuilder* aBuilder,
PRIntn skipSides = 0; PRIntn skipSides = 0;
nsPresContext* presContext = mFrame->PresContext(); nsPresContext* presContext = mFrame->PresContext();
nsStyleContext* styleContext = mFrame->GetStyleContext(); nsStyleContext* styleContext = mFrame->GetStyleContext();
nsRect rect = mRect + aBuilder->ToReferenceFrame(mFrame); nsRect rect = mRect + ToReferenceFrame();
nsCSSRendering::PaintBorder(presContext, *aCtx, mFrame, nsCSSRendering::PaintBorder(presContext, *aCtx, mFrame,
mVisibleRect, rect, styleContext, skipSides); mVisibleRect, rect, styleContext, skipSides);
nsCSSRendering::PaintOutline(presContext, *aCtx, mFrame, nsCSSRendering::PaintOutline(presContext, *aCtx, mFrame,

Просмотреть файл

@ -145,7 +145,7 @@ void nsDisplayMathMLError::Paint(nsDisplayListBuilder* aBuilder,
// Set color and font ... // Set color and font ...
nsLayoutUtils::SetFontFromStyle(aCtx, mFrame->GetStyleContext()); nsLayoutUtils::SetFontFromStyle(aCtx, mFrame->GetStyleContext());
nsPoint pt = aBuilder->ToReferenceFrame(mFrame); nsPoint pt = ToReferenceFrame();
aCtx->SetColor(NS_RGB(255,0,0)); aCtx->SetColor(NS_RGB(255,0,0));
aCtx->FillRect(nsRect(pt, mFrame->GetSize())); aCtx->FillRect(nsRect(pt, mFrame->GetSize()));
aCtx->SetColor(NS_RGB(255,255,255)); aCtx->SetColor(NS_RGB(255,255,255));

Просмотреть файл

@ -476,7 +476,7 @@ void nsDisplayMathMLBoundingMetrics::Paint(nsDisplayListBuilder* aBuilder,
nsIRenderingContext* aCtx) nsIRenderingContext* aCtx)
{ {
aCtx->SetColor(NS_RGB(0,0,255)); aCtx->SetColor(NS_RGB(0,0,255));
aCtx->DrawRect(mRect + aBuilder->ToReferenceFrame(mFrame)); aCtx->DrawRect(mRect + ToReferenceFrame());
} }
nsresult nsresult
@ -522,7 +522,7 @@ void nsDisplayMathMLBar::Paint(nsDisplayListBuilder* aBuilder,
{ {
// paint the bar with the current text color // paint the bar with the current text color
aCtx->SetColor(mFrame->GetStyleColor()->mColor); aCtx->SetColor(mFrame->GetStyleColor()->mColor);
aCtx->FillRect(mRect + aBuilder->ToReferenceFrame(mFrame)); aCtx->FillRect(mRect + ToReferenceFrame());
} }
nsresult nsresult

Просмотреть файл

@ -767,8 +767,7 @@ void nsDisplayNotation::Paint(nsDisplayListBuilder* aBuilder,
{ {
// get the gfxRect // get the gfxRect
nsPresContext* presContext = mFrame->PresContext(); nsPresContext* presContext = mFrame->PresContext();
gfxRect rect = presContext-> gfxRect rect = presContext->AppUnitsToGfxUnits(mRect + ToReferenceFrame());
AppUnitsToGfxUnits(mRect + aBuilder->ToReferenceFrame(mFrame));
// paint the frame with the current text color // paint the frame with the current text color
aCtx->SetColor(mFrame->GetStyleColor()->mColor); aCtx->SetColor(mFrame->GetStyleColor()->mColor);

Просмотреть файл

@ -610,8 +610,7 @@ void nsDisplayMathMLSlash::Paint(nsDisplayListBuilder* aBuilder,
{ {
// get the gfxRect // get the gfxRect
nsPresContext* presContext = mFrame->PresContext(); nsPresContext* presContext = mFrame->PresContext();
gfxRect rect = presContext-> gfxRect rect = presContext->AppUnitsToGfxUnits(mRect + ToReferenceFrame());
AppUnitsToGfxUnits(mRect + aBuilder->ToReferenceFrame(mFrame));
// paint with the current text color // paint with the current text color
aCtx->SetColor(mFrame->GetStyleColor()->mColor); aCtx->SetColor(mFrame->GetStyleColor()->mColor);

Просмотреть файл

@ -443,7 +443,7 @@ nsDisplaySVG::HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect,
HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames) HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames)
{ {
nsSVGOuterSVGFrame *outerSVGFrame = static_cast<nsSVGOuterSVGFrame*>(mFrame); nsSVGOuterSVGFrame *outerSVGFrame = static_cast<nsSVGOuterSVGFrame*>(mFrame);
nsRect rectAtOrigin = aRect - aBuilder->ToReferenceFrame(mFrame); nsRect rectAtOrigin = aRect - ToReferenceFrame();
nsRect thisRect(nsPoint(0,0), outerSVGFrame->GetSize()); nsRect thisRect(nsPoint(0,0), outerSVGFrame->GetSize());
if (!thisRect.Intersects(rectAtOrigin)) if (!thisRect.Intersects(rectAtOrigin))
return; return;
@ -464,7 +464,7 @@ nsDisplaySVG::Paint(nsDisplayListBuilder* aBuilder,
nsIRenderingContext* aCtx) nsIRenderingContext* aCtx)
{ {
static_cast<nsSVGOuterSVGFrame*>(mFrame)-> static_cast<nsSVGOuterSVGFrame*>(mFrame)->
Paint(*aCtx, mVisibleRect, aBuilder->ToReferenceFrame(mFrame)); Paint(*aCtx, mVisibleRect, ToReferenceFrame());
} }
// helper // helper

Просмотреть файл

@ -411,7 +411,7 @@ void nsDisplayTableCellBackground::Paint(nsDisplayListBuilder* aBuilder,
nsIRenderingContext* aCtx) nsIRenderingContext* aCtx)
{ {
static_cast<nsTableCellFrame*>(mFrame)-> static_cast<nsTableCellFrame*>(mFrame)->
PaintBackground(*aCtx, mVisibleRect, aBuilder->ToReferenceFrame(mFrame), PaintBackground(*aCtx, mVisibleRect, ToReferenceFrame(),
aBuilder->GetBackgroundPaintFlags()); aBuilder->GetBackgroundPaintFlags());
} }

Просмотреть файл

@ -1090,7 +1090,7 @@ nsTableFrame::GetAdditionalChildListName(PRInt32 aIndex) const
nsRect nsRect
nsDisplayTableItem::GetBounds(nsDisplayListBuilder* aBuilder) { nsDisplayTableItem::GetBounds(nsDisplayListBuilder* aBuilder) {
return mFrame->GetOverflowRect() + aBuilder->ToReferenceFrame(mFrame); return mFrame->GetOverflowRect() + ToReferenceFrame();
} }
PRBool PRBool
@ -1143,7 +1143,7 @@ nsDisplayTableBorderBackground::Paint(nsDisplayListBuilder* aBuilder,
{ {
static_cast<nsTableFrame*>(mFrame)-> static_cast<nsTableFrame*>(mFrame)->
PaintTableBorderBackground(*aCtx, mVisibleRect, PaintTableBorderBackground(*aCtx, mVisibleRect,
aBuilder->ToReferenceFrame(mFrame), ToReferenceFrame(),
aBuilder->GetBackgroundPaintFlags()); aBuilder->GetBackgroundPaintFlags());
} }

Просмотреть файл

@ -598,11 +598,10 @@ nsDisplayTableRowBackground::Paint(nsDisplayListBuilder* aBuilder,
nsIRenderingContext* aCtx) { nsIRenderingContext* aCtx) {
nsTableFrame* tableFrame = nsTableFrame::GetTableFrame(mFrame); nsTableFrame* tableFrame = nsTableFrame::GetTableFrame(mFrame);
nsPoint pt = aBuilder->ToReferenceFrame(mFrame);
TableBackgroundPainter painter(tableFrame, TableBackgroundPainter painter(tableFrame,
TableBackgroundPainter::eOrigin_TableRow, TableBackgroundPainter::eOrigin_TableRow,
mFrame->PresContext(), *aCtx, mFrame->PresContext(), *aCtx,
mVisibleRect, pt, mVisibleRect, ToReferenceFrame(),
aBuilder->GetBackgroundPaintFlags()); aBuilder->GetBackgroundPaintFlags());
painter.PaintRow(static_cast<nsTableRowFrame*>(mFrame)); painter.PaintRow(static_cast<nsTableRowFrame*>(mFrame));
} }

Просмотреть файл

@ -188,11 +188,10 @@ nsDisplayTableRowGroupBackground::Paint(nsDisplayListBuilder* aBuilder,
nsIRenderingContext* aCtx) { nsIRenderingContext* aCtx) {
nsTableFrame* tableFrame = nsTableFrame::GetTableFrame(mFrame); nsTableFrame* tableFrame = nsTableFrame::GetTableFrame(mFrame);
nsPoint pt = aBuilder->ToReferenceFrame(mFrame);
TableBackgroundPainter painter(tableFrame, TableBackgroundPainter painter(tableFrame,
TableBackgroundPainter::eOrigin_TableRowGroup, TableBackgroundPainter::eOrigin_TableRowGroup,
mFrame->PresContext(), *aCtx, mFrame->PresContext(), *aCtx,
mVisibleRect, pt, mVisibleRect, ToReferenceFrame(),
aBuilder->GetBackgroundPaintFlags()); aBuilder->GetBackgroundPaintFlags());
painter.PaintRowGroup(static_cast<nsTableRowGroupFrame*>(mFrame)); painter.PaintRowGroup(static_cast<nsTableRowGroupFrame*>(mFrame));
} }

Просмотреть файл

@ -1278,7 +1278,7 @@ public:
HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames) { HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames) {
nsPoint rectCenter(aRect.x + aRect.width / 2, aRect.y + aRect.height / 2); nsPoint rectCenter(aRect.x + aRect.width / 2, aRect.y + aRect.height / 2);
static_cast<nsBoxFrame*>(mFrame)-> static_cast<nsBoxFrame*>(mFrame)->
DisplayDebugInfoFor(this, rectCenter - aBuilder->ToReferenceFrame(mFrame)); DisplayDebugInfoFor(this, rectCenter - ToReferenceFrame());
aOutFrames->AppendElement(this); aOutFrames->AppendElement(this);
} }
virtual void Paint(nsDisplayListBuilder* aBuilder virtual void Paint(nsDisplayListBuilder* aBuilder
@ -1291,7 +1291,7 @@ nsDisplayXULDebug::Paint(nsDisplayListBuilder* aBuilder,
nsIRenderingContext* aCtx) nsIRenderingContext* aCtx)
{ {
static_cast<nsBoxFrame*>(mFrame)-> static_cast<nsBoxFrame*>(mFrame)->
PaintXULDebugOverlay(*aCtx, aBuilder->ToReferenceFrame(mFrame)); PaintXULDebugOverlay(*aCtx, ToReferenceFrame());
} }
static void static void
@ -1318,7 +1318,7 @@ nsBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
"XULDebugBackground")); "XULDebugBackground"));
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
rv = aLists.Outlines()->AppendNewToTop(new (aBuilder) rv = aLists.Outlines()->AppendNewToTop(new (aBuilder)
nsDisplayXULDebug(Builder this)); nsDisplayXULDebug(aBuilder, this));
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
} }
#endif #endif

Просмотреть файл

@ -132,8 +132,7 @@ nsDisplayXULGroupBackground::Paint(nsDisplayListBuilder* aBuilder,
nsIRenderingContext* aCtx) nsIRenderingContext* aCtx)
{ {
static_cast<nsGroupBoxFrame*>(mFrame)-> static_cast<nsGroupBoxFrame*>(mFrame)->
PaintBorderBackground(*aCtx, aBuilder->ToReferenceFrame(mFrame), PaintBorderBackground(*aCtx, ToReferenceFrame(), mVisibleRect);
mVisibleRect);
} }
NS_IMETHODIMP NS_IMETHODIMP

Просмотреть файл

@ -333,7 +333,7 @@ void nsDisplayXULImage::Paint(nsDisplayListBuilder* aBuilder,
nsIRenderingContext* aCtx) nsIRenderingContext* aCtx)
{ {
static_cast<nsImageBoxFrame*>(mFrame)-> static_cast<nsImageBoxFrame*>(mFrame)->
PaintImage(*aCtx, mVisibleRect, aBuilder->ToReferenceFrame(mFrame), PaintImage(*aCtx, mVisibleRect, ToReferenceFrame(),
aBuilder->ShouldSyncDecodeImages() aBuilder->ShouldSyncDecodeImages()
? (PRUint32) imgIContainer::FLAG_SYNC_DECODE ? (PRUint32) imgIContainer::FLAG_SYNC_DECODE
: (PRUint32) imgIContainer::FLAG_NONE); : (PRUint32) imgIContainer::FLAG_NONE);

Просмотреть файл

@ -353,12 +353,12 @@ nsDisplayXULTextBox::Paint(nsDisplayListBuilder* aBuilder,
nsIRenderingContext* aCtx) nsIRenderingContext* aCtx)
{ {
static_cast<nsTextBoxFrame*>(mFrame)-> static_cast<nsTextBoxFrame*>(mFrame)->
PaintTitle(*aCtx, mVisibleRect, aBuilder->ToReferenceFrame(mFrame)); PaintTitle(*aCtx, mVisibleRect, ToReferenceFrame());
} }
nsRect nsRect
nsDisplayXULTextBox::GetBounds(nsDisplayListBuilder* aBuilder) { nsDisplayXULTextBox::GetBounds(nsDisplayListBuilder* aBuilder) {
return mFrame->GetOverflowRect() + aBuilder->ToReferenceFrame(mFrame); return mFrame->GetOverflowRect() + ToReferenceFrame();
} }
NS_IMETHODIMP NS_IMETHODIMP

Просмотреть файл

@ -110,7 +110,7 @@ void
nsDisplayXULTreeColSplitterTarget::HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect, nsDisplayXULTreeColSplitterTarget::HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect,
HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames) HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames)
{ {
nsRect rect = aRect - aBuilder->ToReferenceFrame(mFrame); nsRect rect = aRect - ToReferenceFrame();
// If we are in either in the first 4 pixels or the last 4 pixels, we're going to // If we are in either in the first 4 pixels or the last 4 pixels, we're going to
// do something really strange. Check for an adjacent splitter. // do something really strange. Check for an adjacent splitter.
PRBool left = PR_FALSE; PRBool left = PR_FALSE;