W3C home > Mailing lists > Public > www-svg@w3.org > July 2010

Conference Calls and Issues

From: Patrick Dengler <patd@microsoft.com>
Date: Mon, 19 Jul 2010 15:38:37 +0000
To: "www-svg@w3.org" <www-svg@w3.org>
Message-ID: <4A2DB3AE4504E944AF122BBFBA7FBA1F514F77E5@TK5EX14MBXC118.redmond.corp.microsoft.com>
Ok, I returned to the conference calls, bright and early here in Redmond, but I must have missed the note that today's and last week's was cancelled?

I thought I would give some updates and ask a few questions:

HTML5 / SVG Tests
===============
Thanks for the feedback on the test we submitted to the testing center.  We had some errors and hopefully all are corrected at this time.  We are now looking at jwatt's tests to see if we can contribute any others as discussed at the Face to Face.

SVG Test Suite Analysis
==================
I had noted that we would have a surface analysis at the end of July.  We are still on track for that and will include some anecdotal details of tests that we believe are in error.  We also believe that the quality of these tests is critical to a quality specification.  We are not intended at all to inundate the SVG WG with many tests, and we recognize the desire to reduce the impact of reviewing tests, but I believe we must make sure that they are correct, and do test the specification.

Questions:

Markers
=======
The issue of markers, http://lists.w3.org/Archives/Public/www-svg/2010Feb/0023.html was raised by Jeff Schiller.  At the time we discussed that as this would be visited in SVG 2.0, and that the approach of applying styles at the reference point was the right model, and like with href in SVG 2.0, this is how we implemented it.  However we have noted that no other browser has adopted this, and the marker test is still out there.  Since we agreed that marker was another instance of <use>, the following should be applied: " he referenced element inherits properties from the ‘marker’ element and the ‘marker’ element's ancestors."

Problems with List interface
=====================
I brought this up before.  We believe that the list interface, while well documented, conflicts with other areas of the specification specifically in areas where one value is stored as a reference for two different values, and yet the unit type differs.   One of our developers, Alan, has created a sample test that shows where this demonstrates and inconsistency in the specification (see end of email). In terms of appropriate behavior, combined with the desire to "fix" lists in SVG 2.0, we think that the appropriate behavior here is to not hold the reference when assigning a value, but rather making a copy, which also implies not removing it from the previous list.  This results in the copy being able to fit the appropriate unit type where assigned. Webkit matches this behavior. Firefox adds references, but does not remove items from lists. (Firefox also throws an exception in the middle of the test).  Opera follows the list portion of the spec, but as you can see in this test it demonstrates the inconsistencies in the spec (namely, how do you resolve referenced unit types like em and percent when it applies to two different contexts).


<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

<svg  id="root"
      width="100%" height="100%" version="1.1"
      xmlns:xlink="http://www.w3.org/1999/xlink"
      xmlns="http://www.w3.org/2000/svg"
      >

  <g font-family="Times New Roman" font-size="32">
    <image id="image1" x="10" y="1.5em" width="1em" height="1em" xlink:href="foo.png"/>
    <text id="text1" x="50 90 130" y="2em">Times New Roman 32pt</text>
  </g>

  <g font-family="Courier New" font-size="16">
    <text id="text2" x="60 80 100" y="10em">Courier New 16pt</text>
  </g>

  <script>
    try {
    var root = document.getElementById("root");
    var image1 = document.getElementById("image1");
    var image2 = document.getElementById("image2");
    var text1 = document.getElementById("text1");
    var text2 = document.getElementById("text2");

    alert("Creating an SVGLength");
    alert("var createdLength = root.createSVGLength();");
    var createdLength = root.createSVGLength();
    createdLength.value = 170;
    alert((createdLength instanceof SVGLength)?"Success":"Failure");

    alert("Appending created length to text1.x.baseVal");
    alert("var append1 = text1.x.baseVal.appendItem(createdLength);");
    var append1 = text1.x.baseVal.appendItem(createdLength);
    alert((text1.x.baseVal.numberOfItems == 4) ? "Success" : "Failure");

    alert("Modifying createdLength to test reference/copy.");
    alert("createdLength.value = 210;");
    createdLength.value = 210;
    if( append1.value == 210) {
    alert("Added as a reference according to spec. append1.value == " + append1.value);
    } else {
    alert("Added as a copy against spec. append1.value == " + append1.value);
    }

    alert("Appending result of last append to text2");
    alert("var append2 = text2.x.baseVal.appendItem(append1);");
    var append2 = text2.x.baseVal.appendItem(append1);
    alert((text2.x.baseVal.numberOfItems == 4) ? "Success" : "Failure");

    alert("Checking if the append1 was removed from text1.baseVal.x");
    if(text1.x.baseVal.numberOfItems == 3) {
    alert("append1 was removed from text1.x.baseVal according to spec. text1.x.baseVal.numberOfItems == " + text1.x.baseVal.numberOfItems);
    } else {
    alert("append1 was not removed from text1.x.baseVal against spec. text1.x.baseVal.numberOfItems == " + text1.x.baseVal.numberOfItems);
    }

    alert("Appending image1.y to text2.y.baseVal");
    alert("var append3 = text2.y.baseVal.appendItem(image1.y.baseVal);");
    var image_y = image1.y.baseVal;
    var append3 = text2.y.baseVal.appendItem(image_y);
    alert((text2.y.baseVal.numberOfItems == 2) ? "Success" : "Failure");

    alert("Checking em to px conversion for parameter and added value.");
    alert("Parameter value = " + image_y.value);
    alert("Appended value = " + append3.value);

    alert("Checking if appendItem parameter is the same instance as returned value");
    if(append3 === image_y) {
    alert("Reference was added in accordance with spec.");
    } else {
    alert("Instances are different, but that may not mean anything.");
    }

    alert("Checking if change to appendItem parameter changes item in list.");
    image_y.value = 160;
    if(append3.value == 160) {
    alert("Reference was added in accordance with spec.");
    } else {
    alert("Copy was added in violation of spec.");
    }

    } catch(e) {
    alert(e);
    }
  </script>
  
</svg>




Received on Monday, 19 July 2010 15:39:11 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:45 GMT