зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1402094 - Blacklist about:reader from using stylo. r=bholley
MozReview-Commit-ID: 6cG1x1tcOwn --HG-- extra : rebase_source : dce6a0b1828f8388952e5ff1993424dff782d3d5
This commit is contained in:
Родитель
d721de8d81
Коммит
9ce0474398
|
@ -13608,6 +13608,27 @@ nsIDocument::ReportHasScrollLinkedEffect()
|
|||
"ScrollLinkedEffectFound2");
|
||||
}
|
||||
|
||||
// URL-based blacklist for stylo.
|
||||
static bool
|
||||
ShouldUseGeckoBackend(nsIURI* aDocumentURI)
|
||||
{
|
||||
if (!aDocumentURI) {
|
||||
return false;
|
||||
}
|
||||
bool isScheme = false;
|
||||
if (NS_SUCCEEDED(aDocumentURI->SchemeIs("about", &isScheme))) {
|
||||
nsAutoCString path;
|
||||
aDocumentURI->GetFilePath(path);
|
||||
// about:reader requires support of :scope pseudo-class so we have
|
||||
// to use Gecko backend for now. See bug 1402094.
|
||||
// This should be fixed by bug 1204818.
|
||||
if (path.EqualsLiteral("reader")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
nsIDocument::UpdateStyleBackendType()
|
||||
{
|
||||
|
@ -13626,7 +13647,7 @@ nsIDocument::UpdateStyleBackendType()
|
|||
// Note that, since tests can have XUL support, we still need to
|
||||
// explicitly exclude XUL documents here.
|
||||
if (!nsContentUtils::IsSystemPrincipal(NodePrincipal()) &&
|
||||
!IsXULDocument()) {
|
||||
!IsXULDocument() && !ShouldUseGeckoBackend(mDocumentURI)) {
|
||||
mStyleBackendType = StyleBackendType::Servo;
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче