Fri, 18 Apr 2014 22:41:54 +0200
[css-masking] Change stroke bounding box algorithm for containers to a recursive algorithm
css-masking-1/Overview.src.html | file | annotate | diff | comparison | revisions | |
css-masking-1/index.html | file | annotate | diff | comparison | revisions |
1.1 --- a/css-masking-1/Overview.src.html Fri Apr 18 13:15:09 2014 +0900 1.2 +++ b/css-masking-1/Overview.src.html Fri Apr 18 22:41:54 2014 +0200 1.3 @@ -1231,21 +1231,15 @@ 1.4 <dt><a>'use'</a></dt> 1.5 <dd> 1.6 <ol class="algorithm"> 1.7 - <li>Let <var>box</var> be a rectangle initialized to (0, 0, 0, 0).</li> 1.8 - <li>Let <var>parent</var> be the <a>container element</a> if it is one, or the 1.9 - root of the <a>'use'</a> element's shadow tree otherwise.</li> 1.10 - <li>For each descendant <a>graphics element</a> <var>child</var> of <var>parent</var>: 1.11 + <li>Let <var>parent</var> be the <a>container element</a> if it is one, or the root of the <a>'use'</a> element's shadow tree otherwise.</li> 1.12 + <li>For each child <var>child</var> of <var>parent</var> 1.13 <ol> 1.14 - <li>If <var>child</var> has an ancestor element within <var>parent</var> that is 1.15 - <span class='prop-value'>'display: none'</span>, has a failing <a>conditional processing attribute</a>, 1.16 - or is not an <a>'a'</a>, <a>'g'</a>, <a>'svg'</a> or <a>'switch'</a> element, then 1.17 - continue to the next descendant <a>graphics element</a>.</li> 1.18 - <li>Otherwise, set <var>box</var> to be the union of <var>box</var> and the result of invoking the 1.19 - algorithm to compute a bounding box with <var>child</var> as the element 1.20 - and the same values for <var>space</var>, <var>fill</var>, <var>stroke</var>, 1.21 - <var>markers</var> and <var>clipped</var> as the corresponding algorithm input values.</li> 1.22 + <li>Let <var>childBox</var> be a rectangle initialized to (0, 0, 0, 0).</li> 1.23 + <li>Invoke the stroke bounding box algorithm with <var>child</var>.</li> 1.24 + <li>Set <var>childBox</var> to the returned box value of the invoked algorithm.</li> 1.25 + <li>Map <var>childBox</var> from the coordinate space of <var>child</var> to the coordinate space of <var>parent</var>.</li> 1.26 </ol> 1.27 - </li> 1.28 + <li>Let <var>box</var> be the union of all <var>childBox</var>es.</li> 1.29 <li>Return <var>box</var>.</li> 1.30 </ol> 1.31 </dd>
2.1 --- a/css-masking-1/index.html Fri Apr 18 13:15:09 2014 +0900 2.2 +++ b/css-masking-1/index.html Fri Apr 18 22:41:54 2014 +0200 2.3 @@ -59,7 +59,7 @@ 2.4 </p> 2.5 <h1 class="p-name no-ref" id=title>CSS Masking Module Level 1</h1> 2.6 <h2 class="no-num no-toc no-ref heading settled heading" id=subtitle><span class=content>Editor’s Draft, 2.7 - <span class=dt-updated><span class=value-title title=20140417>17 April 2014</span></span></span></h2> 2.8 + <span class=dt-updated><span class=value-title title=20140418>18 April 2014</span></span></span></h2> 2.9 <div data-fill-with=spec-metadata><dl><dt>This version:<dd><a class=u-url href=http://dev.w3.org/fxtf/css-masking-1/>http://dev.w3.org/fxtf/css-masking-1/</a><dt>Latest version:<dd><a href=http://www.w3.org/TR/css-masking-1/>http://www.w3.org/TR/css-masking-1/</a><dt>Editor’s Draft:<dd><a href=http://dev.w3.org/fxtf/css-masking-1/>http://dev.w3.org/fxtf/css-masking-1/</a><dt>Previous Versions:<dd><a href=http://www.w3.org/TR/2013/WD-css-masking-20130620/ rel=previous>http://www.w3.org/TR/2013/WD-css-masking-20130620/</a><dd><a href=http://www.w3.org/TR/2012/WD-css-masking-20121115/ rel=previous>http://www.w3.org/TR/2012/WD-css-masking-20121115/</a> 2.10 <dt>Feedback:</dt> 2.11 <dd><a href="mailto:public-fx@w3.org?subject=%5Bcss-masking%5D%20feedback">public-fx@w3.org</a> 2.12 @@ -1105,21 +1105,15 @@ 2.13 <dt><a href=http://www.w3.org/TR/2011/REC-SVG11-20110816/struct.html#UseElement><code class=element-name><use></code></a></dt> 2.14 <dd> 2.15 <ol class=algorithm> 2.16 - <li>Let <var>box</var> be a rectangle initialized to (0, 0, 0, 0).</li> 2.17 - <li>Let <var>parent</var> be the <a href=http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermGraphicsElement>container element</a> if it is one, or the 2.18 - root of the <a href=http://www.w3.org/TR/2011/REC-SVG11-20110816/struct.html#UseElement><code class=element-name><use></code></a> element’s shadow tree otherwise.</li> 2.19 - <li>For each descendant <a href=http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermGraphicsElement>graphics element</a> <var>child</var> of <var>parent</var>: 2.20 + <li>Let <var>parent</var> be the <a href=http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermGraphicsElement>container element</a> if it is one, or the root of the <a href=http://www.w3.org/TR/2011/REC-SVG11-20110816/struct.html#UseElement><code class=element-name><use></code></a> element’s shadow tree otherwise.</li> 2.21 + <li>For each child <var>child</var> of <var>parent</var> 2.22 <ol> 2.23 - <li>If <var>child</var> has an ancestor element within <var>parent</var> that is 2.24 - <span class=prop-value>'display: none'</span>, has a failing <a href=http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermConditionalProcessingAttribute>conditional processing attribute</a>, 2.25 - or is not an <a href=http://www.w3.org/TR/2011/REC-SVG11-20110816/linking.html#AElement><code class=element-name><a></code></a>, <a href=http://www.w3.org/TR/2011/REC-SVG11-20110816/struct.html#GElement><code class=element-name><g></code></a>, <a href=http://www.w3.org/TR/2011/REC-SVG11-20110816/struct.html#SVGElement><code class=element-name><svg></code></a> or <a href=http://www.w3.org/TR/2011/REC-SVG11-20110816/struct.html#SwitchElement><code class=element-name><switch></code></a> element, then 2.26 - continue to the next descendant <a href=http://www.w3.org/TR/2011/REC-SVG11-20110816/intro.html#TermGraphicsElement>graphics element</a>.</li> 2.27 - <li>Otherwise, set <var>box</var> to be the union of <var>box</var> and the result of invoking the 2.28 - algorithm to compute a bounding box with <var>child</var> as the element 2.29 - and the same values for <var>space</var>, <var>fill</var>, <var>stroke</var>, 2.30 - <var>markers</var> and <var>clipped</var> as the corresponding algorithm input values.</li> 2.31 + <li>Let <var>childBox</var> be a rectangle initialized to (0, 0, 0, 0).</li> 2.32 + <li>Invoke the stroke bounding box algorithm with <var>child</var>.</li> 2.33 + <li>Set <var>childBox</var> to the returned box value of the invoked algorithm.</li> 2.34 + <li>Map <var>childBox</var> from the coordinate space of <var>child</var> to the coordinate space of <var>parent</var>.</li> 2.35 </ol> 2.36 - </li> 2.37 + <li>Let <var>box</var> be the union of all <var>childBox</var>es.</li> 2.38 <li>Return <var>box</var>.</li> 2.39 </ol> 2.40 </dd>