Open Bug 2002789 Opened 5 months ago Updated 3 months ago

Fix `AnchorPositioningUtils::GetScrollOffsetFor` and `GetOffsetToIgnoringScrolling` to handle sticky & chain-anchored frames

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Points:
5

Tracking

()

ASSIGNED

People

(Reporter: dshin, Assigned: dshin)

References

(Blocks 4 open bugs)

Details

See bug 1999954 for context - anchor position we resolve against have partial scroll offset taken into account, even though it's not supposed to, and as a result, it's impossible to properly apply scroll offsets for these frames right now.

Scroll offset computation in AnchorPositioningUtils::GetScrollOffsetFor currently does not have any special handling for these frames either, which will need to be added at the same time for a proper fix.

There may be some risk here to changing these functions since non-anchor code uses them.

(In reply to Jonathan Watt [:jwatt] from comment #1)

There may be some risk here to changing these functions since non-anchor code uses them.

You're right, regarding nsIFrame::GetOffsetToIgnoringScrolling. It may be worth hacking around nsIFrame::GetPositionIgnoringScrolling and nsIFrame::GetPositionOfChildIgnoringScrolling to return normal position for sticky & chained anchors, and see what breaks (Aside from anchor positioning scroll offset, which is expected to break)

Blocks: 2003516
See Also: → 2004627
Severity: -- → S3
Blocks: 2005455
Whiteboard: [anchorpositioning:triage] → [anchorpositioning:triage][anchorpositioning:continuation]
Whiteboard: [anchorpositioning:triage][anchorpositioning:continuation] → [anchorpositioning:continuation]
Points: --- → 5
Assignee: nobody → dshin
Status: NEW → ASSIGNED
Whiteboard: [anchorpositioning:continuation]
Blocks: 2014379
You need to log in before you can comment on or make changes to this bug.