Changes

Jump to: navigation, search

Gecko:Overview

307 bytes added, 18:37, 1 March 2022
Reflow: Update links and documentation about reflow roots
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(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
descendants never changes their rect or overflow areas (though currently
To do this, we maintain two bits on frames:
[httphttps://dxr.mozillasearchfox.org/mozilla-central/search?q=varsymbol:E_%3ANS_FRAME_IS_DIRTY&case=true3CT_nsFrameState%3E_NS_FRAME_IS_DIRTY&redirect=true NS_FRAME_IS_DIRTY]
indicates that a frame and all of its descendants require reflow.
[httphttps://dxr.mozillasearchfox.org/mozilla-central/search?q=varsymbol:E_%3ANS_FRAME_HAS_DIRTY_CHILDREN&case=true3CT_nsFrameState%3E_NS_FRAME_HAS_DIRTY_CHILDREN&redirect=true NS_FRAME_HAS_DIRTY_CHILDREN]
indicates that a frame has a descendant 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
removed). These bits allow coalescing of multiple updates; this
coalescing is done in nsPresShellPresShell, which tracks the set of reflow roots
that require reflow. The bits are set during calls to
nsPresShell[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
Confirm
489
edits

Navigation menu