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 14:39:45 +00:00
parent 6c52fe9ff5
commit 5774189842
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;
}