Issue #2112 - Part 5: Remove Servo from forwarding code used by magic pointer classes

This commit is contained in:
FranklinDM 2024-03-25 02:02:08 +08:00 committed by roytam1
commit a93a7bed47
52 changed files with 274 additions and 1116 deletions

View file

@ -319,14 +319,9 @@ nsStyleLinkElement::DoUpdateStyleSheet(nsIDocument* aOldDocument,
return NS_OK;
}
// XXXheycam ServoStyleSheets do not support <style scoped>.
Element* oldScopeElement = nullptr;
if (mStyleSheet) {
if (mStyleSheet->IsServo()) {
NS_WARNING("stylo: ServoStyleSheets don't support <style scoped>");
} else {
oldScopeElement = mStyleSheet->AsGecko()->GetScopeElement();
}
oldScopeElement = mStyleSheet->AsGecko()->GetScopeElement();
}
if (mStyleSheet && (aOldDocument || aOldShadowRoot)) {
@ -488,12 +483,6 @@ nsStyleLinkElement::UpdateStyleSheetScopedness(bool aIsNowScoped)
return;
}
if (mStyleSheet->IsServo()) {
// XXXheycam ServoStyleSheets don't support <style scoped>.
NS_ERROR("stylo: ServoStyleSheets don't support <style scoped>");
return;
}
CSSStyleSheet* sheet = mStyleSheet->AsGecko();
nsCOMPtr<nsIContent> thisContent;