diff options
author | Roman Kennke <roman@kennke.org> | 2006-11-15 13:35:05 +0000 |
---|---|---|
committer | Roman Kennke <roman@kennke.org> | 2006-11-15 13:35:05 +0000 |
commit | ef0ba6a7f0fb1697c58c9db0272b279b9b3233b1 (patch) | |
tree | ae6d74eac614a2f8c1b0473364d132d4a3790f43 /gnu/javax/swing | |
parent | d75e6f110b4e554532133d265beffd0ff211fd38 (diff) | |
download | classpath-ef0ba6a7f0fb1697c58c9db0272b279b9b3233b1.tar.gz |
2006-11-15 Roman Kennke <kennke@aicas.com>
* javax/swing/text/html/HTMLDocument.java
(HTMLReader.ParagraphAction.end): Call super instead of blockClose()
directly.
(HTMLReader.ParagraphAction.start): Call super instead of blockOpen()
directly.
(HTMLReader.parseStack): Removed.
(HTMLReader.blockClose): Simply call addContent() with ' '
instead of doing more complicated stuff. Removed parseStack
handling.
(HTMLReader.blockOpen): Removed parseStack handling.
(getInsertingReader): Removed parseStack init.
* gnu/javax/swing/text/html/parser/htmlValidator.java
(closeTag): Return true only when the tag actually should be
closed.
* gnu/javax/swing/text/html/parser/support/Parser.java
(_handleEndTag): Only actually close the tag when the validator
allows it.
Diffstat (limited to 'gnu/javax/swing')
-rw-r--r-- | gnu/javax/swing/text/html/parser/htmlValidator.java | 5 | ||||
-rw-r--r-- | gnu/javax/swing/text/html/parser/support/Parser.java | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/gnu/javax/swing/text/html/parser/htmlValidator.java b/gnu/javax/swing/text/html/parser/htmlValidator.java index 4d287a677..7507850e8 100644 --- a/gnu/javax/swing/text/html/parser/htmlValidator.java +++ b/gnu/javax/swing/text/html/parser/htmlValidator.java @@ -153,7 +153,7 @@ public abstract class htmlValidator * Remove the given tag from the stack or (if found) from the list * of the forcibly closed tags. */ - public void closeTag(TagElement tElement) + public boolean closeTag(TagElement tElement) { HTML.Tag tag = tElement.getHTMLTag(); hTag x; @@ -191,11 +191,12 @@ public abstract class htmlValidator } stack.remove(x); - return; + return true; } } } s_error("Closing unopened <" + tag + ">"); + return false; } /** diff --git a/gnu/javax/swing/text/html/parser/support/Parser.java b/gnu/javax/swing/text/html/parser/support/Parser.java index 9c10f68fc..60b876fb0 100644 --- a/gnu/javax/swing/text/html/parser/support/Parser.java +++ b/gnu/javax/swing/text/html/parser/support/Parser.java @@ -1200,8 +1200,8 @@ public class Parser */ private void _handleEndTag(TagElement tag) { - validator.closeTag(tag); - _handleEndTag_remaining(tag); + if (validator.closeTag(tag)) + _handleEndTag_remaining(tag); } /** |