Open Bug 127117 Opened 23 years ago Updated 2 years ago

nsBlockFrame and nsLineBox need better separation

Categories

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

x86
Linux
defect

Tracking

()

Future

People

(Reporter: john, Unassigned)

References

(Blocks 1 open bug)

Details

nsBlockFrame is constantly reaching into nsLineBox's internals and treating it
like a struct, attempting to ensure data integrity on its own.  Data integrity
in a class should be the responsibility of that class.  The
nsBlockFrame::DoRemoveFrame() is a good example of this.  In bug 125124 we
encountered a place where nsBlockFrame did not ensure data integrity between the
list of children of a line and its child count, which ultimately caused a crash.
 This method should be entirely in nsLineBox.h.  (Probably it is best to make it
a method in nsLineList or a static method in nsLineBox.) 
nsBlockFrame::AddFrames() is another good candidate.

It might be a decent idea to split nsLineList and nsLineBox into their own
separate .h files to keep size down, too.

This is the result of suggestions by Alex (and our subsequent conversation) in
response to my fix to bug 125124.
Priority: -- → P3
Changing QA contact
QA Contact: petersen → amar
Bulk moving P1-P5 un-milestoned bugs to future. 
Target Milestone: --- → Future
->Layout: Block&Inline
Assignee: alexsavulov → block-and-inline
Blocks: 76767
Component: Layout → Layout: Block & Inline
QA Contact: amar → ian
Assignee: layout.block-and-inline → nobody
QA Contact: ian → layout.block-and-inline
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.