mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 1232852 (part 4) - Remove some unused parameters in and around layout/base/. r=heycam.
--HG-- extra : rebase_source : 68642322a9fc78bb7eace1501b75003241a44507
This commit is contained in:
parent
3ba02d7a9b
commit
fd7ca876ef
@ -1366,7 +1366,6 @@ protected:
|
||||
|
||||
already_AddRefed<Layer> CreateMaskLayer(
|
||||
Layer *aLayer, const DisplayItemClip& aClip,
|
||||
const nsIntRegion& aLayerVisibleRegion,
|
||||
const Maybe<size_t>& aForAncestorMaskLayer,
|
||||
uint32_t aRoundedRectClipCount = UINT32_MAX);
|
||||
|
||||
@ -4777,7 +4776,7 @@ ContainerState::SetupScrollingMetadata(NewLayerEntry* aEntry)
|
||||
// layer as an additional, separate clip.
|
||||
Maybe<size_t> nextIndex = Some(maskLayers.Length());
|
||||
RefPtr<Layer> maskLayer =
|
||||
CreateMaskLayer(aEntry->mLayer, *clip, aEntry->mVisibleRegion, nextIndex, clip->GetRoundedRectCount());
|
||||
CreateMaskLayer(aEntry->mLayer, *clip, nextIndex, clip->GetRoundedRectCount());
|
||||
if (maskLayer) {
|
||||
metrics->SetMaskLayerIndex(nextIndex);
|
||||
maskLayers.AppendElement(maskLayer);
|
||||
@ -6016,7 +6015,7 @@ ContainerState::SetupMaskLayer(Layer *aLayer,
|
||||
}
|
||||
|
||||
RefPtr<Layer> maskLayer =
|
||||
CreateMaskLayer(aLayer, aClip, aLayerVisibleRegion, Nothing(), aRoundedRectClipCount);
|
||||
CreateMaskLayer(aLayer, aClip, Nothing(), aRoundedRectClipCount);
|
||||
|
||||
if (!maskLayer) {
|
||||
SetClipCount(paintedData, 0);
|
||||
@ -6030,7 +6029,6 @@ ContainerState::SetupMaskLayer(Layer *aLayer,
|
||||
already_AddRefed<Layer>
|
||||
ContainerState::CreateMaskLayer(Layer *aLayer,
|
||||
const DisplayItemClip& aClip,
|
||||
const nsIntRegion& aLayerVisibleRegion,
|
||||
const Maybe<size_t>& aForAncestorMaskLayer,
|
||||
uint32_t aRoundedRectClipCount)
|
||||
{
|
||||
|
@ -2522,7 +2522,7 @@ nsCSSFrameConstructor::ConstructDocElementFrame(Element* aDocEle
|
||||
contentFrame = NS_NewBlockFormattingContext(mPresShell, styleContext);
|
||||
nsFrameItems frameItems;
|
||||
// Use a null PendingBinding, since our binding is not in fact pending.
|
||||
ConstructBlock(state, display, aDocElement,
|
||||
ConstructBlock(state, aDocElement,
|
||||
state.GetGeometricParent(display,
|
||||
mDocElementContainingBlock),
|
||||
mDocElementContainingBlock, styleContext,
|
||||
@ -4659,8 +4659,7 @@ nsCSSFrameConstructor::ConstructScrollableBlock(nsFrameConstructorState& aState,
|
||||
aState.AddChild(newFrame, aFrameItems, content, styleContext, aParentFrame);
|
||||
|
||||
nsFrameItems blockItem;
|
||||
ConstructBlock(aState, scrolledContentStyle->StyleDisplay(), content,
|
||||
newFrame, newFrame, scrolledContentStyle,
|
||||
ConstructBlock(aState, content, newFrame, newFrame, scrolledContentStyle,
|
||||
&scrolledFrame, blockItem,
|
||||
aDisplay->IsAbsPosContainingBlock(newFrame) ? newFrame : nullptr,
|
||||
aItem.mPendingBinding);
|
||||
@ -4701,7 +4700,7 @@ nsCSSFrameConstructor::ConstructNonScrollableBlock(nsFrameConstructorState& aSta
|
||||
newFrame = NS_NewBlockFrame(mPresShell, styleContext);
|
||||
}
|
||||
|
||||
ConstructBlock(aState, aDisplay, aItem.mContent,
|
||||
ConstructBlock(aState, aItem.mContent,
|
||||
aState.GetGeometricParent(aDisplay, aParentFrame),
|
||||
aParentFrame, styleContext, &newFrame,
|
||||
aFrameItems,
|
||||
@ -11302,9 +11301,7 @@ nsCSSFrameConstructor::CreateListBoxContent(nsContainerFrame* aParentFrame,
|
||||
nsIFrame* aPrevFrame,
|
||||
nsIContent* aChild,
|
||||
nsIFrame** aNewFrame,
|
||||
bool aIsAppend,
|
||||
bool aIsScrollbar,
|
||||
nsILayoutHistoryState* aFrameState)
|
||||
bool aIsAppend)
|
||||
{
|
||||
#ifdef MOZ_XUL
|
||||
nsresult rv = NS_OK;
|
||||
@ -11376,7 +11373,6 @@ nsCSSFrameConstructor::CreateListBoxContent(nsContainerFrame* aParentFrame,
|
||||
|
||||
void
|
||||
nsCSSFrameConstructor::ConstructBlock(nsFrameConstructorState& aState,
|
||||
const nsStyleDisplay* aDisplay,
|
||||
nsIContent* aContent,
|
||||
nsContainerFrame* aParentFrame,
|
||||
nsContainerFrame* aContentParentFrame,
|
||||
|
@ -304,9 +304,7 @@ public:
|
||||
nsIFrame* aPrevFrame,
|
||||
nsIContent* aChild,
|
||||
nsIFrame** aResult,
|
||||
bool aIsAppend,
|
||||
bool aIsScrollbar,
|
||||
nsILayoutHistoryState* aFrameState);
|
||||
bool aIsAppend);
|
||||
|
||||
// GetInitialContainingBlock() is deprecated in favor of GetRootElementFrame();
|
||||
// nsIFrame* GetInitialContainingBlock() { return mRootElementFrame; }
|
||||
@ -1740,7 +1738,6 @@ private:
|
||||
// @param aPendingBinding the pending binding from this block's frame
|
||||
// construction item.
|
||||
void ConstructBlock(nsFrameConstructorState& aState,
|
||||
const nsStyleDisplay* aDisplay,
|
||||
nsIContent* aContent,
|
||||
nsContainerFrame* aParentFrame,
|
||||
nsContainerFrame* aContentParentFrame,
|
||||
|
@ -1476,8 +1476,7 @@ void
|
||||
nsCSSRendering::PaintBoxShadowInner(nsPresContext* aPresContext,
|
||||
nsRenderingContext& aRenderingContext,
|
||||
nsIFrame* aForFrame,
|
||||
const nsRect& aFrameArea,
|
||||
const nsRect& aDirtyRect)
|
||||
const nsRect& aFrameArea)
|
||||
{
|
||||
const nsStyleBorder* styleBorder = aForFrame->StyleBorder();
|
||||
nsCSSShadowArray* shadows = styleBorder->mBoxShadow;
|
||||
|
@ -370,8 +370,7 @@ struct nsCSSRendering {
|
||||
static void PaintBoxShadowInner(nsPresContext* aPresContext,
|
||||
nsRenderingContext& aRenderingContext,
|
||||
nsIFrame* aForFrame,
|
||||
const nsRect& aFrameArea,
|
||||
const nsRect& aDirtyRect);
|
||||
const nsRect& aFrameArea);
|
||||
|
||||
static void PaintBoxShadowOuter(nsPresContext* aPresContext,
|
||||
nsRenderingContext& aRenderingContext,
|
||||
|
@ -1300,7 +1300,6 @@ DrawBorderRadius(DrawTarget* aDrawTarget,
|
||||
// seams when anti-aliased drawing is used.
|
||||
static void
|
||||
DrawCorner(DrawTarget* aDrawTarget,
|
||||
mozilla::css::Corner c,
|
||||
const Point& aOuterCorner, const Point& aInnerCorner,
|
||||
const twoFloats& aCornerMultPrev, const twoFloats& aCornerMultNext,
|
||||
const Size& aCornerDims,
|
||||
@ -1455,7 +1454,7 @@ nsCSSBorderRenderer::DrawNoCompositeColorSolidBorder()
|
||||
} else if (!mBorderCornerDimensions[c].IsEmpty()) {
|
||||
// a corner with no border radius
|
||||
DrawCorner(mDrawTarget,
|
||||
c, outerCorner, innerCorner,
|
||||
outerCorner, innerCorner,
|
||||
cornerMults[i], cornerMults[i3],
|
||||
mBorderCornerDimensions[c],
|
||||
firstColor, secondColor, skirtSize, skirtSlope);
|
||||
|
@ -537,8 +537,7 @@ nsCaret::GetPaintGeometry(nsRect* aRect)
|
||||
return frame;
|
||||
}
|
||||
|
||||
void nsCaret::PaintCaret(nsDisplayListBuilder *aBuilder,
|
||||
DrawTarget& aDrawTarget,
|
||||
void nsCaret::PaintCaret(DrawTarget& aDrawTarget,
|
||||
nsIFrame* aForFrame,
|
||||
const nsPoint &aOffset)
|
||||
{
|
||||
|
@ -137,8 +137,7 @@ class nsCaret final : public nsISelectionListener
|
||||
/** PaintCaret
|
||||
* Actually paint the caret onto the given rendering context.
|
||||
*/
|
||||
void PaintCaret(nsDisplayListBuilder *aBuilder,
|
||||
DrawTarget& aDrawTarget,
|
||||
void PaintCaret(DrawTarget& aDrawTarget,
|
||||
nsIFrame *aForFrame,
|
||||
const nsPoint &aOffset);
|
||||
|
||||
|
@ -1245,8 +1245,7 @@ nsDisplayListBuilder::AdjustWindowDraggingRegion(nsIFrame* aFrame)
|
||||
}
|
||||
|
||||
const uint32_t gWillChangeAreaMultiplier = 3;
|
||||
static uint32_t GetWillChangeCost(nsIFrame* aFrame,
|
||||
const nsSize& aSize) {
|
||||
static uint32_t GetWillChangeCost(const nsSize& aSize) {
|
||||
// There's significant overhead for each layer created from Gecko
|
||||
// (IPC+Shared Objects) and from the backend (like an OpenGL texture).
|
||||
// Therefore we set a minimum cost threshold of a 64x64 area.
|
||||
@ -1279,7 +1278,7 @@ nsDisplayListBuilder::AddToWillChangeBudget(nsIFrame* aFrame,
|
||||
uint32_t budgetLimit = nsPresContext::AppUnitsToIntCSSPixels(area.width) *
|
||||
nsPresContext::AppUnitsToIntCSSPixels(area.height);
|
||||
|
||||
uint32_t cost = GetWillChangeCost(aFrame, aSize);
|
||||
uint32_t cost = GetWillChangeCost(aSize);
|
||||
bool onBudget = (budget.mBudget + cost) /
|
||||
gWillChangeAreaMultiplier < budgetLimit;
|
||||
|
||||
@ -1299,7 +1298,7 @@ nsDisplayListBuilder::IsInWillChangeBudget(nsIFrame* aFrame,
|
||||
|
||||
if (!onBudget) {
|
||||
nsString usageStr;
|
||||
usageStr.AppendInt(GetWillChangeCost(aFrame, aSize));
|
||||
usageStr.AppendInt(GetWillChangeCost(aSize));
|
||||
|
||||
nsString multiplierStr;
|
||||
multiplierStr.AppendInt(gWillChangeAreaMultiplier);
|
||||
@ -3482,7 +3481,7 @@ nsDisplayCaret::Paint(nsDisplayListBuilder* aBuilder,
|
||||
nsRenderingContext* aCtx) {
|
||||
// Note: Because we exist, we know that the caret is visible, so we don't
|
||||
// need to check for the caret's visibility.
|
||||
mCaret->PaintCaret(aBuilder, *aCtx->GetDrawTarget(), mFrame, ToReferenceFrame());
|
||||
mCaret->PaintCaret(*aCtx->GetDrawTarget(), mFrame, ToReferenceFrame());
|
||||
}
|
||||
|
||||
nsDisplayBorder::nsDisplayBorder(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame)
|
||||
@ -3754,8 +3753,7 @@ nsDisplayBoxShadowInner::Paint(nsDisplayListBuilder* aBuilder,
|
||||
for (uint32_t i = 0; i < rects.Length(); ++i) {
|
||||
gfx->Save();
|
||||
gfx->Clip(NSRectToSnappedRect(rects[i], appUnitsPerDevPixel, *drawTarget));
|
||||
nsCSSRendering::PaintBoxShadowInner(presContext, *aCtx, mFrame,
|
||||
borderRect, rects[i]);
|
||||
nsCSSRendering::PaintBoxShadowInner(presContext, *aCtx, mFrame, borderRect);
|
||||
gfx->Restore();
|
||||
}
|
||||
}
|
||||
|
@ -346,7 +346,7 @@ public:
|
||||
void ClearGrandTotals();
|
||||
void DisplayTotals(const char * aStr);
|
||||
void DisplayHTMLTotals(const char * aStr);
|
||||
void DisplayDiffsInTotals(const char * aStr);
|
||||
void DisplayDiffsInTotals();
|
||||
|
||||
void Add(const char * aName, nsIFrame * aFrame);
|
||||
ReflowCounter * LookUp(const char * aName);
|
||||
@ -9806,7 +9806,7 @@ PresShell::DumpReflows()
|
||||
}
|
||||
mReflowCountMgr->DisplayTotals(uriStr.get());
|
||||
mReflowCountMgr->DisplayHTMLTotals(uriStr.get());
|
||||
mReflowCountMgr->DisplayDiffsInTotals("Differences");
|
||||
mReflowCountMgr->DisplayDiffsInTotals();
|
||||
}
|
||||
}
|
||||
|
||||
@ -10346,7 +10346,7 @@ int ReflowCountMgr::DoDisplayDiffTotals(PLHashEntry *he, int i, void *arg)
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
void ReflowCountMgr::DisplayDiffsInTotals(const char * aStr)
|
||||
void ReflowCountMgr::DisplayDiffsInTotals()
|
||||
{
|
||||
if (mCycledOnce) {
|
||||
printf("Differences\n");
|
||||
|
@ -349,7 +349,7 @@ nsButtonFrameRenderer::PaintBorderAndBackground(
|
||||
aDirtyRect, buttonRect, bgFlags);
|
||||
|
||||
nsCSSRendering::PaintBoxShadowInner(aPresContext, aRenderingContext,
|
||||
mFrame, buttonRect, aDirtyRect);
|
||||
mFrame, buttonRect);
|
||||
|
||||
result &=
|
||||
nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, mFrame,
|
||||
|
@ -235,7 +235,7 @@ nsFieldSetFrame::PaintBorderBackground(
|
||||
aDirtyRect, rect, bgFlags);
|
||||
|
||||
nsCSSRendering::PaintBoxShadowInner(presContext, aRenderingContext,
|
||||
this, rect, aDirtyRect);
|
||||
this, rect);
|
||||
|
||||
if (nsIFrame* legend = GetLegend()) {
|
||||
css::Side legendSide = wm.PhysicalSide(eLogicalSideBStart);
|
||||
|
@ -3795,7 +3795,7 @@ SVGTextFrame::PaintSVG(gfxContext& aContext,
|
||||
if (frame == caretFrame && ShouldPaintCaret(run, caret)) {
|
||||
// XXX Should we be looking at the fill/stroke colours to paint the
|
||||
// caret with, rather than using the color property?
|
||||
caret->PaintCaret(nullptr, aDrawTarget, frame, nsPoint());
|
||||
caret->PaintCaret(aDrawTarget, frame, nsPoint());
|
||||
aContext.NewPath();
|
||||
}
|
||||
|
||||
|
@ -1179,8 +1179,7 @@ nsListBoxBodyFrame::GetFirstItemBox(int32_t aOffset, bool* aCreated)
|
||||
nsPresContext* presContext = PresContext();
|
||||
nsCSSFrameConstructor* fc = presContext->PresShell()->FrameConstructor();
|
||||
nsIFrame* topFrame = nullptr;
|
||||
fc->CreateListBoxContent(this, nullptr, startContent,
|
||||
&topFrame, isAppend, false, nullptr);
|
||||
fc->CreateListBoxContent(this, nullptr, startContent, &topFrame, isAppend);
|
||||
mTopFrame = topFrame;
|
||||
if (mTopFrame) {
|
||||
if (aCreated)
|
||||
@ -1233,7 +1232,7 @@ nsListBoxBodyFrame::GetNextItemBox(nsIFrame* aBox, int32_t aOffset,
|
||||
nsPresContext* presContext = PresContext();
|
||||
nsCSSFrameConstructor* fc = presContext->PresShell()->FrameConstructor();
|
||||
fc->CreateListBoxContent(this, prevFrame, nextContent,
|
||||
&result, isAppend, false, nullptr);
|
||||
&result, isAppend);
|
||||
|
||||
if (result) {
|
||||
if (aCreated)
|
||||
|
Loading…
Reference in New Issue
Block a user