Bug 1923763: Part 5 - Replace inset evaluations with anchor-resolved inset evaluations. r=layout-reviewers,emilio

Differential Revision: https://phabricator.services.mozilla.com/D231259
This commit is contained in:
David Shin
2025-01-21 15:11:25 +00:00
parent 7e571d68da
commit 3d615cb7f6
16 changed files with 211 additions and 138 deletions

View File

@@ -3793,8 +3793,10 @@ bool PresShell::ScrollFrameIntoView(
// If we're targetting a sticky element, make sure not to apply
// scroll-padding on the direction we're stuck.
const auto* stylePosition = aFrame->StylePosition();
const auto positionProperty = aFrame->StyleDisplay()->mPosition;
for (auto side : AllPhysicalSides()) {
if (stylePosition->GetInset(side).IsAuto()) {
if (stylePosition->GetAnchorResolvedInset(side, positionProperty)
.IsAuto()) {
continue;
}
// See if this axis is stuck.