Closed Bug 837000 Opened 11 years ago Closed 11 years ago

Remove nsBlockReflowState.h's #include of nsBlockFrame.h

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: dholbert, Assigned: dholbert)

Details

Attachments

(1 file)

Noticed that nsBlockReflowState.h has an essentially-unnecessary "#include nsBlockFrame.h". Filing this bug on removing it, and fixing the collateral damage.
Attached patch fix v1Splinter Review
Changes in this patch:
 a) Move nsBlockReflowState.cpp's #include of its own header to the top, to be sure its header compiles on its own.

 b) Move the nsBlockReflowState::AppendPushedFloat() implementation from the .h file into the .cpp file, since it uses |mBlock| and requires us to have #included nsBlockFrame.h. (Specifically, that code passes mBlock to a function that expects to receive a nsIFrame*, and we need to have seen nsBlockFrame.h in order to know that nsBlockFrame inherits from nsIFrame which makes that function-call legal.)

 c) Removes nsBlockReflowState.h's #include of nsBlockFrame.h (and replaces it with forward-declarations)

 d) Explicitly #include nsBlockFrame.h in nsTextFrameThebes.cpp (which previously got nsBlockFrame via its include of nsLineLayout.h, which includes nsBlockReflowState.h, which used to (but no longer) #includes nsBlockFrame.h

 e) While I'm touching nsTextFrameThebes.cpp, move its header (nsTextFrame.h) to the top
Attachment #708870 - Flags: review?(dbaron)
(c) is what this bug is primarily about; the rest are just fixes to make sure we compile.
https://hg.mozilla.org/mozilla-central/rev/e9f2886c0179
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: