Gecko:Reflow Refactoring: Difference between revisions

Line 85: Line 85:
One of the reflow reasons is <code>eReflowReason_Incremental</code>, which means that there is at least one reflow command on a descendant but otherwise nothing needs to be handled.  Another is <code>eReflowReason_Resize</code>, which means that only the final width needs to be recalculated (intrinsic widths do not).  Another is <code>eReflowReason_StyleChange</code>, which means that everything, including intrinsic widths, needs to be recalculated.  The other reflow reasons and the reflow types not corresponding to these reasons (other than incremental, which has no corresponding reflow type) are poorly defined and hopefully unnecessary.
One of the reflow reasons is <code>eReflowReason_Incremental</code>, which means that there is at least one reflow command on a descendant but otherwise nothing needs to be handled.  Another is <code>eReflowReason_Resize</code>, which means that only the final width needs to be recalculated (intrinsic widths do not).  Another is <code>eReflowReason_StyleChange</code>, which means that everything, including intrinsic widths, needs to be recalculated.  The other reflow reasons and the reflow types not corresponding to these reasons (other than incremental, which has no corresponding reflow type) are poorly defined and hopefully unnecessary.


Explain bits (both for box and non-box)...
There are also methods on the pres shell to cause a style change or resize reflow over the entire frame tree:  these don't rely on a reflow command at some point in the reflow tree to convert the incremental reflow reason to a style change or resize; instead, they start with a style change or resize reflow reason from the top of the tree.
 
In addition to the information in the reflow commands (which are in the reflow tree), there are two bits, NS_FRAME_IS_DIRTY and NS_FRAME_HAS_DIRTY_CHILDREN.  They are used very differently for non-box and box layout. (Maybe it's worth explaining, but I don't remember the whole business, nor do I much care. - [[User:Dbaron|Dbaron]])


== Design ==
== Design ==
canmove, Confirmed users, Bureaucrats and Sysops emeriti
1,334

edits