Remove Layer::GetIsStickyPosition
Categories
(Core :: Graphics: Layers, task, P3)
Tracking
()
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
Assignee | ||
Comment 1•5 years ago
|
||
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.
Comment 2•5 years ago
|
||
I'm fine with not doing anything here if it's not going to make things particularly cleaner.
Assignee | ||
Comment 3•5 years ago
|
||
Ok, let's just leave it. In the distant future once WR is everywhere this will go away on its own.
Description
•