[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    [PATCH] better Imagemap Error recovery
From:       Luciano Montanaro <mikelima () virgilio ! it>
Date:       2002-06-12 17:04:08
[Download RAW message or body]

Following a discussion in the konq-embed mailing list,
I came up with this patch, which cures malformed imagemaps, where
an area is specified as
<area shape="rect" coord="">

the default action of the getRegion is to return an area as big as the map,
which masks the following area definitions.

For an example of the problem,  look at the site
http://www.tisya.co.in/

My patch returns an empty QRegion when there are less than three
coordinates in 'coord', which is the minimum needed by 'circle' shapes.

Probably better checks on bad parameters in other parts of the function could 
help too.

Anyhow, here is my patch,
can anyone with more knowledge on the issues review it and eventually commit 
it?

Luciano Montanaro
["imageimpl.patch" (text/x-diff)]

Index: html_imageimpl.cpp
===================================================================
RCS file: /home/kdecvs/kde/kdelibs/khtml/html/html_imageimpl.cpp,v
retrieving revision 1.129
diff -r1.129 html_imageimpl.cpp
395a396,400
>     // If there are less than three coordinate values, the region must
>     // be misdefined. 
>     if (m_coords->count < 3)
> 	return region;
>     

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic