This removes some pieces of debug output that have accidentally been
left in the code. Mark? Merge to release branch?

2006-12-05  Roman Kennke  <[EMAIL PROTECTED]>

        * javax/swing/text/html/HTMLEditorKit.java
        (HTMLFactory.create): Removed debug output.
        * javax/swing/text/html/InlineView.java
        (getBreakWeight): Likewise.
        * javax/swing/text/html/StyleSheet.java
        (addRule): Likewise.
        (ListPainter.paint): Removed debug output.

/Roman
Index: javax/swing/text/html/HTMLEditorKit.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/text/html/HTMLEditorKit.java,v
retrieving revision 1.45
diff -u -1 -5 -r1.45 HTMLEditorKit.java
--- javax/swing/text/html/HTMLEditorKit.java	1 Dec 2006 23:20:28 -0000	1.45
+++ javax/swing/text/html/HTMLEditorKit.java	5 Dec 2006 22:16:32 -0000
@@ -825,31 +825,30 @@
 
           else if (tag.equals(HTML.Tag.MENU) || tag.equals(HTML.Tag.DIR)
                    || tag.equals(HTML.Tag.UL) || tag.equals(HTML.Tag.OL))
             view = new ListView(element);
           else if (tag.equals(HTML.Tag.FRAMESET))
             view = new FrameSetView(element);
           else if (tag.equals(HTML.Tag.FRAME))
             view = new FrameView(element);
           // FIXME: Uncomment when the views have been implemented
           /*
           else if (tag.equals(HTML.Tag.OBJECT))
             view = new ObjectView(element); */
         }
       if (view == null)
         {
-          System.err.println("missing tag->view mapping for: " + element);
           view = new NullView(element);
         }
       return view;
     }
   }
   
   /**
    * The abstract HTML parser declaration.
    */
   public abstract static class Parser
   {
     /**
      * Parse the HTML text, calling various methods of the provided callback
      * in response to the occurence of the corresponding HTML constructions.
      * @param reader The reader to read the source HTML from.
Index: javax/swing/text/html/InlineView.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/text/html/InlineView.java,v
retrieving revision 1.7
diff -u -1 -5 -r1.7 InlineView.java
--- javax/swing/text/html/InlineView.java	1 Dec 2006 23:20:28 -0000	1.7
+++ javax/swing/text/html/InlineView.java	5 Dec 2006 22:16:32 -0000
@@ -150,33 +150,32 @@
    */
   public AttributeSet getAttributes()
   {
     if (attributes == null)
       {
         StyleSheet ss = getStyleSheet();
         attributes = ss.getViewAttributes(this);
       }
     return attributes;
   }
 
   
   public int getBreakWeight(int axis, float pos, float len)
   {
     int weight;
-    if (nowrap) { if (getText(getStartOffset(), getEndOffset()).toString().contains("Web"))
-      System.err.println("Web NOWRAP");
-      weight = BadBreakWeight;}
+    if (nowrap)
+      weight = BadBreakWeight;
     else
       weight = super.getBreakWeight(axis, pos, len);
     return weight;
   }
 
   public View breakView(int axis, int offset, float pos, float len)
   {
     // FIXME: Implement this.
     return super.breakView(axis, offset, pos, len);
   }
 
   /**
    * Loads the character style properties from the stylesheet.
    */
   protected void setPropertiesFromAttributes()
Index: javax/swing/text/html/StyleSheet.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/text/html/StyleSheet.java,v
retrieving revision 1.24
diff -u -1 -5 -r1.24 StyleSheet.java
--- javax/swing/text/html/StyleSheet.java	5 Dec 2006 21:52:52 -0000	1.24
+++ javax/swing/text/html/StyleSheet.java	5 Dec 2006 22:16:33 -0000
@@ -500,32 +500,31 @@
    * @param rule - the rule to add to the sheet
    */
   public void addRule(String rule)
   {
     CSSStyleSheetParserCallback cb =
       new CSSStyleSheetParserCallback(CSSStyle.PREC_AUTHOR_NORMAL);
     // FIXME: Handle ref.
     StringReader in = new StringReader(rule);
     CSSParser parser = new CSSParser(in, cb);
     try
       {
         parser.parse();
       }
     catch (IOException ex)
       {
-        // Shouldn't happen. And if, then we
-        System.err.println("IOException while parsing stylesheet: " + ex.getMessage());
+        // Shouldn't happen. And if, then don't let it bork the outside code.
       }
     // Clean up resolved styles cache so that the new styles are recognized
     // on next stylesheet request.
     resolvedStyles.clear();
   }
   
   /**
    * Translates a CSS declaration into an AttributeSet. This is called
    * as a result of encountering an HTML style attribute.
    * 
    * @param decl - the declaration to get
    * @return the AttributeSet representing the declaration
    */
   public AttributeSet getDeclaration(String decl)
   {
@@ -1419,31 +1418,30 @@
                   Shape a1 = itemView.getChildAllocation(0, tmpRect);
                   Rectangle r1 = a1 instanceof Rectangle ? (Rectangle) a1
                                                          : a1.getBounds();
                   ParagraphView par = (ParagraphView) v1;
                   Shape a = par.getChildAllocation(0, r1);
                   if (a != null)
                     {
                       Rectangle r = a instanceof Rectangle ? (Rectangle) a
                                                            : a.getBounds();
                       centerY = (int) (r.height / 2 + r.y);
                     }
                 }
             }
           if (centerY == -1)
             {
-              System.err.println("WARNING LI child is not a paragraph view " + itemView.getView(0) + ", " + itemView.getViewCount());
               centerY =(int) (h / 2 + y);
             }
           g.fillOval(centerX - 3, centerY - 3, 6, 6);
         }
     }
   }
 
   /**
    * Converts an AttributeSet to a Map. This is used for CSS resolving.
    *
    * @param atts the attributes to convert
    *
    * @return the converted map
    */
   private Map attributeSetToMap(AttributeSet atts)

Reply via email to