I am going to think out loud about the line area layout process. This is partly implemented and I want to document some of the problems and thinking involved.
The block area firstly gets all of the layout managers from its children. Then it combines consecutive inline area layout managers and converts into a single line layout manager. All inline layout managers have no children. This means that nested inline elements are flattened into a list of inline area layout managers. When flattening the parent inline level sets start and end properties on the layout managers. The line layout manager gets an inline area from the child layout managers using an index. This means it is easy to keep track of and to backtrack. The problems: initial property set These properties need to become the parent property set of the inline areas created in the first line of a block. keeps an inline area could have a keep with next or previous or an implicit keep between characters. areas resolved depending on page page reference numbers must be resolved depending on the current page changing inline progression dimension adding side floats could change to available inline progression dimension stretchable areas areas such as space, leader may stretch to fill space towards optimum value properties over a range of areas properties such as id area, link, background can only be set over a range, it is not sensible to set on every inline area hyphenation this needs to be determined independantly from the inline area layout managers since different managers may return consecutive characters The solution: The initial property set is given to the inline layout managers if this is the first line, areas that didn't make it are re-retrieved without the property set. Temporary data is set on every inline area, this data also tells us of any keeps. When adding children we add the current area and have the next area for reference. The best break is stored with the current position and min/opt/max length. Inlines areas are added until no more can possibly fit. The areas are always retrieved from the inline layout managers, they are only stored in completed line areas. If a line area needs to change ipd then we start from the beginning. Line areas that contain resolved values also are re-retrieved. Stretching areas is a bit tricky. Spaces are stretched by the user agent and leader and others can have a range. This process is done after the inline areas have been completed for the line. Things like side floats, before floats, footnotes, range properties are retrieved from the child layout managers before/after getting the inline areas. These areas remain linked to a line so that removing the line will allow us to remove the float or footnote. Hyphenation is a bit difficult, having hyphenation on a single character complicates the matter. If it is hyphenating then we need to combine all consecutive character areas regardless of properties and apply the hyphenation. The index used to get inline areas can also be used to free memory when a page is completed. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]