Bug 1578282 - Use flattened tree parent when getting inserted node container. r=Jamie

This assures that a node that has already been inserted in a shadow root
subtree does not get erroneously reinserted into the top container.

Differential Revision: https://phabricator.services.mozilla.com/D44880

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Eitan Isaacson 2019-09-06 00:24:21 +00:00
parent bc31321ff9
commit 0bf1f3d15c
3 changed files with 24 additions and 2 deletions

View File

@ -1830,8 +1830,8 @@ bool InsertIterator::Next() {
continue;
}
Accessible* container =
Document()->AccessibleOrTrueContainer(node->GetParentNode(), true);
Accessible* container = Document()->AccessibleOrTrueContainer(
node->GetFlattenedTreeParentNode(), true);
if (container != Context()) {
continue;
}

View File

@ -0,0 +1,21 @@
<html class="reftest-wait">
<head>
<script>
function onload() {
document.documentElement.style.display = "none"
document.documentElement.getBoundingClientRect()
document.documentElement.style.display = ""
window.setTimeout(() => {
document.documentElement.removeAttribute("class");
}, 1000);
}
</script>
</head>
<body onload="onload()">
<marquee style="display: inline-grid">
<video></video>
<bgsound></bgsound>
&lt;
</marquee>
</body>
</html>

View File

@ -2,6 +2,7 @@ load 448064.xhtml # This test instantiates a11y, so be careful about adding test
load chrome://reftest/content/crashtests/accessible/tests/crashtests/471493.xul
asserts-if(!browserIsRemote,2) load 884202.html
load 1572811.html
load 1578282.html
load 890760.html
load 893515.html
load 1072792.xhtml