Bug in KHMTLPart::gotoAnchor, RenderBox x and y are not right

Eeli Kaikkonen eekaikko at mail.student.oulu.fi
Sun Dec 30 18:01:57 GMT 2007


I have problem with KHTMLPart::gotoAnchor. With our application it does
not go to an anchor.I tested the html code with Konqueror (RC2) and it
works, which means that the bug is triggered by some special situation.

I have added some debug statements to the KDE code and located the bug a
bit deeper. The problem seems to be that gotoAnchor calls
HTMLElementImpl::getUpperLeftCorner() which calls
RenderObject::absolutePosition(). The problematic objects are
RenderBoxes which call their container's absolutePosition(). The
position is taken with xPos() and yPos(). My debugging reveals that y
position has been set once to -500000 with setPos() but never updated.
Therefore with our html code the final y position is -1500000 and
gotoAnchor calls m_view->setContentsPos(-10, -1500000). The view moves
to the beginning of the page every time.

I have worked with this for two days now so I'm running out of interest
and energy and could use some help. How should I continue? Could someone
help if I send for example the debugging output?

  Yours,
	Eeli Kaikkonen (Mr.), Oulu, Finland
	e-mail: eekaikko at mailx.studentx.oulux.fix (with no x)




More information about the kfm-devel mailing list