Bug 1359486 - Fix SVGImageContext::MaybeStoreContextPaint to work with DevTools chrome. r=dholbert

MozReview-Commit-ID: 7TL9cfWsiED
This commit is contained in:
Jonathan Watt 2017-04-05 11:44:16 +01:00
Родитель b81353aaae
Коммит 1ba9dbe74f
1 изменённых файлов: 2 добавлений и 1 удалений

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

@ -10,6 +10,7 @@
// Keep others in (case-insensitive) order: // Keep others in (case-insensitive) order:
#include "gfxUtils.h" #include "gfxUtils.h"
#include "mozilla/Preferences.h" #include "mozilla/Preferences.h"
#include "nsContentUtils.h"
#include "nsIFrame.h" #include "nsIFrame.h"
#include "nsPresContext.h" #include "nsPresContext.h"
@ -30,7 +31,7 @@ SVGImageContext::MaybeStoreContextPaint(Maybe<SVGImageContext>& aContext,
} }
if (!sEnabledForContent && if (!sEnabledForContent &&
!aFromFrame->PresContext()->IsChrome()) { !nsContentUtils::IsChromeDoc(aFromFrame->GetContent()->OwnerDoc())) {
// Context paint is pref'ed off for content and this is a content doc. // Context paint is pref'ed off for content and this is a content doc.
return; return;
} }