Bug 1648064 - Disable lazy loading for print documents. r=hiro

This, along with the previous patches, allow lazy-loaded images to show
up in print, even if they haven't been loaded otherwise.

Differential Revision: https://phabricator.services.mozilla.com/D81780
This commit is contained in:
Emilio Cobos Álvarez
2020-07-22 20:29:08 +00:00
parent f7bd619fb5
commit 1a9e20d90b
2 changed files with 5 additions and 1 deletions

View File

@@ -1256,7 +1256,10 @@ void HTMLImageElement::SetLazyLoading() {
// If scripting is disabled don't do lazy load.
// https://whatpr.org/html/3752/images.html#updating-the-image-data
if (!OwnerDoc()->IsScriptEnabled()) {
//
// Same for printing.
Document* doc = OwnerDoc();
if (!doc->IsScriptEnabled() || doc->IsStaticDocument()) {
return;
}