Bug 1554499 - Remove member variables that were previously only used to calculate per frame index r=mattwoodrow

Depends on D50185

Differential Revision: https://phabricator.services.mozilla.com/D50186

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Miko Mynttinen 2019-11-05 15:10:20 +00:00
Родитель a131671571
Коммит f8659a8bef
5 изменённых файлов: 18 добавлений и 60 удалений

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

@ -157,8 +157,7 @@ class nsDisplayTextOverflowMarker final : public nsPaintedDisplayItem {
: nsPaintedDisplayItem(aBuilder, aFrame),
mRect(aRect),
mStyle(aStyle),
mAscent(aAscent),
mIndex((aLineNumber << 1) + aIndex) {
mAscent(aAscent) {
MOZ_COUNT_CTOR(nsDisplayTextOverflowMarker);
}
@ -214,7 +213,6 @@ class nsDisplayTextOverflowMarker final : public nsPaintedDisplayItem {
nsRect mRect; // in reference frame coordinates
const StyleTextOverflowSide mStyle;
nscoord mAscent; // baseline for the marker text in mRect
uint16_t mIndex;
};
static void PaintTextShadowCallback(gfxContext* aCtx, nsPoint aShadowOffset,

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

@ -1720,7 +1720,6 @@ class nsDisplayMathMLCharForeground final : public nsPaintedDisplayItem {
uint16_t aIndex, bool aIsSelected)
: nsPaintedDisplayItem(aBuilder, aFrame),
mChar(aChar),
mIndex(aIndex),
mIsSelected(aIsSelected) {
MOZ_COUNT_CTOR(nsDisplayMathMLCharForeground);
}
@ -1768,7 +1767,6 @@ class nsDisplayMathMLCharForeground final : public nsPaintedDisplayItem {
private:
nsMathMLChar* mChar;
uint16_t mIndex;
bool mIsSelected;
};

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

@ -304,7 +304,7 @@ class nsDisplayMathMLBar final : public nsPaintedDisplayItem {
public:
nsDisplayMathMLBar(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
const nsRect& aRect, uint16_t aIndex)
: nsPaintedDisplayItem(aBuilder, aFrame), mRect(aRect), mIndex(aIndex) {
: nsPaintedDisplayItem(aBuilder, aFrame), mRect(aRect) {
MOZ_COUNT_CTOR(nsDisplayMathMLBar);
}
@ -323,7 +323,6 @@ class nsDisplayMathMLBar final : public nsPaintedDisplayItem {
NS_DISPLAY_DECL_NAME("MathMLBar", TYPE_MATHML_BAR)
private:
nsRect mRect;
uint16_t mIndex;
};
void nsDisplayMathMLBar::Paint(nsDisplayListBuilder* aBuilder,

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

@ -4928,8 +4928,7 @@ nsDisplayTableBackgroundImage::nsDisplayTableBackgroundImage(
nsDisplayListBuilder* aBuilder, nsIFrame* aFrame, const InitData& aData,
nsIFrame* aCellFrame)
: nsDisplayBackgroundImage(aBuilder, aFrame, aData, aCellFrame),
mStyleFrame(aCellFrame),
mTableType(GetTableTypeFromFrame(mStyleFrame)) {
mStyleFrame(aCellFrame) {
if (aBuilder->IsRetainingDisplayList()) {
mStyleFrame->AddDisplayItem(this);
}
@ -5577,7 +5576,6 @@ nsDisplayCompositorHitTestInfo::nsDisplayCompositorHitTestInfo(
const mozilla::gfx::CompositorHitTestInfo& aHitTestFlags, uint16_t aIndex,
const mozilla::Maybe<nsRect>& aArea)
: nsDisplayHitTestInfoItem(aBuilder, aFrame),
mIndex(aIndex),
mAppUnitsPerDevPixel(mFrame->PresContext()->AppUnitsPerDevPixel()) {
MOZ_COUNT_CTOR(nsDisplayCompositorHitTestInfo);
// We should never even create this display item if we're not building
@ -5605,7 +5603,6 @@ nsDisplayCompositorHitTestInfo::nsDisplayCompositorHitTestInfo(
nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
mozilla::UniquePtr<HitTestInfo>&& aHitTestInfo)
: nsDisplayHitTestInfoItem(aBuilder, aFrame),
mIndex(0),
mAppUnitsPerDevPixel(mFrame->PresContext()->AppUnitsPerDevPixel()) {
MOZ_COUNT_CTOR(nsDisplayCompositorHitTestInfo);
SetHitTestInfo(std::move(aHitTestInfo));
@ -6210,7 +6207,6 @@ nsDisplayWrapList::nsDisplayWrapList(
: nsDisplayHitTestInfoItem(aBuilder, aFrame, aActiveScrolledRoot),
mFrameActiveScrolledRoot(aBuilder->CurrentActiveScrolledRoot()),
mOverrideZIndex(0),
mIndex(aIndex),
mHasZIndexOverride(false),
mClearingClipChain(aClearClipChain) {
MOZ_COUNT_CTOR(nsDisplayWrapList);
@ -6254,7 +6250,6 @@ nsDisplayWrapList::nsDisplayWrapList(nsDisplayListBuilder* aBuilder,
: nsDisplayHitTestInfoItem(aBuilder, aFrame,
aBuilder->CurrentActiveScrolledRoot()),
mOverrideZIndex(0),
mIndex(0),
mHasZIndexOverride(false) {
MOZ_COUNT_CTOR(nsDisplayWrapList);
@ -6812,7 +6807,7 @@ nsDisplayBlendMode::nsDisplayBlendMode(
uint16_t aIndex)
: nsDisplayWrapList(aBuilder, aFrame, aList, aActiveScrolledRoot, true),
mBlendMode(aBlendMode),
mIndex(aIndex) {
mIsBackgroundBlendMode(aIndex != 0) {
MOZ_COUNT_CTOR(nsDisplayBlendMode);
}
@ -6894,7 +6889,7 @@ bool nsDisplayBlendMode::CanMerge(const nsDisplayItem* aItem) const {
const nsDisplayBlendMode* item =
static_cast<const nsDisplayBlendMode*>(aItem);
if (item->mIndex != 0 || mIndex != 0) {
if (item->mIsBackgroundBlendMode || mIsBackgroundBlendMode) {
// Don't merge background-blend-mode items
return false;
}
@ -6988,8 +6983,7 @@ nsDisplayOwnLayer::nsDisplayOwnLayer(
mFlags(aFlags),
mScrollbarData(aScrollbarData),
mForceActive(aForceActive),
mWrAnimationId(0),
mIndex(aIndex) {
mWrAnimationId(0) {
MOZ_COUNT_CTOR(nsDisplayOwnLayer);
// For scroll thumb layers, override the AGR to be the thumb's AGR rather
@ -7449,7 +7443,6 @@ nsDisplayFixedPosition::nsDisplayFixedPosition(
const ActiveScrolledRoot* aContainerASR)
: nsDisplayOwnLayer(aBuilder, aFrame, aList, aActiveScrolledRoot),
mContainerASR(aContainerASR),
mIndex(0),
mIsFixedBackground(false) {
MOZ_COUNT_CTOR(nsDisplayFixedPosition);
Init(aBuilder);
@ -7462,7 +7455,6 @@ nsDisplayFixedPosition::nsDisplayFixedPosition(nsDisplayListBuilder* aBuilder,
: nsDisplayOwnLayer(aBuilder, aFrame, aList,
aBuilder->CurrentActiveScrolledRoot()),
mContainerASR(nullptr), // XXX maybe this should be something?
mIndex(aIndex),
mIsFixedBackground(true) {
MOZ_COUNT_CTOR(nsDisplayFixedPosition);
Init(aBuilder);
@ -7598,8 +7590,7 @@ nsDisplayTableFixedPosition::nsDisplayTableFixedPosition(
nsDisplayListBuilder* aBuilder, nsIFrame* aFrame, nsDisplayList* aList,
uint16_t aIndex, nsIFrame* aAncestorFrame)
: nsDisplayFixedPosition(aBuilder, aFrame, aList, aIndex),
mAncestorFrame(aAncestorFrame),
mTableType(GetTableTypeFromFrame(aAncestorFrame)) {
mAncestorFrame(aAncestorFrame) {
if (aBuilder->IsRetainingDisplayList()) {
mAncestorFrame->AddDisplayItem(this);
}
@ -8081,7 +8072,6 @@ nsDisplayTransform::nsDisplayTransform(nsDisplayListBuilder* aBuilder,
mAnimatedGeometryRootForChildren(mAnimatedGeometryRoot),
mAnimatedGeometryRootForScrollMetadata(mAnimatedGeometryRoot),
mChildrenBuildingRect(aChildrenBuildingRect),
mIndex(aIndex),
mIsTransformSeparator(true),
mAllowAsyncAnimation(false) {
MOZ_COUNT_CTOR(nsDisplayTransform);
@ -8099,7 +8089,6 @@ nsDisplayTransform::nsDisplayTransform(nsDisplayListBuilder* aBuilder,
mAnimatedGeometryRootForChildren(mAnimatedGeometryRoot),
mAnimatedGeometryRootForScrollMetadata(mAnimatedGeometryRoot),
mChildrenBuildingRect(aChildrenBuildingRect),
mIndex(aIndex),
mIsTransformSeparator(false),
mAllowAsyncAnimation(aAllowAsyncAnimation) {
MOZ_COUNT_CTOR(nsDisplayTransform);
@ -8117,7 +8106,6 @@ nsDisplayTransform::nsDisplayTransform(
mAnimatedGeometryRootForChildren(mAnimatedGeometryRoot),
mAnimatedGeometryRootForScrollMetadata(mAnimatedGeometryRoot),
mChildrenBuildingRect(aChildrenBuildingRect),
mIndex(aIndex),
mIsTransformSeparator(false),
mAllowAsyncAnimation(false) {
MOZ_COUNT_CTOR(nsDisplayTransform);

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

@ -4406,9 +4406,7 @@ class nsDisplaySolidColor : public nsDisplaySolidColorBase {
nsDisplaySolidColor(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
const nsRect& aBounds, nscolor aColor,
uint16_t aIndex = 0, bool aCanBeReused = true)
: nsDisplaySolidColorBase(aBuilder, aFrame, aColor),
mBounds(aBounds),
mIndex(aIndex) {
: nsDisplaySolidColorBase(aBuilder, aFrame, aColor), mBounds(aBounds) {
NS_ASSERTION(NS_GET_A(aColor) > 0,
"Don't create invisible nsDisplaySolidColors!");
MOZ_COUNT_CTOR(nsDisplaySolidColor);
@ -4468,7 +4466,6 @@ class nsDisplaySolidColor : public nsDisplaySolidColorBase {
private:
nsRect mBounds;
mozilla::Maybe<int32_t> mOverrideZIndex;
const uint16_t mIndex;
};
/**
@ -4792,7 +4789,6 @@ class nsDisplayTableBackgroundImage : public nsDisplayBackgroundImage {
nsIFrame* StyleFrame() const override { return mStyleFrame; }
nsIFrame* mStyleFrame;
TableType mTableType;
};
/**
@ -4885,8 +4881,7 @@ class nsDisplayTableThemedBackground : public nsDisplayThemedBackground {
const nsRect& aBackgroundRect,
nsIFrame* aAncestorFrame)
: nsDisplayThemedBackground(aBuilder, aFrame, aBackgroundRect),
mAncestorFrame(aAncestorFrame),
mTableType(GetTableTypeFromFrame(aAncestorFrame)) {
mAncestorFrame(aAncestorFrame) {
if (aBuilder->IsRetainingDisplayList()) {
mAncestorFrame->AddDisplayItem(this);
}
@ -4922,7 +4917,6 @@ class nsDisplayTableThemedBackground : public nsDisplayThemedBackground {
protected:
nsIFrame* StyleFrame() const override { return mAncestorFrame; }
nsIFrame* mAncestorFrame;
TableType mTableType;
};
class nsDisplayBackgroundColor : public nsPaintedDisplayItem {
@ -5072,8 +5066,7 @@ class nsDisplayTableBackgroundColor : public nsDisplayBackgroundColor {
const nscolor& aColor, nsIFrame* aAncestorFrame)
: nsDisplayBackgroundColor(aBuilder, aFrame, aBackgroundRect,
aBackgroundStyle, aColor),
mAncestorFrame(aAncestorFrame),
mTableType(GetTableTypeFromFrame(aAncestorFrame)) {
mAncestorFrame(aAncestorFrame) {
if (aBuilder->IsRetainingDisplayList()) {
mAncestorFrame->AddDisplayItem(this);
}
@ -5112,7 +5105,6 @@ class nsDisplayTableBackgroundColor : public nsDisplayBackgroundColor {
protected:
nsIFrame* mAncestorFrame;
TableType mTableType;
};
class nsDisplayClearBackground : public nsPaintedDisplayItem {
@ -5406,7 +5398,6 @@ class nsDisplayCompositorHitTestInfo : public nsDisplayHitTestInfoItem {
private:
mozilla::Maybe<mozilla::layers::ScrollableLayerGuid::ViewID> mScrollTarget;
uint16_t mIndex;
mozilla::Maybe<int32_t> mOverrideZIndex;
int32_t mAppUnitsPerDevPixel;
};
@ -5467,7 +5458,6 @@ class nsDisplayWrapList : public nsDisplayHitTestInfoItem {
: nsDisplayHitTestInfoItem(aBuilder, aFrame),
mFrameActiveScrolledRoot(aBuilder->CurrentActiveScrolledRoot()),
mOverrideZIndex(0),
mIndex(0),
mHasZIndexOverride(false) {
MOZ_COUNT_CTOR(nsDisplayWrapList);
mBaseBuildingRect = GetBuildingRect();
@ -5496,7 +5486,6 @@ class nsDisplayWrapList : public nsDisplayHitTestInfoItem {
mBounds(aOther.mBounds),
mBaseBuildingRect(aOther.mBaseBuildingRect),
mOverrideZIndex(aOther.mOverrideZIndex),
mIndex(aOther.mIndex),
mHasZIndexOverride(aOther.mHasZIndexOverride),
mClearingClipChain(aOther.mClearingClipChain) {
MOZ_COUNT_CTOR(nsDisplayWrapList);
@ -5690,7 +5679,6 @@ class nsDisplayWrapList : public nsDisplayHitTestInfoItem {
// Our mBuildingRect may include the visible areas of children.
nsRect mBaseBuildingRect;
int32_t mOverrideZIndex;
uint16_t mIndex;
bool mHasZIndexOverride;
bool mClearingClipChain = false;
@ -5881,7 +5869,7 @@ class nsDisplayBlendMode : public nsDisplayWrapList {
const nsDisplayBlendMode& aOther)
: nsDisplayWrapList(aBuilder, aOther),
mBlendMode(aOther.mBlendMode),
mIndex(aOther.mIndex) {
mIsBackgroundBlendMode(aOther.mIsBackgroundBlendMode) {
MOZ_COUNT_CTOR(nsDisplayBlendMode);
}
@ -5925,7 +5913,7 @@ class nsDisplayBlendMode : public nsDisplayWrapList {
protected:
uint8_t mBlendMode;
uint16_t mIndex;
bool mIsBackgroundBlendMode;
private:
NS_DISPLAY_ALLOW_CLONING()
@ -5939,8 +5927,7 @@ class nsDisplayTableBlendMode : public nsDisplayBlendMode {
uint16_t aIndex, nsIFrame* aAncestorFrame)
: nsDisplayBlendMode(aBuilder, aFrame, aList, aBlendMode,
aActiveScrolledRoot, aIndex),
mAncestorFrame(aAncestorFrame),
mTableType(GetTableTypeFromFrame(aAncestorFrame)) {
mAncestorFrame(aAncestorFrame) {
if (aBuilder->IsRetainingDisplayList()) {
mAncestorFrame->AddDisplayItem(this);
}
@ -5958,8 +5945,7 @@ class nsDisplayTableBlendMode : public nsDisplayBlendMode {
nsDisplayTableBlendMode(nsDisplayListBuilder* aBuilder,
const nsDisplayTableBlendMode& aOther)
: nsDisplayBlendMode(aBuilder, aOther),
mAncestorFrame(aOther.mAncestorFrame),
mTableType(aOther.mTableType) {
mAncestorFrame(aOther.mAncestorFrame) {
if (aBuilder->IsRetainingDisplayList()) {
mAncestorFrame->AddDisplayItem(this);
}
@ -5985,7 +5971,6 @@ class nsDisplayTableBlendMode : public nsDisplayBlendMode {
protected:
nsIFrame* mAncestorFrame;
TableType mTableType;
private:
NS_DISPLAY_ALLOW_CLONING()
@ -6089,8 +6074,7 @@ class nsDisplayTableBlendContainer : public nsDisplayBlendContainer {
bool aIsForBackground, nsIFrame* aAncestorFrame)
: nsDisplayBlendContainer(aBuilder, aFrame, aList, aActiveScrolledRoot,
aIsForBackground),
mAncestorFrame(aAncestorFrame),
mTableType(GetTableTypeFromFrame(aAncestorFrame)) {
mAncestorFrame(aAncestorFrame) {
if (aBuilder->IsRetainingDisplayList()) {
mAncestorFrame->AddDisplayItem(this);
}
@ -6107,8 +6091,7 @@ class nsDisplayTableBlendContainer : public nsDisplayBlendContainer {
nsDisplayTableBlendContainer(nsDisplayListBuilder* aBuilder,
const nsDisplayTableBlendContainer& aOther)
: nsDisplayBlendContainer(aBuilder, aOther),
mAncestorFrame(aOther.mAncestorFrame),
mTableType(aOther.mTableType) {}
mAncestorFrame(aOther.mAncestorFrame) {}
~nsDisplayTableBlendContainer() override {
if (mAncestorFrame) {
@ -6117,7 +6100,6 @@ class nsDisplayTableBlendContainer : public nsDisplayBlendContainer {
}
nsIFrame* mAncestorFrame;
TableType mTableType;
private:
NS_DISPLAY_ALLOW_CLONING()
@ -6190,8 +6172,7 @@ class nsDisplayOwnLayer : public nsDisplayWrapList {
mFlags(aOther.mFlags),
mScrollbarData(aOther.mScrollbarData),
mForceActive(aOther.mForceActive),
mWrAnimationId(aOther.mWrAnimationId),
mIndex(aOther.mIndex) {
mWrAnimationId(aOther.mWrAnimationId) {
MOZ_COUNT_CTOR(nsDisplayOwnLayer);
}
@ -6245,7 +6226,6 @@ class nsDisplayOwnLayer : public nsDisplayWrapList {
ScrollbarData mScrollbarData;
bool mForceActive;
uint64_t mWrAnimationId;
uint16_t mIndex;
};
class nsDisplayRenderRoot : public nsDisplayWrapList {
@ -6469,7 +6449,6 @@ class nsDisplayFixedPosition : public nsDisplayOwnLayer {
mAnimatedGeometryRootForScrollMetadata(
aOther.mAnimatedGeometryRootForScrollMetadata),
mContainerASR(aOther.mContainerASR),
mIndex(aOther.mIndex),
mIsFixedBackground(aOther.mIsFixedBackground) {
MOZ_COUNT_CTOR(nsDisplayFixedPosition);
}
@ -6530,7 +6509,6 @@ class nsDisplayFixedPosition : public nsDisplayOwnLayer {
RefPtr<AnimatedGeometryRoot> mAnimatedGeometryRootForScrollMetadata;
RefPtr<const ActiveScrolledRoot> mContainerASR;
uint16_t mIndex;
bool mIsFixedBackground;
private:
@ -6573,8 +6551,7 @@ class nsDisplayTableFixedPosition : public nsDisplayFixedPosition {
nsDisplayTableFixedPosition(nsDisplayListBuilder* aBuilder,
const nsDisplayTableFixedPosition& aOther)
: nsDisplayFixedPosition(aBuilder, aOther),
mAncestorFrame(aOther.mAncestorFrame),
mTableType(aOther.mTableType) {}
mAncestorFrame(aOther.mAncestorFrame) {}
~nsDisplayTableFixedPosition() override {
if (mAncestorFrame) {
@ -6583,7 +6560,6 @@ class nsDisplayTableFixedPosition : public nsDisplayFixedPosition {
}
nsIFrame* mAncestorFrame;
TableType mTableType;
private:
NS_DISPLAY_ALLOW_CLONING()
@ -7464,7 +7440,6 @@ class nsDisplayTransform : public nsDisplayHitTestInfoItem {
RefPtr<AnimatedGeometryRoot> mAnimatedGeometryRootForScrollMetadata;
nsRect mChildrenBuildingRect;
mutable RetainedDisplayList mChildren;
uint16_t mIndex;
// The untransformed bounds of |mChildren|.
nsRect mChildBounds;