nsBlockFrame and nsLineBox need better separation

NEW
Unassigned

Status

()

P3
normal
17 years ago
8 years ago

People

(Reporter: john, Unassigned)

Tracking

(Blocks: 1 bug)

Trunk
Future
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

17 years ago
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.

Updated

17 years ago
Priority: -- → P3

Comment 1

17 years ago
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
You need to log in before you can comment on or make changes to this bug.