On Tuesday 2005-03-08 16:16 -0800, Chris Du wrote: > What is the relation between frames and lines? The lines here means the ones > used in nsBlockFrame. > > In these days, I tried to understand the architecture of Gecko rendering > engine. > But there are only few overview documents in mozilla.org. > I tried to look into the code but easier to get tired and frustrated by > those classes and terms.
Frames form a tree structure, representing what CSS describes as boxes. Block frames use lines essentially as an out-of-band annotation on their child list. They have a list of lines, and each normal flow child is in exactly one line. The line stores only a pointer to the first child that's in it and the number of children in it, since the children in it are consecutive. (Note also that when a frame is split (e.g., an inline being wrapped for line breaking, or many types of frames being split for printing), the split pieces are linked via next-in-flow and prev-in-flow pointers. If the split frame's parent is not split at that point, then the two parts of the split are siblings (but otherwise they are not). This happens for an inline that is the *child* of a block.) -David -- L. David Baron <URL: http://dbaron.org/ > Technical Lead, Layout & CSS, The Mozilla Foundation
pgp7LU0YMzh9j.pgp
Description: PGP signature
