From 98276c282967d6857d29173d7314edfee85fe605 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Tue, 4 Jun 2024 14:19:27 +0200 Subject: [PATCH] [spidermonkey] style.backgroundClip unused, but jquery checks it --- src/ecmascript/spidermonkey/style.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/ecmascript/spidermonkey/style.cpp b/src/ecmascript/spidermonkey/style.cpp index 26fea085..740b17b8 100644 --- a/src/ecmascript/spidermonkey/style.cpp +++ b/src/ecmascript/spidermonkey/style.cpp @@ -57,6 +57,7 @@ static bool style_style(JSContext *ctx, unsigned int argc, JS::Value *vp, const char *property); static bool style_set_style(JSContext *ctx, unsigned int argc, JS::Value *vp, const char *property); static bool style_get_property_background(JSContext *ctx, unsigned int argc, JS::Value *vp); +static bool style_get_property_backgroundClip(JSContext *ctx, unsigned int argc, JS::Value *vp); static bool style_get_property_backgroundColor(JSContext *ctx, unsigned int argc, JS::Value *vp); static bool style_get_property_color(JSContext *ctx, unsigned int argc, JS::Value *vp); static bool style_get_property_cssText(JSContext *ctx, unsigned int argc, JS::Value *vp); @@ -73,6 +74,7 @@ static bool style_get_property_top(JSContext *ctx, unsigned int argc, JS::Value static bool style_get_property_whiteSpace(JSContext *ctx, unsigned int argc, JS::Value *vp); static bool style_set_property_background(JSContext *ctx, unsigned int argc, JS::Value *vp); +static bool style_set_property_backgroundClip(JSContext *ctx, unsigned int argc, JS::Value *vp); static bool style_set_property_backgroundColor(JSContext *ctx, unsigned int argc, JS::Value *vp); static bool style_set_property_color(JSContext *ctx, unsigned int argc, JS::Value *vp); static bool style_set_property_cssText(JSContext *ctx, unsigned int argc, JS::Value *vp); @@ -115,6 +117,7 @@ JSClass style_class = { static JSPropertySpec style_props[] = { JS_PSGS("background", style_get_property_background, style_set_property_background, JSPROP_ENUMERATE), + JS_PSGS("backgroundClip", style_get_property_backgroundClip, style_set_property_backgroundClip, JSPROP_ENUMERATE), JS_PSGS("backgroundColor", style_get_property_backgroundColor, style_set_property_backgroundColor, JSPROP_ENUMERATE), JS_PSGS("color", style_get_property_color, style_set_property_color, JSPROP_ENUMERATE), JS_PSGS("cssText", style_get_property_cssText, style_set_property_cssText, JSPROP_ENUMERATE), @@ -141,6 +144,15 @@ style_get_property_background(JSContext *ctx, unsigned int argc, JS::Value *vp) return style_style(ctx, argc, vp, "background"); } +static bool +style_get_property_backgroundClip(JSContext *ctx, unsigned int argc, JS::Value *vp) +{ +#ifdef ECMASCRIPT_DEBUG + fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__); +#endif + return style_style(ctx, argc, vp, "background-clip"); +} + static bool style_get_property_backgroundColor(JSContext *ctx, unsigned int argc, JS::Value *vp) { @@ -267,6 +279,16 @@ style_set_property_background(JSContext *ctx, unsigned int argc, JS::Value *vp) return style_set_style(ctx, argc, vp, "background"); } +static bool +style_set_property_backgroundClip(JSContext *ctx, unsigned int argc, JS::Value *vp) +{ +#ifdef ECMASCRIPT_DEBUG + fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__); +#endif + return style_set_style(ctx, argc, vp, "background-clip"); +} + + static bool style_set_property_backgroundColor(JSContext *ctx, unsigned int argc, JS::Value *vp) { @@ -386,6 +408,7 @@ style_set_property_whiteSpace(JSContext *ctx, unsigned int argc, JS::Value *vp) const std::map good = { { "background", true }, + { "background-clip", true }, { "background-color", true }, { "color", true }, { "display", true },