mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1247478: Rename FirstAdditionalAuthorSheet() to GetFirstAdditionalAuthorSheet(), since it can return null. r=heycam
This commit is contained in:
parent
7eeafeb0b3
commit
cfda6970cc
@ -4479,7 +4479,7 @@ nsDocument::RemoveAdditionalStyleSheet(additionalSheetType aType, nsIURI* aSheet
|
||||
}
|
||||
|
||||
StyleSheetHandle
|
||||
nsDocument::FirstAdditionalAuthorSheet()
|
||||
nsDocument::GetFirstAdditionalAuthorSheet()
|
||||
{
|
||||
return mAdditionalSheets[eAuthorSheet].SafeElementAt(0, StyleSheetHandle());
|
||||
}
|
||||
|
@ -827,7 +827,7 @@ public:
|
||||
mozilla::StyleSheetHandle aSheet) override;
|
||||
virtual void RemoveAdditionalStyleSheet(additionalSheetType aType,
|
||||
nsIURI* sheetURI) override;
|
||||
virtual mozilla::StyleSheetHandle FirstAdditionalAuthorSheet() override;
|
||||
virtual mozilla::StyleSheetHandle GetFirstAdditionalAuthorSheet() override;
|
||||
|
||||
virtual nsIChannel* GetChannel() const override {
|
||||
return mChannel;
|
||||
|
@ -1007,7 +1007,7 @@ public:
|
||||
mozilla::StyleSheetHandle aSheet) = 0;
|
||||
virtual void RemoveAdditionalStyleSheet(additionalSheetType aType,
|
||||
nsIURI* sheetURI) = 0;
|
||||
virtual mozilla::StyleSheetHandle FirstAdditionalAuthorSheet() = 0;
|
||||
virtual mozilla::StyleSheetHandle GetFirstAdditionalAuthorSheet() = 0;
|
||||
|
||||
/**
|
||||
* Get this document's CSSLoader. This is guaranteed to not return null.
|
||||
|
@ -1466,9 +1466,10 @@ PresShell::AddAuthorSheet(nsISupports* aSheet)
|
||||
return;
|
||||
}
|
||||
|
||||
// Document specific "additional" Author sheets should be stronger than the ones
|
||||
// added with the StyleSheetService.
|
||||
StyleSheetHandle firstAuthorSheet = mDocument->FirstAdditionalAuthorSheet();
|
||||
// Document specific "additional" Author sheets should be stronger than the
|
||||
// ones added with the StyleSheetService.
|
||||
StyleSheetHandle firstAuthorSheet =
|
||||
mDocument->GetFirstAdditionalAuthorSheet();
|
||||
if (firstAuthorSheet) {
|
||||
mStyleSet->InsertStyleSheetBefore(SheetType::Doc, sheet, firstAuthorSheet);
|
||||
} else {
|
||||
|
@ -752,10 +752,10 @@ nsStyleSet::AddDocStyleSheet(CSSStyleSheet* aSheet, nsIDocument* aDocument)
|
||||
break;
|
||||
}
|
||||
}
|
||||
MOZ_ASSERT(!aDocument->FirstAdditionalAuthorSheet() ||
|
||||
aDocument->FirstAdditionalAuthorSheet()->IsGecko(),
|
||||
MOZ_ASSERT(!aDocument->GetFirstAdditionalAuthorSheet() ||
|
||||
aDocument->GetFirstAdditionalAuthorSheet()->IsGecko(),
|
||||
"why do we have a ServoStyleSheet for an nsStyleSet?");
|
||||
if (sheet == aDocument->FirstAdditionalAuthorSheet()->GetAsGecko()) {
|
||||
if (sheet == aDocument->GetFirstAdditionalAuthorSheet()->GetAsGecko()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user