Bug 1376805 - Disable stylo for about: pages other than about:blank. r?bholley
MozReview-Commit-ID: F3gSY2uDGJ7
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -13128,17 +13128,23 @@ nsIDocument::UpdateStyleBackendType()
mStyleBackendType = StyleBackendType::Gecko;
#ifdef MOZ_STYLO
if (nsLayoutUtils::StyloEnabled()) {
if (!mDocumentContainer) {
NS_WARNING("stylo: No docshell yet, assuming Gecko style system");
} else if ((IsHTMLOrXHTML() || IsSVGDocument()) &&
IsContentDocument()) {
- mStyleBackendType = StyleBackendType::Servo;
+ // Disable stylo for about: pages other than about:blank, since
+ // they tend to use unsupported selectors like XUL tree pseudos.
+ bool isAbout = false;
+ mDocumentURI->SchemeIs("about", &isAbout);
+ if (!isAbout || NS_IsAboutBlank(mDocumentURI)) {
+ mStyleBackendType = StyleBackendType::Servo;
+ }
}
}
#endif
}
/**
* Helper function for |nsDocument::PrincipalFlashClassification|
*