Page 1 of 1

SVG Script Feature String

Posted: Sun May 01, 2011 2:18 pm
by dhouwn
Friendship, comrades!

Here I am now reporting something which IMHO is not really worth fixing, but should it ever bite then I can claim to have reported it first. ;)

The issue: SVG has the ability to check for features like scripting support, so the following testcase should (if I understand it correctly) display green and not blue when Javascript is disabled for a domain using NoScript:
http://hg.mozilla.org/mozilla-central/file/1be13b4c6d80/layout/reftests/svg/as-image/script100x100.svg wrote:

Code: Select all

<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
     width="100" height="100">
  <defs>
    <pattern id="p1" patternUnits="userSpaceOnUse" width="100%" height="100%">
      <rect width="100%" height="100%" fill="lime"/>
      <rect id="r1" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Script" width="100%" height="100%" fill="orange"/>
    </pattern>
  </defs>
  <rect width="100%" height="100%" fill="lime"/>
  <rect requiredFeatures="http://www.w3.org/TR/SVG11/feature#Script" width="100%" height="100%" fill="blue"/>
</svg>
BTW, Firefox bug report 652442 is about reporting this correctly when JS is generally disabled and was fixed on trunk just recently.
Using the testcase (cross-domain?) in an img element (in this case scripts are not invoked) shows it correctly (on latest nightly):
Image