зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1290276 Part 4 - Make ServoStyleSet::RawSet() return a pointer. r=heycam
In next part, we'll use ServoStyleSet to host XBL stylesheets. The raw set is not available until the resources are loaded, so it's easier to tell that by checking whether the pointer is nullptr or not. MozReview-Commit-ID: Hqydd55FPO9 --HG-- extra : rebase_source : 6df6c2666aea2ca8a8065d4f4d9b552ec7b3e6fe
This commit is contained in:
Родитель
e2e9e98b3f
Коммит
ee880dc08d
|
@ -82,9 +82,10 @@ ServoMediaList::Delete(const nsAString& aOldMedium)
|
|||
bool
|
||||
ServoMediaList::Matches(nsPresContext* aPresContext) const
|
||||
{
|
||||
const RawServoStyleSet& rawSet =
|
||||
const RawServoStyleSet* rawSet =
|
||||
aPresContext->StyleSet()->AsServo()->RawSet();
|
||||
return Servo_MediaList_Matches(mRawList, &rawSet);
|
||||
MOZ_ASSERT(rawSet, "The RawServoStyleSet should be valid!");
|
||||
return Servo_MediaList_Matches(mRawList, rawSet);
|
||||
}
|
||||
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -142,7 +142,9 @@ public:
|
|||
void InvalidateStyleForCSSRuleChanges();
|
||||
|
||||
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
|
||||
const RawServoStyleSet& RawSet() const { return *mRawSet; }
|
||||
const RawServoStyleSet* RawSet() const {
|
||||
return mRawSet.get();
|
||||
}
|
||||
|
||||
bool GetAuthorStyleDisabled() const;
|
||||
nsresult SetAuthorStyleDisabled(bool aStyleDisabled);
|
||||
|
|
Загрузка…
Ссылка в новой задаче