From 60090508a8131bbf10895b60b44d366747ce9d48 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sat, 3 Nov 2012 22:42:40 +0000 Subject: Do not validate event names and use dom_string_byte_length for fastness --- src/core/node.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/core') diff --git a/src/core/node.c b/src/core/node.c index ca8fd72..e0f07b2 100644 --- a/src/core/node.c +++ b/src/core/node.c @@ -2326,7 +2326,7 @@ dom_exception _dom_node_dispatch_event(dom_event_target *et, evt->in_dispatch = true; } - if (evt->type == NULL || dom_string_length(evt->type) == 0) { + if (evt->type == NULL || dom_string_byte_length(evt->type) == 0) { return DOM_UNSPECIFIED_EVENT_TYPE_ERR; } @@ -2340,10 +2340,6 @@ dom_exception _dom_node_dispatch_event(dom_event_target *et, return DOM_NO_ERR; } - if (_dom_validate_ncname(evt->type) == false) { - return DOM_INVALID_CHARACTER_ERR; - } - *success = true; /* Compose the event target list */ -- cgit v1.2.3