[Dillo-dev]Re: anchor names
Hi there, This is half an email forward and half an answer. On Sun, Oct 17, 2004 at 04:32:09PM +0200, Sebastian Geerken wrote:
Hi,
the dillo-dev mailing list does not seem to work, I always get an 550 error, so I forward you the mail, which I did not succeed to send to the list.
Sebastian
Now, 18 Oct, it works for me. I'm answering to dillo-dev because my test mail succeeded.
Date: Sun, 17 Oct 2004 15:54:40 +0200 From: Sebastian Geerken <sgeerken@dillo.org> Subject: Re: [Dillo-dev]anchors_table not cleared To: dillo-dev@auriga.wearlab.de Mail-Followup-To: Sebastian Geerken <sgeerken@dillo.org>, dillo-dev@auriga.wearlab.de
On Fri, Oct 15, Matthias Franz wrote:
I'm writing a patch for a better treatment of anchor names in HTML pages. During this, I've come across the following bug in Dillo.
Jorge: I think this is what produced the bug in the patch I sent you.
Entries are never removed from the hash table anchors_table, which stores the anchors of a page (see dw_gtk_viewport.c). This means that whenever a new page is displayed in the same viewport, the old anchors remain in the hash table, but their keys are overwritten. Like in this example: (The "###" lines are debug information I've inserted.)
[...]
Obviously, the anchors_table must be cleared whenever a new page is displayed. I don't know the dw* part of Dillo very well, and the connection between the html structure and the viewport seems to be quite indirect. Can anyone suggest a fix?
The latest commitment in CVS fixes this, the patch is also attached. Jorge, I'm not sure, whether this should be included into the release, since the changes are rather big, and currently, it only fixes a memory leak.
I'd prefer to leave it out of rc2. It's been more than four months since our last release. The one following 0.8.3 is going to have the new abstraction layer for Dw, and other changes, so just in case it takes some time to stabilize it, it'd be very good to have a solid 0.8.3 out there. I'll prepare the dillo-0.8.3-rc2 tarball ASAP and write back when it's ready for download...
The changes also make the viewport check, whether anchor names are unique. If not, g_return_if_fail is called, which messages should not be printed normally (and "normally" includes faulty web pages), instead, normal HTML error messages should be shown. Probably, the best solution is to add a function a_Dw_gtk_viewport_check_anchor(), which returns, whether an anchor is already defined. If it returns TRUE, an appropriate message is shown, and the anchor is not added.
Agreed. -- Cheers Jorge.-
participants (1)
-
Jorge Arellano Cid