1 |
keytoaster 08/05/05 15:11:46 |
2 |
|
3 |
Added: kdelibs-3.5.9-bug_219970_khtml.patch |
4 |
Log: |
5 |
Adding patch to fix khtml crashes, bug #219970 |
6 |
(Portage version: 2.1.5_rc6) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 kde-base/kdelibs/files/kdelibs-3.5.9-bug_219970_khtml.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/kde-base/kdelibs/files/kdelibs-3.5.9-bug_219970_khtml.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/kde-base/kdelibs/files/kdelibs-3.5.9-bug_219970_khtml.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: kdelibs-3.5.9-bug_219970_khtml.patch |
15 |
=================================================================== |
16 |
--- khtml/rendering/render_container.cpp.orig 2008-05-03 09:22:01.000000000 +0200 |
17 |
+++ khtml/rendering/render_container.cpp 2008-05-03 09:22:47.000000000 +0200 |
18 |
@@ -79,6 +79,8 @@ |
19 |
kdDebug( 6040 ) << this << ": " << renderName() << "(RenderObject)::addChild( " << newChild << ": " << |
20 |
newChild->renderName() << ", " << (beforeChild ? beforeChild->renderName() : "0") << " )" << endl; |
21 |
#endif |
22 |
+ // protect ourselves from deletion |
23 |
+ setDoNotDelete(true); |
24 |
|
25 |
bool needsTable = false; |
26 |
|
27 |
@@ -159,6 +161,8 @@ |
28 |
static_cast<RenderText*>(newChild)->setText(textToTransform, true); |
29 |
} |
30 |
newChild->attach(); |
31 |
+ |
32 |
+ setDoNotDelete(false); |
33 |
} |
34 |
|
35 |
RenderObject* RenderContainer::removeChildNode(RenderObject* oldChild) |
36 |
@@ -545,7 +549,7 @@ |
37 |
RenderObject *next = child->nextSibling(); |
38 |
|
39 |
if ( child->isRenderBlock() && child->isAnonymousBlock() && !child->continuation() && |
40 |
- !child->childrenInline() && !child->isTableCell() ) { |
41 |
+ !child->childrenInline() && !child->isTableCell() && !child->doNotDelete()) { |
42 |
RenderObject *firstAnChild = child->firstChild(); |
43 |
RenderObject *lastAnChild = child->lastChild(); |
44 |
if ( firstAnChild ) { |
45 |
@@ -560,17 +564,21 @@ |
46 |
child->previousSibling()->setNextSibling( firstAnChild ); |
47 |
if ( child->nextSibling() ) |
48 |
child->nextSibling()->setPreviousSibling( lastAnChild ); |
49 |
+ if ( child == firstChild() ) |
50 |
+ m_first = firstAnChild; |
51 |
+ if ( child == lastChild() ) |
52 |
+ m_last = lastAnChild; |
53 |
} else { |
54 |
if ( child->previousSibling() ) |
55 |
child->previousSibling()->setNextSibling( child->nextSibling() ); |
56 |
if ( child->nextSibling() ) |
57 |
child->nextSibling()->setPreviousSibling( child->previousSibling() ); |
58 |
- |
59 |
- } |
60 |
if ( child == firstChild() ) |
61 |
- m_first = firstAnChild; |
62 |
+ m_first = child->nextSibling(); |
63 |
if ( child == lastChild() ) |
64 |
- m_last = lastAnChild; |
65 |
+ m_last = child->previousSibling(); |
66 |
+ } |
67 |
+ |
68 |
child->setParent( 0 ); |
69 |
child->setPreviousSibling( 0 ); |
70 |
child->setNextSibling( 0 ); |
71 |
--- khtml/rendering/render_object.cpp.orig 2008-05-03 09:22:40.000000000 +0200 |
72 |
+++ khtml/rendering/render_object.cpp 2008-05-03 09:22:47.000000000 +0200 |
73 |
@@ -178,7 +178,8 @@ |
74 |
m_isRoot( false ), |
75 |
m_afterPageBreak( false ), |
76 |
m_needsPageClear( false ), |
77 |
- m_containsPageBreak( false ) |
78 |
+ m_containsPageBreak( false ), |
79 |
+ m_doNotDelete(false) |
80 |
{ |
81 |
assert( node ); |
82 |
if (node->getDocument()->documentElement() == node) setIsRoot(true); |
83 |
--- khtml/rendering/render_object.h.orig 2008-05-03 09:22:04.000000000 +0200 |
84 |
+++ khtml/rendering/render_object.h 2008-05-03 09:22:47.000000000 +0200 |
85 |
@@ -754,6 +754,9 @@ |
86 |
virtual void deleteInlineBoxes(RenderArena* arena=0) {(void)arena;} |
87 |
virtual void detach( ); |
88 |
|
89 |
+ void setDoNotDelete(bool b) { m_doNotDelete = b; } |
90 |
+ bool doNotDelete() const { return m_doNotDelete; } |
91 |
+ |
92 |
const QFont &font(bool firstLine) const { |
93 |
return style( firstLine )->font(); |
94 |
} |
95 |
@@ -835,7 +838,9 @@ |
96 |
bool m_needsPageClear : 1; |
97 |
bool m_containsPageBreak : 1; |
98 |
|
99 |
- // ### we have 16 + 24 bits. Cut 8 and save 32 |
100 |
+ bool m_doNotDelete : 1; // This object should not be auto-deleted |
101 |
+ |
102 |
+ // ### we have 16 + 27 bits. |
103 |
|
104 |
|
105 |
void arenaDelete(RenderArena *arena, void *objectBase); |
106 |
|
107 |
|
108 |
|
109 |
-- |
110 |
gentoo-commits@l.g.o mailing list |