summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2022-11-26 14:55:20 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2022-11-26 14:55:20 +0000
commit3d739479ea760b948a95edf759d0dc080e26b035 (patch)
tree6419cc0b707a8f66219022651b7b829dc515bbad
parent14fba9afdce36db0f4465159ce976f24b6d4916c (diff)
downloadnetsurf-3d739479ea760b948a95edf759d0dc080e26b035.tar.gz
netsurf-3d739479ea760b948a95edf759d0dc080e26b035.tar.bz2
(duktape): Clear some warnings by adding base data to css rule and stylesheet
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
-rw-r--r--content/handlers/javascript/duktape/CSSRule.bnd22
-rw-r--r--content/handlers/javascript/duktape/CSSStyleSheet.bnd22
-rw-r--r--content/handlers/javascript/duktape/netsurf.bnd4
3 files changed, 48 insertions, 0 deletions
diff --git a/content/handlers/javascript/duktape/CSSRule.bnd b/content/handlers/javascript/duktape/CSSRule.bnd
new file mode 100644
index 000000000..555023c85
--- /dev/null
+++ b/content/handlers/javascript/duktape/CSSRule.bnd
@@ -0,0 +1,22 @@
+/* CSS Rule binding for NetSurf using duktape and libcss/libdom
+ *
+ * Copyright 2022 Daniel Silverstone <dsilvers@netsurf-browser.org>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * Released under the terms of the MIT License,
+ * http://www.opensource.org/licenses/mit-license
+ */
+
+/* Note, for now this exists purely to block warnings, eventually
+ * rules will have to come from stylesheets etc.
+ */
+
+class CSSRule {
+ private bool unused;
+};
+
+init CSSRule()
+%{
+ priv->unused = true;
+%}
diff --git a/content/handlers/javascript/duktape/CSSStyleSheet.bnd b/content/handlers/javascript/duktape/CSSStyleSheet.bnd
new file mode 100644
index 000000000..9167b8afa
--- /dev/null
+++ b/content/handlers/javascript/duktape/CSSStyleSheet.bnd
@@ -0,0 +1,22 @@
+/* CSS Stylesheet binding for NetSurf using duktape and libcss/libdom
+ *
+ * Copyright 2022 Daniel Silverstone <dsilvers@netsurf-browser.org>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * Released under the terms of the MIT License,
+ * http://www.opensource.org/licenses/mit-license
+ */
+
+/* Note, for now this exists purely to block warnings, eventually
+ * stylesheets will have to come from documents etc.
+ */
+
+class CSSStyleSheet {
+ private bool unused;
+};
+
+init CSSStyleSheet()
+%{
+ priv->unused = true;
+%}
diff --git a/content/handlers/javascript/duktape/netsurf.bnd b/content/handlers/javascript/duktape/netsurf.bnd
index e47f07d2b..651c2fdfa 100644
--- a/content/handlers/javascript/duktape/netsurf.bnd
+++ b/content/handlers/javascript/duktape/netsurf.bnd
@@ -205,3 +205,7 @@ init HTMLPropertiesCollection(struct dom_html_collection *coll);
#include "CanvasRenderingContext2D.bnd"
#include "ImageData.bnd"
+/* CSS Object model */
+
+#include "CSSRule.bnd"
+#include "CSSStyleSheet.bnd"