From 900e904c09a69f9986f4b23931adcbfc3e2e63d9 Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Mon, 16 Feb 2015 19:53:16 +0100 Subject: [PATCH] parser: Simplify the `element_in_specific_scope` calls The old implementation using 2 tagsets was being rather wasteful with stack space, allocating 2 whole sets when one of them always contains a single tag element. Knowing that the `expected` elements must always be in the HTML namespace, we can simplify these APIs by passing an array of elements and stop allocating so much space on the stack. --- src/parser.c | 71 +++++++++++++++++++++++----------------------------- 1 file changed, 31 insertions(+), 40 deletions(-) diff --git a/src/parser.c b/src/parser.c index d190983c..c2eae936 100644 --- a/src/parser.c +++ b/src/parser.c @@ -1313,40 +1313,38 @@ static GumboQuirksModeEnum compute_quirks_mode( // names. For example, "has an element in list scope" looks for an element of // the given qualified name within the nearest enclosing
    or