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 hi...@apache.org on 2002/06/12 13:04:24 UTC

cvs commit: xml-batik/test-resources/org/apache/batik/css/dom bug9779.svg unitTesting.xml

hillion     2002/06/12 04:04:24

  Modified:    sources/org/apache/batik/css/engine/value/css2
                        FontStretchManager.java
               test-resources/org/apache/batik/css/dom unitTesting.xml
  Added:       test-resources/org/apache/batik/css/dom bug9779.svg
  Log:
  Fixed bug #9779
  
  Revision  Changes    Path
  1.2       +5 -5      xml-batik/sources/org/apache/batik/css/engine/value/css2/FontStretchManager.java
  
  Index: FontStretchManager.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/css/engine/value/css2/FontStretchManager.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FontStretchManager.java	18 Mar 2002 10:28:23 -0000	1.1
  +++ FontStretchManager.java	12 Jun 2002 11:04:24 -0000	1.2
  @@ -96,11 +96,11 @@
           if (value == ValueConstants.NARROWER_VALUE) {
               sm.putParentRelative(idx, true);
   
  -            Element p = CSSEngine.getParentCSSStylableElement(elt);
  +            CSSStylableElement p = CSSEngine.getParentCSSStylableElement(elt);
               if (p == null) {
                   return ValueConstants.SEMI_CONDENSED_VALUE;
               }
  -            Value v = engine.getComputedStyle(elt, pseudo, idx);
  +            Value v = engine.getComputedStyle(p, pseudo, idx);
               if (v == ValueConstants.NORMAL_VALUE) {
                   return ValueConstants.SEMI_CONDENSED_VALUE;
               }
  @@ -129,11 +129,11 @@
           } else if (value == ValueConstants.WIDER_VALUE) {
               sm.putParentRelative(idx, true);
   
  -            Element p = CSSEngine.getParentCSSStylableElement(elt);
  +            CSSStylableElement p = CSSEngine.getParentCSSStylableElement(elt);
               if (p == null) {
                   return ValueConstants.SEMI_CONDENSED_VALUE;
               }
  -            Value v = engine.getComputedStyle(elt, pseudo, idx);
  +            Value v = engine.getComputedStyle(p, pseudo, idx);
               if (v == ValueConstants.NORMAL_VALUE) {
                   return ValueConstants.SEMI_EXPANDED_VALUE;
               }
  
  
  
  1.4       +2 -1      xml-batik/test-resources/org/apache/batik/css/dom/unitTesting.xml
  
  Index: unitTesting.xml
  ===================================================================
  RCS file: /home/cvs/xml-batik/test-resources/org/apache/batik/css/dom/unitTesting.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- unitTesting.xml	10 Jun 2002 14:04:24 -0000	1.3
  +++ unitTesting.xml	12 Jun 2002 11:04:24 -0000	1.4
  @@ -18,5 +18,6 @@
           <test id="rgbUpdateTest" />
           <test id="rgbPresentationTest" />
           <test id="bug9740" />
  +        <test id="bug9779" />
       </testGroup>
   </testSuite>
  
  
  
  1.1                  xml-batik/test-resources/org/apache/batik/css/dom/bug9779.svg
  
  Index: bug9779.svg
  ===================================================================
  <?xml version="1.0" standalone="no"?>
  <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
  "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
  
  <!-- ========================================================================= -->
  <!-- Copyright (C) The Apache Software Foundation. All rights reserved.        -->
  <!--                                                                           -->
  <!-- This software is published under the terms of the Apache Software License -->
  <!-- version 1.1, a copy of which has been included with this distribution in  -->
  <!-- the LICENSE file.                                                         -->
  <!-- ========================================================================= -->
  
  <!-- ========================================================================= -->
  <!--                                                                           -->
  <!-- @author shillion@ilog.fr                                                  -->
  <!-- @version $Id: bug9779.svg,v 1.1 2002/06/12 11:04:24 hillion Exp $ -->
  <!-- ========================================================================= -->
  
  <svg xmlns="http://www.w3.org/2000/svg" 
       xmlns:xlink="http://www.w3.org/1999/xlink" 
       xmlns:test="http://xml.apache.org/batik/test"
       width="450" height="500" viewBox="0 0 450 500"
       onload="runTest(evt)">
  
    <test:testResult id="testResult" />
  
    <script type="text/ecmascript"><![CDATA[
     var testNS = "http://xml.apache.org/batik/test";
  
     function runTest() {
       // This document caused batik to crash.
       // So just make sure that this function was called...
       var result = document.getElementById("testResult");
       result.setAttributeNS(null, "result", "passed");
     }
    ]]></script>
  
    <text x="30" y="40" style="font-stretch:normal">normal</text>
    <text x="30" y="70" style="font-stretch:wider">wider</text>
  
  </svg>
  
  
  

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