Closed Bug 1400421 Opened 7 years ago Closed 7 years ago

nsLeafFrame::Reflow / DoReflow seem to be dead code and want to be deleted

Categories

(Core :: Layout, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: dholbert, Assigned: dholbert)

Details

Attachments

(2 files)

nsLeafFrame (an abstract superclass for some non-container frames) has its own override of nsIFrame::Reflow. It also adds a virtual helper function "DoReflow", which its Reflow implementation calls (and is the only caller of).


However, it seems both of these are effectively unused!
 * Firstly, no subclasses override ::DoReflow, as far as I can tell, so it has no reason to exist (it could conceptually be merged into Reflow).

 * More importantly: each subclass seems to provide its own Reflow impl, so nsLeafFrame's reflow method is just completely unused.  This means DoReflow is completely unused as well (on top of being needlessly virtual).

So, both methods are dead code and might as well just be deleted.
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Summary: nsLeafFrame::Reflow / DoReflow seem to be unused → nsLeafFrame::Reflow / DoReflow seem to be dead code and want to be deleted
Comment on attachment 8908862 [details]
Bug 1400421 part 1: Annotate class 'nsPageBreakFrame' as final, to reflect reality.

https://reviewboard.mozilla.org/r/180476/#review185734
Attachment #8908862 - Flags: review?(mats) → review+
Comment on attachment 8908863 [details]
Bug 1400421 part 2: Delete unused nsLeafFrame::Reflow override (and its DoReflow helper).

https://reviewboard.mozilla.org/r/180480/#review185736
Attachment #8908863 - Flags: review?(mats) → review+
Pushed by dholbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c20a1a0d01ff
part 1: Annotate class 'nsPageBreakFrame' as final, to reflect reality. r=mats
https://hg.mozilla.org/integration/autoland/rev/5393e4f98858
part 2: Delete unused nsLeafFrame::Reflow override (and its DoReflow helper). r=mats
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: