зеркало из https://github.com/mozilla/gecko-dev.git
Backout changeset ef47dbb6313a (bug 539356) because of performance and correctness regressions
This commit is contained in:
Родитель
202d711270
Коммит
497f844a09
|
@ -1179,18 +1179,6 @@ nsPresContext::GetParentPresContext()
|
|||
return f->PresContext();
|
||||
}
|
||||
}
|
||||
// Not sure if this is always strictly the parent, but it works for GetRootPresContext
|
||||
// where the current pres context has no frames.
|
||||
nsIDocument *doc = Document();
|
||||
if (doc) {
|
||||
doc = doc->GetParentDocument();
|
||||
if (doc) {
|
||||
shell = doc->GetShell();
|
||||
if (shell) {
|
||||
return shell->GetPresContext();
|
||||
}
|
||||
}
|
||||
}
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
|
@ -1215,7 +1203,7 @@ nsPresContext::GetRootPresContext()
|
|||
nsPresContext* pc = this;
|
||||
for (;;) {
|
||||
nsPresContext* parent = pc->GetParentPresContext();
|
||||
if (!parent || parent == pc)
|
||||
if (!parent)
|
||||
break;
|
||||
pc = parent;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче