Closed Bug 1642038 Opened 4 years ago Closed 4 years ago

Improve APIs related to manipulating overflow list and nsFrameList

Categories

(Core :: Layout, task)

task

Tracking

()

RESOLVED FIXED
mozilla79
Tracking Status
firefox79 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

References

Details

Attachments

(3 files)

Punt some clean up patches here before fixing bug 1641085.

SetOverflowFrames() is simplified a bit. Other methods are moved
verbatim.

StealOverflowFrames() and RemovePropTableFrames() use TakeProperty() to
remove the property, and transfer the ownership to the caller. Since
TakeProperty() is already marked as [[nodiscard]], so should they.

Depends on D77566

AutoFrameListPtr might be used more frequently after we add more APIs to
handle overflow container list and excess overflow container list in
bug 1641085.

The improvements in this patch includes:

  • Change the constructor to take PresShell instead of PresContext since
    the destructor really needs PresShell and it's easy to get PresShell
    from the callers.
  • Mark AutoFrameListPtr as MOZ_RAII and final class.
  • Move AutoFrameListPtr into mozilla namespace since we don't use layout
    sub-namespace that much these days.

Depends on D77567

Summary: Improve APIs related to manipulating oveflow list and nsFrameList → Improve APIs related to manipulating overflow list and nsFrameList
Attachment #9152905 - Attachment description: Bug 1642038 Part 3 - Improve AutoFrameListPtr's implementation. → Bug 1642038 Part 3 - Minor cleanup for AutoFrameListPtr.
Pushed by aethanyc@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/e9155daf732b
Part 1 - Move the definition of helpers manipulating overflow list to their declarations. r=emilio
https://hg.mozilla.org/integration/autoland/rev/ea0b7069e9ad
Part 2 - Mark [[nodiscard]] for StealOverflowFrames() and RemovePropTableFrames(). r=emilio
https://hg.mozilla.org/integration/autoland/rev/193f658993bd
Part 3 - Minor cleanup for AutoFrameListPtr. r=mats
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla79
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: