[prev in list] [next in list] [prev in thread] [next in thread] 

List:       batik-dev
Subject:    cvs commit: xml-batik/sources/org/apache/batik/script/rhino RhinoInterpreter.java WindowWrapper.java
From:       deweese () apache ! org
Date:       2003-07-30 0:08:37
[Download RAW message or body]

deweese     2003/07/29 17:08:37

  Modified:    sources/org/apache/batik/css/engine CSSEngine.java
               sources/org/apache/batik/ext/awt
                        MultipleGradientPaintContext.java
               sources/org/apache/batik/script/rhino RhinoInterpreter.java
                        WindowWrapper.java
  Log:
  1) Fixed CSS property change in some complex cases.
  2) Fixed a problem in transparency detection for Gradients with NO_REPEAT
  3) Fixed a bug with getURL when passed a function using scoping.
  
  Revision  Changes    Path
  1.27      +11 -8     xml-batik/sources/org/apache/batik/css/engine/CSSEngine.java
  
  Index: CSSEngine.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/css/engine/CSSEngine.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- CSSEngine.java	29 Jul 2003 00:24:32 -0000	1.26
  +++ CSSEngine.java	30 Jul 2003 00:08:36 -0000	1.27
  @@ -1889,13 +1889,16 @@
                   else props[i] = -1;
               }
               
  -            if (count == 0) 
  -                return; // nothing to propogate
  -            inherited = new int[count];
  -            count=0;
  -            for (int i=0; i<props.length; i++)
  -                if (props[i] != -1)
  -                    inherited[count++] = props[i];
  +            if (count == 0) {
  +                // nothing to propogate for sure
  +                inherited = null;
  +            } else {
  +                inherited = new int[count];
  +                count=0;
  +                for (int i=0; i<props.length; i++)
  +                    if (props[i] != -1)
  +                        inherited[count++] = props[i];
  +            }
           }
   
           Node c = getImportedChild(node);
  
  
  
  1.16      +7 -1      xml-batik/sources/org/apache/batik/ext/awt/MultipleGradientPaintContext.java
  
  Index: MultipleGradientPaintContext.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/ext/awt/MultipleGradientPaintContext.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- MultipleGradientPaintContext.java	11 Apr 2003 13:57:13 -0000	1.15
  +++ MultipleGradientPaintContext.java	30 Jul 2003 00:08:37 -0000	1.16
  @@ -318,6 +318,12 @@
   
           //initialize to be fully opaque for ANDing with colors
           transparencyTest = 0xff000000;
  +        if (cycleMethod == MultipleGradientPaint.NO_CYCLE) {
  +            // Include overflow and underflow colors in transparency
  +            // test.
  +            transparencyTest &= gradientUnderflow;
  +            transparencyTest &= gradientOverflow;
  +        }
   
           //array of interpolation arrays
           gradients = new int[fractions.length - 1][];
  
  
  
  1.32      +4 -4      xml-batik/sources/org/apache/batik/script/rhino/RhinoInterpreter.java
  
  Index: RhinoInterpreter.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/script/rhino/RhinoInterpreter.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- RhinoInterpreter.java	10 Jul 2003 13:49:59 -0000	1.31
  +++ RhinoInterpreter.java	30 Jul 2003 00:08:37 -0000	1.32
  @@ -459,12 +459,12 @@
       /**
        * To be used by <code>WindowWrapper</code>.
        */
  -    void callHandler(Function handler,
  -                     ArgumentsBuilder ab)
  +    void callHandler(Function handler, ArgumentsBuilder ab)
           throws JavaScriptException {
           Context ctx = enterContext(); 
           try {
  -           handler.call(ctx, globalObject, globalObject, ab.buildArguments());
  +            Object [] args = ab.buildArguments();
  +           handler.call(ctx, handler.getParentScope(), globalObject, args );
           } finally {
               Context.exit();
           }
  
  
  
  1.17      +3 -6      xml-batik/sources/org/apache/batik/script/rhino/WindowWrapper.java
  
  Index: WindowWrapper.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/script/rhino/WindowWrapper.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- WindowWrapper.java	20 Jul 2003 22:32:31 -0000	1.16
  +++ WindowWrapper.java	30 Jul 2003 00:08:37 -0000	1.17
  @@ -371,7 +371,7 @@
                                  final String content) {
               try {
                   interpreter.callHandler
  -                    (function,
  +                    (function, 
                        new GetURLDoneArgBuilder(success, mime, content, scope));
               } catch (JavaScriptException e) {
                   throw new WrappedException(e);
  @@ -400,7 +400,6 @@
            */
           private ScriptableObject scope;
   
  -        private Object[] array = new Object[1];
           private static final String COMPLETE = "operationComplete";
   
           /**
  @@ -449,7 +448,6 @@
           }
   
           public Object[] buildArguments() {
  -            Object[] arguments = new Object[1];
               ScriptableObject so = new NativeObject();
               so.put("success", so,
                      (success) ? Boolean.TRUE : Boolean.FALSE);
  @@ -461,8 +459,7 @@
                   so.put("content", so,
                          Context.toObject(content, scope));
               }
  -            arguments[0] = so;
  -            return arguments;
  +            return new Object [] { so };
           }
       }
       
  
  
  

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic