Closed Bug 1627314 Opened 5 years ago Closed 5 years ago

Remove Layer::GetIsStickyPosition

Categories

(Core :: Graphics: Layers, task, P3)

task

Tracking

()

RESOLVED WONTFIX

People

(Reporter: kats, Assigned: kats)

References

Details

https://searchfox.org/mozilla-central/rev/064b0f9501ad76802853b43f18e33d8713fd54d3/gfx/layers/Layers.h#1385 is not really needed, we can have GetStickyScrollContainerId() return NULL_SCROLL_ID instead and use that to check.

Spinoff from https://phabricator.services.mozilla.com/D69554#2113600

Doing this makes things slightly less clean, actually. It means we're effectively pushing the "is sticky" check down inside the SimpleLayerAttributes functions and so don't have to do it any of the call sites. But the GetStickyScrollRange* methods return a const LayerRectAbsolute& here and if they are called unconditionally they need to be able to return an empty rect (via the static const LayerRectAbsolute empty; return empty ugliness). And the caller sites in LayerMetricsWrapper would also need to keep their own return empty; for the case where AtBottomLayer() is false. So we'd be propagating this return empty; stuff further which I think is undesirable.

The other option is to make mStickyPositionData not a Maybe so that it has empty rects to return if needed.

I'm fine with not doing anything here if it's not going to make things particularly cleaner.

Ok, let's just leave it. In the distant future once WR is everywhere this will go away on its own.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.