csswg/css3-images Overview.html,1.129,1.130 Overview.src.html,1.136,1.137

Update of /sources/public/csswg/css3-images
In directory hutz:/tmp/cvs-serv29421

Modified Files:
	Overview.html Overview.src.html 
Log Message:
Half-done with entering element() changes.


Index: Overview.html
===================================================================
RCS file: /sources/public/csswg/css3-images/Overview.html,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -d -r1.129 -r1.130
--- Overview.html	4 Aug 2011 21:22:41 -0000	1.129
+++ Overview.html	5 Aug 2011 19:21:23 -0000	1.130
@@ -9,6 +9,10 @@
   <link href="http://www.w3.org/StyleSheets/TR/W3C-ED" rel=stylesheet
   type="text/css">
 
+  <style>
+  p { text-indent: 0 !important; margin: 1em 0 !important; }
+  </style>
+
  <body>
   <div class=head> <!--begin-logo-->
    <p><a href="http://www.w3.org/"><img alt=W3C height=48
@@ -16,10 +20,19 @@
 
    <h1>CSS Image Values and Replaced Content Module Level 3</h1>
 
-   <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 4 August 2011</h2>
+   <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 5 August 2011</h2>
 
+<<<<<<< Overview.html
+   <dl>
+    <dt>This version:
+
+    <dd><a
+     href="http://www.w3.org/TR/2011/ED-css3-images-20110805/">http://www.w3.org/TR/2011/ED-css3-images-20110805/</a>
+     
+=======
    <dl><!--<dt>This version:</dt>
 		<dd><a href="http://www.w3.org/TR/2011/ED-css3-images-20110804/">http://www.w3.org/TR/2011/ED-css3-images-20110804/</a>-->
+>>>>>>> 1.129
 
     <dt>Latest version:
 
@@ -407,14 +420,12 @@
    Images: the &lsquo;<code class=css>element()</code>&rsquo; notation</h3>
 
   <p>The &lsquo;<code class=css>element()</code>&rsquo; function allows an
-   author to reference an element in the document that should be used as an
-   image. As the referenced element changes, for example, by the user typing
-   into a &lt;textarea> element or a script drawing into a &lt;canvas>
-   element in HTML, the image produced by the &lsquo;<code
-   class=css>element()</code>&rsquo; function stays in sync, allowing dynamic
-   effects such as script-animated background images or previews of the next
-   slide in a slideshow. The syntax for &lsquo;<code
-   class=css>element()</code>&rsquo; is defined as:
+   author to use an element in the document as an image. As the referenced
+   element changes appearance, the image changes as well. This can be used,
+   for example, to create live previews of the next/previous slide in a
+   slideshow, or to reference a canvas element for a fancy generated gradient
+   or even an animated background. The syntax for &lsquo;<code
+   class=css>element()</code>&rsquo; is:
 
   <pre
    class=prod><dfn id=ltelement-reference>&lt;element-reference></dfn> = element( [&lt;id-selector> | &lt;identifier> ] )</pre>
@@ -431,34 +442,42 @@
    identifier</dfn> is the given identifier. (CSS does not define how an
    element acquires a <a href="#css-element-reference-identifier"><i>CSS
    element reference identifier</i></a>; that is determined by the host
-   language.) If no element in the document matches the selector, or no
-   element has the identifier as its <a
-   href="#css-element-reference-identifier"><i>CSS element reference
-   identifier</i></a>, the function represents a fully transparent image with
-   no intrinsic dimensions, equivalent to <code>image(transparent)</code>. If
-   the document changes so that which element is matched, or whether an
-   element is matched at all, changes, the image represented by the function
-   must change accordingly.
+   language.)
 
-  <p>If the &lsquo;<code class=css>element()</code>&rsquo; function refers to
-   an element, then it represents an image with width and height equal to the
-   width and height of the margin box of the referenced element. The image
-   must be constructed by rendering the referenced element and its
-   descendants at the same size that the element would be in its document,
-   over an infinite transparent black background, positioned so that the
-   edges of the margin box of the element is flush with the edges of the
-   image. <span class=note>If the element has decorations or descendants that
-   extend outside the margin box, these will be clipped to the margin box in
-   the generated image by default. &lsquo;<code
-   class=css>background-repeat:extend</code>&rsquo; may allow the author to
-   override this behavior so that decorations and descendants outside the
-   margin box are still painted.</span> If the referenced element or an
-   ancestor of the referenced element has a transform applied to it, the
-   transform must be ignored for the purpose of constructing this image
-   (transforms on descendants must be unaffected).
+  <p>If the &lsquo;<code class=css>element()</code>&rsquo; function doesn't
+   reference an element, or it references an element that does not have a
+   rendering (such as an element with display:none, or a &lt;link> element in
+   HTML), or the rendering is not defined within CSS (such as child elements
+   of replaced elements, like the &lt;option> element within the &lt;select>
+   element in HTML), it must represent a solid transparent-black image with
+   no intrinsic dimensions, exactly identical to <code
+   class=css>image(transparent)</code>.
 
-  <p>If the argument passed to &lsquo;<code class=css>element()</code>&rsquo;
-   isn't an ID selector or an ident, it is a syntax error.
+  <p>Otherwise, it represents an image with width and height equal to the
+   bounding box of the referenced element. The image must be constructed by
+   rendering the referenced element and its descendants at the same size that
+   the element would be in its document, over an infinite transparent black
+   background, positioned so that the edges of the referenced element's
+   bounding box is flush with the edges of the image. <span
+   class=note>Because images clip anything outside their bounds by default,
+   this means that decorations that extend outside the bounding box, like
+   box-shadows or some border-images, may be clipped.</span>
+
+  <p>If the referenced element has a transform applied to it or an ancestor,
+   the transform must be ignored when rendering the element as an image. If
+   the referenced element is broken across pages, the element must be
+   displayed as if the pages were joined flush in the pagination direction
+   (elements broken across lines or columns just render with their bounding
+   box, as normal, which may have strange effects).
+
+  <p>Host languages may allow certain elements to be referenced that have a
+   "natural" notion of what it means to be rendered, even if the element is
+   not currently being rendered. For example, an HTML &lt;canvas> element may
+   be created from script and assigned to the <code>CSSElementMap</code>,
+   then referenced from the &lsquo;<code class=css>element()</code>&rsquo;
+   function without being appended to the document. In this instance, the
+   &lsquo;<code class=css>element()</code>&rsquo; function must represent an
+   image with a width, height, and appearance defined by the host language.
 
   <p>Implementations may either re-use existing bitmap data generated for the
    referenced element or regenerate the display of the element to maximize
@@ -469,6 +488,8 @@
    referenced element, modulo rasterization quality.
 
   <div class=example> TODO: copy an example from the MozHacks article</div>
+<<<<<<< Overview.html
+=======
 
   <p class=issue>For transforms, transforms <strong>on the element</strong>
    don't affect the geometry/size of the image (as normal), but do affect the
@@ -520,6 +541,7 @@
    -moz-element(%23foo)%3B }%0A%23option1%3Achecked ~ div { background%3A
    -moz-element(%23bar)%3B }%0A%23option2%3Achecked ~ div { background%3A
    -moz-element(%23baz)%3B }%0A&lt;%2Fstyle>">demo</a>).)</p>
+>>>>>>> 1.129
   <!-- ====================================================================== -->
 
   <h4 class="no-num no-toc" id=element-cycles> Detecting and Resolving

Index: Overview.src.html
===================================================================
RCS file: /sources/public/csswg/css3-images/Overview.src.html,v
retrieving revision 1.136
retrieving revision 1.137
diff -u -d -r1.136 -r1.137
--- Overview.src.html	4 Aug 2011 21:22:41 -0000	1.136
+++ Overview.src.html	5 Aug 2011 19:21:23 -0000	1.137
@@ -5,6 +5,9 @@
   <title>CSS Image Values and Replaced Content Module Level 3</title>
   <link rel="stylesheet" type="text/css" href="http://dev.w3.org/csswg/default.css">
   <link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/TR/W3C-ED">
+  <style>
+  p { text-indent: 0 !important; margin: 1em 0 !important; }
+  </style>
 </head>
 
 <body>
@@ -244,48 +247,21 @@
 <h3 id='element-reference'>
 Using Elements as Images: the ''element()'' notation</h3>
 
-	<p>The ''element()'' function allows an author to reference an element in
-	the document that should be used as an image.  As the referenced element 
-	changes, for example, by the user typing into a &lt;textarea> element or 
-	a script drawing into a &lt;canvas> element in HTML, the image produced by 
-	the ''element()'' function stays in sync, allowing dynamic effects such as 
-	script-animated background images or previews of the next slide in a slideshow.  
-	The syntax for ''element()'' is defined as:</p>
+	<p>The ''element()'' function allows an author to use an element in the document as an image.  As the referenced element changes appearance, the image changes as well.  This can be used, for example, to create live previews of the next/previous slide in a slideshow, or to reference a canvas element for a fancy generated gradient or even an animated background.  The syntax for ''element()'' is:</p>
 
 	<pre class=prod><dfn>&lt;element-reference></dfn> = element( [&lt;id-selector> | &lt;identifier> ] )</pre>
 
-	<p>where &lt;id-selector> is an ID selector [[!SELECT]], and &lt;identifier> 
-	is an identifer [[!CSS3VAL]].</p>
+	<p>where &lt;id-selector> is an ID selector [[!SELECT]], and &lt;identifier> is an identifer [[!CSS3VAL]].</p>
 
-	<p>If the argument to the ''element()'' function is an ID selector, the 
-	function references the element matched by the selector.  If it's an identifier, 
-	the function references the element whose <dfn>CSS element reference identifier</dfn> 
-	is the given identifier.  (CSS does not define how an element acquires a 
-	<i>CSS element reference identifier</i>; that is determined by the host language.)  
-	If no element in the document matches the selector, or no element has the 
-	identifier as its <i>CSS element reference identifier</i>, the function 
-	represents a fully transparent image with no intrinsic dimensions, equivalent 
-	to <code>image(transparent)</code>.  If the document changes so that which 
-	element is matched, or whether an element is matched at all, changes, the 
-	image represented by the function must change accordingly.</p>
+	<p>If the argument to the ''element()'' function is an ID selector, the function references the element matched by the selector.  If it's an identifier, the function references the element whose <dfn>CSS element reference identifier</dfn> is the given identifier.  (CSS does not define how an element acquires a <i>CSS element reference identifier</i>; that is determined by the host language.)</p>
 
-	<p>If the ''element()'' function refers to an element, then it represents 
-	an image with width and height equal to the width and height of the margin 
-	box of the referenced element.  The image must be constructed by rendering 
-	the referenced element and its descendants at the same size that the element 
-	would be in its document, over an infinite transparent black background, 
-	positioned so that the edges of the margin box of the element is flush with 
-	the edges of the image.  <span class=note>If the element has decorations 
-	or descendants that extend outside the margin box, these will be clipped 
-	to the margin box in the generated image by default.  ''background-repeat:extend'' 
-	may allow the author to override this behavior so that decorations and 
-	descendants outside the margin box are still painted.</span>  If the 
-	referenced element or an ancestor of the referenced element has a transform 
-	applied to it, the transform must be ignored for the purpose of constructing 
-	this image (transforms on descendants must be unaffected).</p>
+	<p>If the ''element()'' function doesn't reference an element, or it references an element that does not have a rendering (such as an element with display:none, or a &lt;link> element in HTML), or the rendering is not defined within CSS (such as child elements of replaced elements, like the &lt;option> element within the &lt;select> element in HTML), it must represent a solid transparent-black image with no intrinsic dimensions, exactly identical to <code class=css>image(transparent)</code>.</p>
 
-	<p>If the argument passed to ''element()'' isn't an ID selector or an ident, 
-	it is a syntax error.</p>
+	<p>Otherwise, it represents an image with width and height equal to the bounding box of the referenced element.  The image must be constructed by rendering the referenced element and its descendants at the same size that the element would be in its document, over an infinite transparent black background, positioned so that the edges of the referenced element's bounding box is flush with the edges of the image.  <span class=note>Because images clip anything outside their bounds by default, this means that decorations that extend outside the bounding box, like box-shadows or some border-images, may be clipped.</span></p>
+
+	<p>If the referenced element has a transform applied to it or an ancestor, the transform must be ignored when rendering the element as an image.  If the referenced element is broken across pages, the element must be displayed as if the pages were joined flush in the pagination direction (elements broken across lines or columns just render with their bounding box, as normal, which may have strange effects).</p>
+
+	<p>Host languages may allow certain elements to be referenced that have a "natural" notion of what it means to be rendered, even if the element is not currently being rendered.  For example, an HTML &lt;canvas> element may be created from script and assigned to the <code>CSSElementMap</code>, then referenced from the ''element()'' function without being appended to the document.  In this instance, the ''element()'' function must represent an image with a width, height, and appearance defined by the host language.</p>
 
 	<p>Implementations may either re-use existing bitmap data generated for the 
 	referenced element or regenerate the display of the element to maximize quality 
@@ -299,16 +275,6 @@
 		TODO: copy an example from the MozHacks article
 	</div>
 
-	<p class=issue>For transforms, transforms <strong>on the element</strong> don't affect the geometry/size of the image (as normal), but do affect the appearance (<a href="data:text/html;charset=utf-8,&lt;!DOCTYPE html>%0A&lt;p id%3Dfoo>&lt;span id%3Dbar>foofoofoo&lt;br>bar&lt;%2Fspan>&lt;%2Fp>%0A&lt;div>&lt;%2Fdiv>%0A&lt;style>%0Aspan { border%3A thick solid red%3B }%0Ap { border%3A thin solid black%3B width%3A 50px%3B -moz-transform%3Arotate(30deg)%3B}%0Adiv { %0A border%3A thick solid black%3B%0A width%3A 200px%3B%0A height%3A 200px%3B%0A background%3A -moz-element(%23foo)%3B%0A}%0A&lt;%2Fstyle>">demo</a>) (this looks kinda weird, but whatever).  Transforms on an ancestor are ignored (<a href="data:text/html;charset=utf-8,&lt;!DOCTYPE html>%0A&lt;p id%3Dfoo>&lt;span id%3Dbar>foofoofoo&lt;br>bar&lt;%2Fspan>&lt;%2Fp>%0A&lt;div>&lt;%2Fdiv>%0A&lt;style>%0Aspan { border%3A thick solid red%3B }%0Ap { border%3A thin solid black%3B width%3A 50px%3B -moz-transform%3Arotate(30deg)%3B}%0Adiv { %0A border%3A thick slid black%3B%0A width%3A 200px%3B%0A height%3A 200px%3B%0A background%3A -moz-element(%23bar)%3B%0A}%0A&lt;%2Fstyle>">demo</a>).</p>
-
-	<p class=issue>For inline elements, the image is sized to the bounding box of the individual pieces, if they're broken across a line (see above demos).</p>
-
-	<p class=issue>Elements broken across columns also size themselves according to the bounding box (<a href="data:text/html;charset=utf-8,&lt;!DOCTYPE html>%0A&lt;p id%3Dfoo>foo foo foo &lt;span id%3Dbar>foo foo&lt;%2Fspan> foo foo foo&lt;%2Fp>%0A&lt;div>&lt;%2Fdiv>%0A&lt;style>%0Aspan { border%3A thick solid red%3B }%0Ap { border%3A thin solid black%3B width%3A 100px%3B -moz-column-width%3A40px%3B}%0Adiv { %0A border%3A thick solid black%3B%0A width%3A 200px%3B%0A height%3A 200px%3B%0A background%3A -moz-element(%23bar)%3B%0A}%0A&lt;%2Fstyle>">demo</a>).</p>
-
-	<p class=issue>What happens with elements broken across regions?  Pages?</p>
-
-	<p class=issue>An &lt;option> element still has a proper renderer (not what's displayed when you're folded up; the display in the tray when it comes out), and thus works fine in element() (<a href="data:text/html;charset=utf-8,&lt;!DOCTYPE html>%0A&lt;select id%3Dfoo>%0A &lt;option id%3Dbar>one&lt;%2Foption>%0A &lt;option id%3Dbaz>two&lt;%2Foption>%0A&lt;%2Fselect>%0A&lt;input type%3Dradio name%3Da id%3Dselect>&lt;label for%3Dselect>select&lt;%2Flabel>%0A | &lt;input type%3Dradio name%3Da id%3Doption1>&lt;label for%3Doption1>option1&lt;%2Flabel>%0A | &lt;input type%3Dradio name%3Da id%3Doption2>&lt;label for%3Doption2>option2&lt;%2Flabel>%0A&lt;div>&lt;%2Fdiv>%0A&lt;style>%0Adiv { %0A border%3A thick solid black%3B%0A width%3A 200px%3B%0A height%3A 200px%3B%0A}%0A%0A%23select%3Achecked ~ div { background%3A -moz-element(%23foo)%3B }%0A%23option1%3Achecked ~ div { background%3A -moz-element(%23bar)%3B }%0A%23option2%3Achecked ~ div { background%3A -moz-element(%23baz)%3B }%0A&lt;%2Fstyle>">demo</a>).)</p>
-
 <!-- ====================================================================== -->
 
 <h4 class="no-num no-toc" id='element-cycles'>

Received on Friday, 5 August 2011 19:21:34 UTC