Skip to content

Commit ade1ae7

Browse files
committedDec 7, 2024
Bug 1933423. Remove some unused fixed position display list code. r=jwatt
Only related in theme to this bug, but needed a place to put this cleanup. Differential Revision: https://phabricator.services.mozilla.com/D230242
1 parent ede7c3b commit ade1ae7

File tree

2 files changed

+2
-20
lines changed

2 files changed

+2
-20
lines changed
 

‎layout/painting/nsDisplayList.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -2904,8 +2904,7 @@ nsDisplayBackgroundImage::nsDisplayBackgroundImage(
29042904
mFillRect(aInitData.fillArea),
29052905
mDestRect(aInitData.destArea),
29062906
mLayer(aInitData.layer),
2907-
mIsRasterImage(aInitData.isRasterImage),
2908-
mShouldFixToViewport(aInitData.shouldFixToViewport) {
2907+
mIsRasterImage(aInitData.isRasterImage) {
29092908
MOZ_COUNT_CTOR(nsDisplayBackgroundImage);
29102909
#ifdef DEBUG
29112910
if (mBackgroundStyle && mBackgroundStyle != mFrame->Style()) {
@@ -2916,7 +2915,7 @@ nsDisplayBackgroundImage::nsDisplayBackgroundImage(
29162915
#endif
29172916

29182917
mBounds = GetBoundsInternal(aInitData.builder, aFrameForBounds);
2919-
if (mShouldFixToViewport) {
2918+
if (aInitData.shouldFixToViewport) {
29202919
// Expand the item's visible rect to cover the entire bounds, limited to the
29212920
// viewport rect. This is necessary because the background's clip can move
29222921
// asynchronously.

‎layout/painting/nsDisplayList.h

-17
Original file line numberDiff line numberDiff line change
@@ -2534,14 +2534,6 @@ class nsDisplayItem {
25342534
return Nothing();
25352535
}
25362536

2537-
/**
2538-
* @return true if the contents of this item are rendered fixed relative
2539-
* to the nearest viewport.
2540-
*/
2541-
virtual bool ShouldFixToViewport(nsDisplayListBuilder* aBuilder) const {
2542-
return false;
2543-
}
2544-
25452537
/**
25462538
* Returns true if all layers that can be active should be forced to be
25472539
* active. Requires setting the pref layers.force-active=true.
@@ -4195,9 +4187,6 @@ class nsDisplayBackgroundImage : public nsPaintedDisplayItem {
41954187
void ComputeInvalidationRegion(nsDisplayListBuilder* aBuilder,
41964188
const nsDisplayItemGeometry* aGeometry,
41974189
nsRegion* aInvalidRegion) const override;
4198-
bool ShouldFixToViewport(nsDisplayListBuilder* aBuilder) const override {
4199-
return mShouldFixToViewport;
4200-
}
42014190

42024191
nsRect GetDestRect() const { return mDestRect; }
42034192

@@ -4249,8 +4238,6 @@ class nsDisplayBackgroundImage : public nsPaintedDisplayItem {
42494238
nsRect mBounds;
42504239
uint16_t mLayer;
42514240
bool mIsRasterImage;
4252-
/* Whether the image should be treated as fixed to the viewport. */
4253-
bool mShouldFixToViewport;
42544241
};
42554242

42564243
/**
@@ -5660,10 +5647,6 @@ class nsDisplayFixedPosition : public nsDisplayOwnLayer {
56605647
mFrame->PresContext()->AppUnitsPerDevPixel());
56615648
}
56625649

5663-
bool ShouldFixToViewport(nsDisplayListBuilder* aBuilder) const override {
5664-
return mIsFixedBackground;
5665-
}
5666-
56675650
bool CreateWebRenderCommands(
56685651
wr::DisplayListBuilder& aBuilder, wr::IpcResourceUpdateQueue& aResources,
56695652
const StackingContextHelper& aSc,

0 commit comments

Comments
 (0)
Failed to load comments.