From b182cc7617a739f4b42293ef8e43485ef48d7cab Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Mon, 25 May 2020 17:12:43 +0100 Subject: remove box handling from browser window --- content/handlers/html/box.h | 8 -------- content/handlers/html/box_construct.c | 6 ------ content/handlers/html/box_special.c | 8 ++++---- 3 files changed, 4 insertions(+), 18 deletions(-) (limited to 'content') diff --git a/content/handlers/html/box.h b/content/handlers/html/box.h index b4da031f1..d0df73568 100644 --- a/content/handlers/html/box.h +++ b/content/handlers/html/box.h @@ -448,12 +448,4 @@ struct box { }; -/* Frame target names (constant pointers to save duplicating the strings many - * times). We convert _blank to _top for user-friendliness. */ -extern const char *TARGET_SELF; -extern const char *TARGET_PARENT; -extern const char *TARGET_TOP; -extern const char *TARGET_BLANK; - - #endif diff --git a/content/handlers/html/box_construct.c b/content/handlers/html/box_construct.c index 5ae755211..5edd88ed2 100644 --- a/content/handlers/html/box_construct.c +++ b/content/handlers/html/box_construct.c @@ -85,12 +85,6 @@ struct box_construct_props { static const content_type image_types = CONTENT_IMAGE; -/* the strings are not important, since we just compare the pointers */ -const char *TARGET_SELF = "_self"; -const char *TARGET_PARENT = "_parent"; -const char *TARGET_TOP = "_top"; -const char *TARGET_BLANK = "_blank"; - /** * mapping from CSS display to box type this table must be in sync * with libcss' css_display enum diff --git a/content/handlers/html/box_special.c b/content/handlers/html/box_special.c index 2332316ce..c6be9e626 100644 --- a/content/handlers/html/box_special.c +++ b/content/handlers/html/box_special.c @@ -716,18 +716,18 @@ box_a(dom_node *n, if (err == DOM_NO_ERR && s != NULL) { if (dom_string_caseless_lwc_isequal(s, corestring_lwc__blank)) - box->target = TARGET_BLANK; + box->target = "_blank"; else if (dom_string_caseless_lwc_isequal(s, corestring_lwc__top)) - box->target = TARGET_TOP; + box->target = "_top"; else if (dom_string_caseless_lwc_isequal(s, corestring_lwc__parent)) - box->target = TARGET_PARENT; + box->target = "_parent"; else if (dom_string_caseless_lwc_isequal(s, corestring_lwc__self)) /* the default may have been overridden by a * , so this is different to 0 */ - box->target = TARGET_SELF; + box->target = "_self"; else { /* 6.16 says that frame names must begin with [a-zA-Z] * This doesn't match reality, so just take anything */ -- cgit v1.2.3