Robert O'Callahan wrote:
On 19/09/09 6:42 PM, L. David Baron wrote:
We could avoid this relatively easily by using an out-of-band tree
(much like the reflow tree that we had before the reflow branch
landed). This is what I propose in
https://bugzilla.mozilla.org/show_bug.cgi?id=479655
I guess I just worry about the complexity and overhead of maintaining
that separately from the DOM.
(Another advantage such an approach might have is that we'd have
more room for storing the various types of restyling we might want
to do, if we want to differentiate more cases in order to optimize
them.)
It looks like we have 5 bits free in mFlagsOrSlots. It looks like you
only need 3 or 4 for this. If we need more data we could use node
properties. Or perhaps we could use two bits in mFlagsOrSlots for "needs
restyle" and "descendant needs restyle", and have a node property with
more data for nodes that need restyle.
Ran into this old thread.
I think adding bits to nodes about what restyling they need is totally
ok. If we need to add another word to all nodes I don't think that's a
big deal (we've been way too conservative about this in the past, we
really don't have that many nodes alive that it's a big concern I'm
pretty sure).
This would actually make it easy to keep a list of nodes that need
restyling. Whenever a node is flagged as needing
restyling/frame-creating of some sort we just add it to a list/hash. If
the node is removed from the document it's easy to make UnbindFromTree
check if there's restyle information and if so have the node remove
itself from the list/hash.
/ Jonas
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout