[prev in list] [next in list] [prev in thread] [next in thread] 

List:       batik-dev
Subject:    [jira] [Created] (BATIK-1042) Batik requires 'splitText' to have a parent node
From:       "EL (JIRA)" <jira () apache ! org>
Date:       2013-04-16 10:39:15
Message-ID: JIRA.12642700.1366108704888.172936.1366108755524 () arcas
[Download RAW message or body]

EL created BATIK-1042:
-------------------------

             Summary: Batik requires 'splitText' to have a parent node
                 Key: BATIK-1042
                 URL: https://issues.apache.org/jira/browse/BATIK-1042
             Project: Batik
          Issue Type: Bug
          Components: SVG DOM, SVG Rasterizer, SVG Viewer
    Affects Versions: 1.7
         Environment: Linux, SL/RHEL 6, Java 1.6.0_24
            Reporter: EL


'splitText' fails and throws an exception ("A text node needs a parent node in order \
to be split") when the text node is created directly in 'document'. It doesn't appear \
to be a requirement of 'splitText' that it should be lower down in the DOM. This \
isn't an issue in Chrome, Firefox, Safari, Opera, and IE9+.

This code works in the 5 major browsers, but fails in squiggle (and fails silently in \
the rasteriser):

   var ltnode, rtnode;
   ...
   ltnode = svg_doc.createTextNode(input);        // 'svg_doc' is 'document'
   while(1) {
      sindx = ltnode.nodeValue.indexOf(" ", 1);
      if(sindx < 0)
         finished = true;    // no more spaces; 'ltnode' is the last word
      else
         rtnode = ltnode.splitText(sindx);             // squiggle throws exception
      ...
   }

When the exception is thrown, the debugger shoes 'svg_doc' as \
'org.apache.batik.dom.svg.SVGOMDocument'. The Chrome debugger shows it as 'document' \
at the same point in execution.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic