Bug 1381851 - Update comments for nsXBLPrototypeResources::ComputeServoStyleSet(). draft
authorTing-Yu Lin <tlin@mozilla.com>
Fri, 28 Jul 2017 16:33:22 +0800
changeset 618448 2cc6ee2441a259c8f2e87763874388e9465fcf28
parent 618447 d378459af7ce6f119ea20310a51498e9d287a680
child 640071 b451b2142c9807ef1f382ec8f91f31e39aaf9c8a
push id71334
push userbmo:tlin@mozilla.com
push dateMon, 31 Jul 2017 13:56:30 +0000
bugs1381851
milestone56.0a1
Bug 1381851 - Update comments for nsXBLPrototypeResources::ComputeServoStyleSet(). MozReview-Commit-ID: E1Ols3kfEKU
dom/xbl/nsXBLPrototypeResources.cpp
--- a/dom/xbl/nsXBLPrototypeResources.cpp
+++ b/dom/xbl/nsXBLPrototypeResources.cpp
@@ -167,19 +167,20 @@ nsXBLPrototypeResources::GatherRuleProce
 void
 nsXBLPrototypeResources::ComputeServoStyleSet(nsPresContext* aPresContext)
 {
   mServoStyleSet.reset(new ServoStyleSet());
   mServoStyleSet->Init(aPresContext, nullptr);
   for (StyleSheet* sheet : mStyleSheetList) {
     MOZ_ASSERT(sheet->IsServo(),
                "This should only be called with Servo-flavored style backend!");
-    // The sheets aren't document sheets, but we need to decide a particular
-    // SheetType so that we can pull them out from the right place on the
-    // Servo side.
+    // The XBL style sheets aren't document level sheets, but we need to
+    // decide a particular SheetType to add them to style set. This type
+    // doesn't affect the place where we pull those rules from
+    // stylist::push_applicable_declarations_as_xbl_only_stylist().
     mServoStyleSet->AppendStyleSheet(SheetType::Doc, sheet->AsServo());
   }
   mServoStyleSet->UpdateStylistIfNeeded();
 }
 
 void
 nsXBLPrototypeResources::AppendStyleSheet(StyleSheet* aSheet)
 {