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/04/15 19:01:44 UTC

cvs commit: xml-batik/sources/org/apache/batik/css/engine CSSEngine.java

hillion     02/04/15 10:01:44

  Modified:    sources/org/apache/batik/css/engine CSSEngine.java
  Log:
  - Fixed a bug with CSS classes on <use> elements.
  
  Revision  Changes    Path
  1.9       +26 -11    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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- CSSEngine.java	12 Apr 2002 09:17:52 -0000	1.8
  +++ CSSEngine.java	15 Apr 2002 17:01:44 -0000	1.9
  @@ -58,7 +58,7 @@
    * This is the base class for all the CSS engines.
    *
    * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
  - * @version $Id: CSSEngine.java,v 1.8 2002/04/12 09:17:52 hillion Exp $
  + * @version $Id: CSSEngine.java,v 1.9 2002/04/15 17:01:44 hillion Exp $
    */
   public abstract class CSSEngine {
   
  @@ -1425,9 +1425,6 @@
        * Fires a CSSEngineEvent, given a list of modified properties.
        */
       protected void firePropertiesChangedEvent(Element target, int[] props) {
  -        //System.out.println("EVT props.length: " + props.length);
  -        //System.out.println("    target      : " + target);
  -
           CSSEngineListener[] ll =
               (CSSEngineListener[])listeners.toArray(LISTENER_ARRAY);
   
  @@ -1448,8 +1445,6 @@
       protected void inlineStyleAttributeUpdated(CSSStylableElement elt,
                                                  StyleMap style,
                                                  MutationEvent evt) {
  -        // !!! Fixed style maps not taken into account
  -
           boolean[] updated = styleDeclarationUpdateHandler.updatedProperties;
           for (int i = getNumberOfProperties() - 1; i >= 0; --i) {
               updated[i] = false;
  @@ -1506,11 +1501,15 @@
   
                   firePropertiesChangedEvent(elt, ALL_PROPERTIES);
                       
  +                Node c = getImportedChild(elt);
  +                if (c != null) {
  +                    propagateChanges(c, ALL_PROPERTIES);
  +                }
                   for (Node n = elt.getFirstChild();
                        n != null;
                        n = n.getNextSibling()) {
                       propagateChanges(n, ALL_PROPERTIES);
  -                    Node c = getImportedChild(n);
  +                    c = getImportedChild(n);
                       if (c != null) {
                           propagateChanges(c, ALL_PROPERTIES);
                       }
  @@ -1564,11 +1563,15 @@
                       }
                       firePropertiesChangedEvent(elt, props);
                       
  +                    Node c = getImportedChild(elt);
  +                    if (c != null) {
  +                        propagateChanges(c, ALL_PROPERTIES);
  +                    }
                       for (Node n = elt.getFirstChild();
                            n != null;
                            n = n.getNextSibling()) {
                           propagateChanges(n, props);
  -                        Node c = getImportedChild(n);
  +                        c = getImportedChild(n);
                           if (c != null) {
                               propagateChanges(c, props);
                           }
  @@ -1670,11 +1673,15 @@
               }
           }
           if (props != null) {
  +            Node c = getImportedChild(node);
  +            if (c != null) {
  +                propagateChanges(c, ALL_PROPERTIES);
  +            }
               for (Node n = node.getFirstChild();
                    n != null;
                    n = n.getNextSibling()) {
                   propagateChanges(n, props);
  -                Node c = getImportedChild(n);
  +                c = getImportedChild(n);
                   if (c != null) {
                       propagateChanges(c, props);
                   }
  @@ -1825,11 +1832,15 @@
           }
           firePropertiesChangedEvent(elt, props);
   
  +        Node c = getImportedChild(elt);
  +        if (c != null) {
  +            propagateChanges(c, ALL_PROPERTIES);
  +        }
           for (Node n = elt.getFirstChild();
                n != null;
                n = n.getNextSibling()) {
               propagateChanges(n, props);
  -            Node c = getImportedChild(n);
  +            c = getImportedChild(n);
               if (c != null) {
                   propagateChanges(c, props);
               }
  @@ -1885,11 +1896,15 @@
   
                       firePropertiesChangedEvent(elt, ALL_PROPERTIES);
                       
  +                    Node c = getImportedChild(elt);
  +                    if (c != null) {
  +                        propagateChanges(c, ALL_PROPERTIES);
  +                    }
                       for (Node n = elt.getFirstChild();
                            n != null;
                            n = n.getNextSibling()) {
                           propagateChanges(n, ALL_PROPERTIES);
  -                        Node c = getImportedChild(n);
  +                        c = getImportedChild(n);
                           if (c != null) {
                               propagateChanges(c, ALL_PROPERTIES);
                           }
  
  
  

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