Bug 1359217 part 5 - Fix reversed condition for inserting import rule. r?heycam
MozReview-Commit-ID: 7LU4l83lQ0t
--- a/layout/style/ServoCSSRuleList.cpp
+++ b/layout/style/ServoCSSRuleList.cpp
@@ -270,17 +270,17 @@ ServoCSSRuleList::InsertRule(const nsASt
StyleSheet* sheet = mStyleSheet->GetMostRecentlyAddedChildSheet();
MOZ_ASSERT(sheet, "Should have at least one "
"child stylesheet after inserting @import rule");
ServoStyleSheet* servoSheet = sheet->AsServo();
// This should always be that case, but currently ServoStyleSheet
// may be reused and the reused stylesheet doesn't refer to the
// right raw sheet, which is bug 1368381. This should be converted
// to an assertion after that bug gets fixed.
- if (servoSheet->RawSheet() == raw) {
+ if (servoSheet->RawSheet() != raw) {
NS_WARNING("New child sheet should always be prepended to the list");
return static_cast<ServoStyleSheet*>(nullptr);
}
return servoSheet;
});
}
return rv;
}