[prev in list] [next in list] [prev in thread] [next in thread]
List: kfm-devel
Subject: Possible fix for #74616
From: rwlbuis () xs4all ! nl
Date: 2004-02-16 21:08:22
Message-ID: 9086.80.126.7.160.1076965702.squirrel () webmail ! xs4all ! nl
[Download RAW message or body]
Hi,
I was looking at fixing bug #74616. It soon was clear that attributes
were copied after cloneNode was called, but not parsed/set. In short,
parseAttribute calls are lacking AFAICS.
I made a patch that changes copyAttributes to do this. Please note I
have no idea if that is the correct place, thats why I am asking here :)
BTW this patch fixes the bug on my system.
Comments?
Cheers,
Rob.
["dom_elementimpl.diff" (text/x-diff)]
Index: xml/dom_elementimpl.cpp
===================================================================
RCS file: /home/kde/kdelibs/khtml/xml/dom_elementimpl.cpp,v
retrieving revision 1.196
diff -u -3 -p -r1.196 dom_elementimpl.cpp
--- xml/dom_elementimpl.cpp 15 Feb 2004 18:49:43 -0000 1.196
+++ xml/dom_elementimpl.cpp 16 Feb 2004 21:02:07 -0000
@@ -964,11 +964,15 @@ void NamedAttrMapImpl::copyAttributes(Na
if (m_attrs[i].m_attrId) {
m_attrs[i].m_data.value = other->m_attrs[i].m_data.value;
m_attrs[i].m_data.value->ref();
+ if(m_element)
+ m_element->parseAttribute(m_attrs[i].m_attrId, m_attrs[i].m_data.value);
}
else {
m_attrs[i].m_data.attr = static_cast<AttrImpl*>(other->m_attrs[i].m_data.attr->cloneNode(true));
m_attrs[i].m_data.attr->ref();
m_attrs[i].m_data.attr->setElement(m_element);
+ if(m_element)
+ m_element->parseAttribute(m_attrs[i].m_data.attr->id(), m_attrs[i].m_data.attr->val());
}
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic