Commit 199f6bdd authored by hyatt's avatar hyatt

Make <caption> error-handling more robust.

	Specifically, handle <tr> and <td> misplaced inside
	<caption>s and still make them be part of the table.

        * khtml/html/htmlparser.cpp:
        (KHTMLParser::insertNode):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2710 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 60648563
2002-11-16 David Hyatt <hyatt@apple.com>
Make <caption> error-handling more robust.
Specifically, handle <tr> and <td> misplaced inside
<caption>s and still make them be part of the table.
* khtml/html/htmlparser.cpp:
(KHTMLParser::insertNode):
2002-11-16 David Hyatt <hyatt@apple.com> 2002-11-16 David Hyatt <hyatt@apple.com>
Implement the collapsing top margin quirk for <body> (the same Implement the collapsing top margin quirk for <body> (the same
......
2002-11-16 David Hyatt <hyatt@apple.com>
Make <caption> error-handling more robust.
Specifically, handle <tr> and <td> misplaced inside
<caption>s and still make them be part of the table.
* khtml/html/htmlparser.cpp:
(KHTMLParser::insertNode):
2002-11-16 David Hyatt <hyatt@apple.com> 2002-11-16 David Hyatt <hyatt@apple.com>
Implement the collapsing top margin quirk for <body> (the same Implement the collapsing top margin quirk for <body> (the same
......
2002-11-16 David Hyatt <hyatt@apple.com>
Make <caption> error-handling more robust.
Specifically, handle <tr> and <td> misplaced inside
<caption>s and still make them be part of the table.
* khtml/html/htmlparser.cpp:
(KHTMLParser::insertNode):
2002-11-16 David Hyatt <hyatt@apple.com> 2002-11-16 David Hyatt <hyatt@apple.com>
Implement the collapsing top margin quirk for <body> (the same Implement the collapsing top margin quirk for <body> (the same
......
...@@ -580,6 +580,19 @@ bool KHTMLParser::insertNode(NodeImpl *n, bool flat) ...@@ -580,6 +580,19 @@ bool KHTMLParser::insertNode(NodeImpl *n, bool flat)
break; break;
case ID_BODY: case ID_BODY:
break; break;
case ID_CAPTION:
// Illegal content in a caption. Close the caption and try again.
popBlock(ID_CAPTION);
switch( id ) {
case ID_THEAD:
case ID_TFOOT:
case ID_TBODY:
case ID_TR:
case ID_TD:
case ID_TH:
return insertNode(n, flat);
}
break;
case ID__KONQBLOCK: case ID__KONQBLOCK:
switch( id ) { switch( id ) {
case ID_THEAD: case ID_THEAD:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment