Version: (using KDE KDE 3.5.1) Installed from: Gentoo Packages OS: Linux HTML elements inside <table><form><div> tags don't get rendered with the KHTML shipped in the KDE-3.5 series. This is a regression from 3.4 and earlier. IOW: <table> <form> <div> This doesn't get rendered </div> </form> </table> <form> <table> <div> But this does </div> </table> </form>
Created attachment 14915 [details] A test case from Sampo bank internet service
Created attachment 16274 [details] A more complete test case
No ofcause it can't. FORM is not allowed inside TABLE, but we sort of handle it because it is common, but DIV is certainly not allowed inside a table, and is not handled at all.
The latter test case shows that the problem is the <table><form> combination. Content within all other combinations of <div>, <table> and <form> is displayed. What's really strange (as illustrated by the test case) is that if there's a <p> or <br> element between the <table> and <form> elements, everything works just fine. Only a <table><form> combination without any line break elements between them results in undisplayed contents.
I will try and figure out how firefox handles it, and see if we can come close and still make sense.
Thanks for your efforts. I've filed a bug report about this issue with the bank and it seems like they might actually do something about it. So there's a chance that for me this'll be fixed right where it should be.
SVN commit 551858 by carewolf: Don't put content under already malformed FORMs in malformed TABLEs BUG:122884 M +5 -0 htmlparser.cpp --- branches/KDE/3.5/kdelibs/khtml/html/htmlparser.cpp #551857:551858 @@ -329,6 +329,10 @@ #ifdef PARSER_DEBUG kdDebug( 6035 ) << "added " << n->nodeName().string() << " to " << tmp->nodeName().string() << ", new current=" << newNode->nodeName().string() << endl; #endif + // We allow TABLE > FORM in dtd.cpp, but do not allow form have children in this case + if (current->id() == ID_TABLE && id == ID_FORM) { + flat = true; + } // don't push elements without end tag on the stack if(tagPriority[id] != 0 && !flat) { @@ -353,6 +357,7 @@ if(n->isInline()) m_inline = true; } + #if SPEED_DEBUG < 1 if(tagPriority[id] == 0 && n->renderer()) n->renderer()->calcMinMaxWidth();
*** Bug 117850 has been marked as a duplicate of this bug. ***
*** Bug 123242 has been marked as a duplicate of this bug. ***
I tested the patch on kdelibs-3.5.3 and it fixes my problem. Thank you so much. Now I can finally give Opera the boot.