summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <michael.drake@codethink.co.uk>2016-05-08 13:12:19 (GMT)
committer Michael Drake <tlsa@netsurf-browser.org>2016-11-19 14:30:07 (GMT)
commitd91bf786c42bd86a9d9159a6cd8e14e04ee29f39 (patch)
tree88e2d735ba64a8adbd1057c1fa0c2e2885f5306f
parentcd5aa421206501a8651baa5cb4d19a96c4374cbe (diff)
downloadlibcss-d91bf786c42bd86a9d9159a6cd8e14e04ee29f39.tar.gz
libcss-d91bf786c42bd86a9d9159a6cd8e14e04ee29f39.tar.bz2
Remove option to support not storing data on DOM nodes.
It was complicating lifetimes and ownership.
-rw-r--r--test/INDEX3
-rw-r--r--test/Makefile2
-rw-r--r--test/select-nd.c14
-rw-r--r--test/select-no-nd.c14
-rw-r--r--test/select.c (renamed from test/select-common.c)12
5 files changed, 14 insertions, 31 deletions
diff --git a/test/INDEX b/test/INDEX
index cf1a3cb..d712157 100644
--- a/test/INDEX
+++ b/test/INDEX
@@ -10,8 +10,7 @@ number Conversion of numbers to fixed point number
#css21 Parsing (CSS2.1 specifics) css
parse-auto Automated parser tests (bytecode) parse
parse2-auto Automated parser tests (om & invalid) parse2
-select-no-nd Automated selection engine tests (no node_data) select
-select-nd Automated selection engine tests (with node_data) select
+select Automated selection engine tests select
# Regression tests
diff --git a/test/Makefile b/test/Makefile
index 021d829..18124ce 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -2,6 +2,6 @@
DIR_TEST_ITEMS := csdetect:csdetect.c css21:css21.c lex:lex.c \
lex-auto:lex-auto.c number:number.c \
parse:parse.c parse-auto:parse-auto.c parse2-auto:parse2-auto.c \
- select-no-nd:select-no-nd.c select-nd:select-nd.c
+ select:select.c
include $(NSBUILD)/Makefile.subdir
diff --git a/test/select-nd.c b/test/select-nd.c
deleted file mode 100644
index 6469267..0000000
--- a/test/select-nd.c
+++ b/dev/null
@@ -1,14 +0,0 @@
-
-#include "select-common.c"
-
-static css_error get_libcss_node_data(void *pw, void *n,
- void **libcss_node_data)
-{
- node *node = n;
- UNUSED(pw);
-
- /* Pass any node data back to libcss */
- *libcss_node_data = node->libcss_node_data;
-
- return CSS_OK;
-}
diff --git a/test/select-no-nd.c b/test/select-no-nd.c
deleted file mode 100644
index 8eb3735..0000000
--- a/test/select-no-nd.c
+++ b/dev/null
@@ -1,14 +0,0 @@
-
-#include "select-common.c"
-
-static css_error get_libcss_node_data(void *pw, void *n,
- void **libcss_node_data)
-{
- UNUSED(pw);
- UNUSED(n);
-
- /* Test case were node data is deleted, by not passing any node data */
- *libcss_node_data = NULL;
-
- return CSS_OK;
-}
diff --git a/test/select-common.c b/test/select.c
index b4f588a..4146355 100644
--- a/test/select-common.c
+++ b/test/select.c
@@ -1678,4 +1678,16 @@ static css_error set_libcss_node_data(void *pw, void *n,
return CSS_OK;
}
+static css_error get_libcss_node_data(void *pw, void *n,
+ void **libcss_node_data)
+{
+ node *node = n;
+ UNUSED(pw);
+
+ /* Pass any node data back to libcss */
+ *libcss_node_data = node->libcss_node_data;
+
+ return CSS_OK;
+}
+