W3C home > Mailing lists > Public > public-svg-wg@w3.org > April to June 2014

svg2: ACTION-3614: make width and height presentation attributes on f...

From: SVG Working Group repository <cam+svgwgrepo@mcc.id.au>
Date: Thu, 10 Apr 2014 02:45:30 -0700
Message-Id: <hg.bdc014530367.1397123130.3034738116371802840@ps58493.dreamhostps.com>
To: public-svg-wg@w3.org
details:   https://svgwg.org/hg/svg2/rev/bdc014530367
branches:  
changeset: 650:bdc014530367
user:      Erik Dahlstr?m <ed@opera.com>
date:      Thu Apr 10 11:39:13 2014 +0200
description:
ACTION-3614: make width and height presentation attributes on foreignObject.

diffstat:

 master/changes.html    |    1 +
 master/definitions.xml |    6 +-
 master/extend.html     |   17 ++++---
 master/styling.html    |  107 +++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 122 insertions(+), 9 deletions(-)

diffs (278 lines):

diff --git a/master/changes.html b/master/changes.html
--- a/master/changes.html
+++ b/master/changes.html
@@ -309,16 +309,17 @@ have been made.</p>
 <ul>
   <li>Added WOFF requirement, rearranged content.</li>
 </ul>
 
 <h3 id="extend">Extensibility chapter</h3>
 
 <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>
 
 <ul>
   <li>Removed this appendix, as SVG 2 is not defined in terms of a DTD.</li>
 </ul>
 
diff --git a/master/definitions.xml b/master/definitions.xml
--- a/master/definitions.xml
+++ b/master/definitions.xml
@@ -297,18 +297,18 @@
   <element
       name='foreignObject'
       href='extend.html#ForeignObjectElement'
       contentmodel='any'
       attributecategories='aria, navigation, core, conditional processing, graphical event, presentation, style'
       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
     name='g'
     href='struct.html#GElement'
     contentmodel='anyof'
     elementcategories='animation, descriptive, shape, structural, paint server'
     elements='a, altGlyphDef, clipPath, cursor, filter, font, font-face, foreignObject, image, marker, mask, script, style, switch, text, view'
@@ -1179,16 +1179,18 @@
   <property name='word-spacing' href='text.html#WordSpacingProperty'/>
   <property name='writing-mode' href='text.html#WritingModeProperty'/>
 
   <!-- ... properties defined elsewhere but described in this spec ........ -->
 
   <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'/>
   <property name='line-height'     href='text.html#TextLineHeight'/>
   <property name='overflow-wrap'   href='text.html#OverflowWrapProperty'/>
   <property name='line-break'      href='text.html#LineBreakProperty'/>
   <property name='shape-inside'    href='text.html#TextShapeInside'/>
   <property name='shape-margin'    href='text.html#TextShapeMargin'/>
diff --git a/master/extend.html b/master/extend.html
--- a/master/extend.html
+++ b/master/extend.html
@@ -142,30 +142,32 @@ available.</p>
         <dd>The y-axis coordinate of one corner of the rectangular
         region into which the referenced document is placed.<br />
          If the attribute is not specified, the effect is as if a
         value of <span class='attr-value'>'0'</span> were specified.<br />
          <span class="anim-target"><a
         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>).
         A value of zero disables rendering of the element.<br />
          <span class="anim-target"><a
         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>).
         A value of zero disables rendering of the element.<br />
          <span class="anim-target"><a
         href="animate.html#Animatable">Animatable</a>:
         yes.</span></dd>
       </dl>
@@ -260,25 +262,26 @@ element.
 </div>
 </dd>
 
 <dt id="__svg__SVGForeignObjectElement__width" class="attribute"><b>width</b><span class="idl-type-parenthetical"> (readonly <a class="idlinterface" href="types.html#InterfaceSVGAnimatedLength">SVGAnimatedLength</a>)</span></dt>
 <dd class="attribute">
 <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>
 
 <dt id="__svg__SVGForeignObjectElement__height" class="attribute"><b>height</b><span class="idl-type-parenthetical"> (readonly <a class="idlinterface" href="types.html#InterfaceSVGAnimatedLength">SVGAnimatedLength</a>)</span></dt>
 <dd class="attribute">
 <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>
 </dl>
 </dd>
 </dl>
 
 </edit:with>
diff --git a/master/styling.html b/master/styling.html
--- a/master/styling.html
+++ b/master/styling.html
@@ -73,16 +73,22 @@ we normative require support for, and wh
       <li><a>'direction'</a></li>
       <li><a>'letter-spacing'</a></li>
       <li><a>'text-decoration'</a></li>
       <li><a>'unicode-bidi'</a></li>
       <li><a>'word-spacing'</a></li>
     </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>
       <li><a>'color'</a>, used to provide a potential indirect value
       (<span class="prop-value">currentColor</span>) for the
       <a>'fill'</a>,
       <a>'stroke'</a>,
       <a>'stop-color'</a>,
@@ -1050,16 +1056,117 @@ descendants.</p>
   or style attributes, or in external style sheets linked with
   the style sheet processing instruction) apply across the
   entire document, including those parts of it in the SVG
   namespace. To get different styling for the SVG part, use the
   <a>'style attribute'</a> attribute, or put an <a>'id'</a> on the <a>'svg'</a> element and use
   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>
 
 <h2 id='UAStyleSheet'>User agent style sheet</h2>
 
 <p>The user agent shall maintain a
 <a href='http://www.w3.org/TR/2011/REC-CSS2-20110607/cascade.html#cascade'>user agent style sheet</a>
Received on Thursday, 10 April 2014 09:45:54 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:20:19 UTC