Bug 1256603. Fix comment in ImageLoader. r=aosmond
authorTimothy Nikkel <tnikkel@gmail.com>
Sat, 13 Oct 2018 00:31:03 -0500
changeset 489366 2cc5b3f51ec4fa0501af01e4ece67be0eed814c4
parent 489365 d8bb90ade0d68eaf309127cb51840c722e4008b5
child 489367 54598c1940f1b4cf12c1e122431ce709237c686f
child 489443 94a62c1aad526dc24dc9186a6ccebb0db276ee87
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewersaosmond
bugs1256603
milestone64.0a1
Bug 1256603. Fix comment in ImageLoader. r=aosmond
layout/style/ImageLoader.cpp
--- a/layout/style/ImageLoader.cpp
+++ b/layout/style/ImageLoader.cpp
@@ -160,21 +160,23 @@ ImageLoader::AssociateRequestToFrame(img
         } else {
           // If we don't already have a complete frame, kickoff decode. This
           // will ensure that either onFrameComplete or onLoadComplete will
           // unblock document onload.
 
           // We want to request decode in such a way that avoids triggering
           // sync decode. First, we attempt to convert the aRequest into
           // a imgIContainer. If that succeeds, then aRequest has an image
-          // and we can request decoding for size at zero size, and that will
-          // trigger async decode. If the conversion to imgIContainer is
-          // unsuccessful, then that means aRequest doesn't have an image yet,
-          // which means we can safely call StartDecoding() on it without
-          // triggering any synchronous work.
+          // and we can request decoding for size at zero size, the size will
+          // be ignored because we don't pass the FLAG_HIGH_QUALITY_SCALING
+          // flag and an async decode (because we didn't pass any sync decoding
+          // flags) at the intrinsic size will be requested. If the conversion
+          // to imgIContainer is unsuccessful, then that means aRequest doesn't
+          // have an image yet, which means we can safely call StartDecoding()
+          // on it without triggering any synchronous work.
           nsCOMPtr<imgIContainer> imgContainer;
           aRequest->GetImage(getter_AddRefs(imgContainer));
           if (imgContainer) {
             imgContainer->RequestDecodeForSize(gfx::IntSize(0, 0),
               imgIContainer::DECODE_FLAGS_DEFAULT);
           } else {
             // It's safe to call StartDecoding directly, since it can't
             // trigger synchronous decode without an image. Flags are ignored.