зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1631057 - Remove adopted sheets from styles on unlink r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D71377
This commit is contained in:
Родитель
4452987eb3
Коммит
cacf520bf8
|
@ -820,9 +820,10 @@ void DocumentOrShadowRoot::Unlink(DocumentOrShadowRoot* tmp) {
|
|||
tmp->RemoveSheetFromStylesIfApplicable(*sheet);
|
||||
}
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mStyleSheets);
|
||||
for (StyleSheet* sheet : tmp->mAdoptedStyleSheets) {
|
||||
sheet->RemoveAdopter(*tmp);
|
||||
}
|
||||
tmp->EnumerateUniqueAdoptedStyleSheetsBackToFront([&](StyleSheet& aSheet) {
|
||||
aSheet.RemoveAdopter(*tmp);
|
||||
tmp->RemoveSheetFromStylesIfApplicable(aSheet);
|
||||
});
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mAdoptedStyleSheets);
|
||||
tmp->mIdentifierMap.Clear();
|
||||
tmp->mRadioGroups.Clear();
|
||||
|
|
Загрузка…
Ссылка в новой задаче