Issue #2112 - Part 7: Remove Servo CSS Loader support

This commit is contained in:
FranklinDM 2024-03-25 16:57:34 +08:00 committed by roytam1
commit 14764253a5
17 changed files with 37 additions and 87 deletions

View file

@ -2276,8 +2276,6 @@ nsDocumentViewer::CreateStyleSet(nsIDocument* aDocument)
// this should eventually get expanded to allow for creating
// different sets for different media
StyleBackendType backendType = aDocument->GetStyleBackendType();
StyleSetHandle styleSet = new nsStyleSet();
styleSet->BeginUpdate();
@ -2298,7 +2296,7 @@ nsDocumentViewer::CreateStyleSet(nsIDocument* aDocument)
return styleSet;
}
auto cache = nsLayoutStylesheetCache::For(backendType);
auto cache = nsLayoutStylesheetCache::Get();
// Handle the user sheets.
StyleSheet* sheet = nullptr;
@ -2332,8 +2330,7 @@ nsDocumentViewer::CreateStyleSet(nsIDocument* aDocument)
nsAutoString sheets;
elt->GetAttribute(NS_LITERAL_STRING("usechromesheets"), sheets);
if (!sheets.IsEmpty() && baseURI) {
RefPtr<mozilla::css::Loader> cssLoader =
new mozilla::css::Loader(backendType);
RefPtr<mozilla::css::Loader> cssLoader = new mozilla::css::Loader();
char *str = ToNewCString(sheets);
char *newStr = str;