W3C home > Mailing lists > Public > www-style@w3.org > October 2012

Re: [css-regions] Handling circular dependencies between flows

From: Alan Stearns <stearns@adobe.com>
Date: Thu, 11 Oct 2012 06:33:37 -0700
To: Mihnea-Vlad Ovidenie <mihnea@adobe.com>, Mihai Balan <mibalan@adobe.com>, Andrei Bucur <abucur@adobe.com>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <CC9C1840.149E8%stearns@adobe.com>
On 10/11/12 5:08 AM, "Mihnea-Vlad Ovidenie" <mihnea@adobe.com> wrote:

>Hi Alan,
>
>On 10/11/12 12:36 AM, "Alan Stearns" <stearns@adobe.com> wrote:
>
>>On 10/10/12 8:59 AM, "Alan Stearns" <stearns@adobe.com> wrote:
>>
>>>I would like to solve the basic circular reference problem by deciding
>>>that these circular references do not create regions. So I'd change this
>>>sentence:
>>>
>>>---
>>>Likewise, if the block container is part
>>>of the flow with name <ident>, then
>>>the block container does not format
>>>any content visually.
>>>---
>>>
>>>to this (and move it up in the definition to precede the text that
>>>describes how regions are created)
>>>
>>>---
>>>If the block container is part
>>>of the flow with name <ident>,
>>>then the block container does
>>>not become a CSS Region.
>>>---
>>
>>This wording solves the case where a named flow contains a region for
>>itself, but does not generally solve more complex circular dependencies
>>that can arise. Following the advice on this morning's call, I am
>>stealing
>>some text from css4-images [1] and will replace the current sentence
>>above
>>with a section that reads:
>>
>>---
>>Named flows containing elements with the flow-from property set can
>>produce nonsensical circular relationships, such as a named flow
>>containing regions in its own region chain. These relationships can be
>>easily and reliably detected and resolved, however, by keeping track of a
>>dependency graph and using common cycle-detection algorithms.
>>
>>The dependency graph consists of edges such that:
>>
>>- Every named flow depends on its elements with the flow-from property
>>set
>>- Every element in a named flow with the flow-from property set to an
>><ident> depends on the named flow with the <ident> name.
>>
>>If the graph contains a cycle, any elements with the flow-from property
>>set to an <ident> participating in the cycle do not become CSS Regions.
>>---
>
>Considering the following example:
>
><style>
>    .flowA { flow-into: flowA; }
>    .regionFlowA { flow-from: flowA; }
>    .flowB { flow-into: flowB; }
>    .regionFlowB { flow-from: flowB; }
></style>
><div id="div1" class="flowA">
>    <div id="div2" class="regionFlowB"></div>
></div>
><div id="div3" class="flowB">
>    <div id="div4" class="regionFlowA"></div>
></div>
>
>Would create something like flowA -> div2 -> flowB -> div4 -> flowA and in
>this case, both div2 and div4 (having flow-from) do not become regions.
>Did I get it right?

That is correct. But if flowA (or flowB) had an element that was a region
for an additional flowC, that would not participate in this particular
cycle and would remain a region.

Thanks,

Alan
Received on Thursday, 11 October 2012 13:34:13 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:01 GMT