chore: Start making use of Mozilla's linter, p=#12656

This commit is contained in:
mr. m
2026-03-07 12:15:32 +01:00
committed by GitHub
parent 7c8ccdedd4
commit 0ee960e3a3
78 changed files with 712 additions and 4842 deletions

View File

@@ -23,14 +23,12 @@ namespace {
static auto GetZenStyleSheetCache() -> ZenStyleSheetCache* {
return ZenStyleSheetCache::Singleton();
}
}
} // namespace
// Use the macro to inject all of the definitions for nsISupports.
NS_IMPL_ISUPPORTS(nsZenModsBackend, nsIZenModsBackend)
nsZenModsBackend::nsZenModsBackend() {
(void)CheckEnabled();
}
nsZenModsBackend::nsZenModsBackend() { (void)CheckEnabled(); }
auto nsZenModsBackend::CheckEnabled() -> void {
// Check if the mods backend is enabled based on the preference.
@@ -44,17 +42,19 @@ auto nsZenModsBackend::CheckEnabled() -> void {
!mozilla::Preferences::GetBool("zen.themes.disable-all", false);
}
auto nsZenModsBackend::RebuildModsStyles(const nsACString& aContents) -> nsresult {
auto nsZenModsBackend::RebuildModsStyles(const nsACString& aContents)
-> nsresult {
// Notify that the mods stylesheets have been rebuilt.
return GetZenStyleSheetCache()->RebuildModsStylesheets(aContents);
}
} // namespace: zen
} // namespace zen
auto nsStyleSheetService::ZenMarkStylesAsChanged() -> void {
for (auto& presShell : mPresShells) {
if (presShell) {
if (auto doc = presShell->GetDocument(); doc && doc->IsInChromeDocShell()) {
if (auto doc = presShell->GetDocument();
doc && doc->IsInChromeDocShell()) {
// Notify the document that styles have changed.
doc->ApplicableStylesChanged();
}