Issue #2488 - Part 6: Define and declare CSSStyleSheet cast functions directly in StyleSheet

This renames AsGecko calls to AsConcrete and removes the header containing leftover Stylo macros.
This commit is contained in:
FranklinDM 2024-03-29 16:30:12 +08:00 committed by roytam1
commit f0116f51db
18 changed files with 109 additions and 134 deletions

View file

@ -491,7 +491,6 @@ nsLayoutStylesheetCache::InvalidateSheet(RefPtr<StyleSheet>* aSheet)
{
MOZ_ASSERT(gCSSLoader, "pref changed before we loaded a sheet?");
// TODO: this redundant check goes away once we get rid of AsGecko.
const bool hasSheet = aSheet && *aSheet;
if (hasSheet && gCSSLoader) {
nsIURI* uri = (*aSheet)->GetSheetURI();
@ -628,7 +627,7 @@ nsLayoutStylesheetCache::BuildPreferenceSheet(RefPtr<StyleSheet>* aSheet,
"kPreallocSize should be big enough to build preference style "
"sheet without reallocation");
sheet->AsGecko()->ReparseSheet(sheetText);
sheet->AsConcrete()->ReparseSheet(sheetText);
#undef NS_GET_R_G_B
}