Gecko:Overview: Difference between revisions

Jump to navigation Jump to search
→‎Reflow: Update links and documentation about reflow roots
(→‎Layout: various terminology updates and clarifications.)
(→‎Reflow: Update links and documentation about reflow roots)
Line 525: Line 525:


The reflow generally starts from the root of the frame tree, though some other
The reflow generally starts from the root of the frame tree, though some other
types of frame can act as reflow roots and start a reflow from them.
types of frame can act as "reflow roots" and start a reflow from them
(nsTextControlFrame is one example; see the
[https://searchfox.org/mozilla-central/search?q=symbol:E_%3CT_nsFrameState%3E_NS_FRAME_REFLOW_ROOT&redirect=true NS_FRAME_REFLOW_ROOT] frame state bit).
Reflow roots must obey the invariant that a change inside one of their
Reflow roots must obey the invariant that a change inside one of their
descendants never changes their rect or overflow areas (though currently
descendants never changes their rect or overflow areas (though currently
Line 537: Line 539:


To do this, we maintain two bits on frames:
To do this, we maintain two bits on frames:
[http://dxr.mozilla.org/mozilla-central/search?q=var%3ANS_FRAME_IS_DIRTY&case=true&redirect=true NS_FRAME_IS_DIRTY]
[https://searchfox.org/mozilla-central/search?q=symbol:E_%3CT_nsFrameState%3E_NS_FRAME_IS_DIRTY&redirect=true NS_FRAME_IS_DIRTY]
indicates that a frame and all of its descendants require reflow.
indicates that a frame and all of its descendants require reflow.
[http://dxr.mozilla.org/mozilla-central/search?q=var%3ANS_FRAME_HAS_DIRTY_CHILDREN&case=true&redirect=true NS_FRAME_HAS_DIRTY_CHILDREN]
[https://searchfox.org/mozilla-central/search?q=symbol:E_%3CT_nsFrameState%3E_NS_FRAME_HAS_DIRTY_CHILDREN&redirect=true NS_FRAME_HAS_DIRTY_CHILDREN]
indicates that a frame has a descendant that
indicates that a frame has a descendant that
is dirty or has had a descendant removed (i.e., that it has a child that
is dirty or has had a descendant removed (i.e., that it has a child that
has NS_FRAME_IS_DIRTY or NS_FRAME_HAS_DIRTY_CHILDREN or it had a child
has NS_FRAME_IS_DIRTY or NS_FRAME_HAS_DIRTY_CHILDREN or it had a child
removed).  These bits allow coalescing of multiple updates; this
removed).  These bits allow coalescing of multiple updates; this
coalescing is done in nsPresShell, which tracks the set of reflow roots
coalescing is done in PresShell, which tracks the set of reflow roots
that require reflow.  The bits are set during calls to
that require reflow.  The bits are set during calls to
nsPresShell::FrameNeedsReflow and are cleared during reflow.
[https://searchfox.org/mozilla-central/search?q=PresShell%3A%3AFrameNeedsReflow&path= PresShell::FrameNeedsReflow]
and are cleared during reflow.


The layout algorithms used by many of the frame classes are those
The layout algorithms used by many of the frame classes are those
Confirmed users
490

edits

Navigation menu