Changes

Jump to: navigation, search

Gecko:Reflow Refactoring

1,488 bytes added, 00:49, 21 June 2006
Background and Terminology: Add background section
== Background and Terminology ==
 
The CSS specification has a concept of a rendering object, which it calls a box. There is a tree of rendering objects parallel to and close-to-isomorphic to the content (or DOM) tree. In Mozilla, these rendering objects are implemented by objects that implement the nsIFrame interface (and, for XUL, also the nsIBox interface), known as frames.
 
There are three main operations performed on these objects:
* frame construction (building the tree of objects)
* reflow (determining their positions; should perhaps have been called Layout instead), and
* painting (drawing them on the screen) (the code to determine targets for events is closely connected to the painting code, so it can be considered part of this area).
 
The algorithms used to determine the positions of some types of rendering objects are described in the CSS specifications. The most important version of the specification is CSS2.1, and the chapter with the most interesting material is 10 (visudet.html), although 9 (visuren.html), 11 (visufx.html), and 8 (box.html) are also quite relevant. However, many of the rendering objects are described poorly (tables) or not at all (form controls, many other things) by the CSS2.1 specification.
 
The algorithms used to determine the positions of XUL rendering objects are architecturally rather different. See [http://xtech06.usefulinc.com/schedule/paper/146 dbaron's XTech 2006 paper] for some further discussion of this difference.
 
== Summary ==
Canmove, confirm, emeritus
1,334
edits

Navigation menu