Bug 1062732 - Avoid tracking descendants for restyling if we are force restyling the entire subtree. r=dbaron

This commit is contained in:
Cameron McCormack 2014-09-19 11:12:31 +10:00
Родитель b973a953c7
Коммит 377ef30058
1 изменённых файлов: 6 добавлений и 1 удалений

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

@ -472,9 +472,14 @@ RestyleTracker::AddPendingRestyle(Element* aElement,
RestyleData* curData;
mPendingRestyles.Get(cur, &curData);
NS_ASSERTION(curData, "expected to find a RestyleData for cur");
// If cur has an eRestyle_ForceDescendants restyle hint, then we
// know that we will get to all descendants. Don't bother
// recording the descendant to restyle in that case.
if (!(curData->mRestyleHint & eRestyle_ForceDescendants)) {
curData->mDescendants.AppendElement(aElement);
}
}
}
mHaveLaterSiblingRestyles =
mHaveLaterSiblingRestyles || (aRestyleHint & eRestyle_LaterSiblings) != 0;