On Wed, Feb 20, 2013 at 4:29 AM, Dimitri Glazkov <dglaz...@chromium.org>wrote:

> On Tue, Feb 19, 2013 at 3:50 AM, Antti Koivisto <koivi...@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<
>
_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev

Reply via email to