summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2012-03-24 17:02:02 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2012-03-24 17:02:02 +0000
commit3b384400b23edbf52e15ff8610bb0384f5745054 (patch)
treeca83382682cf27bfadb0c6e8102470e7e6be2962
parent32bd088080ebfd90cfda8788d7f58884086f5316 (diff)
downloadlibdom-3b384400b23edbf52e15ff8610bb0384f5745054.tar.gz
libdom-3b384400b23edbf52e15ff8610bb0384f5745054.tar.bz2
Store 'class' string on document.
svn path=/trunk/libdom/; revision=13604
-rw-r--r--src/core/document.c7
-rw-r--r--src/core/document.h4
2 files changed, 10 insertions, 1 deletions
diff --git a/src/core/document.c b/src/core/document.c
index 3f7ce77..c4e0283 100644
--- a/src/core/document.c
+++ b/src/core/document.c
@@ -132,6 +132,11 @@ dom_exception _dom_document_initialise(dom_document *doc,
doc->id_name = NULL;
+ if (lwc_intern_string("class", SLEN("class"),
+ &doc->class_string) != lwc_error_ok) {
+ return DOM_NO_MEM_ERR;
+ }
+
/* We should not pass a NULL when all things hook up */
return _dom_document_event_internal_initialise(doc, &doc->dei, daf);
}
@@ -164,6 +169,8 @@ bool _dom_document_finalise(dom_document *doc)
if (doc->id_name != NULL)
dom_string_unref(doc->id_name);
+
+ lwc_string_unref(doc->class_string);
_dom_document_event_internal_finalise(doc, &doc->dei);
diff --git a/src/core/document.h b/src/core/document.h
index 4f9990c..f79c9a9 100644
--- a/src/core/document.h
+++ b/src/core/document.h
@@ -50,7 +50,9 @@ struct dom_document {
struct list_entry pending_nodes;
/**< The deletion pending list */
- dom_string *id_name; /**< The ID attribute's name */
+ dom_string *id_name; /**< The ID attribute's name */
+
+ lwc_string *class_string; /**< The string "class". */
dom_document_event_internal dei;
/**< The DocumentEVent interface */