Re: Patch for Acid3 test 77 (SVGTextContentElement errata)

On Sat, 12 Jul 2008 04:01:36 +0200, Ian Hickson <ian@hixie.ch> wrote:

> On Fri, Jul 11, 2008 at 4:17 PM, Ian Hickson <ian@hixie.ch> wrote:
>>>
>>> It's likely that there will be a publication of the SVG 1.1 errata soon.
>>> Once that happens, it would be great if the attached patch could be included
>>> in the acid3 test.
>>
>> I updated Acid3.
>
> Actually I've reverted the change, because the test was still correct
> given the SVG errata. The WebKit team pointed out to me that the new
> errata is wrong. You've made (2,2) not through an exception and (3,0)
> throw an exception, even though the former is undefined and the second
> should be 0.

Assuming the example is a 3 character string, the reasoning behind the change for getSubStringLength(2,2) being equal to getSubStringLength(2,1) is that that's how selectSubString(2,2) works, the second argument value is clamped to the number of available characters.

It's possible that (3,0) shouldn't throw though, to be somewhat more similar to the old definition. That would make it different to selectSubString though, but I can see that with that particular indata you'd want to know in selectSubString that nothing was selected, and for getSubStringLength to return 0 for this case is more convenient.

The webkit team is represented on the SVG WG (by Apple), and it would have been great if the comments would have been heard there when this errata was discussed.

> Please let me know when you've fixed the spec and actually published
> public errata.

Sure thing.

Cheers
/Erik

-- 
Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed

Received on Monday, 14 July 2008 07:29:02 UTC