Backed out changeset e0841c88d3ae (bug 1474466) for landing with the wrong bug number. r=me

This commit is contained in:
Emilio Cobos Álvarez 2018-07-15 12:36:07 +02:00
Родитель cadda9e720
Коммит dea0d7ad83
3 изменённых файлов: 5 добавлений и 9 удалений

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

@ -25,13 +25,6 @@ DocumentOrShadowRoot::DocumentOrShadowRoot(nsIDocument& aDoc)
, mKind(Kind::Document)
{}
DocumentOrShadowRoot::~DocumentOrShadowRoot()
{
for (StyleSheet* sheet : mStyleSheets) {
sheet->ClearAssociatedDocumentOrShadowRoot();
}
}
StyleSheetList&
DocumentOrShadowRoot::EnsureDOMStyleSheets()
{

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

@ -100,7 +100,7 @@ public:
already_AddRefed<nsContentList>
GetElementsByClassName(const nsAString& aClasses);
~DocumentOrShadowRoot();
~DocumentOrShadowRoot() = default;
Element* GetPointerLockElement();
Element* GetFullscreenElement();

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

@ -1684,12 +1684,15 @@ nsDocument::~nsDocument()
mFirstChild = nullptr;
mCachedRootElement = nullptr;
// Let the stylesheets know we're going away
for (StyleSheet* sheet : mStyleSheets) {
sheet->ClearAssociatedDocumentOrShadowRoot();
}
for (auto& sheets : mAdditionalSheets) {
for (StyleSheet* sheet : sheets) {
sheet->ClearAssociatedDocumentOrShadowRoot();
}
}
if (mAttrStyleSheet) {
mAttrStyleSheet->SetOwningDocument(nullptr);
}