Closed Bug 841261 Opened 11 years ago Closed 11 years ago

nsFrameIterator constructor should use init list to initialize its variables

Categories

(Core :: Layout, defect)

defect
Not set
trivial

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: dholbert, Assigned: dholbert)

Details

Attachments

(1 file)

https://mxr.mozilla.org/mozilla-central/source/layout/base/nsFrameTraversal.cpp#186

The nsFrameIterator constructor should use an init list instead of assignments in the constructor.
Attached patch fixSplinter Review
NOTES:

I moved this reassignment...
  aStart = nsPlaceholderFrame::GetRealFrameFor(aStart);
...up one level, so that we don't have to worry about fixing up aStart in the constructor.  (And I added an assertion in the constructor to verify that this has been done.)

I also marked a bunch of member-vars as 'const' (which we can do now that they're set via the init list), and removed two unused setters (since I've now marked the variable they attempt to set as being const).
Attachment #713764 - Flags: review?(matspal)
This doesn't bitrot bug 242829's patch, BTW -- MQ still happily applies it (with a mention that it's used fuzz 1 to do so).
Attachment #713764 - Flags: review?(matspal) → review+
https://hg.mozilla.org/mozilla-central/rev/4e92ba60695d
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: