Bug 1577492 [wpt PR 18747] - Only check that "display: contents" computes to none for MathML child…, a=testonly

Automatic update from web-platform-tests
Only check that "display: contents" computes to none for MathML child… (#18747)

* Only check that "display: contents" computes to none for MathML children.

* do not remove space

--

wpt-commits: e63a246b128875ed7ff0db69a9fbaa7548cc0360
wpt-pr: 18747
This commit is contained in:
Frédéric Wang 2019-09-02 12:42:35 +00:00 коммит произвёл moz-wptsync-bot
Родитель fd9cb0aa4e
Коммит 248324b182
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -37,6 +37,13 @@
var elementContainer = div.firstElementChild;
var elementContainerWidth = elementContainer.getBoundingClientRect().width;
var element = FragmentHelper.element(elementContainer);
if (style === "display: contents" &&
!element.classList.contains("mathml-container")) {
// A "display: contents" MathML child is not participating to
// parent layout because its computed style is "display: none".
// If we cannot append a MathML child then skip that test.
return;
}
FragmentHelper.forceNonEmptyElement(element);
var allowInvalid = true;
var child = FragmentHelper.appendChild(element, allowInvalid);