From 2e2190a5044943bde31679996afdc3558d22231b Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 17 Apr 2020 05:46:23 -0400 Subject: Bug 1332353 - Make it clearer when a stylesheet is really owned by its mDocument Tag #1375 --- editor/libeditor/HTMLEditor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'editor') diff --git a/editor/libeditor/HTMLEditor.cpp b/editor/libeditor/HTMLEditor.cpp index 56e607200..3c43ade3b 100644 --- a/editor/libeditor/HTMLEditor.cpp +++ b/editor/libeditor/HTMLEditor.cpp @@ -2961,7 +2961,7 @@ HTMLEditor::EnableStyleSheet(const nsAString& aURL, // Ensure the style sheet is owned by our document. nsCOMPtr doc = do_QueryReferent(mDocWeak); - sheet->SetOwningDocument(doc); + sheet->SetAssociatedDocument(doc, StyleSheet::NotOwnedByDocument); if (sheet->IsServo()) { // XXXheycam ServoStyleSheets don't support being enabled/disabled yet. @@ -2983,7 +2983,7 @@ HTMLEditor::EnableExistingStyleSheet(const nsAString& aURL) // Ensure the style sheet is owned by our document. nsCOMPtr doc = do_QueryReferent(mDocWeak); - sheet->SetOwningDocument(doc); + sheet->SetAssociatedDocument(doc, StyleSheet::NotOwnedByDocument); if (sheet->IsServo()) { // XXXheycam ServoStyleSheets don't support being enabled/disabled yet. -- cgit v1.2.3