mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-22 20:16:54 +03:00
Check if box with imagemap at point has area at point.
This commit is contained in:
parent
7d83151d1a
commit
8bccf16158
@ -2622,9 +2622,12 @@ html_get_contextual_content(struct content *c,
|
||||
|
||||
if (box->usemap) {
|
||||
const char *target = NULL;
|
||||
data->link_url = nsurl_access(imagemap_get(html,
|
||||
box->usemap, box_x, box_y, x, y,
|
||||
&target));
|
||||
nsurl *url = imagemap_get(html, box->usemap, box_x,
|
||||
box_y, x, y, &target);
|
||||
/* Box might have imagemap, but no actual link area
|
||||
* at point */
|
||||
if (url != NULL)
|
||||
data->link_url = nsurl_access(url);
|
||||
}
|
||||
if (box->gadget) {
|
||||
switch (box->gadget->type) {
|
||||
|
@ -1564,9 +1564,7 @@ bool nsurl_has_component(const nsurl *url, nsurl_component part)
|
||||
/* exported interface, documented in nsurl.h */
|
||||
const char *nsurl_access(const nsurl *url)
|
||||
{
|
||||
if (url == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
assert(url != NULL);
|
||||
|
||||
return url->string;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user