Uploaded image for project: 'Batik'
  1. Batik
  2. BATIK-853

Change to style CDATA not detected

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: None
    • Component/s: SVG DOM
    • Labels:
      None
    • Environment:
      Operating System: Mac OS X 10.4
      Platform: Macintosh

      Description

      Changes to the CDATA of a style element are not reflected in a document loaded in a JSVGComponent.

      To reproduce: Load the attached document cdata.svg and click on the square. This will run a script to replace the CDATA content of a style element.

      Observed: No change.

      Expected: The square should alternate between red and blue when clicked.

      Workaround: Replace the entire style element instead of its contents.

      Analysis: I think this is a simple copy-and-paste-o in SVGOMDocument.DOMCharacterDataModifiedListenerWrapper, which forwards its event using the subTreeModified(Node) method instead of characterDataModified(Node), which is what I would have expected.

        Attachments

        1. cdata.svg
          0.6 kB
          Stephen Drake
        2. cdata.patch
          0.9 kB
          Stephen Drake

          Activity

            People

            • Assignee:
              batik-dev@xmlgraphics.apache.org Batik Developer's Mailing list
              Reporter:
              steve@drakenz.com Stephen Drake
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: