Closed Bug 1523061 Opened 5 years ago Closed 5 years ago

Simplify nsIFrame::ListTag() APIs

Categories

(Core :: Layout, enhancement, P4)

enhancement

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

Details

Attachments

(3 files)

There are six different nsIFrame::ListTag() APIs [1], and it's often confusing which one to use.

I'd like to trim it off to two APIs: void ListTag(FILE* out) const and nsAutoCString ListTag() const.

[1] https://searchfox.org/mozilla-central/rev/465dbfe030dfec7756b9b523029e90d48dd5ecce/layout/generic/nsIFrame.h#4531-4532,4537,4542-4543,4548

There are three different APIs that serve similar purpose. Keeping only
one is sufficient.

Many of the modifications are guarded by #ifdefs. I verify them locally
by manually define them in nsBlockDebugFlags.h and nsLinelayout.cpp.

Note that I replace ""mFrame by frame in some place in
NOISY_BLOCK_DIR_MARGINS in nsBlockFrame.cpp because they were incorrect
renamed in Bug 1277129 Part 6a.
https://hg.mozilla.org/mozilla-central/rev/a70b04f074fc

Depends on D17732

We can replace it by a simple for-loop. If we want to print not only the
tag, but the detailed frame information, we can use nsFrameList::List().

Depends on D17733

Pushed by aethanyc@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/a9804b2eca4a
Part 1 - Remove two nsIFrame::ListTag() methods that retrieve frame tag in a string. r=dholbert
https://hg.mozilla.org/integration/autoland/rev/3fd657e4aea9
Part 2 - Remove static ListTag(FILE*, const nsIFrame*). r=dholbert
https://hg.mozilla.org/integration/autoland/rev/acdd17a4329e
Part 3 - Remove ListTag() that prints frame tag in a frame list. r=dholbert
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: