Bug 1457920: Remove StyleSheet::AsServo. r=xidorn
authorEmilio Cobos Álvarez <emilio@crisal.io>
Mon, 30 Apr 2018 18:19:44 +0200
changeset 470079 39788dcbd008d4782533e192ba426b1bc746a33f
parent 470078 424b39cb6769a83a7aa6cc750fcf12d37e469d90
child 470080 7d3b204b45dcafd1deb993e4d450e02be53c82df
push id9179
push userarchaeopteryx@coole-files.de
push dateThu, 03 May 2018 15:28:18 +0000
treeherdermozilla-beta@e6f9ade8bca7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersxidorn
bugs1457920
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1457920: Remove StyleSheet::AsServo. r=xidorn MozReview-Commit-ID: IkkJvUFHykk
chrome/nsChromeRegistry.cpp
dom/base/ShadowRoot.cpp
dom/base/nsDocument.cpp
dom/base/nsTreeSanitizer.cpp
dom/html/nsHTMLDocument.cpp
dom/xbl/nsXBLPrototypeResources.cpp
layout/base/PresShell.cpp
layout/base/nsDocumentViewer.cpp
layout/base/nsPresContext.cpp
layout/inspector/InspectorUtils.cpp
layout/inspector/ServoStyleRuleMap.cpp
layout/printing/nsPrintJob.cpp
layout/style/Loader.cpp
layout/style/ServoBindings.cpp
layout/style/ServoCSSRuleList.cpp
layout/style/ServoKeyframesRule.cpp
layout/style/ServoStyleRule.cpp
layout/style/ServoStyleSheet.cpp
layout/style/StyleSheet.cpp
layout/style/StyleSheet.h
layout/style/nsDOMCSSDeclaration.cpp
layout/style/nsLayoutStylesheetCache.cpp
--- a/chrome/nsChromeRegistry.cpp
+++ b/chrome/nsChromeRegistry.cpp
@@ -413,19 +413,18 @@ nsresult nsChromeRegistry::RefreshWindow
       nsIURI* uri = sheet->GetSheetURI();
 
       if (IsChromeURI(uri)) {
         // Reload the sheet.
         RefPtr<StyleSheet> newSheet;
         rv = document->LoadChromeSheetSync(uri, true, &newSheet);
         if (NS_FAILED(rv)) return rv;
         if (newSheet) {
-          rv = newAgentSheets.AppendElement(newSheet->AsServo())
-            ? NS_OK : NS_ERROR_FAILURE;
-          if (NS_FAILED(rv)) return rv;
+          newAgentSheets.AppendElement(newSheet);
+          return NS_OK;
         }
       }
       else {  // Just use the same sheet.
         rv = newAgentSheets.AppendElement(sheet) ? NS_OK : NS_ERROR_FAILURE;
         if (NS_FAILED(rv)) return rv;
       }
     }
 
--- a/dom/base/ShadowRoot.cpp
+++ b/dom/base/ShadowRoot.cpp
@@ -262,28 +262,28 @@ ShadowRoot::RemoveSlot(HTMLSlotElement* 
 }
 
 // FIXME(emilio): There's a bit of code duplication between this and the
 // equivalent ServoStyleSet methods, it'd be nice to not duplicate it...
 void
 ShadowRoot::RuleAdded(StyleSheet& aSheet, css::Rule& aRule)
 {
   if (mStyleRuleMap) {
-    mStyleRuleMap->RuleAdded(*aSheet.AsServo(), aRule);
+    mStyleRuleMap->RuleAdded(aSheet, aRule);
   }
 
   Servo_AuthorStyles_ForceDirty(mServoStyles.get());
   ApplicableRulesChanged();
 }
 
 void
 ShadowRoot::RuleRemoved(StyleSheet& aSheet, css::Rule& aRule)
 {
   if (mStyleRuleMap) {
-    mStyleRuleMap->RuleRemoved(*aSheet.AsServo(), aRule);
+    mStyleRuleMap->RuleRemoved(aSheet, aRule);
   }
 
   Servo_AuthorStyles_ForceDirty(mServoStyles.get());
   ApplicableRulesChanged();
 }
 
 void
 ShadowRoot::RuleChanged(StyleSheet&, css::Rule*) {
@@ -315,19 +315,19 @@ ShadowRoot::InsertSheetAt(size_t aIndex,
   }
 }
 
 void
 ShadowRoot::AppendStyleSheet(StyleSheet& aSheet)
 {
   DocumentOrShadowRoot::AppendStyleSheet(aSheet);
   if (aSheet.IsApplicable()) {
-    Servo_AuthorStyles_AppendStyleSheet(mServoStyles.get(), aSheet.AsServo());
+    Servo_AuthorStyles_AppendStyleSheet(mServoStyles.get(), &aSheet);
     if (mStyleRuleMap) {
-      mStyleRuleMap->SheetAdded(*aSheet.AsServo());
+      mStyleRuleMap->SheetAdded(aSheet);
     }
     ApplicableRulesChanged();
   }
 }
 
 void
 ShadowRoot::InsertSheet(StyleSheet* aSheet, nsIContent* aLinkingContent)
 {
@@ -359,61 +359,61 @@ ShadowRoot::InsertSheet(StyleSheet* aShe
 
 void
 ShadowRoot::InsertSheetIntoAuthorData(size_t aIndex, StyleSheet& aSheet)
 {
   MOZ_ASSERT(SheetAt(aIndex) == &aSheet);
   MOZ_ASSERT(aSheet.IsApplicable());
 
   if (mStyleRuleMap) {
-    mStyleRuleMap->SheetAdded(*aSheet.AsServo());
+    mStyleRuleMap->SheetAdded(aSheet);
   }
 
   for (size_t i = aIndex + 1; i < SheetCount(); ++i) {
     StyleSheet* beforeSheet = SheetAt(i);
     if (!beforeSheet->IsApplicable()) {
       continue;
     }
 
     Servo_AuthorStyles_InsertStyleSheetBefore(
-      mServoStyles.get(), aSheet.AsServo(), beforeSheet->AsServo());
+      mServoStyles.get(), &aSheet, beforeSheet);
     ApplicableRulesChanged();
     return;
   }
 
-  Servo_AuthorStyles_AppendStyleSheet(mServoStyles.get(), aSheet.AsServo());
+  Servo_AuthorStyles_AppendStyleSheet(mServoStyles.get(), &aSheet);
   ApplicableRulesChanged();
 }
 
 void
 ShadowRoot::StyleSheetApplicableStateChanged(StyleSheet& aSheet, bool aApplicable)
 {
   MOZ_ASSERT(mStyleSheets.Contains(&aSheet));
   if (aApplicable) {
     int32_t index = IndexOfSheet(aSheet);
     MOZ_RELEASE_ASSERT(index >= 0);
     InsertSheetIntoAuthorData(size_t(index), aSheet);
   } else {
     if (mStyleRuleMap) {
-      mStyleRuleMap->SheetRemoved(*aSheet.AsServo());
+      mStyleRuleMap->SheetRemoved(aSheet);
     }
-    Servo_AuthorStyles_RemoveStyleSheet(mServoStyles.get(), aSheet.AsServo());
+    Servo_AuthorStyles_RemoveStyleSheet(mServoStyles.get(), &aSheet);
     ApplicableRulesChanged();
   }
 }
 
 void
 ShadowRoot::RemoveSheet(StyleSheet* aSheet)
 {
   DocumentOrShadowRoot::RemoveSheet(*aSheet);
   if (aSheet->IsApplicable()) {
     if (mStyleRuleMap) {
-      mStyleRuleMap->SheetRemoved(*aSheet->AsServo());
+      mStyleRuleMap->SheetRemoved(*aSheet);
     }
-    Servo_AuthorStyles_RemoveStyleSheet(mServoStyles.get(), aSheet->AsServo());
+    Servo_AuthorStyles_RemoveStyleSheet(mServoStyles.get(), aSheet);
     ApplicableRulesChanged();
   }
 }
 
 void
 ShadowRoot::AddToIdTable(Element* aElement, nsAtom* aId)
 {
   nsIdentifierMapEntry* entry = mIdentifierMap.PutEntry(aId);
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -2431,17 +2431,17 @@ nsIDocument::RemoveDocStyleSheetsFromSty
 {
   // The stylesheets should forget us
   for (StyleSheet* sheet : Reversed(mStyleSheets)) {
     sheet->ClearAssociatedDocument();
 
     if (sheet->IsApplicable()) {
       nsCOMPtr<nsIPresShell> shell = GetShell();
       if (shell) {
-        shell->StyleSet()->RemoveDocStyleSheet(sheet->AsServo());
+        shell->StyleSet()->RemoveDocStyleSheet(sheet);
       }
     }
     // XXX Tell observers?
   }
 }
 
 void
 nsIDocument::RemoveStyleSheetsFromStyleSets(
@@ -2450,17 +2450,17 @@ nsIDocument::RemoveStyleSheetsFromStyleS
 {
   // The stylesheets should forget us
   for (StyleSheet* sheet : Reversed(aSheets)) {
     sheet->ClearAssociatedDocument();
 
     if (sheet->IsApplicable()) {
       nsCOMPtr<nsIPresShell> shell = GetShell();
       if (shell) {
-        shell->StyleSet()->RemoveStyleSheet(aType, sheet->AsServo());
+        shell->StyleSet()->RemoveStyleSheet(aType, sheet);
       }
     }
     // XXX Tell observers?
   }
 }
 
 void
 nsIDocument::ResetStylesheetsToURI(nsIURI* aURI)
@@ -2517,48 +2517,48 @@ nsIDocument::ResetStylesheetsToURI(nsIUR
 }
 
 static void
 AppendSheetsToStyleSet(ServoStyleSet* aStyleSet,
                        const nsTArray<RefPtr<StyleSheet>>& aSheets,
                        SheetType aType)
 {
   for (StyleSheet* sheet : Reversed(aSheets)) {
-    aStyleSet->AppendStyleSheet(aType, sheet->AsServo());
+    aStyleSet->AppendStyleSheet(aType, sheet);
   }
 }
 
 
 void
 nsIDocument::FillStyleSet(ServoStyleSet* aStyleSet)
 {
   NS_PRECONDITION(aStyleSet, "Must have a style set");
   NS_PRECONDITION(aStyleSet->SheetCount(SheetType::Doc) == 0,
                   "Style set already has document sheets?");
 
   MOZ_ASSERT(!mStyleSetFilled);
 
   for (StyleSheet* sheet : Reversed(mStyleSheets)) {
     if (sheet->IsApplicable()) {
-      aStyleSet->AddDocStyleSheet(sheet->AsServo(), this);
+      aStyleSet->AddDocStyleSheet(sheet, this);
     }
   }
 
   if (nsStyleSheetService* sheetService = nsStyleSheetService::GetInstance()) {
     nsTArray<RefPtr<StyleSheet>>& sheets =
       *sheetService->AuthorStyleSheets();
     for (StyleSheet* sheet : sheets) {
-      aStyleSet->AppendStyleSheet(SheetType::Doc, sheet->AsServo());
+      aStyleSet->AppendStyleSheet(SheetType::Doc, sheet);
     }
   }
 
   // Iterate backwards to maintain order
   for (StyleSheet* sheet : Reversed(mOnDemandBuiltInUASheets)) {
     if (sheet->IsApplicable()) {
-      aStyleSet->PrependStyleSheet(SheetType::Agent, sheet->AsServo());
+      aStyleSet->PrependStyleSheet(SheetType::Agent, sheet);
     }
   }
 
   AppendSheetsToStyleSet(aStyleSet, mAdditionalSheets[eAgentSheet],
                          SheetType::Agent);
   AppendSheetsToStyleSet(aStyleSet, mAdditionalSheets[eUserSheet],
                          SheetType::User);
   AppendSheetsToStyleSet(aStyleSet, mAdditionalSheets[eAuthorSheet],
@@ -4297,29 +4297,29 @@ nsIDocument::AddOnDemandBuiltInUASheet(S
   if (aSheet->IsApplicable()) {
     // This is like |AddStyleSheetToStyleSets|, but for an agent sheet.
     nsCOMPtr<nsIPresShell> shell = GetShell();
     if (shell) {
       // Note that prepending here is necessary to make sure that html.css etc.
       // do not override Firefox OS/Mobile's content.css sheet. Maybe we should
       // have an insertion point to match the order of
       // nsDocumentViewer::CreateStyleSet though?
-      shell->StyleSet()->PrependStyleSheet(SheetType::Agent, aSheet->AsServo());
+      shell->StyleSet()->PrependStyleSheet(SheetType::Agent, aSheet);
     }
   }
 
   NotifyStyleSheetAdded(aSheet, false);
 }
 
 void
 nsIDocument::AddStyleSheetToStyleSets(StyleSheet* aSheet)
 {
   nsCOMPtr<nsIPresShell> shell = GetShell();
   if (shell) {
-    shell->StyleSet()->AddDocStyleSheet(aSheet->AsServo(), this);
+    shell->StyleSet()->AddDocStyleSheet(aSheet, this);
   }
 }
 
 #define DO_STYLESHEET_NOTIFICATION(className, type, memberName, argName)      \
   do {                                                                        \
     className##Init init;                                                     \
     init.mBubbles = true;                                                     \
     init.mCancelable = true;                                                  \
@@ -4376,17 +4376,17 @@ nsIDocument::AddStyleSheet(StyleSheet* a
   NotifyStyleSheetAdded(aSheet, true);
 }
 
 void
 nsIDocument::RemoveStyleSheetFromStyleSets(StyleSheet* aSheet)
 {
   nsCOMPtr<nsIPresShell> shell = GetShell();
   if (shell) {
-    shell->StyleSet()->RemoveDocStyleSheet(aSheet->AsServo());
+    shell->StyleSet()->RemoveDocStyleSheet(aSheet);
   }
 }
 
 void
 nsIDocument::RemoveStyleSheet(StyleSheet* aSheet)
 {
   NS_PRECONDITION(aSheet, "null arg");
   RefPtr<StyleSheet> sheet = aSheet; // hold ref so it won't die too soon
@@ -4597,17 +4597,17 @@ nsIDocument::AddAdditionalStyleSheet(add
     return NS_ERROR_INVALID_ARG;
 
   mAdditionalSheets[aType].AppendElement(aSheet);
 
   BeginUpdate(UPDATE_STYLE);
   nsCOMPtr<nsIPresShell> shell = GetShell();
   if (shell) {
     SheetType type = ConvertAdditionalSheetType(aType);
-    shell->StyleSet()->AppendStyleSheet(type, aSheet->AsServo());
+    shell->StyleSet()->AppendStyleSheet(type, aSheet);
   }
 
   // Passing false, so documet.styleSheets.length will not be affected by
   // these additional sheets.
   NotifyStyleSheetAdded(aSheet, false);
   EndUpdate(UPDATE_STYLE);
   return NS_OK;
 }
@@ -4625,17 +4625,17 @@ nsIDocument::RemoveAdditionalStyleSheet(
     sheets.RemoveElementAt(i);
 
     BeginUpdate(UPDATE_STYLE);
     if (!mIsGoingAway) {
       MOZ_ASSERT(sheetRef->IsApplicable());
       nsCOMPtr<nsIPresShell> shell = GetShell();
       if (shell) {
         SheetType type = ConvertAdditionalSheetType(aType);
-        shell->StyleSet()->RemoveStyleSheet(type, sheetRef->AsServo());
+        shell->StyleSet()->RemoveStyleSheet(type, sheetRef);
       }
     }
 
     // Passing false, so documet.styleSheets.length will not be affected by
     // these additional sheets.
     NotifyStyleSheetRemoved(sheetRef, false);
     EndUpdate(UPDATE_STYLE);
 
--- a/dom/base/nsTreeSanitizer.cpp
+++ b/dom/base/nsTreeSanitizer.cpp
@@ -1091,17 +1091,17 @@ nsTreeSanitizer::SanitizeStyleSheet(cons
   bool didSanitize = false;
   // Create a sheet to hold the parsed CSS
   RefPtr<StyleSheet> sheet =
     new ServoStyleSheet(mozilla::css::eAuthorSheetFeatures,
                         CORS_NONE, aDocument->GetReferrerPolicy(),
                         SRIMetadata());
   sheet->SetURIs(aDocument->GetDocumentURI(), nullptr, aBaseURI);
   sheet->SetPrincipal(aDocument->NodePrincipal());
-  sheet->AsServo()->ParseSheetSync(
+  sheet->ParseSheetSync(
     aDocument->CSSLoader(),
     NS_ConvertUTF16toUTF8(aOriginal),
     /* aLoadData = */ nullptr,
     /* aLineNumber = */ 0);
   NS_ENSURE_SUCCESS(rv, true);
   // Mark the sheet as complete.
   MOZ_ASSERT(!sheet->HasForcedUniqueInner(),
              "should not get a forced unique inner during parsing");
--- a/dom/html/nsHTMLDocument.cpp
+++ b/dom/html/nsHTMLDocument.cpp
@@ -2402,39 +2402,38 @@ nsHTMLDocument::EditingStateChanged()
     // because new style may change whether focused element will be focusable
     // or not.
     nsTArray<RefPtr<ServoStyleSheet>> agentSheets;
     rv = presShell->GetAgentStyleSheets(agentSheets);
     NS_ENSURE_SUCCESS(rv, rv);
 
     auto cache = nsLayoutStylesheetCache::Singleton();
 
-    ServoStyleSheet* contentEditableSheet =
-      cache->ContentEditableSheet()->AsServo();
+    StyleSheet* contentEditableSheet = cache->ContentEditableSheet();
 
     if (!agentSheets.Contains(contentEditableSheet)) {
       agentSheets.AppendElement(contentEditableSheet);
     }
 
     // Should we update the editable state of all the nodes in the document? We
     // need to do this when the designMode value changes, as that overrides
     // specific states on the elements.
     if (designMode) {
       // designMode is being turned on (overrides contentEditable).
-      ServoStyleSheet* designModeSheet = cache->DesignModeSheet()->AsServo();
+      StyleSheet* designModeSheet = cache->DesignModeSheet();
       if (!agentSheets.Contains(designModeSheet)) {
         agentSheets.AppendElement(designModeSheet);
       }
 
       updateState = true;
       spellRecheckAll = oldState == eContentEditable;
     }
     else if (oldState == eDesignMode) {
       // designMode is being turned off (contentEditable is still on).
-      agentSheets.RemoveElement(cache->DesignModeSheet()->AsServo());
+      agentSheets.RemoveElement(cache->DesignModeSheet());
       updateState = true;
     }
 
     rv = presShell->SetAgentStyleSheets(agentSheets);
     NS_ENSURE_SUCCESS(rv, rv);
 
     presShell->RestyleForCSSRuleChanges();
 
--- a/dom/xbl/nsXBLPrototypeResources.cpp
+++ b/dom/xbl/nsXBLPrototypeResources.cpp
@@ -145,17 +145,17 @@ nsXBLPrototypeResources::ClearLoader()
 
 
 void
 nsXBLPrototypeResources::SyncServoStyles()
 {
   mStyleRuleMap.reset(nullptr);
   mServoStyles.reset(Servo_AuthorStyles_Create());
   for (auto& sheet : mStyleSheetList) {
-    Servo_AuthorStyles_AppendStyleSheet(mServoStyles.get(), sheet->AsServo());
+    Servo_AuthorStyles_AppendStyleSheet(mServoStyles.get(), sheet);
   }
 }
 
 void
 nsXBLPrototypeResources::ComputeServoStyles(const ServoStyleSet& aMasterStyleSet)
 {
   SyncServoStyles();
   Servo_AuthorStyles_Flush(mServoStyles.get(), aMasterStyleSet.RawSet());
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
@@ -1503,27 +1503,27 @@ PresShell::UpdatePreferenceStyles()
   mStyleSet->BeginUpdate();
 
   RemovePreferenceStyles();
 
   // NOTE(emilio): This sheet is added as an agent sheet, because we don't want
   // it to be modifiable from devtools and similar, see bugs 1239336 and
   // 1436782. I think it conceptually should be a user sheet, and could be
   // without too much trouble I'd think.
-  mStyleSet->AppendStyleSheet(SheetType::Agent, newPrefSheet->AsServo());
+  mStyleSet->AppendStyleSheet(SheetType::Agent, newPrefSheet);
   mPrefStyleSheet = newPrefSheet;
 
   mStyleSet->EndUpdate();
 }
 
 void
 PresShell::RemovePreferenceStyles()
 {
   if (mPrefStyleSheet) {
-    mStyleSet->RemoveStyleSheet(SheetType::Agent, mPrefStyleSheet->AsServo());
+    mStyleSet->RemoveStyleSheet(SheetType::Agent, mPrefStyleSheet);
     mPrefStyleSheet = nullptr;
   }
 }
 
 void
 PresShell::AddUserSheet(StyleSheet* aSheet)
 {
   // Make sure this does what nsDocumentViewer::CreateStyleSet does wrt
@@ -1536,59 +1536,59 @@ PresShell::AddUserSheet(StyleSheet* aShe
 
   mStyleSet->BeginUpdate();
 
   nsStyleSheetService* sheetService = nsStyleSheetService::gInstance;
   nsTArray<RefPtr<StyleSheet>>& userSheets = *sheetService->UserStyleSheets();
   // Iterate forwards when removing so the searches for RemoveStyleSheet are as
   // short as possible.
   for (StyleSheet* sheet : userSheets) {
-    mStyleSet->RemoveStyleSheet(SheetType::User, sheet->AsServo());
+    mStyleSet->RemoveStyleSheet(SheetType::User, sheet);
   }
 
   // Now iterate backwards, so that the order of userSheets will be the same as
   // the order of sheets from it in the style set.
   for (StyleSheet* sheet : Reversed(userSheets)) {
-    mStyleSet->PrependStyleSheet(SheetType::User, sheet->AsServo());
+    mStyleSet->PrependStyleSheet(SheetType::User, sheet);
   }
 
   mStyleSet->EndUpdate();
   RestyleForCSSRuleChanges();
 }
 
 void
 PresShell::AddAgentSheet(StyleSheet* aSheet)
 {
   // Make sure this does what nsDocumentViewer::CreateStyleSet does
   // wrt ordering.
-  mStyleSet->AppendStyleSheet(SheetType::Agent, aSheet->AsServo());
+  mStyleSet->AppendStyleSheet(SheetType::Agent, aSheet);
   RestyleForCSSRuleChanges();
 }
 
 void
 PresShell::AddAuthorSheet(StyleSheet* aSheet)
 {
   // Document specific "additional" Author sheets should be stronger than the
   // ones added with the StyleSheetService.
   StyleSheet* firstAuthorSheet =
     mDocument->GetFirstAdditionalAuthorSheet();
   if (firstAuthorSheet) {
-    mStyleSet->InsertStyleSheetBefore(SheetType::Doc, aSheet->AsServo(),
-                                      firstAuthorSheet->AsServo());
+    mStyleSet->InsertStyleSheetBefore(SheetType::Doc, aSheet,
+                                      firstAuthorSheet);
   } else {
-    mStyleSet->AppendStyleSheet(SheetType::Doc, aSheet->AsServo());
+    mStyleSet->AppendStyleSheet(SheetType::Doc, aSheet);
   }
 
   RestyleForCSSRuleChanges();
 }
 
 void
 PresShell::RemoveSheet(SheetType aType, StyleSheet* aSheet)
 {
-  mStyleSet->RemoveStyleSheet(aType, aSheet->AsServo());
+  mStyleSet->RemoveStyleSheet(aType, aSheet);
   RestyleForCSSRuleChanges();
 }
 
 NS_IMETHODIMP
 PresShell::SetDisplaySelection(int16_t aToggle)
 {
   RefPtr<nsFrameSelection> frameSelection = mSelection;
   frameSelection->SetDisplaySelection(aToggle);
@@ -8597,23 +8597,23 @@ nsresult
 PresShell::SetAgentStyleSheets(const nsTArray<RefPtr<ServoStyleSheet>>& aSheets)
 {
   return mStyleSet->ReplaceSheets(SheetType::Agent, aSheets);
 }
 
 nsresult
 PresShell::AddOverrideStyleSheet(StyleSheet* aSheet)
 {
-  return mStyleSet->PrependStyleSheet(SheetType::Override, aSheet->AsServo());
+  return mStyleSet->PrependStyleSheet(SheetType::Override, aSheet);
 }
 
 nsresult
 PresShell::RemoveOverrideStyleSheet(StyleSheet* aSheet)
 {
-  return mStyleSet->RemoveStyleSheet(SheetType::Override, aSheet->AsServo());
+  return mStyleSet->RemoveStyleSheet(SheetType::Override, aSheet);
 }
 
 static void
 FreezeElement(nsISupports *aSupports, void * /* unused */)
 {
   nsCOMPtr<nsIObjectLoadingContent> olc(do_QueryInterface(aSupports));
   if (olc) {
     olc->StopPluginInstance();
--- a/layout/base/nsDocumentViewer.cpp
+++ b/layout/base/nsDocumentViewer.cpp
@@ -2340,106 +2340,105 @@ nsDocumentViewer::CreateStyleSet(nsIDocu
   StyleSheet* sheet = nullptr;
   if (nsContentUtils::IsInChromeDocshell(aDocument)) {
     sheet = cache->UserChromeSheet();
   } else {
     sheet = cache->UserContentSheet();
   }
 
   if (sheet) {
-    styleSet->AppendStyleSheet(SheetType::User, sheet->AsServo());
+    styleSet->AppendStyleSheet(SheetType::User, sheet);
   }
 
   // Append chrome sheets (scrollbars + forms).
   sheet = cache->ScrollbarsSheet();
   if (sheet) {
-    styleSet->PrependStyleSheet(SheetType::Agent, sheet->AsServo());
+    styleSet->PrependStyleSheet(SheetType::Agent, sheet);
   }
 
   if (!aDocument->IsSVGDocument()) {
     // !!! IMPORTANT - KEEP THIS BLOCK IN SYNC WITH
     // !!! SVGDocument::EnsureNonSVGUserAgentStyleSheetsLoaded.
 
     // SVGForeignObjectElement::BindToTree calls SVGDocument::
     // EnsureNonSVGUserAgentStyleSheetsLoaded to loads these UA sheet
     // on-demand. (Excluding the quirks sheet, which should never be loaded for
     // an SVG document, and excluding xul.css which will be loaded on demand by
     // nsXULElement::BindToTree.)
 
     sheet = cache->FormsSheet();
     if (sheet) {
-      styleSet->PrependStyleSheet(SheetType::Agent, sheet->AsServo());
+      styleSet->PrependStyleSheet(SheetType::Agent, sheet);
     }
 
     if (aDocument->LoadsFullXULStyleSheetUpFront()) {
       // This is the only place components.css gets loaded, unlike xul.css
       sheet = cache->XULComponentsSheet();
       if (sheet) {
-        styleSet->PrependStyleSheet(SheetType::Agent, sheet->AsServo());
+        styleSet->PrependStyleSheet(SheetType::Agent, sheet);
       }
 
       // nsXULElement::BindToTree loads xul.css on-demand if we don't load it
       // up-front here.
       sheet = cache->XULSheet();
       if (sheet) {
-        styleSet->PrependStyleSheet(SheetType::Agent, sheet->AsServo());
+        styleSet->PrependStyleSheet(SheetType::Agent, sheet);
       }
     }
 
     sheet = cache->MinimalXULSheet();
     if (sheet) {
       // Load the minimal XUL rules for scrollbars and a few other XUL things
       // that non-XUL (typically HTML) documents commonly use.
-      styleSet->PrependStyleSheet(SheetType::Agent, sheet->AsServo());
+      styleSet->PrependStyleSheet(SheetType::Agent, sheet);
     }
 
     sheet = cache->CounterStylesSheet();
     if (sheet) {
-      styleSet->PrependStyleSheet(SheetType::Agent, sheet->AsServo());
+      styleSet->PrependStyleSheet(SheetType::Agent, sheet);
     }
 
     if (nsLayoutUtils::ShouldUseNoScriptSheet(aDocument)) {
       sheet = cache->NoScriptSheet();
       if (sheet) {
-        styleSet->PrependStyleSheet(SheetType::Agent, sheet->AsServo());
+        styleSet->PrependStyleSheet(SheetType::Agent, sheet);
       }
     }
 
     if (nsLayoutUtils::ShouldUseNoFramesSheet(aDocument)) {
       sheet = cache->NoFramesSheet();
       if (sheet) {
-        styleSet->PrependStyleSheet(SheetType::Agent, sheet->AsServo());
+        styleSet->PrependStyleSheet(SheetType::Agent, sheet);
       }
     }
 
     // We don't add quirk.css here; nsPresContext::CompatibilityModeChanged will
     // append it if needed.
 
     sheet = cache->HTMLSheet();
     if (sheet) {
-      styleSet->PrependStyleSheet(SheetType::Agent, sheet->AsServo());
+      styleSet->PrependStyleSheet(SheetType::Agent, sheet);
     }
 
-    styleSet->PrependStyleSheet(SheetType::Agent,
-                                cache->UASheet()->AsServo());
+    styleSet->PrependStyleSheet(SheetType::Agent, cache->UASheet());
   } else {
     // SVG documents may have scrollbars and need the scrollbar styling.
     sheet = cache->MinimalXULSheet();
     if (sheet) {
-      styleSet->PrependStyleSheet(SheetType::Agent, sheet->AsServo());
+      styleSet->PrependStyleSheet(SheetType::Agent, sheet);
     }
   }
 
   nsStyleSheetService* sheetService = nsStyleSheetService::GetInstance();
   if (sheetService) {
     for (StyleSheet* sheet : *sheetService->AgentStyleSheets()) {
-      styleSet->AppendStyleSheet(SheetType::Agent, sheet->AsServo());
+      styleSet->AppendStyleSheet(SheetType::Agent, sheet);
     }
     for (StyleSheet* sheet : Reversed(*sheetService->UserStyleSheets())) {
-      styleSet->PrependStyleSheet(SheetType::User, sheet->AsServo());
+      styleSet->PrependStyleSheet(SheetType::User, sheet);
     }
   }
 
   // Caller will handle calling EndUpdate, per contract.
   return styleSet;
 }
 
 NS_IMETHODIMP
--- a/layout/base/nsPresContext.cpp
+++ b/layout/base/nsPresContext.cpp
@@ -1192,21 +1192,21 @@ nsPresContext::CompatibilityModeChanged(
   }
 
   auto cache = nsLayoutStylesheetCache::Singleton();
   StyleSheet* sheet = cache->QuirkSheet();
 
   if (needsQuirkSheet) {
     // quirk.css needs to come after html.css; we just keep it at the end.
     DebugOnly<nsresult> rv =
-      styleSet->AppendStyleSheet(SheetType::Agent, sheet->AsServo());
+      styleSet->AppendStyleSheet(SheetType::Agent, sheet);
     NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "failed to insert quirk.css");
   } else {
     DebugOnly<nsresult> rv =
-      styleSet->RemoveStyleSheet(SheetType::Agent, sheet->AsServo());
+      styleSet->RemoveStyleSheet(SheetType::Agent, sheet);
     NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "failed to remove quirk.css");
   }
 
   mQuirkSheetAdded = needsQuirkSheet;
 }
 
 // Helper function for setting Anim Mode on image
 static void SetImgAnimModeOnImgReq(imgIRequest* aImgReq, uint16_t aMode)
--- a/layout/inspector/InspectorUtils.cpp
+++ b/layout/inspector/InspectorUtils.cpp
@@ -702,18 +702,17 @@ InspectorUtils::ClearPseudoClassLocks(Gl
 
 /* static */ void
 InspectorUtils::ParseStyleSheet(GlobalObject& aGlobalObject,
                                 StyleSheet& aSheet,
                                 const nsAString& aInput,
                                 ErrorResult& aRv)
 {
 
-  RefPtr<ServoStyleSheet> servoSheet = aSheet.AsServo();
-  aRv = servoSheet->ReparseSheet(aInput);
+  aRv = aSheet.ReparseSheet(aInput);
 }
 
 void
 InspectorUtils::ScrollElementIntoView(GlobalObject& aGlobalObject,
                                       Element& aElement)
 {
   nsIPresShell* presShell = aElement.OwnerDoc()->GetShell();
   if (!presShell) {
--- a/layout/inspector/ServoStyleRuleMap.cpp
+++ b/layout/inspector/ServoStyleRuleMap.cpp
@@ -34,28 +34,28 @@ ServoStyleRuleMap::EnsureTable(ServoStyl
 
 void
 ServoStyleRuleMap::EnsureTable(nsXBLPrototypeResources& aXBLResources)
 {
   if (!IsEmpty() || !aXBLResources.GetServoStyles()) {
     return;
   }
   for (auto index : IntegerRange(aXBLResources.SheetCount())) {
-    FillTableFromStyleSheet(*aXBLResources.StyleSheetAt(index)->AsServo());
+    FillTableFromStyleSheet(*aXBLResources.StyleSheetAt(index));
   }
 }
 
 void
 ServoStyleRuleMap::EnsureTable(ShadowRoot& aShadowRoot)
 {
   if (!IsEmpty()) {
     return;
   }
   for (auto index : IntegerRange(aShadowRoot.SheetCount())) {
-    FillTableFromStyleSheet(*aShadowRoot.SheetAt(index)->AsServo());
+    FillTableFromStyleSheet(*aShadowRoot.SheetAt(index));
   }
 }
 
 void
 ServoStyleRuleMap::SheetAdded(ServoStyleSheet& aStyleSheet)
 {
   if (!IsEmpty()) {
     FillTableFromStyleSheet(aStyleSheet);
@@ -140,17 +140,17 @@ ServoStyleRuleMap::FillTableFromRule(css
       auto& rule = static_cast<css::GroupRule&>(aRule);
       auto ruleList = static_cast<ServoCSSRuleList*>(rule.CssRules());
       FillTableFromRuleList(*ruleList);
       break;
     }
     case CSSRuleBinding::IMPORT_RULE: {
       auto& rule = static_cast<ServoImportRule&>(aRule);
       MOZ_ASSERT(aRule.GetStyleSheet());
-      FillTableFromStyleSheet(*rule.GetStyleSheet()->AsServo());
+      FillTableFromStyleSheet(*rule.GetStyleSheet());
       break;
     }
   }
 }
 
 void
 ServoStyleRuleMap::FillTableFromRuleList(ServoCSSRuleList& aRuleList)
 {
--- a/layout/printing/nsPrintJob.cpp
+++ b/layout/printing/nsPrintJob.cpp
@@ -2346,17 +2346,17 @@ nsPrintJob::ReflowPrintObject(const Uniq
 
   UniquePtr<ServoStyleSet> styleSet =
     mDocViewerPrint->CreateStyleSet(aPO->mDocument);
 
   if (aPO->mDocument->IsSVGDocument()) {
     // The SVG document only loads minimal-xul.css, so it doesn't apply other
     // styles. We should add ua.css for applying style which related to print.
     auto cache = nsLayoutStylesheetCache::Singleton();
-    styleSet->PrependStyleSheet(SheetType::Agent, cache->UASheet()->AsServo());
+    styleSet->PrependStyleSheet(SheetType::Agent, cache->UASheet());
   }
 
   aPO->mPresShell = aPO->mDocument->CreateShell(aPO->mPresContext,
                                                 aPO->mViewManager,
                                                 Move(styleSet));
   if (!aPO->mPresShell) {
     return NS_ERROR_FAILURE;
   }
--- a/layout/style/Loader.cpp
+++ b/layout/style/Loader.cpp
@@ -1639,17 +1639,17 @@ Loader::ParseSheet(const nsAString& aUTF
                    SheetLoadData* aLoadData,
                    bool aAllowAsync,
                    bool& aCompleted)
 {
   LOG(("css::Loader::ParseSheet"));
   NS_PRECONDITION(aLoadData, "Must have load data");
   NS_PRECONDITION(aLoadData->mSheet, "Must have sheet to parse into");
   aCompleted = false;
-  ServoStyleSheet* sheet = aLoadData->mSheet->AsServo();
+  StyleSheet* sheet = aLoadData->mSheet;
   MOZ_ASSERT(aUTF16.IsEmpty() || aUTF8.IsEmpty());
   if (!aUTF16.IsEmpty()) {
     return DoParseSheetServo(sheet, NS_ConvertUTF16toUTF8(aUTF16),
                              aLoadData, aAllowAsync, aCompleted);
   } else {
     return DoParseSheetServo(sheet, aUTF8,
                              aLoadData, aAllowAsync, aCompleted);
   }
--- a/layout/style/ServoBindings.cpp
+++ b/layout/style/ServoBindings.cpp
@@ -2585,17 +2585,17 @@ Gecko_StyleSheet_FinishAsyncParse(SheetL
                                   RawServoStyleSheetContentsStrong aSheetContents)
 {
   RefPtr<SheetLoadDataHolder> loadData = aData;
   RefPtr<RawServoStyleSheetContents> sheetContents = aSheetContents.Consume();
   NS_DispatchToMainThread(NS_NewRunnableFunction(__func__,
                                                  [d = Move(loadData),
                                                   s = Move(sheetContents)]() mutable {
     MOZ_ASSERT(NS_IsMainThread());
-    d->get()->mSheet->AsServo()->FinishAsyncParse(s.forget());
+    d->get()->mSheet->FinishAsyncParse(s.forget());
   }));
 }
 
 static already_AddRefed<ServoStyleSheet>
 LoadImportSheet(css::Loader* aLoader,
                 ServoStyleSheet* aParent,
                 SheetLoadData* aParentLoadData,
                 css::LoaderReusableStyleSheets* aReusableSheets,
@@ -2671,17 +2671,17 @@ Gecko_LoadStyleSheetAsync(css::SheetLoad
   NS_DispatchToMainThread(NS_NewRunnableFunction(__func__,
                                                  [data = Move(loadData),
                                                   url = Move(urlVal),
                                                   media = Move(mediaList),
                                                   import = Move(importRule)]() mutable {
     MOZ_ASSERT(NS_IsMainThread());
     SheetLoadData* d = data->get();
     RefPtr<ServoStyleSheet> sheet =
-      LoadImportSheet(d->mLoader, d->mSheet->AsServo(), d, nullptr, url, media.forget());
+      LoadImportSheet(d->mLoader, d->mSheet, d, nullptr, url, media.forget());
     Servo_ImportRule_SetSheet(import, sheet);
   }));
 }
 
 nsCSSKeyword
 Gecko_LookupCSSKeyword(const uint8_t* aString, uint32_t aLength)
 {
   nsDependentCSubstring keyword(reinterpret_cast<const char*>(aString), aLength);
--- a/layout/style/ServoCSSRuleList.cpp
+++ b/layout/style/ServoCSSRuleList.cpp
@@ -64,17 +64,17 @@ ServoCSSRuleList::SetParentRule(css::Gro
   EnumerateInstantiatedRules([aParentRule](css::Rule* rule) {
     rule->SetParentRule(aParentRule);
   });
 }
 
 void
 ServoCSSRuleList::SetStyleSheet(StyleSheet* aStyleSheet)
 {
-  mStyleSheet = aStyleSheet ? aStyleSheet->AsServo() : nullptr;
+  mStyleSheet = aStyleSheet;
   EnumerateInstantiatedRules([this](css::Rule* rule) {
     rule->SetStyleSheet(mStyleSheet);
   });
 }
 
 css::Rule*
 ServoCSSRuleList::GetRule(uint32_t aIndex)
 {
--- a/layout/style/ServoKeyframesRule.cpp
+++ b/layout/style/ServoKeyframesRule.cpp
@@ -209,17 +209,17 @@ ServoKeyframesRule::List(FILE* out, int3
   fprintf_stderr(out, "%s\n", str.get());
 }
 #endif
 
 /* virtual */ void
 ServoKeyframesRule::SetStyleSheet(StyleSheet* aSheet)
 {
   if (mKeyframeList) {
-    mKeyframeList->SetStyleSheet(aSheet ? aSheet->AsServo() : nullptr);
+    mKeyframeList->SetStyleSheet(aSheet);
   }
   dom::CSSKeyframesRule::SetStyleSheet(aSheet);
 }
 
 static const uint32_t kRuleNotFound = std::numeric_limits<uint32_t>::max();
 
 uint32_t
 ServoKeyframesRule::FindRuleIndexForKey(const nsAString& aKey)
@@ -270,17 +270,17 @@ ServoKeyframesRule::AppendRule(const nsA
   if (!sheet) {
     // We cannot parse the rule if we don't have a stylesheet.
     return;
   }
 
   NS_ConvertUTF16toUTF8 rule(aRule);
   UpdateRule([this, sheet, &rule]() {
     bool parsedOk = Servo_KeyframesRule_AppendRule(
-      mRawRule, sheet->AsServo()->RawContents(), &rule);
+      mRawRule, sheet->RawContents(), &rule);
     if (parsedOk && mKeyframeList) {
       mKeyframeList->AppendRule();
     }
   });
 }
 
 void
 ServoKeyframesRule::DeleteRule(const nsAString& aKey)
@@ -306,17 +306,17 @@ ServoKeyframesRule::GetCssText(nsAString
 
 /* virtual */ dom::CSSRuleList*
 ServoKeyframesRule::CssRules()
 {
   if (!mKeyframeList) {
     mKeyframeList = new ServoKeyframeList(do_AddRef(mRawRule));
     mKeyframeList->SetParentRule(this);
     if (StyleSheet* sheet = GetStyleSheet()) {
-      mKeyframeList->SetStyleSheet(sheet->AsServo());
+      mKeyframeList->SetStyleSheet(sheet);
     }
   }
   return mKeyframeList;
 }
 
 /* virtual */ dom::CSSKeyframeRule*
 ServoKeyframesRule::FindRule(const nsAString& aKey)
 {
--- a/layout/style/ServoStyleRule.cpp
+++ b/layout/style/ServoStyleRule.cpp
@@ -202,27 +202,26 @@ ServoStyleRule::GetSelectorText(nsAStrin
 {
   Servo_StyleRule_GetSelectorText(mRawRule, &aSelectorText);
 }
 
 void
 ServoStyleRule::SetSelectorText(const nsAString& aSelectorText)
 {
   if (RefPtr<StyleSheet> sheet = GetStyleSheet()) {
-    ServoStyleSheet* servoSheet = sheet->AsServo();
     nsIDocument* doc = sheet->GetAssociatedDocument();
 
     mozAutoDocUpdate updateBatch(doc, UPDATE_STYLE, true);
 
     // StyleRule lives inside of the Inner, it is unsafe to call WillDirty
     // if sheet does not already have a unique Inner.
     sheet->AssertHasUniqueInner();
     sheet->WillDirty();
 
-    const RawServoStyleSheetContents* contents = servoSheet->RawContents();
+    const RawServoStyleSheetContents* contents = sheet->RawContents();
     if (Servo_StyleRule_SetSelectorText(contents, mRawRule, &aSelectorText)) {
       sheet->RuleChanged(this);
     }
   }
 }
 
 uint32_t
 ServoStyleRule::GetSelectorCount()
--- a/layout/style/ServoStyleSheet.cpp
+++ b/layout/style/ServoStyleSheet.cpp
@@ -298,26 +298,25 @@ ServoStyleSheet::ReparseSheet(const nsAS
 }
 
 // nsICSSLoaderObserver implementation
 NS_IMETHODIMP
 ServoStyleSheet::StyleSheetLoaded(StyleSheet* aSheet,
                                   bool aWasAlternate,
                                   nsresult aStatus)
 {
-  ServoStyleSheet* sheet = aSheet->AsServo();
-  if (!sheet->GetParentSheet()) {
+  if (!aSheet->GetParentSheet()) {
     return NS_OK; // ignore if sheet has been detached already
   }
-  NS_ASSERTION(this == sheet->GetParentSheet(),
+  NS_ASSERTION(this == aSheet->GetParentSheet(),
                "We are being notified of a sheet load for a sheet that is not our child!");
 
   if (NS_SUCCEEDED(aStatus)) {
     mozAutoDocUpdate updateBatch(mDocument, UPDATE_STYLE, true);
-    RuleAdded(*sheet->GetOwnerRule());
+    RuleAdded(*aSheet->GetOwnerRule());
   }
 
   return NS_OK;
 }
 
 void
 ServoStyleSheet::DropRuleList()
 {
--- a/layout/style/StyleSheet.cpp
+++ b/layout/style/StyleSheet.cpp
@@ -576,39 +576,39 @@ StyleSheet::GetContainingShadow() const
     current = current->mParent;                           \
   } while (current);                                      \
 } while (0)
 
 void
 StyleSheet::RuleAdded(css::Rule& aRule)
 {
   mDirtyFlags |= MODIFIED_RULES;
-  NOTIFY(RuleAdded, (*AsServo(), aRule));
+  NOTIFY(RuleAdded, (*this, aRule));
 
   if (mDocument) {
     mDocument->StyleRuleAdded(this, &aRule);
   }
 }
 
 void
 StyleSheet::RuleRemoved(css::Rule& aRule)
 {
   mDirtyFlags |= MODIFIED_RULES;
-  NOTIFY(RuleRemoved, (*AsServo(), aRule));
+  NOTIFY(RuleRemoved, (*this, aRule));
 
   if (mDocument) {
     mDocument->StyleRuleRemoved(this, &aRule);
   }
 }
 
 void
 StyleSheet::RuleChanged(css::Rule* aRule)
 {
   mDirtyFlags |= MODIFIED_RULES;
-  NOTIFY(RuleChanged, (*AsServo(), aRule));
+  NOTIFY(RuleChanged, (*this, aRule));
 
   if (mDocument) {
     mDocument->StyleRuleChanged(this, aRule);
   }
 }
 
 #undef NOTIFY
 
@@ -623,18 +623,17 @@ StyleSheet::InsertRuleIntoGroup(const ns
     return NS_ERROR_INVALID_ARG;
   }
 
   // parse and grab the rule
   mozAutoDocUpdate updateBatch(mDocument, UPDATE_STYLE, true);
 
   WillDirty();
 
-  nsresult result =
-    AsServo()->InsertRuleIntoGroupInternal(aRule, aGroup, aIndex);
+  nsresult result = InsertRuleIntoGroupInternal(aRule, aGroup, aIndex);
   NS_ENSURE_SUCCESS(result, result);
   RuleAdded(*aGroup->GetStyleRuleAt(aIndex));
 
   return NS_OK;
 }
 
 uint64_t
 StyleSheet::FindOwningWindowInnerID() const
--- a/layout/style/StyleSheet.h
+++ b/layout/style/StyleSheet.h
@@ -105,20 +105,16 @@ public:
 
   void SetContentsForImport(const RawServoStyleSheetContents* aContents) {
     MOZ_ASSERT(!Inner()->mContents);
     Inner()->mContents = aContents;
   }
 
   URLExtraData* URLData() const { return Inner()->mURLData; }
 
-  // FIXME(emilio): Remove.
-  StyleSheet* AsServo() { return this; }
-  const StyleSheet* AsServo() const { return this; }
-
   // nsICSSLoaderObserver interface
   NS_IMETHOD StyleSheetLoaded(StyleSheet* aSheet, bool aWasAlternate,
                               nsresult aStatus) final;
 
   // Internal GetCssRules methods which do not have security check and
   // completeness check.
   ServoCSSRuleList* GetCssRulesInternal();
 
--- a/layout/style/nsDOMCSSDeclaration.cpp
+++ b/layout/style/nsDOMCSSDeclaration.cpp
@@ -252,24 +252,24 @@ nsDOMCSSDeclaration::GetServoCSSParsingE
 {
   StyleSheet* sheet = aRule ? aRule->GetStyleSheet() : nullptr;
   if (!sheet) {
     return { nullptr, eCompatibility_FullStandards, nullptr };
   }
 
   if (nsIDocument* document = aRule->GetDocument()) {
     return {
-      sheet->AsServo()->URLData(),
+      sheet->URLData(),
       document->GetCompatibilityMode(),
       document->CSSLoader(),
     };
   }
 
   return {
-    sheet->AsServo()->URLData(),
+    sheet->URLData(),
     eCompatibility_FullStandards,
     nullptr,
   };
 }
 
 template<typename GeckoFunc, typename ServoFunc>
 nsresult
 nsDOMCSSDeclaration::ModifyDeclaration(nsIPrincipal* aSubjectPrincipal,
--- a/layout/style/nsLayoutStylesheetCache.cpp
+++ b/layout/style/nsLayoutStylesheetCache.cpp
@@ -882,22 +882,21 @@ nsLayoutStylesheetCache::BuildPreference
         NS_GET_R_G_B(focusText),
         NS_GET_R_G_B(focusBG));
   }
 
   NS_ASSERTION(sheetText.Length() <= kPreallocSize,
                "kPreallocSize should be big enough to build preference style "
                "sheet without reallocation");
 
-  ServoStyleSheet* servoSheet = sheet->AsServo();
   // NB: The pref sheet never has @import rules, thus no loader.
-  servoSheet->ParseSheetSync(nullptr,
-                             sheetText,
-                             /* aLoadData = */ nullptr,
-                             /* aLineNumber = */ 0);
+  sheet->ParseSheetSync(nullptr,
+                        sheetText,
+                        /* aLoadData = */ nullptr,
+                        /* aLineNumber = */ 0);
 
 #undef NS_GET_R_G_B
 }
 
 mozilla::StaticRefPtr<nsLayoutStylesheetCache>
 nsLayoutStylesheetCache::gStyleCache;
 
 mozilla::StaticRefPtr<mozilla::css::Loader>