Bug 1541846 - Ensure namespace-aware “clear the stack” handling r=smaug
commitd76dfd530f9f22a8b35dbfd641d6f7d66799fff9
authorMichael[tm] Smith <mike@w3.org>
Tue, 17 Aug 2021 12:02:13 +0000 (17 12:02 +0000)
committerMichael[tm] Smith <mike@w3.org>
Tue, 17 Aug 2021 12:02:13 +0000 (17 12:02 +0000)
treed327ac53960e88e1d5118119da6cf3e511f467f4
parentba6c47c851190d6296832bf10e61e3b98f523ccc
Bug 1541846 - Ensure namespace-aware “clear the stack” handling r=smaug

This change ensures that for all cases with spec requirements in the
form “clear the stack back to a foo context” — which involves checking
for elements with particular names — we only look for elements in the
HTML namespace, rather than additionally looking for elements which
aren’t in the HTML namespace but that also have those particular names.

Otherwise, without this change, we aren’t in conformance with the spec
requirements, and we fail several cases in the html5lib-tests suite.

Fixes https://github.com/validator/htmlparser/issues/33

Differential Revision: https://phabricator.services.mozilla.com/D122722
parser/html/javasrc/TreeBuilder.java
parser/html/nsHtml5TreeBuilder.cpp
testing/web-platform/meta/html/syntax/parsing/html5lib_innerHTML_math.html.ini [deleted file]