Bug 1780671 - Make EnsureAutoPageName walk back up the frame tree only when necessary r=dholbert

Differential Revision: https://phabricator.services.mozilla.com/D152471
This commit is contained in:
Emily McDonough 2022-07-22 05:01:40 +00:00
Родитель 1968f60af5
Коммит e9d545fba3
1 изменённых файлов: 4 добавлений и 0 удалений

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

@ -1423,6 +1423,10 @@ static void EnsureAutoPageName(nsFrameConstructorState& aState,
// When building the entire document, this should only happen for the
// root, which will mean the loop will immediately end. Either way, this will
// only happen once for each time the frame constructor is run.
if (aState.mAutoPageNameValue) {
return;
}
for (const nsContainerFrame* frame = aFrame; frame;
frame = frame->GetParent()) {
const StylePageName& pageName = frame->StylePage()->mPage;