Chromium issue 40867444 asks for XML documents inside iframes to use the XML tree viewer instead of rendering as plain text without tags.
The compatibility-sensitive part is the same-origin DOM API below. Even if
the iframe gets a tree viewer, iframe.contentDocument.documentElement
must remain the original XML root element, not an inserted HTML wrapper.
Expected with the fix enabled: tags are visible in the iframe and the
tree can be expanded/collapsed. Expected DOM in all modes: the document
element is <catalog>.
These checks cover the concern from comment #14: pages may depend on the iframe document element being the XML document element.
A browser with the iframe XML viewer path enabled should show angle-bracket XML tags inside the iframe, similar to top-level XML view-source mode.
The page should report all green checks. In particular, this JavaScript expression must stay true:
iframe.contentDocument.documentElement.nodeName === 'catalog'
<?xml version="1.0" encoding="UTF-8"?>
<catalog>
<book id="bk101">
<title>XML iframe viewer sample</title>
<author>Chromium repro</author>
<summary>Tags should be visible in the iframe viewer.</summary>
</book>
<book id="bk102">
<title>DOM compatibility check</title>
<summary>iframe.contentDocument.documentElement must remain the catalog element.</summary>
</book>
</catalog>
This iframe loads XML with an xml-stylesheet processing
instruction. With native XSLT enabled, it should transform into a styled HTML
table. Without XSLT, Chromium may show its XSLT-not-supported message.
These checks report whether native XSLT transformed the XML into a styled HTML table.