Bug 611103 - Part 3: Handle the edge case where the br element appears immediately after another br; r=bzbarsky

The test for bug 1119503 examines this edge case.
This commit is contained in:
Ehsan Akhgari 2015-01-23 11:23:24 -05:00
Родитель 73e2210610
Коммит 0408ade913
1 изменённых файлов: 5 добавлений и 2 удалений

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

@ -330,9 +330,12 @@ IsInvisibleBreak(nsINode *aNode) {
}
// If the BRFrame has caused a visible line break, it should have a next
// sibling, or otherwise no siblings and a non-zero height.
// sibling, or otherwise no siblings (or immediately after a br) and a
// non-zero height.
bool visible = frame->GetNextSibling() ||
(!frame->GetPrevSibling() && frame->GetRect().Height() != 0);
((!frame->GetPrevSibling() ||
frame->GetPrevSibling()->GetType() == nsGkAtoms::brFrame) &&
frame->GetRect().Height() != 0);
return !visible;
}