On Sat, Apr 05, 2008 at 11:58:45AM +0200, Johannes Hofmann wrote:
[...] jcid@d620:~/C/Dillo/d2/dillo2-cur/src$ ./dillo-fltk /tmp/ dillo_dns_init: Here we go! (threaded) Enabling cookies as from cookiesrc... Nav_open_url: new url='file:/tmp/' Nav_open_url: old_url='' idx=-1 [file dpi]: dpip_tag={<cmd='open_url' url='file:/tmp/' '>} adjustScrollPos: scrollX=0 scrollY=-155 ^^^^--- here!
Note: my /tmp is shorter than the viewport.
Please give it a look.
Funny, I had a similar effect in fltkviewport.cc some time ago. The problem becomes more obvious, when adding another printf at the beginning of adjustScrollPos (). Then we get:
Nav_open_url: new url='file:/tmp/hu' Nav_open_url: old_url='' idx=-1 [file dpi]: dpip_tag={<cmd='open_url' url='file:/tmp/hu' '>} adjustScrollPos: scrollX=0 scrollY=0 adjustScrollPos: scrollX=0 scrollY=-376
So its adjustScrollPos() itself that makes scrollY negative! The fix is to do the checks the other way round and not to use "else if" (see attached patch).
Good it wasn't a complex side effect. Committed.
I noticed one regression with the new anchor code: The "Continue Reading Older Posts" link on www.boingboing.net (e.g. http://www.boingboing.net/2008/04/03/#entry-44240) no longer scrolls to the right position.
I'll check it.
PS: I hope the patch format is ok like this. I'm using mercurial and the builtin diff may behave a bit differently than standard diff.
I like "diff -pru", because of the context, and the explicit stating of the function where the changes happen. Mercurial seems to provide both (as in your attached patch).
Do you prefer inline or attached patches?
Attached. -- Cheers Jorge.-