On Sat, May 10, 2008 at 09:11:27PM +0000, corvid wrote:
Jorge wrote:
There's still a bug hiding, most probably inside the code setting the scroll position in dw2. When you have a page with repush (i.e. with charset specified in META element, e.g. www.dillo.org :), and you scroll the page, and then reload. It will be shown from the origin, even though a_UIcmd_set_scroll_xy is called from nav.c:321 with the right coords (enable the _MSG to check).
Scrolled down a little and hit reload. In Layout::adjustScrollPos(), scrollY of 60 became 0 because canvasAscent == 5 and canvasDescent == 5. Looking at the backtrace, a_UIcmd_set_scroll_xy() from a_Nav_expect_done() from a_Web_dispatch_by_type() would seem to be too early.
AFAIR it was handled with an idle function in dw1 in dillo1. Now it's also handled with an idle function, and I seem to recall Sebastian told me something about anchors long ago, but I don't remember. It is tricky because you have to handle several cases, with some events. For instance: * When the page is still loading and you have an anchor to scroll to. Here you have to retry until the page loads enough to scroll to the anchor, and you should keep watching just in case an image placed before the anchor arrives later, and then adjust again. Now if the user decides to scroll with the mouse, before the position settles, then you have to abort the idle scrolling, and let him control it. All this seasoned with window resize, page changes and other events. :-) -- Cheers Jorge.-