dom_string *key, void *data, struct dom_node *src,
struct dom_node *dst)
{
- /* We only care about the userdata that is identified by our
- * userdata key. Unfortunately I see no obvious way to obtain
- * the copy of the userdata key that is already interned in
- * svgtiny_strings.h; so we duplicate it here (ugh). */
- dom_string *str;
- dom_string_create((const uint8_t *)"_libcss_user_data", 17, &str);
- if (dom_string_isequal(str,key) == false || data == NULL) {
- /* Wrong key, or no data */
- dom_string_destroy(str);
+ /* Technically we should compare "key" against the one used in
+ * get/set_libcss_node_data(), but at the moment libcss is the
+ * only user of this libdom feature, and eliding the compare
+ * saves us the trouble of figuring out how to reference that
+ * interned_userdata_key from this handler. */
+ UNUSED(key);
+
+ if (data == NULL) {
+ /* No data */
return;
}
- dom_string_destroy(str);
/* Check the DOM operation, and make the corresponding call to
* css_libcss_node_data_handler(). No error handling is done.