зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset e0841c88d3ae (bug 1474466) for landing with the wrong bug number. r=me
This commit is contained in:
Родитель
cadda9e720
Коммит
dea0d7ad83
|
@ -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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче