зеркало из https://github.com/mozilla/gecko-dev.git
Fixed FindNextSibling to return the first-in-flow not the last in flow
This commit is contained in:
Родитель
fac60d4643
Коммит
c83c90fb24
|
@ -3766,14 +3766,14 @@ FindNextSibling(nsIPresShell* aPresShell,
|
|||
aPresShell->GetPrimaryFrameFor(nextContent, &nextSibling);
|
||||
|
||||
if (nsnull != nextSibling) {
|
||||
// The frame may have a next-in-flow. Get the last-in-flow
|
||||
nsIFrame* nextInFlow;
|
||||
// The frame may have a next-in-flow. Get the first-in-flow
|
||||
nsIFrame* prevInFlow;
|
||||
do {
|
||||
nextSibling->GetNextInFlow(&nextInFlow);
|
||||
if (nsnull != nextInFlow) {
|
||||
nextSibling = nextInFlow;
|
||||
nextSibling->GetPrevInFlow(&prevInFlow);
|
||||
if (nsnull != prevInFlow) {
|
||||
nextSibling = prevInFlow;
|
||||
}
|
||||
} while (nsnull != nextInFlow);
|
||||
} while (nsnull != prevInFlow);
|
||||
|
||||
// Did we really get the *right* frame?
|
||||
const nsStyleDisplay* display;
|
||||
|
|
|
@ -3766,14 +3766,14 @@ FindNextSibling(nsIPresShell* aPresShell,
|
|||
aPresShell->GetPrimaryFrameFor(nextContent, &nextSibling);
|
||||
|
||||
if (nsnull != nextSibling) {
|
||||
// The frame may have a next-in-flow. Get the last-in-flow
|
||||
nsIFrame* nextInFlow;
|
||||
// The frame may have a next-in-flow. Get the first-in-flow
|
||||
nsIFrame* prevInFlow;
|
||||
do {
|
||||
nextSibling->GetNextInFlow(&nextInFlow);
|
||||
if (nsnull != nextInFlow) {
|
||||
nextSibling = nextInFlow;
|
||||
nextSibling->GetPrevInFlow(&prevInFlow);
|
||||
if (nsnull != prevInFlow) {
|
||||
nextSibling = prevInFlow;
|
||||
}
|
||||
} while (nsnull != nextInFlow);
|
||||
} while (nsnull != prevInFlow);
|
||||
|
||||
// Did we really get the *right* frame?
|
||||
const nsStyleDisplay* display;
|
||||
|
|
Загрузка…
Ссылка в новой задаче