You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-commits@xmlgraphics.apache.org by ca...@apache.org on 2009/03/15 06:20:13 UTC
svn commit: r754615 - in /xmlgraphics/batik/trunk: CHANGES
sources/org/apache/batik/dom/svg/SVGLocatableSupport.java
Author: cam
Date: Sun Mar 15 05:20:11 2009
New Revision: 754615
URL: http://svn.apache.org/viewvc?rev=754615&view=rev
Log:
Make SVGLocatable.farthestVieportElement return null when called on the
outermost <svg> element. (Fixes bug 46855.)
Modified:
xmlgraphics/batik/trunk/CHANGES
xmlgraphics/batik/trunk/sources/org/apache/batik/dom/svg/SVGLocatableSupport.java
Modified: xmlgraphics/batik/trunk/CHANGES
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/CHANGES?rev=754615&r1=754614&r2=754615&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/CHANGES (original)
+++ xmlgraphics/batik/trunk/CHANGES Sun Mar 15 05:20:11 2009
@@ -9,8 +9,8 @@
1. Bugzilla problem reports fixed:
- 44590, 44919, 44936, 44966, 45112, 45114, 45117, 45520, 45883,
- 44553, 45958, 46072, 46124, 46430, 46431, 43411
+ 43411, 44553, 44590, 44919, 44936, 44966, 45112, 45114, 45117,
+ 45397, 45520, 45883, 45958, 46072, 46124, 46430, 46431, 46855
2. New features
@@ -46,6 +46,8 @@
* Exceptions are now thrown if an invalid QName is passed to
DOMImplementation.createDocumentType().
* DocumentType.getName() now returns the correct value.
+ * Fixed SVGLocatable.farthestViewportElement to return null when
+ called on the outermost <svg> element.
1.7beta1 -> 1.7
---------------
Modified: xmlgraphics/batik/trunk/sources/org/apache/batik/dom/svg/SVGLocatableSupport.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/sources/org/apache/batik/dom/svg/SVGLocatableSupport.java?rev=754615&r1=754614&r2=754615&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/dom/svg/SVGLocatableSupport.java (original)
+++ xmlgraphics/batik/trunk/sources/org/apache/batik/dom/svg/SVGLocatableSupport.java Sun Mar 15 05:20:11 2009
@@ -64,7 +64,11 @@
* org.w3c.dom.svg.SVGLocatable#getFarthestViewportElement()}.
*/
public static SVGElement getFarthestViewportElement(Element elt) {
- return (SVGElement)elt.getOwnerDocument().getDocumentElement();
+ Element rootSVG = elt.getOwnerDocument().getDocumentElement();
+ if (elt == rootSVG) {
+ return null;
+ }
+ return (SVGElement) rootSVG;
}
/**