Bug 1022612. Part 23: Remove nsDisplayItem::IsVaryingRelativeToMovingFrame. r=mattwoodrow

It's obsolete and no-one calls it.

--HG--
extra : rebase_source : 588144666e7abac06c19bfa5d1d3f41589bdd988
This commit is contained in:
Robert O'Callahan 2014-06-09 16:48:02 +12:00
Родитель c4e7f391f8
Коммит c680be18b6
4 изменённых файлов: 0 добавлений и 54 удалений

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

@ -2252,23 +2252,6 @@ nsDisplayBackgroundImage::IsUniform(nsDisplayListBuilder* aBuilder, nscolor* aCo
return false;
}
bool
nsDisplayBackgroundImage::IsVaryingRelativeToMovingFrame(nsDisplayListBuilder* aBuilder,
nsIFrame* aFrame)
{
if (!mBackgroundStyle)
return false;
if (!mBackgroundStyle->HasFixedBackground())
return false;
// If aFrame is mFrame or an ancestor in this document, and aFrame is
// not the viewport frame, then moving aFrame will move mFrame
// relative to the viewport, so our fixed-pos background will change.
return aFrame->GetParent() &&
(aFrame == mFrame ||
nsLayoutUtils::IsProperAncestorFrame(aFrame, mFrame));
}
nsRect
nsDisplayBackgroundImage::GetPositioningArea()
{
@ -3125,13 +3108,6 @@ bool nsDisplayWrapList::IsUniform(nsDisplayListBuilder* aBuilder, nscolor* aColo
return false;
}
bool nsDisplayWrapList::IsVaryingRelativeToMovingFrame(nsDisplayListBuilder* aBuilder,
nsIFrame* aFrame) {
NS_WARNING("nsDisplayWrapList::IsVaryingRelativeToMovingFrame called unexpectedly");
// We could try to do something but let's conservatively just return true.
return true;
}
void nsDisplayWrapList::Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx) {
NS_ERROR("nsDisplayWrapList should have been flattened away for painting");

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

@ -1101,16 +1101,6 @@ public:
* bounds with the same (possibly translucent) color
*/
virtual bool IsUniform(nsDisplayListBuilder* aBuilder, nscolor* aColor) { return false; }
/**
* @return false if the painting performed by the item is invariant
* when the item's underlying frame is moved relative to aFrame.
* In other words, if you render the item at locations P and P', the rendering
* only differs by the translation.
* It return true for all wrapped lists.
*/
virtual bool IsVaryingRelativeToMovingFrame(nsDisplayListBuilder* aBuilder,
nsIFrame* aFrame)
{ return false; }
/**
* @return true if the contents of this item are rendered fixed relative
* to the nearest viewport.
@ -2191,8 +2181,6 @@ public:
const nsRect& aAllowVisibleRegionExpansion) MOZ_OVERRIDE;
virtual nsRegion GetOpaqueRegion(nsDisplayListBuilder* aBuilder,
bool* aSnap) MOZ_OVERRIDE;
virtual bool IsVaryingRelativeToMovingFrame(nsDisplayListBuilder* aBuilder,
nsIFrame* aFrame) MOZ_OVERRIDE;
virtual bool IsUniform(nsDisplayListBuilder* aBuilder, nscolor* aColor) MOZ_OVERRIDE;
/**
* GetBounds() returns the background painting area.
@ -2607,8 +2595,6 @@ public:
virtual nsRegion GetOpaqueRegion(nsDisplayListBuilder* aBuilder,
bool* aSnap) MOZ_OVERRIDE;
virtual bool IsUniform(nsDisplayListBuilder* aBuilder, nscolor* aColor) MOZ_OVERRIDE;
virtual bool IsVaryingRelativeToMovingFrame(nsDisplayListBuilder* aBuilder,
nsIFrame* aFrame) MOZ_OVERRIDE;
virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx) MOZ_OVERRIDE;
virtual bool ComputeVisibility(nsDisplayListBuilder* aBuilder,
nsRegion* aVisibleRegion,

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

@ -1088,20 +1088,6 @@ nsDisplayTableItem::GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap) {
return mFrame->GetVisualOverflowRectRelativeToSelf() + ToReferenceFrame();
}
bool
nsDisplayTableItem::IsVaryingRelativeToMovingFrame(nsDisplayListBuilder* aBuilder,
nsIFrame* aFrame)
{
if (!mPartHasFixedBackground)
return false;
// If aFrame is mFrame or an ancestor in this document, and aFrame is
// not the viewport frame, then moving aFrame will move mFrame
// relative to the viewport, so our fixed-pos background will change.
return mFrame == aFrame ||
nsLayoutUtils::IsProperAncestorFrame(aFrame, mFrame);
}
/* static */ void
nsDisplayTableItem::UpdateForFrameBackground(nsIFrame* aFrame)
{

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

@ -50,8 +50,6 @@ public:
nsDisplayItem(aBuilder, aFrame),
mPartHasFixedBackground(false) {}
virtual bool IsVaryingRelativeToMovingFrame(nsDisplayListBuilder* aBuilder,
nsIFrame* aFrame) MOZ_OVERRIDE;
// With collapsed borders, parts of the collapsed border can extend outside
// the table part frames, so allow this display element to blow out to our
// overflow rect. This is also useful for row frames that have spanning