This patch removes the strangely looking construct that currently fully suppress the HTMLDocument functionality, blocking the further work on the javax.swing.text.html. HTML is currently developed with this patch being applied locally.

The patch introduces no Mauve regressions in javax/swing/text/** (70 failures, both before and after applying). The removed code may be a compensation of some old bug that is now fixed. I am, however, not so sure and put this under RFC. The patch revives the HTMLDocument and can be at least temporary used to continue work on the java.swing.text.html package.

2006-06-09  Audrius Meskauskas  <[EMAIL PROTECTED]>

* javax/swing/text/DefaultStyledDocument.java (ElementBuffer.insertContentTag):
   Do not recreate leaves and do not remove elements here.

Index: DefaultStyledDocument.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/text/DefaultStyledDocument.java,v
retrieving revision 1.65
diff -u -r1.65 DefaultStyledDocument.java
--- DefaultStyledDocument.java	3 Mar 2006 10:47:11 -0000	1.65
+++ DefaultStyledDocument.java	9 Jun 2006 11:47:20 -0000
@@ -1053,14 +1053,6 @@
 
               Edit edit = getEditForParagraphAndIndex(paragraph, index);
               edit.addAddedElement(leaf);
-
-              if (end != toRec.getEndOffset())
-                {
-                  recreateLeaves(end, toRec, onlyContent);
-                  
-                  if (onlyContent)
-                    edit.addRemovedElement(target);
-                }
             }
           else
             paragraph.replace(0, 0, new Element[] { leaf });

Reply via email to