Closed Bug 1902542 Opened 4 months ago Closed 4 months ago

Clean up for block frame state bits and pushed floats APIs

Categories

(Core :: Layout: Block and Inline, task)

task

Tracking

()

RESOLVED FIXED
129 Branch
Tracking Status
firefox129 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

References

Details

Attachments

(5 files)

See patches for details.

  • Remove "FRAME" for nsBlockFrame state bits for the consistency with other bits.

  • Use helpers instead of checking state bits if possible.

  • Tweak one line documentation to use C++ comment style.

  • Move GetMarker() to protected section because it is used only internally.

Assignee: nobody → aethanyc
Status: NEW → ASSIGNED

Remove "FRAME" for the bit for the consistency with other bits.

Add an "s" to PushedFloatsProperty() to match the state bit.

Rename RemovePushedFloats() to StealPushedFloats() to match other APIs that
take the ownership of a frame list.
https://searchfox.org/mozilla-central/rev/4c8627a76e2e0a9b49c2b673424da478e08715ad/layout/generic/nsContainerFrame.h#598-612

BlockReflowState::mPushedFloats is a pointer to mBlock's pushed floats
list. However, it is only used in AppendPushedFloatChain(). We can just get
the pushed floats list directly.

This is a preparation for the next part that removes a possible scenario where
mPushedFloats can point to a removed pushed floats list.

Pushed by aethanyc@gmail.com: https://hg.mozilla.org/integration/autoland/rev/ab75f4e2495a Part 1 - Clean up nsBlockFrame's helper and state bits related to ::marker. r=layout-reviewers,emilio https://hg.mozilla.org/integration/autoland/rev/25939bb1973a Part 2 - Clean up another nsBlockFrame's state bit related to cached intrinsic. r=layout-reviewers,emilio https://hg.mozilla.org/integration/autoland/rev/a5330ec7bab2 Part 3 - Clean up nsBlockFrame's pushed floats handling. r=layout-reviewers,emilio https://hg.mozilla.org/integration/autoland/rev/b945d8bf8dd9 Part 4 - Remove BlockReflowState::mPushedFloats and related APIs. r=layout-reviewers,emilio https://hg.mozilla.org/integration/autoland/rev/52a9610fc9f2 Part 5 - Delete empty pushed floats list in nsBlockFrame::RemoveFloat(). r=layout-reviewers,emilio
Blocks: 1903141
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: