in NodeImpl::getCaret() method incorrect renderer is used
Vyacheslav Tokarev
tsjoker at gmail.com
Sun Aug 31 19:18:06 BST 2008
Hi,
I've been recently looking through xml/dom_nodeimp.cpp sources and I've
noted the following error (should be porting error):
void NodeImpl::getCaret(int offset, bool override, int &_x, int &_y, int
&width, int &height)
{
if (m_render) {
RenderObject *r;
long r_ofs;
bool outside, outsideEnd;
#if 0
kDebug(6200) << "getCaret: node " << this << " " << nodeName().string() << "
offset: " << offset;
#endif
// mapDOMPosToRenderPos(this, offset, r, r_ofs, outside,
outsideEnd);
outside = false;
#if 0
kDebug(6200) << "getCaret: r " << r << " " << (r?r->renderName():QString())
<< " r_ofs: " << r_ofs << " outside " << outside << " outsideEnd " <<
outsideEnd;
#endif
if (r) {
r->caretPos(r_ofs, override*RenderObject::CFOverride
+ outside*RenderObject::CFOutside
+ outsideEnd*RenderObject::CFOutsideEnd, _x, _y, width, height);
} else
_x = _y = height = -1, width = 1;
} else _x = _y = height = -1, width = 1;
}
the mapDOMPosToRenderPos(this, offset, r, r_ofs, outside, outsideEnd); is
commented out, and there is no other initialization for RenderObject* r and
later it's used without being initialized.
Can please someone look at it?
Thanks,
Vyacheslav Tokarev (vtokarev)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20080901/4c19645b/attachment.htm>
More information about the kfm-devel
mailing list