mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 1158546 - Remove nsDisplayHeaderFooter::mFrame in favor of nsDisplayItem::mFrame; r=roc
There is no need to have two separate variables for the same thing in the same object.
This commit is contained in:
parent
f9a2ed34d6
commit
65709fa8ac
@ -40,6 +40,10 @@ NS_NewPageFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
||||
|
||||
NS_IMPL_FRAMEARENA_HELPERS(nsPageFrame)
|
||||
|
||||
NS_QUERYFRAME_HEAD(nsPageFrame)
|
||||
NS_QUERYFRAME_ENTRY(nsPageFrame)
|
||||
NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
|
||||
|
||||
nsPageFrame::nsPageFrame(nsStyleContext* aContext)
|
||||
: nsContainerFrame(aContext)
|
||||
{
|
||||
@ -480,7 +484,7 @@ static gfx::Matrix4x4 ComputePageTransform(nsIFrame* aFrame, float aAppUnitsPerP
|
||||
class nsDisplayHeaderFooter : public nsDisplayItem {
|
||||
public:
|
||||
nsDisplayHeaderFooter(nsDisplayListBuilder* aBuilder, nsPageFrame *aFrame)
|
||||
: nsDisplayItem(aBuilder, aFrame), mFrame(aFrame)
|
||||
: nsDisplayItem(aBuilder, aFrame)
|
||||
, mDisableSubpixelAA(false)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsDisplayHeaderFooter);
|
||||
@ -493,7 +497,12 @@ public:
|
||||
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder,
|
||||
nsRenderingContext* aCtx) override {
|
||||
mFrame->PaintHeaderFooter(*aCtx, ToReferenceFrame(), mDisableSubpixelAA);
|
||||
#ifdef DEBUG
|
||||
nsPageFrame* pageFrame = do_QueryFrame(mFrame);
|
||||
MOZ_ASSERT(pageFrame, "We should have an nsPageFrame");
|
||||
#endif
|
||||
static_cast<nsPageFrame*>(mFrame)->
|
||||
PaintHeaderFooter(*aCtx, ToReferenceFrame(), mDisableSubpixelAA);
|
||||
}
|
||||
NS_DISPLAY_DECL_NAME("HeaderFooter", nsDisplayItem::TYPE_HEADER_FOOTER)
|
||||
|
||||
@ -506,7 +515,6 @@ public:
|
||||
mDisableSubpixelAA = true;
|
||||
}
|
||||
protected:
|
||||
nsPageFrame* mFrame;
|
||||
bool mDisableSubpixelAA;
|
||||
};
|
||||
|
||||
|
@ -16,6 +16,8 @@ class nsSharedPageData;
|
||||
class nsPageFrame final : public nsContainerFrame {
|
||||
|
||||
public:
|
||||
NS_DECL_QUERYFRAME_TARGET(nsPageFrame)
|
||||
NS_DECL_QUERYFRAME
|
||||
NS_DECL_FRAMEARENA_HELPERS
|
||||
|
||||
friend nsPageFrame* NS_NewPageFrame(nsIPresShell* aPresShell,
|
||||
|
Loading…
Reference in New Issue
Block a user