RE: Bugs in the submitted foreign content tests

Thanks for the feedback - for #12 it's being  discussed in the SVG WG and list that since CSS overflow == auto, SVG in HTML == auto is correct or not.
One the SVG WG agrees we can either approve the test or have it updated with their feedback.

http://dvcs.w3.org/hg/html/raw-file/54697709a218/tests/submission/Microsoft/foreigncontent/foreign_content_012.html>

-----Original Message-----
From: Ms2ger [mailto:ms2ger@gmail.com] 
Sent: Tuesday, June 29, 2010 12:00 PM
To: Kris Krueger
Cc: public-html-testsuite@w3.org
Subject: Bugs in the submitted foreign content tests

Dear Kris

There are some bugs in the foreign content tests Microsoft submitted:


<http://dvcs.w3.org/hg/html/raw-file/54697709a218/tests/submission/Microsoft/foreigncontent/foreign_content_002.html>
The baseline of the text is to be placed at 0 pixels from the top of the svg element, [1][2] so "FillerText" is hidden. A solution would be to change

   var svgNamespace = "http://www.w3.org/2000/svg";
   var textElem = document.createElementNS(svgNamespace, "text");

to

   var svgNamespace = "http://www.w3.org/2000/svg";
   var textElem = document.createElementNS(svgNamespace, "text");
   textElem.setAttribute("y", "1em");


<http://dvcs.w3.org/hg/html/raw-file/54697709a218/tests/submission/Microsoft/foreigncontent/foreign_content_012.html>
Given that the UA style sheet for SVG is to contain |svg:not(:root) {
overflow: hidden }|, [3] the bottom half of the second square is cut off, because it has been positioned outside of the svg element. To avoid confusion when interpreting the pass condition ("…above a black
square.") strictly, I suggest changing

   <svg width="200px" height="200px">
       <rect id="rect1" x="0" y="0" width="100px" height="100px" />
       <rect id="rect2" x="0" y="150"  width="100px" height="100px" />
   </svg>

to

   <svg width="200px" height="200px">
       <rect id="rect1" x="0" y="0" width="100px" height="100px" />
       <rect id="rect2" x="0" y="100" width="100px" height="100px" />
   </svg>

to ensure the entire square is visible.


<http://dvcs.w3.org/hg/html/raw-file/54697709a218/tests/submission/Microsoft/foreigncontent/foreign_content_014.html>
<http://dvcs.w3.org/hg/html/raw-file/54697709a218/tests/submission/Microsoft/foreigncontent/foreign_content_015.html>
HTML5 does not require that SVG elements implement the id IDL attribute. 
To limit the test to what it claims to test, change

   var idName = parentNode.childNodes[i].id;

to

   var idName = parentNode.childNodes[i].getAttribute("id");


A patch with the suggested changes is attached.

[1] http://www.w3.org/TR/SVG/text.html#TSpanElementYAttribute

[2] http://www.w3.org/TR/SVG/text.html#AlignmentPoint

[3] http://lists.w3.org/Archives/Public/public-svg-wg/2008JulSep/0347.html

Received on Wednesday, 7 July 2010 18:35:30 UTC