r13602 dsilvers - in /trunk/libdom/src/core: document.c document.h document_type.c document_type.h

netsurf at semichrome.net netsurf at semichrome.net
Sat Mar 24 16:56:00 GMT 2012


Author: dsilvers
Date: Sat Mar 24 11:56:00 2012
New Revision: 13602

URL: http://source.netsurf-browser.org?rev=13602&view=rev
Log:
Documents and document types do not have text content

Modified:
    trunk/libdom/src/core/document.c
    trunk/libdom/src/core/document.h
    trunk/libdom/src/core/document_type.c
    trunk/libdom/src/core/document_type.h

Modified: trunk/libdom/src/core/document.c
URL: http://source.netsurf-browser.org/trunk/libdom/src/core/document.c?rev=13602&r1=13601&r2=13602&view=diff
==============================================================================
--- trunk/libdom/src/core/document.c (original)
+++ trunk/libdom/src/core/document.c Sat Mar 24 11:56:00 2012
@@ -47,7 +47,7 @@
 		{
 			DOM_NODE_EVENT_TARGET_VTABLE
 		},
-		DOM_NODE_VTABLE
+		DOM_NODE_VTABLE_DOCUMENT
 	},
 	DOM_DOCUMENT_VTABLE
 };
@@ -1043,6 +1043,25 @@
 	return DOM_NOT_SUPPORTED_ERR;
 }
 
+dom_exception _dom_document_get_text_content(dom_node_internal *node,
+					     dom_string **result)
+{
+	UNUSED(node);
+	
+	*result = NULL;
+	
+	return DOM_NO_ERR;
+}
+
+dom_exception _dom_document_set_text_content(dom_node_internal *node,
+					     dom_string *content)
+{
+	UNUSED(node);
+	UNUSED(content);
+	
+	return DOM_NO_ERR;
+}
+
 /*-----------------------------------------------------------------------*/
 
 /* Overload protected virtual functions */

Modified: trunk/libdom/src/core/document.h
URL: http://source.netsurf-browser.org/trunk/libdom/src/core/document.h?rev=13602&r1=13601&r2=13602&view=diff
==============================================================================
--- trunk/libdom/src/core/document.h (original)
+++ trunk/libdom/src/core/document.h Sat Mar 24 11:56:00 2012
@@ -138,6 +138,11 @@
 		dom_string *namespace, dom_string *qname,
 		dom_node **result);
 
+dom_exception _dom_document_get_text_content(dom_node_internal *node,
+					     dom_string **result);
+dom_exception _dom_document_set_text_content(dom_node_internal *node,
+					     dom_string *content);
+
 #define DOM_DOCUMENT_VTABLE \
 	_dom_document_get_doctype, \
 	_dom_document_get_implementation, \
@@ -172,6 +177,45 @@
 	_dom_document_rename_node
 /* End of vtable */
 
+#define DOM_NODE_VTABLE_DOCUMENT \
+	_dom_node_get_node_name, \
+	_dom_node_get_node_value, \
+	_dom_node_set_node_value, \
+	_dom_node_get_node_type, \
+	_dom_node_get_parent_node, \
+	_dom_node_get_child_nodes, \
+	_dom_node_get_first_child, \
+	_dom_node_get_last_child, \
+	_dom_node_get_previous_sibling, \
+	_dom_node_get_next_sibling, \
+	_dom_node_get_attributes, \
+	_dom_node_get_owner_document, \
+	_dom_node_insert_before, \
+	_dom_node_replace_child, \
+	_dom_node_remove_child, \
+	_dom_node_append_child, \
+	_dom_node_has_child_nodes, \
+	_dom_node_clone_node, \
+	_dom_node_normalize, \
+	_dom_node_is_supported, \
+	_dom_node_get_namespace, \
+	_dom_node_get_prefix, \
+	_dom_node_set_prefix, \
+	_dom_node_get_local_name, \
+	_dom_node_has_attributes, \
+	_dom_node_get_base, \
+	_dom_node_compare_document_position, \
+	_dom_document_get_text_content, \
+	_dom_document_set_text_content, \
+	_dom_node_is_same, \
+	_dom_node_lookup_prefix, \
+	_dom_node_is_default_namespace, \
+	_dom_node_lookup_namespace, \
+	_dom_node_is_equal, \
+	_dom_node_get_feature, \
+	_dom_node_set_user_data, \
+	_dom_node_get_user_data
+
 /** \todo Unused! */
 /**
  * The internal used vtable for document

Modified: trunk/libdom/src/core/document_type.c
URL: http://source.netsurf-browser.org/trunk/libdom/src/core/document_type.c?rev=13602&r1=13601&r2=13602&view=diff
==============================================================================
--- trunk/libdom/src/core/document_type.c (original)
+++ trunk/libdom/src/core/document_type.c Sat Mar 24 11:56:00 2012
@@ -32,7 +32,7 @@
 		{
 			DOM_NODE_EVENT_TARGET_VTABLE
 		},
-		DOM_NODE_VTABLE	
+		DOM_NODE_VTABLE_DOCUMENT_TYPE
 	},
 	DOM_DOCUMENT_TYPE_VTABLE
 };
@@ -305,6 +305,25 @@
 	return DOM_NOT_SUPPORTED_ERR;
 }
 
+dom_exception _dom_document_type_get_text_content(dom_node_internal *node,
+                                                  dom_string **result)
+{
+	UNUSED(node);
+	
+	*result = NULL;
+	
+	return DOM_NO_ERR;
+}
+
+dom_exception _dom_document_type_set_text_content(dom_node_internal *node,
+                                                  dom_string *content)
+{
+	UNUSED(node);
+	UNUSED(content);
+	
+	return DOM_NO_ERR;
+}
+
 /*-----------------------------------------------------------------------*/
 
 /* Overload protected virtual functions */

Modified: trunk/libdom/src/core/document_type.h
URL: http://source.netsurf-browser.org/trunk/libdom/src/core/document_type.h?rev=13602&r1=13601&r2=13602&view=diff
==============================================================================
--- trunk/libdom/src/core/document_type.h (original)
+++ trunk/libdom/src/core/document_type.h Sat Mar 24 11:56:00 2012
@@ -43,6 +43,11 @@
 		dom_document_type *doc_type,
 		dom_string **result);
 
+dom_exception _dom_document_type_get_text_content(dom_node_internal *node,
+                                                  dom_string **result);
+dom_exception _dom_document_type_set_text_content(dom_node_internal *node,
+                                                  dom_string *content);
+
 #define DOM_DOCUMENT_TYPE_VTABLE \
 	_dom_document_type_get_name, \
 	_dom_document_type_get_entities, \
@@ -50,6 +55,45 @@
 	_dom_document_type_get_public_id, \
 	_dom_document_type_get_system_id, \
 	_dom_document_type_get_internal_subset
+
+#define DOM_NODE_VTABLE_DOCUMENT_TYPE \
+	_dom_node_get_node_name, \
+	_dom_node_get_node_value, \
+	_dom_node_set_node_value, \
+	_dom_node_get_node_type, \
+	_dom_node_get_parent_node, \
+	_dom_node_get_child_nodes, \
+	_dom_node_get_first_child, \
+	_dom_node_get_last_child, \
+	_dom_node_get_previous_sibling, \
+	_dom_node_get_next_sibling, \
+	_dom_node_get_attributes, \
+	_dom_node_get_owner_document, \
+	_dom_node_insert_before, \
+	_dom_node_replace_child, \
+	_dom_node_remove_child, \
+	_dom_node_append_child, \
+	_dom_node_has_child_nodes, \
+	_dom_node_clone_node, \
+	_dom_node_normalize, \
+	_dom_node_is_supported, \
+	_dom_node_get_namespace, \
+	_dom_node_get_prefix, \
+	_dom_node_set_prefix, \
+	_dom_node_get_local_name, \
+	_dom_node_has_attributes, \
+	_dom_node_get_base, \
+	_dom_node_compare_document_position, \
+	_dom_document_type_get_text_content, \
+	_dom_document_type_set_text_content, \
+	_dom_node_is_same, \
+	_dom_node_lookup_prefix, \
+	_dom_node_is_default_namespace, \
+	_dom_node_lookup_namespace, \
+	_dom_node_is_equal, \
+	_dom_node_get_feature, \
+	_dom_node_set_user_data, \
+	_dom_node_get_user_data
 
 /* Following comes the protected vtable  */
 void _dom_dt_destroy(dom_node_internal *node);




More information about the netsurf-commits mailing list