summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2017-02-04 11:05:20 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2017-02-04 12:01:58 +0000
commit4143b787a2496b74c7a684fe8507c593b136cf8b (patch)
tree7bf7e13155412e6e7a0aca6aca95cb4cec01e148 /src
parent191566a22ca6b5555b1ad688507f7877c3f26463 (diff)
downloadlibnslayout-4143b787a2496b74c7a684fe8507c593b136cf8b.tar.gz
libnslayout-4143b787a2496b74c7a684fe8507c593b136cf8b.tar.bz2
util dom-str: Add additional dom event type strings.
Diffstat (limited to 'src')
-rw-r--r--src/util/dom-str.c27
-rw-r--r--src/util/dom-str.h3
2 files changed, 30 insertions, 0 deletions
diff --git a/src/util/dom-str.c b/src/util/dom-str.c
index b959afe..03fdd9e 100644
--- a/src/util/dom-str.c
+++ b/src/util/dom-str.c
@@ -15,7 +15,10 @@
#include "util/util.h"
dom_string *nsl_dom_str_node_inserted;
+dom_string *nsl_dom_str_node_removed;
dom_string *nsl_dom_str_subtree_modified;
+dom_string *nsl_dom_str_attr_modified;
+dom_string *nsl_dom_str_characterdata_modified;
/* Exported function, documented in src/util/dom-str.h */
@@ -31,6 +34,14 @@ nslayout_error nsl_dom_str_init(void)
printf("Failed to create string!\n");
return NSLAYOUT_NO_MEM;
}
+ exc = dom_string_create((const uint8_t *)"DOMNodeRemoved",
+ SLEN("DOMNodeRemoved"),
+ &nsl_dom_str_node_removed);
+ if (exc != DOM_NO_ERR) {
+ /* TODO: free stuff, return value */
+ printf("Failed to create string!\n");
+ return NSLAYOUT_NO_MEM;
+ }
exc = dom_string_create((const uint8_t *)"DOMSubtreeModified",
SLEN("DOMSubtreeModified"),
&nsl_dom_str_subtree_modified);
@@ -39,6 +50,22 @@ nslayout_error nsl_dom_str_init(void)
printf("Failed to create string!\n");
return NSLAYOUT_NO_MEM;
}
+ exc = dom_string_create((const uint8_t *)"DOMAttrModified",
+ SLEN("DOMAttrModified"),
+ &nsl_dom_str_attr_modified);
+ if (exc != DOM_NO_ERR) {
+ /* TODO: free stuff, return value */
+ printf("Failed to create string!\n");
+ return NSLAYOUT_NO_MEM;
+ }
+ exc = dom_string_create((const uint8_t *)"DOMCharacterDataModified",
+ SLEN("DOMCharacterDataModified"),
+ &nsl_dom_str_characterdata_modified);
+ if (exc != DOM_NO_ERR) {
+ /* TODO: free stuff, return value */
+ printf("Failed to create string!\n");
+ return NSLAYOUT_NO_MEM;
+ }
return NSLAYOUT_OK;
}
diff --git a/src/util/dom-str.h b/src/util/dom-str.h
index 9a51ad5..7c130c3 100644
--- a/src/util/dom-str.h
+++ b/src/util/dom-str.h
@@ -14,7 +14,10 @@
#include <libnslayout/nslayout.h>
extern dom_string *nsl_dom_str_node_inserted;
+extern dom_string *nsl_dom_str_node_removed;
extern dom_string *nsl_dom_str_subtree_modified;
+extern dom_string *nsl_dom_str_attr_modified;
+extern dom_string *nsl_dom_str_characterdata_modified;
/**
* Create the internal DOM strings