When is KHTMLView done with rendering?
Leo Savernik
l.savernik at aon.at
Wed Jun 16 21:46:08 BST 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am Mittwoch 16 Juni 2004 17:26 schrieb Jeroen Wijnhout:
[...]
> > I think we should do like Netscape Navigator and jump to the anchor as
> > soon
[...]
> > as it is loaded, and not wait for the completed signal (which may never
>
> How can you jump to the anchor if you don't know where it is located
> physically (that is, you have to know the coordinates of the anchor)? You
> only know these coordinates when rendering is finished.
Ok, I didn't mean loaded, I meant laid out on the canvas. Then the coordinates
can be subducted, and jumped to.
>
> > arrive, or arrive very late, because of slow-loading imgs or other
> > annoyances).
>
> The rendering itself can be completed even if the loading of images is not
> done yet, right? Perhaps I should have said layouting instead of rendering?
Yes, that's what I meant, too. KHTML renders incrementally, so even if not
everything has been loaded yet, the position of certain elements may already
be known.
> Anyway, as soon as the coordinates of the anchor are known, a signal should
> be sent to KHTMLPart. So the question is: Is there such a signal, and if
> not, how/where should I add such a signal.
There's a much easier approach: After each reflow (triggered by a timer during
page loading), check whether the targeted element already has a renderer. If
it has, we know that it has been laid out and thus the coordinates are known
=> jump to it.
As a usability "enhancement", we could also keep jumping on each reflow as
long as no user interaction (scrolled viewport), in case the position may
shift (e. g. because images have been loaded that precede the targeted
element).
>
[...]
mfg
Leo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQFA0LGQj5jssenUYTsRApslAJ99CcOE72O8b2QcJvWKPH1jTHuyEQCffB1m
k2Ti4xvomTpjhTnyomMlHAk=
=ppdV
-----END PGP SIGNATURE-----
More information about the kfm-devel
mailing list