You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by vh...@apache.org on 2001/02/16 16:59:32 UTC
cvs commit: xml-batik/sources/org/apache/batik/bridge SVGColorProfileElementBridge.java SVGImageElementBridge.java
vhardy 01/02/16 07:59:32
Modified: sources/org/apache/batik/bridge
SVGColorProfileElementBridge.java
SVGImageElementBridge.java
Log:
Modified code to account for CSS case-insensitive behavior.
Revision Changes Path
1.3 +4 -4 xml-batik/sources/org/apache/batik/bridge/SVGColorProfileElementBridge.java
Index: SVGColorProfileElementBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGColorProfileElementBridge.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SVGColorProfileElementBridge.java 2001/02/15 02:27:28 1.2
+++ SVGColorProfileElementBridge.java 2001/02/16 15:59:30 1.3
@@ -32,7 +32,7 @@
* an <tt>ICC_ColorSpace</tt> object.
*
* @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
- * @version $Id: SVGColorProfileElementBridge.java,v 1.2 2001/02/15 02:27:28 vhardy Exp $
+ * @version $Id: SVGColorProfileElementBridge.java,v 1.3 2001/02/16 15:59:30 vhardy Exp $
*/
public class SVGColorProfileElementBridge implements Bridge, SVGConstants {
/**
@@ -58,7 +58,7 @@
/*
* Check if there is one if the cache.
*/
- ICCColorSpaceExt cs = cache.request(iccProfileName);
+ ICCColorSpaceExt cs = cache.request(iccProfileName.toLowerCase());
if(cs != null){
return cs;
}
@@ -81,7 +81,7 @@
String nameAttr
= profileNode.getAttributeNS(null, SVG_NAME_ATTRIBUTE);
- if(iccProfileName.equals(nameAttr)){
+ if(iccProfileName.equalsIgnoreCase(nameAttr)){
profile = profileNode;
}
}
@@ -126,7 +126,7 @@
/**
* Add profile to cache
*/
- cache.put(iccProfileName, cs);
+ cache.put(iccProfileName.toLowerCase(), cs);
return cs;
}
1.12 +4 -6 xml-batik/sources/org/apache/batik/bridge/SVGImageElementBridge.java
Index: SVGImageElementBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGImageElementBridge.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- SVGImageElementBridge.java 2001/02/16 05:14:48 1.11
+++ SVGImageElementBridge.java 2001/02/16 15:59:30 1.12
@@ -66,7 +66,7 @@
*
* @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
* @author <a href="mailto:Thomas.DeWeeese@Kodak.com">Thomas DeWeese</a>
- * @version $Id: SVGImageElementBridge.java,v 1.11 2001/02/16 05:14:48 vhardy Exp $
+ * @version $Id: SVGImageElementBridge.java,v 1.12 2001/02/16 15:59:30 vhardy Exp $
*/
public class SVGImageElementBridge implements GraphicsNodeBridge,
SVGConstants {
@@ -209,21 +209,19 @@
String colorProfileProperty
= val.getStringValue();
- // System.out.println("color-profile : " + colorProfileProperty);
- // System.out.println(" attr : " + svgElement.getAttributeNS(null, CSS_COLOR_PROFILE_PROPERTY));
/**
* The only cases that need special handling are
* 'sRGB' and 'name'
*/
ICCColorSpaceExt colorSpace = null;
- if(CSS_SRGB_VALUE.equals(colorProfileProperty)){
+ if(CSS_SRGB_VALUE.equalsIgnoreCase(colorProfileProperty)){
colorSpace
= new ICCColorSpaceExt(ICC_Profile.getInstance(ColorSpace.CS_sRGB),
ICCColorSpaceExt.AUTO);
}
- else if(!CSS_AUTO_VALUE.equals(colorProfileProperty)
+ else if(!CSS_AUTO_VALUE.equalsIgnoreCase(colorProfileProperty)
&&
- !"".equals(colorProfileProperty)){
+ !"".equalsIgnoreCase(colorProfileProperty)){
/*
* The value is neither 'sRGB' nor 'auto': it is
* a profile name.