ASF Bugzilla – Attachment 16268 Details for
Bug 36455
[PATCH] Backwards compatibility fix for SVGOMElement.getCascadedXMLBase()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to fix the problem
batik-baseURL-patch.diff.txt (text/plain), 1.77 KB, created by
Jeremias Maerki
on 2005-09-01 10:28:58 UTC
(
hide
)
Description:
Patch to fix the problem
Filename:
MIME Type:
Creator:
Jeremias Maerki
Created:
2005-09-01 10:28:58 UTC
Size:
1.77 KB
patch
obsolete
>Index: C:/Dev/apache.org/r/batik/sources/org/apache/batik/dom/svg/SVGOMElement.java >=================================================================== >--- C:/Dev/apache.org/r/batik/sources/org/apache/batik/dom/svg/SVGOMElement.java (revision 219037) >+++ C:/Dev/apache.org/r/batik/sources/org/apache/batik/dom/svg/SVGOMElement.java (working copy) >@@ -1,6 +1,6 @@ > /* > >- Copyright 2000-2003 The Apache Software Foundation >+ Copyright 2000-2003,2005 The Apache Software Foundation > > Licensed under the Apache License, Version 2.0 (the "License"); > you may not use this file except in compliance with the License. >@@ -26,7 +26,6 @@ > import org.apache.batik.util.XMLConstants; > import org.w3c.dom.Attr; > import org.w3c.dom.DOMException; >-import org.w3c.dom.Document; > import org.w3c.dom.Element; > import org.w3c.dom.Node; > import org.w3c.dom.svg.SVGAnimatedEnumeration; >@@ -34,6 +33,7 @@ > import org.w3c.dom.svg.SVGAnimatedLength; > import org.w3c.dom.svg.SVGAnimatedNumber; > import org.w3c.dom.svg.SVGAnimatedString; >+import org.w3c.dom.svg.SVGDocument; > import org.w3c.dom.svg.SVGElement; > import org.w3c.dom.svg.SVGException; > import org.w3c.dom.svg.SVGFitToViewBox; >@@ -210,6 +210,12 @@ > doc = (AbstractDocument) node.getOwnerDocument(); > } > base = doc.getDocumentURI(); >+ if (base == null && doc instanceof SVGDocument) { >+ //getDocumentURI() is only available since after Batik 1.6. >+ //The following line tries to establish backwards compatibility for >+ //clients that can't call setDocumentURI(). >+ base = ((SVGDocument)doc).getURL(); >+ } > } > while (node != null && node.getNodeType() != Node.ELEMENT_NODE) { > node = node.getParentNode();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 36455
: 16268