The main culprit for the following WPT test failure is that we weren't using the HTML namespace for XHTML docs unless one was explicitly provided. (cherry picked from commit 6a5bca1302161a84d95313bef1481d9a8a56702c)