Skip to content

Commit 342427d

Browse files
committedDec 7, 2024
Bug 1933423. Only create nsDisplayFixedPosition if painting to the window. r=botond
The only thing that useFixedPosition controls is whether we create a nsDisplayFixedPosition item. The only things that nsDisplayFixedPosition does different are things that only affect painting to the window (CreateWebRenderCommands, UpdateScrollData, ShouldGetFixedAnimationId). I don't think this causes any behaviour difference, but we only need a nsDisplayFixedPosition item if we are painting to the window. Differential Revision: https://phabricator.services.mozilla.com/D230243
1 parent ade1ae7 commit 342427d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
 

‎layout/generic/nsIFrame.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -3335,6 +3335,7 @@ void nsIFrame::BuildDisplayListForStackingContext(
33353335

33363336
bool useFixedPosition =
33373337
disp->mPosition == StylePositionProperty::Fixed &&
3338+
aBuilder->IsPaintingToWindow() &&
33383339
(DisplayPortUtils::IsFixedPosFrameInDisplayPort(this) ||
33393340
BuilderHasScrolledClip(aBuilder));
33403341

0 commit comments

Comments
 (0)
Failed to load comments.