[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: khtml: patch to prevent double deletion
From: Lars Knoll <lars () trolltech ! com>
Date: 2000-10-05 21:49:06
[Download RAW message or body]
Hi,
a quite important bugfix for khtml. In some cases, khtmls internal rendering
tree could get messed up, and cause a double deletion of some RenderObjects.
An example page where this is happening is:
http://www.elsa.de/FILEAREA/HOME.HTM
I've stripped the problem down to the following piece of html:
<HTML>
<BODY>
<div>
</div>
<br>
<div style="position:absolute; top=50; left=0;">
<div></div>
</div>
<br>
</body>
</html>
I've attached the patch to fix the problem (and probaby some crashes in
khtml) to the mail. Please have a look at it and test.
Lars
["render_flow.diff" (text/plain)]
Index: rendering/render_flow.cpp
===================================================================
RCS file: /home/kde/kdelibs/khtml/rendering/render_flow.cpp,v
retrieving revision 1.145
diff -u -r1.145 render_flow.cpp
--- rendering/render_flow.cpp 2000/10/03 18:48:24 1.145
+++ rendering/render_flow.cpp 2000/10/05 21:46:38
@@ -1133,21 +1133,8 @@
if (!newChild->isText())
{
- switch (newChild->style()->position())
- {
- case RELATIVE:
- case FIXED:
+ if (newChild->style()->position() != STATIC)
setContainsPositioned(true);
- break;
- case ABSOLUTE:
- {
-// kdDebug( 6040 ) << "absolute found" << endl;
- RenderObject::addChild(newChild,beforeChild);
- return;
- }
- default: ;
-
- }
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic