From: Jonathan M. <jon...@gm...> - 2010-05-30 06:56:45
|
I think I might actually have the real answer, after spending hours trying to track down a related problem in a different XULRunner wrapper: JumpToAnchor() uses nsIDocShell, and gets the doc shell by casting the web browser instance to a doc shell. As far as I can tell, this is no longer supported by XULRunner 1.9.2, so the cast will just fail and do nothing. As for a fix, I haven't got that far yet (and am not sure if it's even worth it when you can just do it in Javascript). Is there a newer version of Yelp that might contain a fix? (it looked to me like they are now using WebKit?) If I were you would check if find in the current window works in Xiphos (if you use it), since a doc shell also appears to be used in setting that up. Jon On Wed, May 26, 2010 at 6:08 PM, Jonathan Morgan <jon...@gm...>wrote: > > > On Wed, May 26, 2010 at 2:28 PM, Matthew Talbert <ran...@gm...>wrote: > >> Did you intend to send this to users? I've copied devel in... >> >> > So I've confirmed that the problem exists in Fedora13. *sIGh* >> >> Fun! >> >> > The action of the bug is that the window does in fact /momentarily/ jump >> > to the proper anchor point, and *then* it reverts to top of screen. >> > That's braindead -- why would it revert to top _after_ jumping to >> anchor? >> > >> > The code sequence is from HtmlOuptut in utilities.c, where it calls >> > gecko_html_jump_to_anchor, which is in gecko-html.cpp, where it calls >> > priv->yelper->JumpToAnchor, and that in turn (in Yelper.cpp) calls >> > GoToAnchor. >> > >> > After that point, it's into the weeds of xulrunner itself. >> > >> > Somebody please offer me an explanation for how this goes wrong. Is >> > there some new additional state we need to set, before the XyzToAnchor >> > calls? Is it a genuine xulrunner bug that we need to escalate? >> >> If you can even understand how go to anchor is working, you're farther >> along than I am. >> >> > We're going to have to issue an update. I don't want to make a full >> > release; whatever is needed, it should suffice to make it a patch >> > against the released 3.1.3 and rebuild. >> > >> > That's assuming we can fix it in Xiphos at all, that is, that it's not >> > an xulrunner bug that we can't handle externally. >> >> It might be possible (though insanely difficult) to execute javascript >> that would do this correctly. > > > window.location.hash = "<anchor name>"; should do the trick, though you > will probably need to wait until the window is properly loaded. I would > wonder if something similar is in fact the problem: that it is jumping to > the anchor before the window is properly loaded, then going back to the top > afterwards. > > Jon > |