AbstractElement.getResolveParent should first use the AttributeSet's
resolveParent, but if this is null, it should use the Element's parent's
AttributeSet. This is now fixed and committed.
2005-09-28 Anthony Balkissoon <[EMAIL PROTECTED]>
* javax/swing/text/AbstractDocument.java:
(AbstractElement.getResolveParent): If the AttributeSet's
getResolveParent returns null, use the Element's parent's AttributeSet.
--Tony
Index: javax/swing/text/AbstractDocument.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/text/AbstractDocument.java,v
retrieving revision 1.28
diff -u -r1.28 AbstractDocument.java
--- javax/swing/text/AbstractDocument.java 13 Sep 2005 23:44:49 -0000 1.28
+++ javax/swing/text/AbstractDocument.java 28 Sep 2005 19:39:28 -0000
@@ -1230,6 +1230,9 @@
/**
* Returns the resolve parent of this element.
+ * This is taken from the AttributeSet, but if this is null,
+ * this method instead returns the Element's parent's
+ * AttributeSet
*
* @return the resolve parent of this element
*
@@ -1237,7 +1240,9 @@
*/
public AttributeSet getResolveParent()
{
- return attributes.getResolveParent();
+ if (attributes.getResolveParent() != null)
+ return attributes.getResolveParent();
+ return element_parent.getAttributes();
}
/**
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches