Backed out changeset f8703e5ad323 (bug 1410226) for failing reftests layout/reftests/forms/legend/shadow-dom.html and layout/reftests/css-display/display-contents-generated-content-2.html. r=backout on a CLOSED TREE

--HG--
extra : amend_source : 73fc264f71697cc56520b580c90ca949650e88ba
This commit is contained in:
Sebastian Hengst 2017-10-20 20:40:01 +02:00
Родитель 8074d54110
Коммит 05cc4b82d9
4 изменённых файлов: 17 добавлений и 40 удалений

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

@ -7111,26 +7111,29 @@ nsCSSFrameConstructor::GetInsertionPrevSibling(InsertionPoint* aInsertion,
nsContainerFrame*
nsCSSFrameConstructor::GetContentInsertionFrameFor(nsIContent* aContent)
{
nsIContent* content = aContent;
nsIFrame* frame;
while (!(frame = content->GetPrimaryFrame())) {
if (!GetDisplayContentsStyleFor(content)) {
// Get the primary frame associated with the content
nsIFrame* frame = aContent->GetPrimaryFrame();
if (!frame) {
if (GetDisplayContentsStyleFor(aContent)) {
nsIContent* parent = aContent->GetParent();
if (parent && parent == aContent->GetContainingShadow()) {
parent = parent->GetBindingParent();
}
frame = parent ? GetContentInsertionFrameFor(parent) : nullptr;
}
if (!frame) {
return nullptr;
}
content = content->GetFlattenedTreeParent();
if (!content) {
} else {
// If the content of the frame is not the desired content then this is not
// really a frame for the desired content.
// XXX This check is needed due to bug 135040. Remove it once that's fixed.
if (frame->GetContent() != aContent) {
return nullptr;
}
}
// If the content of the frame is not the desired content then this is not
// really a frame for the desired content.
// XXX This check is needed due to bug 135040. Remove it once that's fixed.
if (frame->GetContent() != aContent) {
return nullptr;
}
nsContainerFrame* insertionFrame = frame->GetContentInsertionFrame();
NS_ASSERTION(!insertionFrame || insertionFrame == frame || !frame->IsLeaf(),

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

@ -1,8 +0,0 @@
<style>
* { display: contents; }
</style>
<details>
</details>
<marquee>
<ul>
<canvas>

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

@ -1,16 +0,0 @@
<!doctype html>
<style>
* { display: contents; }
</style>
<marquee>
<div id="target">
</div>
</marquee>
<script>
document.body.offsetTop;
let div = document.createElement('div');
div.style.display = "block";
div.appendChild(document.createTextNode('where am I'));
target.appendChild(div);
document.body.style.color = "red";
</script>

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

@ -253,5 +253,3 @@ load 1404324-3.html
load 1404057.html
load 1409502.html
load 1409931.html
load 1410226-1.html
load 1410226-2.html