Bug 1570353 [wpt PR 18209] - Give more content to foreign-container, a=testonly

Automatic update from web-platform-tests
Give more content to foreign-container (#18209)

Chromium has behavior different from Firefox. For an empty span in
a div with padding the empty span is positioned at (0, 0). The same
effect is seen for MathML, so add some text content to force
an inline flow.
--

wpt-commits: dbf688e8d16b4483de532ceb29f7de12be12573e
wpt-pr: 18209
This commit is contained in:
Rob Buis 2019-08-06 17:15:12 +00:00 committed by moz-wptsync-bot
parent 7f5c55103c
commit a5b1967a04

View File

@ -144,8 +144,11 @@ var FragmentHelper = {
return element.firstElementChild;
if (element.classList.contains("mathml-container"))
return element.appendChild(this.createElement("mrow"));
if (element.classList.contains("foreign-container"))
return element.appendChild(document.createElement("span"));
if (element.classList.contains("foreign-container")) {
var el = document.createElement("span");
el.textContent = "a";
return element.appendChild(el);
}
throw "Cannot make the element nonempty";
}
}