зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1232852 (part 5) - Remove some unused parameters in and around layout/base/. r=heycam.
--HG-- extra : rebase_source : 3f114d32650a260fe2eda847f24c2967a9d94185
This commit is contained in:
Родитель
fd7ca876ef
Коммит
5721b2ad2e
|
@ -3666,14 +3666,12 @@ nsDocument::CreateShell(nsPresContext* aContext, nsViewManager* aViewManager,
|
|||
// Don't add anything here. Add it to |doCreateShell| instead.
|
||||
// This exists so that subclasses can pass other values for the 4th
|
||||
// parameter some of the time.
|
||||
return doCreateShell(aContext, aViewManager, aStyleSet,
|
||||
eCompatibility_FullStandards);
|
||||
return doCreateShell(aContext, aViewManager, aStyleSet);
|
||||
}
|
||||
|
||||
already_AddRefed<nsIPresShell>
|
||||
nsDocument::doCreateShell(nsPresContext* aContext,
|
||||
nsViewManager* aViewManager, nsStyleSet* aStyleSet,
|
||||
nsCompatibility aCompatMode)
|
||||
nsViewManager* aViewManager, nsStyleSet* aStyleSet)
|
||||
{
|
||||
NS_ASSERTION(!mPresShell, "We have a presshell already!");
|
||||
|
||||
|
@ -3682,7 +3680,7 @@ nsDocument::doCreateShell(nsPresContext* aContext,
|
|||
FillStyleSet(aStyleSet);
|
||||
|
||||
RefPtr<PresShell> shell = new PresShell;
|
||||
shell->Init(this, aContext, aViewManager, aStyleSet, aCompatMode);
|
||||
shell->Init(this, aContext, aViewManager, aStyleSet);
|
||||
|
||||
// Note: we don't hold a ref to the shell (it holds a ref to us)
|
||||
mPresShell = shell;
|
||||
|
|
|
@ -1494,8 +1494,7 @@ public:
|
|||
protected:
|
||||
already_AddRefed<nsIPresShell> doCreateShell(nsPresContext* aContext,
|
||||
nsViewManager* aViewManager,
|
||||
nsStyleSet* aStyleSet,
|
||||
nsCompatibility aCompatMode);
|
||||
nsStyleSet* aStyleSet);
|
||||
|
||||
void RemoveDocStyleSheetsFromStyleSets();
|
||||
void RemoveStyleSheetsFromStyleSets(
|
||||
|
|
|
@ -269,7 +269,7 @@ nsHTMLDocument::CreateShell(nsPresContext* aContext,
|
|||
nsViewManager* aViewManager,
|
||||
nsStyleSet* aStyleSet)
|
||||
{
|
||||
return doCreateShell(aContext, aViewManager, aStyleSet, mCompatMode);
|
||||
return doCreateShell(aContext, aViewManager, aStyleSet);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -1418,15 +1418,13 @@ nsDisplayList::GetVisibleRect() const {
|
|||
|
||||
bool
|
||||
nsDisplayList::ComputeVisibilityForRoot(nsDisplayListBuilder* aBuilder,
|
||||
nsRegion* aVisibleRegion,
|
||||
nsIFrame* aDisplayPortFrame) {
|
||||
nsRegion* aVisibleRegion) {
|
||||
PROFILER_LABEL("nsDisplayList", "ComputeVisibilityForRoot",
|
||||
js::ProfileEntry::Category::GRAPHICS);
|
||||
|
||||
nsRegion r;
|
||||
r.And(*aVisibleRegion, GetBounds(aBuilder));
|
||||
return ComputeVisibilityForSublist(aBuilder, aVisibleRegion,
|
||||
r.GetBounds(), aDisplayPortFrame);
|
||||
return ComputeVisibilityForSublist(aBuilder, aVisibleRegion, r.GetBounds());
|
||||
}
|
||||
|
||||
static nsRegion
|
||||
|
@ -1466,8 +1464,8 @@ TreatAsOpaque(nsDisplayItem* aItem, nsDisplayListBuilder* aBuilder)
|
|||
bool
|
||||
nsDisplayList::ComputeVisibilityForSublist(nsDisplayListBuilder* aBuilder,
|
||||
nsRegion* aVisibleRegion,
|
||||
const nsRect& aListVisibleBounds,
|
||||
nsIFrame* aDisplayPortFrame) {
|
||||
const nsRect& aListVisibleBounds)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
nsRegion r;
|
||||
r.And(*aVisibleRegion, GetBounds(aBuilder));
|
||||
|
@ -2768,8 +2766,8 @@ nsDisplayBackgroundImage::ComputeVisibility(nsDisplayListBuilder* aBuilder,
|
|||
|
||||
/* static */ nsRegion
|
||||
nsDisplayBackgroundImage::GetInsideClipRegion(nsDisplayItem* aItem,
|
||||
uint8_t aClip, const nsRect& aRect,
|
||||
bool* aSnap)
|
||||
uint8_t aClip,
|
||||
const nsRect& aRect)
|
||||
{
|
||||
nsRegion result;
|
||||
if (aRect.IsEmpty())
|
||||
|
@ -2810,7 +2808,6 @@ nsDisplayBackgroundImage::GetOpaqueRegion(nsDisplayListBuilder* aBuilder,
|
|||
if (!mBackgroundStyle)
|
||||
return result;
|
||||
|
||||
|
||||
*aSnap = true;
|
||||
|
||||
// For NS_STYLE_BOX_DECORATION_BREAK_SLICE, don't try to optimize here, since
|
||||
|
@ -2823,7 +2820,7 @@ nsDisplayBackgroundImage::GetOpaqueRegion(nsDisplayListBuilder* aBuilder,
|
|||
(!mFrame->GetPrevContinuation() && !mFrame->GetNextContinuation())) {
|
||||
const nsStyleBackground::Layer& layer = mBackgroundStyle->mLayers[mLayer];
|
||||
if (layer.mImage.IsOpaque() && layer.mBlendMode == NS_STYLE_BLEND_NORMAL) {
|
||||
result = GetInsideClipRegion(this, layer.mClip, mBounds, aSnap);
|
||||
result = GetInsideClipRegion(this, layer.mClip, mBounds);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3233,7 +3230,7 @@ nsDisplayBackgroundColor::GetOpaqueRegion(nsDisplayListBuilder* aBuilder,
|
|||
const nsStyleBackground::Layer& bottomLayer = mBackgroundStyle->BottomLayer();
|
||||
nsRect borderBox = nsRect(ToReferenceFrame(), mFrame->GetSize());
|
||||
return nsDisplayBackgroundImage::GetInsideClipRegion(this, bottomLayer.mClip,
|
||||
borderBox, aSnap);
|
||||
borderBox);
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -3861,8 +3858,7 @@ nsDisplayWrapList::ComputeVisibility(nsDisplayListBuilder* aBuilder,
|
|||
nsRegion originalVisibleRegion = visibleRegion;
|
||||
|
||||
bool retval =
|
||||
mList.ComputeVisibilityForSublist(aBuilder, &visibleRegion,
|
||||
mVisibleRect);
|
||||
mList.ComputeVisibilityForSublist(aBuilder, &visibleRegion, mVisibleRect);
|
||||
|
||||
nsRegion removed;
|
||||
// removed = originalVisibleRegion - visibleRegion
|
||||
|
@ -4542,8 +4538,7 @@ nsDisplaySubDocument::ComputeVisibility(nsDisplayListBuilder* aBuilder,
|
|||
nsRect boundedRect =
|
||||
childVisibleRegion.GetBounds().Intersect(mList.GetBounds(aBuilder));
|
||||
bool visible = mList.ComputeVisibilityForSublist(
|
||||
aBuilder, &childVisibleRegion, boundedRect,
|
||||
usingDisplayPort ? mFrame : nullptr);
|
||||
aBuilder, &childVisibleRegion, boundedRect);
|
||||
|
||||
// If APZ is enabled then don't allow this computation to influence
|
||||
// aVisibleRegion, on the assumption that the layer can be asynchronously
|
||||
|
|
|
@ -2085,15 +2085,11 @@ public:
|
|||
* I.e., opaque contents of this list are subtracted from aVisibleRegion.
|
||||
* @param aListVisibleBounds must be equal to the bounds of the intersection
|
||||
* of aVisibleRegion and GetBounds() for this list.
|
||||
* @param aDisplayPortFrame If the item for which this list corresponds is
|
||||
* within a displayport, the scroll frame for which that display port
|
||||
* applies. For root scroll frames, you can pass the the root frame instead.
|
||||
* @return true if any item in the list is visible.
|
||||
*/
|
||||
bool ComputeVisibilityForSublist(nsDisplayListBuilder* aBuilder,
|
||||
nsRegion* aVisibleRegion,
|
||||
const nsRect& aListVisibleBounds,
|
||||
nsIFrame* aDisplayPortFrame = nullptr);
|
||||
const nsRect& aListVisibleBounds);
|
||||
|
||||
/**
|
||||
* As ComputeVisibilityForSublist, but computes visibility for a root
|
||||
|
@ -2101,11 +2097,9 @@ public:
|
|||
* This method needs to be idempotent.
|
||||
*
|
||||
* @param aVisibleRegion the area that is visible
|
||||
* @param aDisplayPortFrame The root scroll frame, if a displayport is set
|
||||
*/
|
||||
bool ComputeVisibilityForRoot(nsDisplayListBuilder* aBuilder,
|
||||
nsRegion* aVisibleRegion,
|
||||
nsIFrame* aDisplayPortFrame = nullptr);
|
||||
nsRegion* aVisibleRegion);
|
||||
|
||||
/**
|
||||
* Returns true if the visible region output from ComputeVisiblity was
|
||||
|
@ -2716,7 +2710,7 @@ public:
|
|||
const ContainerLayerParameters& aParameters) override;
|
||||
|
||||
static nsRegion GetInsideClipRegion(nsDisplayItem* aItem, uint8_t aClip,
|
||||
const nsRect& aRect, bool* aSnap);
|
||||
const nsRect& aRect);
|
||||
|
||||
virtual bool ShouldFixToViewport(nsDisplayListBuilder* aBuilder) override;
|
||||
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
#include "nsQueryFrame.h"
|
||||
#include "nsCoord.h"
|
||||
#include "nsColor.h"
|
||||
#include "nsCompatibility.h"
|
||||
#include "nsFrameManagerBase.h"
|
||||
#include "nsRect.h"
|
||||
#include "nsRegionFwd.h"
|
||||
|
|
|
@ -7973,9 +7973,7 @@ nsLayoutUtils::GetContentViewerSize(nsPresContext* aPresContext,
|
|||
static bool
|
||||
UpdateCompositionBoundsForRCDRSF(ParentLayerRect& aCompBounds,
|
||||
nsPresContext* aPresContext,
|
||||
const nsRect& aFrameBounds,
|
||||
bool aScaleContentViewerSize,
|
||||
const LayoutDeviceToLayerScale2D& aCumulativeResolution)
|
||||
bool aScaleContentViewerSize)
|
||||
{
|
||||
nsIFrame* rootFrame = aPresContext->PresShell()->GetRootFrame();
|
||||
if (!rootFrame) {
|
||||
|
@ -8058,11 +8056,7 @@ nsLayoutUtils::CalculateCompositionSizeForFrame(nsIFrame* aFrame, bool aSubtract
|
|||
&& aFrame == presShell->GetRootScrollFrame();
|
||||
if (isRootContentDocRootScrollFrame) {
|
||||
ParentLayerRect compBounds;
|
||||
LayoutDeviceToLayerScale2D cumulativeResolution(
|
||||
presShell->GetCumulativeResolution()
|
||||
* nsLayoutUtils::GetTransformToAncestorScale(aFrame));
|
||||
if (UpdateCompositionBoundsForRCDRSF(compBounds, presContext, rect,
|
||||
false, cumulativeResolution)) {
|
||||
if (UpdateCompositionBoundsForRCDRSF(compBounds, presContext, false)) {
|
||||
int32_t auPerDevPixel = presContext->AppUnitsPerDevPixel();
|
||||
size = nsSize(compBounds.width * auPerDevPixel, compBounds.height * auPerDevPixel);
|
||||
}
|
||||
|
@ -8104,8 +8098,7 @@ nsLayoutUtils::CalculateRootCompositionSize(nsIFrame* aFrame,
|
|||
rootPresShell->GetCumulativeResolution()
|
||||
* nsLayoutUtils::GetTransformToAncestorScale(rootFrame));
|
||||
ParentLayerRect compBounds;
|
||||
if (UpdateCompositionBoundsForRCDRSF(compBounds, rootPresContext,
|
||||
rootFrame->GetRect(), true, cumulativeResolution)) {
|
||||
if (UpdateCompositionBoundsForRCDRSF(compBounds, rootPresContext, true)) {
|
||||
rootCompositionSize = ViewAs<ScreenPixel>(compBounds.Size(),
|
||||
PixelCastJustification::ScreenIsParentLayerForRoot);
|
||||
} else {
|
||||
|
@ -8639,8 +8632,7 @@ nsLayoutUtils::ComputeFrameMetrics(nsIFrame* aForFrame,
|
|||
bool isRootContentDocRootScrollFrame = isRootScrollFrame
|
||||
&& presContext->IsRootContentDocument();
|
||||
if (isRootContentDocRootScrollFrame) {
|
||||
UpdateCompositionBoundsForRCDRSF(frameBounds, presContext,
|
||||
compositionBounds, true, metrics.GetCumulativeResolution());
|
||||
UpdateCompositionBoundsForRCDRSF(frameBounds, presContext, true);
|
||||
}
|
||||
|
||||
nsMargin sizes = ScrollbarAreaToExcludeFromCompositionBoundsFor(aScrollFrame);
|
||||
|
|
|
@ -817,8 +817,7 @@ void
|
|||
PresShell::Init(nsIDocument* aDocument,
|
||||
nsPresContext* aPresContext,
|
||||
nsViewManager* aViewManager,
|
||||
nsStyleSet* aStyleSet,
|
||||
nsCompatibility aCompatMode)
|
||||
nsStyleSet* aStyleSet)
|
||||
{
|
||||
NS_PRECONDITION(aDocument, "null ptr");
|
||||
NS_PRECONDITION(aPresContext, "null ptr");
|
||||
|
|
|
@ -79,8 +79,7 @@ public:
|
|||
static bool BeforeAfterKeyboardEventEnabled();
|
||||
|
||||
void Init(nsIDocument* aDocument, nsPresContext* aPresContext,
|
||||
nsViewManager* aViewManager, nsStyleSet* aStyleSet,
|
||||
nsCompatibility aCompatMode);
|
||||
nsViewManager* aViewManager, nsStyleSet* aStyleSet);
|
||||
virtual void Destroy() override;
|
||||
virtual void MakeZombie() override;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче