Bug 122273 - Errors parsing a www.pygame.org page
Summary: Errors parsing a www.pygame.org page
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml parsing (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-19 12:56 UTC by Federico Asara
Modified: 2006-04-28 22:46 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Federico Asara 2006-02-19 12:56:09 UTC
Version:            (using KDE KDE 3.5.1)
Installed from:    Ubuntu Packages
OS:                Linux

KHTML does not render properly some PyGame's pages.
In PyGame's reference there are a lot of comments hidden by buttons: I.E. http://www.pygame.org/docs/ref/surface.html has lots of them. 

But if you click on those buttons, the comments won't appear.
Comment 1 Maksim Orlovich 2006-02-19 15:37:33 UTC
hmm, the parser seems to inappropriately give a standalone input a form which shadows the function context:
<form class='addcomment' action='comment_new.php'>
   <input type='hidden' name='link' value='pygame.Surface'>
   <input type='submit' value='Add a Comment'>
</form>
</div>
<div id='pygame.Surface-comments'>
 <input type='button' value='Comments (2)' onclick='comments_show("pygame.Surface");'></div> &nbsp;<br> 
Comment 2 Ivor Hewitt 2006-03-09 16:00:13 UTC
SVN commit 517005 by ivor:

Replace one form reattach hack with another, pending a  better fix.

BUG: 122968
BUG: 122273
CCBUG: 116790



 M  +1 -5      html_formimpl.cpp  
 M  +9 -0      htmlparser.cpp  


--- branches/KDE/3.5/kdelibs/khtml/html/html_formimpl.cpp #517004:517005
@@ -886,11 +886,7 @@
     {
         if( p->id() == ID_FORM )
             return static_cast<HTMLFormElementImpl *>(p);
-        NodeImpl *s = p->previousSibling();
-        if (!s)
-            p = p->parentNode();
-        else
-            p = s;
+        p = p->parentNode();
     }
 #ifdef FORMS_DEBUG
     kdDebug( 6030 ) << "couldn't find form!" << endl;
--- branches/KDE/3.5/kdelibs/khtml/html/htmlparser.cpp #517004:517005
@@ -1388,6 +1388,15 @@
         blockElem->removeChild(currNode, exceptionCode);
         newNode->appendChild(currNode, exceptionCode);
         currNode = nextNode;
+
+ // TODO - To be replaced.
+        // Re-register form elements with currently active form, step 1 will have removed them
+        if (form)
+        {
+            HTMLGenericFormElementImpl *e = static_cast<HTMLGenericFormElementImpl *>(currNode);
+            if (e)
+                form->registerFormElement(e);
+        }
     }
 
     // Step 4: Place |newNode| under |blockElem|.  |blockElem| is still out of the document, so no
Comment 3 madman 2006-04-28 22:10:53 UTC
This bug still occurs in KDE 3.5.2 (don't know if the above patch has been applied to 3.5.2 version?)
Comment 4 Ismail Donmez 2006-04-28 22:46:02 UTC
The fix will be in KDE 3.5.3