[Netsurf-develop] Redraw Issue and Images

Philip Pemberton philpem at dsl.pipex.com
Sat Sep 13 09:10:29 BST 2003

In message <b0db6f304c.ad123 at myrealbox.com>
          Andrew Duffell <ad123 at myrealbox.com> wrote:

> 1) I made a window full screen (1024x768) and went to http://www.riscos.com/
> I then went to http://mysober.co.uk/ and it displayed the page, but also
> displayed the bottom of http://www.riscos.com/ below.  I can provide a screen
> shot if necessery, but I think the error is repeatable.
I can confirm that. It's repeating here. If the window resize button gets
clicked, the window shrinks down so that the garbage is no longer visible.
Something's playing with the window's scrollbar settings.

> 2) If someone has put the wrong content type header on an image such as
> text/plain then it fills the page with a load of gibberish where the image
> should be.  Should it not either display a broken image or guess the image
> type?
> example is http://riscos.datawave.nl/
The server's broken. Adding guessing-by-extension might be a good idea, but
what if we end up feeding a GIF to the JPEG decoder and the JPEG decoder
actually thinks it's a JPEG? In the best case, we get garbage all over the
window, in the worst case the machine locks up.
I'd try using MIME types first, then check for binary data in the file. If
there's any binary data in the first 200 bytes, see if it can be identified
by its extension. If not, display a "broken image" picture.

Phil.                              | Acorn Risc PC600 Mk3, SA202, 64MB, 6GB,
philpem at dsl.pipex.com              | ViewFinder, Ethernet (Acorn AEH62),
http://www.philpem.dsl.pipex.com/  | 8xCD, framegrabber, Teletext
"High voltage. Yeah, right. I can hold this 20kV wire with my fingers... YEAARGH!" *thud*

More information about the netsurf-users mailing list