Re: [whatwg] Cycles in anchored positioning

On Fri, Dec 7, 2012 at 3:58 PM, Matt Falkenhagen <falken@chromium.org> wrote:
> How are cycles with magically aligned[1] elements resolved?
>
> For example, if a and b are dialogs and you do:
>
> a.show(b);
> b.show(a);
>
> I think an anchoring cycle can also occur if an element |a| is anchored to
> a descendent of an element anchored to |a|.
>
> [1]
> http://www.whatwg.org/specs/web-apps/current-work/multipage/commands.html#magically-aligned

This is a closely-related problem to what I ran into when writing up
my proposal for Positioned Layout <http://www.xanthir.com/blog/b48H0>.
 The only correct answer is to do cycle-detection, and break the cycle
at some predictable location.  In Positioned Layout I used document
order to figure out where to break the cycle, but here you have a nice
temporal ordering already available - if a show() call would produce a
cycle, it should instead act as if no anchor was provided.

~TJ

Received on Tuesday, 11 December 2012 01:02:15 UTC