mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 06:48:38 +09:00
Issue #2112 - Part 5: Remove Servo from forwarding code used by magic pointer classes
This commit is contained in:
parent
b1c9206051
commit
a93a7bed47
52 changed files with 274 additions and 1116 deletions
|
|
@ -176,16 +176,10 @@ nsStyleSheetService::LoadAndRegisterSheet(nsIURI *aSheetURI,
|
|||
// We're guaranteed that the new sheet is the last sheet in
|
||||
// mSheets[aSheetType]
|
||||
|
||||
// XXXheycam Once the nsStyleSheetService can hold ServoStyleSheets too,
|
||||
// we'll need to include them in the notification.
|
||||
StyleSheet* sheet = mSheets[aSheetType].LastElement();
|
||||
if (sheet->IsGecko()) {
|
||||
CSSStyleSheet* cssSheet = sheet->AsGecko();
|
||||
serv->NotifyObservers(NS_ISUPPORTS_CAST(nsIDOMCSSStyleSheet*, cssSheet),
|
||||
message, nullptr);
|
||||
} else {
|
||||
NS_ERROR("stylo: can't notify observers of ServoStyleSheets");
|
||||
}
|
||||
CSSStyleSheet* cssSheet = sheet->AsGecko();
|
||||
serv->NotifyObservers(NS_ISUPPORTS_CAST(nsIDOMCSSStyleSheet*, cssSheet),
|
||||
message, nullptr);
|
||||
}
|
||||
|
||||
if (XRE_IsParentProcess()) {
|
||||
|
|
@ -294,9 +288,6 @@ nsStyleSheetService::PreloadSheet(nsIURI *aSheetURI, uint32_t aSheetType,
|
|||
nsresult rv = loader->LoadSheetSync(aSheetURI, parsingMode, true, &sheet);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
MOZ_ASSERT(sheet->IsGecko(),
|
||||
"stylo: didn't expect Loader to create a ServoStyleSheet");
|
||||
|
||||
RefPtr<CSSStyleSheet> cssSheet = sheet->AsGecko();
|
||||
cssSheet.forget(aSheet);
|
||||
|
||||
|
|
@ -331,15 +322,9 @@ nsStyleSheetService::UnregisterSheet(nsIURI *aSheetURI, uint32_t aSheetType)
|
|||
|
||||
nsCOMPtr<nsIObserverService> serv = services::GetObserverService();
|
||||
if (serv) {
|
||||
// XXXheycam Once the nsStyleSheetService can hold ServoStyleSheets too,
|
||||
// we'll need to include them in the notification.
|
||||
if (sheet->IsGecko()) {
|
||||
CSSStyleSheet* cssSheet = sheet->AsGecko();
|
||||
serv->NotifyObservers(NS_ISUPPORTS_CAST(nsIDOMCSSStyleSheet*, cssSheet),
|
||||
message, nullptr);
|
||||
} else {
|
||||
NS_ERROR("stylo: can't notify observers of ServoStyleSheets");
|
||||
}
|
||||
CSSStyleSheet* cssSheet = sheet->AsGecko();
|
||||
serv->NotifyObservers(NS_ISUPPORTS_CAST(nsIDOMCSSStyleSheet*, cssSheet),
|
||||
message, nullptr);
|
||||
}
|
||||
|
||||
if (XRE_IsParentProcess()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue