ACTION-3614: make width and height presentation attributes on foreignObject.
authorErik Dahlström <ed@opera.com>
Thu, 10 Apr 2014 11:39:13 +0200
changeset 650 bdc014530367
parent 649 f2678313d917
child 651 f0b5cb1a9546
ACTION-3614: make width and height presentation attributes on foreignObject.
master/changes.html
master/definitions.xml
master/extend.html
master/styling.html
--- a/master/changes.html	Thu Apr 03 17:56:16 2014 +1100
+++ b/master/changes.html	Thu Apr 10 11:39:13 2014 +0200
@@ -314,6 +314,7 @@
 
 <ul>
   <li>Made <a>'foreignObject'</a> a <a>graphics element</a>.</li>
+  <li>Made <a>'foreignObject/width'</a> and <a>'foreignObject/height'</a> presentation attributes on the <a>'foreignObject'</a> element.</li>
 </ul>
 
 <h3 id="svgdtd">Document Type Definition appendix</h3>
--- a/master/definitions.xml	Thu Apr 03 17:56:16 2014 +1100
+++ b/master/definitions.xml	Thu Apr 10 11:39:13 2014 +0200
@@ -302,8 +302,8 @@
       interfaces='SVGForeignObjectElement'>
     <attribute name='x' href='extend.html#ForeignObjectElementXAttribute' animatable='yes'/>
     <attribute name='y' href='extend.html#ForeignObjectElementYAttribute' animatable='yes'/>
-    <attribute name='width' href='extend.html#ForeignObjectElementWidthAttribute' animatable='yes'/>
-    <attribute name='height' href='extend.html#ForeignObjectElementHeightAttribute' animatable='yes'/>
+    <attribute name='width' href='extend.html#ForeignObjectElementWidthAttribute' animatable='yes' presentation='yes'/>
+    <attribute name='height' href='extend.html#ForeignObjectElementHeightAttribute' animatable='yes' presentation='yes'/>
   </element>
 
   <element
@@ -1184,6 +1184,8 @@
   <property name='display' href='painting.html#VisibilityControl'/>
   <property name='opacity' href='masking.html#ObjectAndGroupOpacityProperties'/>
   <property name='visibility' href='painting.html#VisibilityControl'/>
+  <property name='height' href='styling.html#HeightProperty'/>
+  <property name='width' href='styling.html#WidthProperty'/>
 
   <!-- ... text properties defined elsewhere -->
   <property name='hyphens'         href='text.html#HyphensProperty'/>
--- a/master/extend.html	Thu Apr 03 17:56:16 2014 +1100
+++ b/master/extend.html	Thu Apr 10 11:39:13 2014 +0200
@@ -147,9 +147,10 @@
         href="animate.html#Animatable">Animatable</a>:
         yes.</span></dd>
         <dt id="ForeignObjectElementWidthAttribute"><span
-        class="adef">width</span> = "<span class="attr-value"><a
-        href="types.html#DataTypeLength">&lt;length&gt;</a></span>"</dt>
-        <dd>The width of the rectangular region into which the
+        class="adef">width</span> = <em>see <a>'width property'</a></em></dt>
+        <dd>
+        <span class="note">Note that this is a presentation attribute.</span><br />
+          The width of the rectangular region into which the
         referenced document is placed.<br />
          A negative value is an error (see <a
         href="implnote.html#ErrorProcessing">Error processing</a>).
@@ -158,9 +159,10 @@
         href="animate.html#Animatable">Animatable</a>:
         yes.</span></dd>
         <dt id="ForeignObjectElementHeightAttribute"><span
-        class="adef">height</span> = "<span class="attr-value"><a
-        href="types.html#DataTypeLength">&lt;length&gt;</a></span>"</dt>
-        <dd>The height of the rectangular region into which the
+        class="adef">height</span> = <em>see <a>'height property'</a></em></dt>
+        <dd>
+        <span class="note">Note that this is a presentation attribute.</span><br />
+          The height of the rectangular region into which the
         referenced document is placed.<br />
          A negative value is an error (see <a
         href="implnote.html#ErrorProcessing">Error processing</a>).
@@ -265,7 +267,7 @@
 <div>
 Corresponds to attribute <a>'width'</a> on the given <a>'foreignObject'</a>
 element.
-
+<p class="issue">What value should be returned here (since this is now a presentation attribute)?</p>
 </div>
 </dd>
 
@@ -274,6 +276,7 @@
 <div>
 Corresponds to attribute <a>'height'</a> on the given <a>'foreignObject'</a>
 element.
+<p class="issue">What value should be returned here (since this is now a presentation attribute)?</p>
 
 </div>
 </dd>
--- a/master/styling.html	Thu Apr 03 17:56:16 2014 +1100
+++ b/master/styling.html	Thu Apr 10 11:39:13 2014 +0200
@@ -78,6 +78,12 @@
     </ul>
   </li>
   <li>
+    Content size properties: 
+    <ul>
+      <li><a>'height'</a></li>
+      <li><a>'width'</a></li>
+    </ul>
+  </li>  <li>
     Other properties for visual media: 
     <ul>
       <li><a>'clip'</a>, only applicable to <a>outermost svg element</a>.</li>
@@ -1055,6 +1061,107 @@
   contextual CSS selectors, or use XSL selectors.</dd>
 </dl>
 
+<h2 id="ContentSizeProperties">Content size properties</h2>
+  <p>
+    The content size properties specify the size of a CSS box.
+  </p>
+
+  <table  class="propdef">
+    <tr>
+      <th>Name:</th>
+      <td><dfn id="WidthProperty">width</dfn></td>
+    </tr>
+    <tr>
+      <td>Value:</td>
+      <td><a>&lt;percentage&gt;</a> | <a>&lt;length&gt;</a> | auto</td>
+    </tr>
+    <tr>
+      <td>Initial:</td>
+      <td>auto</td>
+    </tr>
+    <tr>
+      <td>Applies to:</td>
+      <td>all elements but non-replaced inline elements, table rows, and row groups, in SVG: the <a>'foreignObject'</a> element</td>
+    </tr>
+    <tr>
+      <td>Inherited:</td>
+      <td>no</td>
+    </tr>
+    <tr>
+      <td>Percentages:</td>
+      <td>refer to width of containing block</td>
+    </tr>
+    <tr>
+      <td>Media:</td>
+      <td>visual</td>
+    </tr>
+    <tr>
+      <th>Computed&#160;value:</th>
+      <td>the percentage or 'auto' as specified or the absolute length</td>
+    </tr>
+    <tr>
+      <th><a>Animatable</a>:</th>
+      <td>yes</td>
+    </tr>
+  </table>
+
+  <p class="note">
+    Except for any additional information provided in this
+    specification, the
+    <a href="http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#the-width-property">normative
+    definition of the <span class="property-name">'width'</span> property</a> is in CSS 2.1
+    ([<a href="refs.html#ref-CSS21">CSS21</a>], section 10.2).
+  </p>
+
+  <table class="propdef">
+    <tr>
+      <th>Name:</th>
+      <td><dfn id="HeightProperty">height</dfn></td>
+    </tr>
+    <tr>
+      <td>Value:</td>
+      <td><a>&lt;percentage&gt;</a> | <a>&lt;length&gt;</a> | auto</td>
+    </tr>
+    <tr>
+      <td>Initial:</td>
+      <td>auto</td>
+    </tr>
+    <tr>
+      <td>Applies to:</td>
+      <td>all elements but non-replaced inline elements, table columns, and column groups, in SVG: the <a>'foreignObject'</a> element</td>
+    </tr>
+    <tr>
+      <td>Inherited:</td>
+      <td>no</td>
+    </tr>
+    <tr>
+      <td>Percentages:</td>
+      <td><a href="http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#the-height-property">see prose</a></td>
+    </tr>
+    <tr>
+      <td>Media:</td>
+      <td>visual</td>
+    </tr>
+    <tr>
+      <th>Computed&#160;value:</th>
+      <td>the percentage or 'auto' (see prose under <a href="http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#the-height-property">&lt;percentage&gt;</a>) or the absolute length</td>
+    </tr>
+    <tr>
+      <th><a>Animatable</a>:</th>
+      <td>yes</td>
+    </tr>
+  </table>
+
+  <p class="note">
+    Except for any additional information provided in this
+    specification, the
+    <a href="http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#the-height-property">normative
+    definition of the <span class="property-name">'height'</span> property</a> is in CSS 2.1
+    ([<a href="refs.html#ref-CSS21">CSS21</a>], section 10.5).
+  </p>
+
+  <p class="issue">Is there a need to define 'auto' in more detail specifically for svg/foreignObject?</p>
+
 <p class="issue">As part of unifying HTML's and SVG's
 <span class="element-name">'style'</span> element, we should
 allow and mention scoped style sheets here.</p>