ACTION-3606: various tweaks for 'overflow'
authorErik Dahlström <ed@opera.com>
Thu, 10 Apr 2014 14:08:21 +0200
changeset 652 cf6f0f844e40
parent 651 f0b5cb1a9546
child 653 6dc0cdba8335
ACTION-3606: various tweaks for 'overflow'

RESOLUTION: outer-most svg elements of inline fragments will be overflow: hidden by default.
RESOLUTION: svg:svg elements should allow overflow: scroll to create scrollbars.
RESOLUTION: overflow property on root svg elements still controls if there should be scrollbars but there should be a clipping rectangle that is the size of the svg element's viewport
master/changes.html
master/masking.html
--- a/master/changes.html	Thu Apr 10 13:58:16 2014 +0200
+++ b/master/changes.html	Thu Apr 10 14:08:21 2014 +0200
@@ -257,6 +257,7 @@
     </ul>
   </li>
   <li>Added reference to Compositing and Blending spec. Simple alpha compositing it mandatory.</li>
+  <li>The <a>'overflow'</a> property should be respected on the outermost svg elements inline in html.</li>
 </ul>
 <h3 id="filters">Filter Effects chapter</h3>
 
--- a/master/masking.html	Thu Apr 10 13:58:16 2014 +0200
+++ b/master/masking.html	Thu Apr 10 14:08:21 2014 +0200
@@ -131,26 +131,32 @@
 going to work in the furture. Sadly, these properties belong to CSS3-box.</p>
 
 <ul>
-  <li>The <a>'overflow'</a> property applies to
-  <a href="coords.html#ElementsThatEstablishViewports">elements that establish new viewports</a>
-  (e.g., <a>'svg'</a> elements), <a>'pattern'</a> elements and <a>'marker element'</a>
-  elements. For all other elements, the property has no effect (i.e., a clipping
-  rectangle is not created).</li>
-
   <li>For those elements to which the <a>'overflow'</a> property can apply, if
   the <a>'overflow'</a> property has the value <span class='prop-value'>hidden</span> or <span class='prop-value'>scroll</span>,
   the effect is that a new clipping path in the shape of a rectangle is created.
   The result is equivalent to defining a <a>'clipPath'</a> element whose
   content is a <a>'rect'</a> element which defines the equivalent rectangle,
   and then specifying the &lt;uri&gt; of this <a>'clipPath'</a> element on the
-  <a>'clip-path'</a> property for the given element.</li>
+  <a>'clip-path'</a> property for the given element.
+  </li>
+  
+  <li>
+  When <span class='prop-value'>scroll</span> is specified on an
+  <a>'svg'</a> element and if the user agent uses a scrolling mechanism that
+  is visible on the screen (such as a scroll bar or a panner), that mechanism should
+  be displayed for the viewport whether or not any of its content is clipped.
+  </li>
 
   <li>If the <a>'overflow'</a> property has a value other than
   <span class='prop-value'>hidden</span> or <span class='prop-value'>scroll</span>,
-  the property has no effect (i.e., a clipping rectangle is not created).</li>
+  the property has no effect (i.e., a clipping rectangle is not created).
+  </li>
 
   <li>Within SVG content, the value <span class='prop-value'>auto</span> is
-  equivalent to the value <span class='prop-value'>visible</span>.</li>
+  equivalent to the value <span class='prop-value'>visible</span>.
+  <p class="issue"><a href="http://www.w3.org/TR/2011/REC-CSS2-20110607/visufx.html#propdef-overflow">CSS implies</a> that 'auto' should be clipped rather
+  than visible, do we want to follow that or not?</p>
+  </li>
 
   <li>When an <a>outermost svg element</a> is embedded inline within a
   parent XML grammar which uses <a href="http://www.w3.org/TR/2011/REC-CSS2-20110607/visuren.html">CSS layout</a>
@@ -164,12 +170,15 @@
   clipping path is set according to the <a href="http://www.w3.org/TR/2011/REC-CSS2-20110607/visufx.html#overflow">clipping rules as defined in CSS 2.1</a>
   ([<a href="refs.html#ref-CSS21">CSS21</a>], section 11.1.1).</li>
 
-  <li>When an <a>outermost svg element</a> is stand-alone or embedded
+  <li>When an <a>outermost svg element</a> is standalone or embedded
   inline within a parent XML grammar which does not use CSS layout
   or XSL formatting, the
   <a>'overflow'</a> property on the <a>outermost svg element</a> is ignored
   for the purposes of visual rendering and the initial clipping path is set to
-  the bounds of the initial <a href="coords.html#SVGViewport">viewport</a>.</li>
+  the bounds of the initial <a href="coords.html#SVGViewport">viewport</a>.
+  Note that the value <span class='prop-value'>hidden</span> still means that
+  no scrolling user interface should be provided.
+  </li>
 
   <li>The initial value for <a>'overflow'</a> as defined
   in [<a href="http://www.w3.org/TR/2011/REC-CSS2-20110607/visufx.html#overflow">CSS21-overflow</a>]
@@ -178,7 +187,7 @@
   overrides this initial value and sets the <a>'overflow'</a> property on
   <a href="coords.html#ElementsThatEstablishViewports">elements that establish new viewports</a>
   (e.g., <a>'svg'</a> elements), <a>'pattern'</a> elements and
-  <a>'marker element'</a> elements to the value 'hidden'.</li>
+  <a>'marker element'</a> elements to the value <span class="prop-value">hidden</span>.</li>
 </ul>
 
 <p>As a result of the above, the default behavior of SVG user agents is to