Bug 1369903 Part 2: Allow HTMLEditor to enable/disable any type of stylesheet. r=emilio

MozReview-Commit-ID: JSlJ8yhqLXm

--HG--
extra : rebase_source : 35fd4c941fd09109779f454020c7af8de72dba55
This commit is contained in:
Brad Werth 2017-06-05 09:00:20 -07:00
parent 2413824883
commit 6aa25ee4e2

View File

@ -2967,12 +2967,7 @@ HTMLEditor::EnableStyleSheet(const nsAString& aURL,
nsCOMPtr<nsIDocument> doc = do_QueryReferent(mDocWeak); nsCOMPtr<nsIDocument> doc = do_QueryReferent(mDocWeak);
sheet->SetAssociatedDocument(doc, StyleSheet::NotOwnedByDocument); sheet->SetAssociatedDocument(doc, StyleSheet::NotOwnedByDocument);
if (sheet->IsServo()) { return sheet->SetDisabled(!aEnable);
// XXXheycam ServoStyleSheets don't support being enabled/disabled yet.
NS_ERROR("stylo: ServoStyleSheets can't be disabled yet");
return NS_ERROR_FAILURE;
}
return sheet->AsGecko()->SetDisabled(!aEnable);
} }
bool bool