From bb57a2287816d9bf02375bfd2fd5836b8bd4a4ac Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Thu, 4 Oct 2018 18:32:33 +0000 Subject: [PATCH] Bug 1496279 - Don't register CSS images in the loading document when printing r=emilio Differential Revision: https://phabricator.services.mozilla.com/D7677 --HG-- extra : moz-landing-system : lando --- layout/style/nsCSSValue.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/layout/style/nsCSSValue.cpp b/layout/style/nsCSSValue.cpp index c4cfec61eb25..74158b181bdf 100644 --- a/layout/style/nsCSSValue.cpp +++ b/layout/style/nsCSSValue.cpp @@ -1404,16 +1404,8 @@ css::ImageValue::LoadImage(nsIDocument* aDocument) this, mCORSMode); - // Register the image in the loading document, and in our document if it's - // different from the loading document. - imgRequestProxy* request = - loadingDoc->StyleImageLoader()->RegisterCSSImage(this); - - if (aDocument != loadingDoc) { - request = aDocument->StyleImageLoader()->RegisterCSSImage(this); - } - - return request; + // Register the image in the document that's using it. + return aDocument->StyleImageLoader()->RegisterCSSImage(this); } css::ImageValue::~ImageValue()