8000 [css-regions] circular dependency section · w3c/csswg-drafts@373018d · GitHub
Skip to content

Commit 373018d

Browse files
committed
[css-regions] circular dependency section
1 parent 8f1a64b commit 373018d

2 files changed

Lines changed: 102 additions & 54 deletions

File tree

css3-regions/Overview.html

Lines changed: 61 additions & 32 deletions
@@ -50,13 +50,14 @@
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
rel=dcterms.rights>
1313
<meta content="CSS Regions Module Level 3" name=dcterms.title>
1414
<meta content=text name=dcterms.type>
15-
<meta content=2012-10-09 name=dcterms.issued>
15+
<meta content=2012-10-11 name=dcterms.issued>
1616
<meta content="Vincent Hardy" name=dcterms.creator>
1717
<meta content="Alex Mogilevsky" name=dcterms.creator>
1818
<meta content="Alan Stearns" name=dcterms.creator>
1919
<meta content=W3C name=dcterms.publisher>
20-
<meta content="http://www.w3.org/TR/2012/ED-css3-regions-20121009/"
20+
<meta content="http://www.w3.org/TR/2012/ED-css3-regions-20121011/"
2121
name=dcterms.identifier>
2222
<link href="../shared/style/default.css" rel=stylesheet type="text/css">
2323
<script defer=defer
5050

5151
<h1 id=css-regions-module>CSS Regions Module Level 3</h1>
5252

53-
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 9 October 2012</h2>
53+
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 11 October
54+
2012</h2>
5455

5556
<dl>
5657
<dt>This version:
5758

5859
<dd><a
59-
href="http://www.w3.org/TR/2012/ED-css3-regions-20121009/">http://www.w3.org/csswg/css3-regions</a>
60+
href="http://www.w3.org/TR/2012/ED-css3-regions-20121011/">http://www.w3.org/csswg/css3-regions</a>
6061

6162
<dt>Latest version:
6263

@@ -208,6 +209,10 @@ <h2 class="no-num no-toc" id=table-of-contents>Table of contents</h2>
208209

209210
<li><a href="#the-flow-from-property"><span class=secno>3.2. </span>The
210211
<code class=property>flow-from</code>’ property</a>
212+
<ul class=toc>
213+
<li><a href="#circular-dependencies"><span class=secno>3.2.1.
214+
</span>Cycle Detection</a>
215+
</ul>
211216

212217
<li><a href="#region-flow-break"><span class=secno>3.3. </span>Region
213218
flow break properties: ‘<code class=property>break-before</code>’,
@@ -719,9 +724,10 @@ <h3 id=the-flow-into-property><span class=secno>3.1. </span>The ‘<a
719724
href="http://www.w3.org/TR/2011/REC-CSS2-20110607/syndata.html#value-def-identifier">&lt;ident&gt;</a>
720725

721726
<dd>The element is taken out of its parent's flow and placed into the flow
722-
with the name ‘<code class=css>&lt;ident&gt;</code>’. The element is
723-
said to have a <dfn id=specified-flow>specified flow</dfn>. The values
724-
<code class=property>none</code>’, ‘<code
727+
with the name ‘<code class=css><a
728+
href="http://www.w3.org/TR/2011/REC-CSS2-20110607/syndata.html#value-def-identifier">&lt;ident&gt;</a></code>’.
729+
The element is said to have a <dfn id=specified-flow>specified
730+
flow</dfn>. The values ‘<code class=property>none</code>’, ‘<code
725731
class=property>inherit</code>’, ‘<code
726732
class=property>default</code>’, ‘<code class=property>auto</code>
727733
and ‘<code class=property>initial</code>’ are invalid flow names.
@@ -889,7 +895,8 @@ <h3 id=the-flow-from-property><span class=secno>3.2. </span>The ‘<a
889895
<dd>The block container is not a <a href="#css-region"
890896
title=region>region</a>.
891897

892-
<dt><strong>&lt;ident&gt;</strong>
898+
<dt><strong><a
899+
href="http://www.w3.org/TR/2011/REC-CSS2-20110607/syndata.html#value-def-identifier">&lt;ident&gt;</a></strong>
893900

894901
<dd> If the ‘<code class=property>content</code>’ property computes to
895902
something else than ‘<code class=property>normal</code>’ (or ‘<code
@@ -907,31 +914,22 @@ <h3 id=the-flow-from-property><span class=secno>3.2. </span>The ‘<a
907914
href="http://www.w3.org/TR/CSS21/visuren.html#principal-box">principal
908915
boxes</a> of the <a href="#css-region">regions</a> in the <a
909916
href="#region-chain0">region chain</a>. <br>
910-
If there is no flow with name &lt;ident&gt;, then the block container
911-
does not format any content visually. <br>
912-
Likewise, if the block container is part of the flow with name
913-
&lt;ident&gt;, then the block container does not format any content
914-
visually.
917+
If there is no flow with name <a
918+
href="http://www.w3.org/TR/2011/REC-CSS2-20110607/syndata.html#value-def-identifier">&lt;ident&gt;</a>,
919+
then the block container does not format any content visually.
915920
</dl>
916921

917-
<div class=issue-marker data-bug_id=16819 data-bug_status=ASSIGNED> <a
918-
href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=16819">Issue-16819</a>
919-
920-
<div class=issue-details>
921-
<p class=short-desc>No display when combining flow-from and flow-into is
922-
bad
923-
</div>
924-
</div>
925-
926922
<p>A <span>CSS Region</span><code class=css>s document children are not
927923
visually formatted unless they are directed to a <a
928924
href="#named-flow0">named flow</a> with an associated <a
929925
href="#region-chain0">region chain</a>.</code>
930926

931927
<div class=note><span class=note-prefix>Note </span>
932928
<p>An block container becomes a <span>CSS Region</span> when its
933-
’flow-from' property is set to a valid &lt;ident&gt; value, even if
934-
there is no content contributing to the referenced flow. For example:
929+
’flow-from' property is set to a valid <a
930+
href="http://www.w3.org/TR/2011/REC-CSS2-20110607/syndata.html#value-def-identifier">&lt;ident&gt;</a>
931+
value, even if there is no content contributing to the referenced flow.
932+
For example:
935933

936934
<pre>
937935
&lt;style&gt;
@@ -1019,6 +1017,43 @@ <h3 id=the-flow-from-property><span class=secno>3.2. </span>The ‘<a
10191017
class=property>height</code>’ values are resolved for <span>CSS
10201018
Region</span> boxes.
10211019

1020+
<h4 id=circular-dependencies><span class=secno>3.2.1. </span>Cycle
1021+
Detection</h4>
1022+
1023+
<p><a href="#named-flow0">Named flows</a> containing elements where the
1024+
value of ‘<a href="#flow-from"><code
1025+
class=property>flow-from</code></a>’ computes to an <a
1026+
href="http://www.w3.org/TR/2011/REC-CSS2-20110607/syndata.html#value-def-identifier">&lt;ident&gt;</a>
1027+
can produce nonsensical circular relationships, such as a <a
1028+
href="#named-flow0">named flow</a> containing <span>CSS Regions</span> in
1029+
its own <a href="#region-chain0">region chain</a>. These relationships can
1030+
be easily and reliably detected and resolved, however, by keeping track of
1031+
a dependency graph and using common cycle-detection algorithms.
1032+
1033+
<p>The dependency graph consists of edges such that:
1034+
1035+
<ul>
1036+
<li>Every <a href="#named-flow0">named flow</a> depends on its elements
1037+
where the value of ‘<a href="#flow-from"><code
1038+
class=property>flow-from</code></a>’ computes to an <a
1039+
href="http://www.w3.org/TR/2011/REC-CSS2-20110607/syndata.html#value-def-identifier">&lt;ident&gt;</a>
1040+
.
1041+
1042+
<li>Every element in a <a href="#named-flow0">named flow</a> where the
1043+
value of ‘<a href="#flow-from"><code
1044+
class=property>flow-from</code></a>’ computes to an <a
1045+
href="http://www.w3.org/TR/2011/REC-CSS2-20110607/syndata.html#value-def-identifier">&lt;ident&gt;</a>
1046+
depends on the <a href="#named-flow0">named flow</a> with the <a
1047+
href="http://www.w3.org/TR/2011/REC-CSS2-20110607/syndata.html#value-def-identifier">&lt;ident&gt;</a>
1048+
name.
1049+
</ul>
1050+
1051+
<p>If the graph contains a cycle, any elements where the value of ‘<a
1052+
href="#flow-from"><code class=property>flow-from</code></a>’ computes to
1053+
an <a
1054+
href="http://www.w3.org/TR/2011/REC-CSS2-20110607/syndata.html#value-def-identifier">&lt;ident&gt;</a>
105 6DBF 5+
participating in the cycle do not become <span>CSS Regions</span>.
1056+
10221057
<h3 id=region-flow-break><span class=secno>3.3. </span>Region flow break
10231058
properties: ‘<a href="#break-before"><code
10241059
class=property>break-before</code></a>’, ‘<a href="#break-after"><code
@@ -2769,6 +2804,8 @@ <h3 id="changes_from_Aug_28_2012"><span class=secno>12.1. </span>Changes
27692804
28<sup>th</sup> 2012</a> version</h3>
27702805

27712806
<ul>
2807+
<li>Added section on handling circular flow-from and flow-into situations
2808+
27722809
<li>Added alignment and justification to region styling properties
27732810

27742811
<li>Added timing for regionLayoutUpdate event
@@ -3320,14 +3357,6 @@ <h2 class=no-num id=intro-example-code>Appendix A. Example Code for
33203357
<h2 class=no-num id=references>References</h2>
33213358

33223359
<div class="issue-marker wrapper">
3323-
<div class=issue-marker data-bug_id=16404 data-bug_status=ASSIGNED> <a
3324-
href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=16404">Issue-16404</a>
3325-
3326-
<div class=issue-details>
3327-
<p class=short-desc>Fix specification dependencies
3328-
</div>
3329-
</div>
3330-
33313360
<div class=issue-marker data-bug_id=18767 data-bug_status=NEW> <a
33323361
href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=18767">Issue-18767</a>
33333362

css3-regions/Overview.src.html

Lines changed: 41 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ <h3 id="the-flow-into-property">The 'flow-into' property</h3>
502502
<dd>The element is taken out
503503
of its parent's flow
504504
and placed into the flow
505-
with the name '&lt;ident&gt;'.
505+
with the name '<a href="http://www.w3.org/TR/2011/REC-CSS2-20110607/syndata.html#value-def-identifier">&lt;ident&gt;</a>'.
506506
The element is said to have
507507
a <dfn id="specified-flow">specified flow</dfn>.
508508
The values 'none', 'inherit', 'default', 'auto' and 'initial'
@@ -701,7 +701,7 @@ <h3 id="the-flow-from-property">The 'flow-from' property</h3>
701701

702702
<dd>The block container is not a <span title="region">region</span>.</dd>
703703

704-
<dt><strong>&lt;ident&gt;</strong></dt>
704+
<dt><strong><a href="http://www.w3.org/TR/2011/REC-CSS2-20110607/syndata.html#value-def-identifier">&lt;ident&gt;</a></strong></dt>
705705

706706
<dd>
707707
If the 'content' property computes
@@ -721,24 +721,13 @@ <h3 id="the-flow-from-property">The 'flow-from' property</h3>
721721
of the <span>regions</span>
722722
in the <span>region chain</span>.
723723
<br/>
724-
If there is no flow with name &lt;ident&gt;,
724+
If there is no flow with name
725+
<a href="http://www.w3.org/TR/2011/REC-CSS2-20110607/syndata.html#value-def-identifier">&lt;ident&gt;</a>,
725726
then the block container does not
726727
format any content visually.
727-
<br/>
728-
Likewise, if the block container is part
729-
of the flow with name &lt;ident&gt;,
730-
then the block container does not
731-
format any content visually.
732728
</dd>
733729
</dl>
734730

735-
<div class="issue-marker" data-bug_id="16819" data-bug_status="ASSIGNED">
736-
<a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=16819">Issue-16819</a>
737-
<div class="issue-details">
738-
<p class="short-desc">No display when combining flow-from and flow-into is bad</p>
739-
</div>
740-
</div>
741-
742731
<p>A <span>CSS Region</span>'s document children
743732
are not visually formatted
744733
unless they are directed
@@ -748,7 +737,7 @@ <h3 id="the-flow-from-property">The 'flow-from' property</h3>
748737
<div class="note"><span class="note-prefix">Note </span>
749738
<p>An block container becomes a <span>CSS Region</span>
750739
when its 'flow-from' property is set
751-
to a valid &lt;ident&gt; value,
740+
to a valid <a href="http://www.w3.org/TR/2011/REC-CSS2-20110607/syndata.html#value-def-identifier">&lt;ident&gt;</a> value,
752741
even if there is no content contributing
753742
to the referenced flow.
754743
For example:</p>
@@ -855,6 +844,41 @@ <h3 id="the-flow-from-property">The 'flow-from' property</h3>
855844
'width' and 'height' values are resolved
856845
for <span>CSS Region</span> boxes.</p>
857846

847+
<h4 id="circular-dependencies">Cycle Detection</h4>
848+
849+
<p><span>Named flows</span> containing elements
850+
where the value of 'flow-from' computes to an
851+
<a href="http://www.w3.org/TR/2011/REC-CSS2-20110607/syndata.html#value-def-identifier">&lt;ident&gt;</a>
852+
can produce nonsensical circular relationships,
853+
such as a <span>named flow</span> containing <span>CSS Regions</span>
854+
in its own <span>region chain</span>.
855+
These relationships can be easily
856+
and reliably detected and resolved, however,
857+
by keeping track of a dependency graph
858+
and using common cycle-detection algorithms.</p>
859+
860+
<p>The dependency graph consists of edges such that:</p>
861+
862+
<ul>
863+
<li>Every <span>named flow</span> depends on its elements
864+
where the value of 'flow-from' computes to an
865+
<a href="http://www.w3.org/TR/2011/REC-CSS2-20110607/syndata.html#value-def-identifier">&lt;ident&gt;</a>
866+
.</li>
867+
<li>Every element in a <span>named flow</span>
868+
where the value of 'flow-from' computes to an
869+
<a href="http://www.w3.org/TR/2011/REC-CSS2-20110607/syndata.html#value-def-identifier">&lt;ident&gt;</a>
870+
depends on the <span>named flow</span> with the
871+
<a href="http://www.w3.org/TR/2011/REC-CSS2-20110607/syndata.html#value-def-identifier">&lt;ident&gt;</a>
872+
name.</li>
873+
</ul>
874+
875+
<p>If the graph contains a cycle,
876+
any elements where the value of 'flow-from'
877+
computes to an
878+
<a href="http://www.w3.org/TR/2011/REC-CSS2-20110607/syndata.html#value-def-identifier">&lt;ident&gt;</a>
879+
participating in the cycle
880+
do not become <span>CSS Regions</span>.</p>
881+
858882
<h3 id=
859883
"region-flow-break">Region
860884
flow break properties: 'break-before', 'break-after', 'break-inside'</h3>
@@ -2416,6 +2440,7 @@ <h2 id="changes">Changes</h2>
24162440
<h3 id="changes_from_Aug_28_2012">Changes from <a href="http://www.w3.org/TR/2012/WD-css3-regions-20120823/">August 28<sup>th</sup> 2012</a> version</h3>
24172441

24182442
<ul>
2443+
<li>Added section on handling circular flow-from and flow-into situations</li>
24192444
<li>Added alignment and justification to region styling properties</li>
24202445
<li>Added timing for regionLayoutUpdate event</li>
24212446
<li>Clarified interaction between content and flow-from for pseudo-elements</li>
@@ -2762,12 +2787,6 @@ <h2 id="intro-example-code" class="no-num">Appendix A. Example Code for Introduc
27622787
<h2 class="no-num" id="references">References</h2>
27632788

27642789
<div class="issue-marker wrapper">
2765-
<div class="issue-marker" data-bug_id="16404" data-bug_status="ASSIGNED">
2766-
<a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=16404">Issue-16404</a>
2767-
<div class="issue-details">
2768-
<p class="short-desc">Fix specification dependencies</p>
2769-
</div>
2770-
</div>
27712790
<div class="issue-marker" data-bug_id="18767" data-bug_status="NEW">
27722791
<a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=18767">Issue-18767</a>
27732792
<div class="issue-details">

0 commit comments

Comments
 (0)