From ffa57c6ed129cb3edf496598577e97cdf0e1e676 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Sun, 27 Oct 2024 12:58:06 +0100 Subject: [PATCH] [quickjs] Removed map_csses --- src/js/quickjs.c | 5 ----- src/js/quickjs/css.c | 25 +------------------------ src/js/quickjs/mapa.h | 3 --- 3 files changed, 1 insertion(+), 32 deletions(-) diff --git a/src/js/quickjs.c b/src/js/quickjs.c index 260358641..de3fb1274 100644 --- a/src/js/quickjs.c +++ b/src/js/quickjs.c @@ -171,9 +171,6 @@ quickjs_init(struct module *module) map_form_elements_rev = attr_create_new_form_elements_map_rev(); //js_module_init_ok = spidermonkey_runtime_addref(); - map_csses = attr_create_new_csses_map(); - map_rev_csses = attr_create_new_csses_map_rev(); - #ifdef CONFIG_DEBUG quickjs_runtime = JS_NewRuntime2(&el_quickjs_mf, NULL); #else @@ -205,8 +202,6 @@ quickjs_done(struct module *xxx) attr_delete_map(map_form_elements); attr_delete_map_rev(map_form_elements_rev); - attr_delete_map(map_csses); - attr_delete_map_rev(map_rev_csses); interp_delete_map(map_interp); if (quickjs_runtime) { diff --git a/src/js/quickjs/css.c b/src/js/quickjs/css.c index abe172113..f818ac0b2 100644 --- a/src/js/quickjs/css.c +++ b/src/js/quickjs/css.c @@ -24,9 +24,6 @@ #define countof(x) (sizeof(x) / sizeof((x)[0])) -void *map_csses; -void *map_rev_csses; - #if 0 static void * js_CSSStyleDeclaration_GetOpaque(JSValueConst this_val) @@ -165,29 +162,9 @@ getCSSStyleDeclaration(JSContext *ctx, void *node) fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__); #endif -#if 0 - static int initialized; - JSValue second; - - if (!initialized) { - initialized = 1; - } - second = attr_find_in_map(map_csses, node); - - if (!JS_IsNull(second)) { - JSValue r = JS_DupValue(ctx, second); - - RETURN_JS(r); - } -#endif JSValue CSSStyleDeclaration_obj = JS_NewArray(ctx); JS_SetPropertyFunctionList(ctx, CSSStyleDeclaration_obj, js_CSSStyleDeclaration_proto_funcs, countof(js_CSSStyleDeclaration_proto_funcs)); - //js_CSSStyleDeclaration_SetOpaque(CSSStyleDeclaration_obj, node); js_CSSStyleDeclaration_set_items(ctx, CSSStyleDeclaration_obj, node); - //attr_save_in_map(map_csses, node, CSSStyleDeclaration_obj); + RETURN_JS(CSSStyleDeclaration_obj); - -// JSValue rr = JS_DupValue(ctx, CSSStyleDeclaration_obj); - -// RETURN_JS(rr); } diff --git a/src/js/quickjs/mapa.h b/src/js/quickjs/mapa.h index c671c135c..88ebda4ee 100644 --- a/src/js/quickjs/mapa.h +++ b/src/js/quickjs/mapa.h @@ -24,9 +24,6 @@ extern void *map_rev_nodelist; extern void *map_form_elements; extern void *map_form_elements_rev; -extern void *map_csses; -extern void *map_rev_csses; - extern void *map_interp; void attr_save_in_map(void *m, void *node, JSValueConst value);