diff --git a/layout/style/Loader.cpp b/layout/style/Loader.cpp index 0da5ef549f2a..62755fddaa2a 100644 --- a/layout/style/Loader.cpp +++ b/layout/style/Loader.cpp @@ -1412,10 +1412,10 @@ Loader::InsertChildSheet(StyleSheet* aSheet, MOZ_ASSERT(aParentSheet, "Need a parent to insert into"); MOZ_ASSERT_IF(aSheet->IsGecko(), aGeckoParentRule && !aServoChildSheet); MOZ_ASSERT_IF(aSheet->IsServo(), aServoChildSheet && !aGeckoParentRule); + // child sheets should always start out enabled, even if they got + // cloned off of top-level sheets which were disabled + aSheet->SetEnabled(true); if (aSheet->IsGecko()) { - // child sheets should always start out enabled, even if they got - // cloned off of top-level sheets which were disabled - aSheet->AsGecko()->SetEnabled(true); aGeckoParentRule->SetSheet(aSheet->AsGecko()); // This sets the ownerRule on the sheet } else { if (!aSheet->AsServo()->RawSheet()) { @@ -1900,8 +1900,7 @@ Loader::DoSheetComplete(SheetLoadData* aLoadData, nsresult aStatus, // If mSheetAlreadyComplete, then the sheet could well be modified between // when we posted the async call to SheetComplete and now, since the sheet // was page-accessible during that whole time. - MOZ_ASSERT(!(data->mSheet->IsGecko() && - data->mSheet->AsGecko()->IsModified()), + MOZ_ASSERT(!data->mSheet->IsModified(), "should not get marked modified during parsing"); data->mSheet->SetComplete(); data->ScheduleLoadEventIfNeeded(aStatus);