[webkit-dev] AncestorChainWalker substance and style thoughts
Hajime Morrita
morrita at chromium.org
Tue Feb 19 16:24:03 PST 2013
On Wed, Feb 20, 2013 at 4:29 AM, Dimitri Glazkov <dglazkov at chromium.org>wrote:
> On Tue, Feb 19, 2013 at 3:50 AM, Antti Koivisto <koivisto at iki.fi> wrote:
> > The problem with ComposedShadowTreeWalker is not that it is an iterator
> but
> > that it is ill-defined and complex. It calls back to non-trivial,
> mutating
> > functions on the structure being traversed
> > (ContentDistributor::distribute!). Simply traversing a tree with it can
> > apparently end up marking the tree for style recalc.
>
> This is a really good point. It encapsulates traversal of the composed
> tree, but this tree's integrity is maintained lazily, which means that
> as you traverse it, you could force the update. That ain't awesome.
>
We could possibly separate the recalculation of the composed tree from
style recalculation or attachment.
Even though the valid tree is computed lazily, the invalidation happens
eagerly, which triggers style recalculation. So we could let our style
recalc lifecycle to handle it and make distribute() to focus on calculating
distribution. This kind of clarification is apparently worth trying, an I
believe current design is close to that shape.
Filed http://wkb.ug/110280 for tracking.
--
morrita
>
> :DG<
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20130220/67a7b5bf/attachment.html>
More information about the webkit-dev
mailing list