Bug 1377158 - (Part 1) Set style backend to stylo when SVG is used as an image. r=heycam

MozReview-Commit-ID: 9FnA8X84h87

--HG--
extra : rebase_source : 49a6140c4c78c35f755710934c798ce46dafa213
This commit is contained in:
Xidorn Quan 2017-08-03 11:24:55 +10:00
Родитель 77b71da58c
Коммит 9e809e01c2
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -13219,7 +13219,10 @@ nsIDocument::UpdateStyleBackendType()
#ifdef MOZ_STYLO
if (nsLayoutUtils::StyloEnabled()) {
if (!mDocumentContainer) {
if (IsBeingUsedAsImage()) {
// Enable stylo for SVG-as-image.
mStyleBackendType = StyleBackendType::Servo;
} else if (!mDocumentContainer) {
NS_WARNING("stylo: No docshell yet, assuming Gecko style system");
} else if ((IsHTMLOrXHTML() || IsSVGDocument()) &&
IsContentDocument()) {