Bug 1158282 - Clarify existing comment in FaviconView.formatImage. r=margaret
authorMichael Comella <michael.l.comella@gmail.com>
Thu, 21 May 2015 14:11:41 -0700
changeset 266270 8d1f3331f453f65b2b234a1ecc9d556b0c4ce275
parent 266269 7330e7687ca6e401e3db00eaf6e6697529c7d880
child 266271 02d343f01fa55053e21e36191c279f19ebbdb486
push id2231
push usermichael.l.comella@gmail.com
push dateFri, 22 May 2015 20:04:59 +0000
reviewersmargaret
bugs1158282
milestone41.0a1
Bug 1158282 - Clarify existing comment in FaviconView.formatImage. r=margaret
mobile/android/base/widget/FaviconView.java
--- a/mobile/android/base/widget/FaviconView.java
+++ b/mobile/android/base/widget/FaviconView.java
@@ -137,17 +137,17 @@ public class FaviconView extends ImageVi
     }
 
     /**
      * Formats the image for display, if the prerequisite data are available. Upscales tiny Favicons to
      * normal sized ones, replaces null bitmaps with the default Favicon, and fills all remaining space
      * in this view with the coloured background.
      */
     private void formatImage() {
-        // If we're called before bitmap is set, or before size is set, show blank.
+        // We're waiting for both onSizeChanged and updateImage to be called before scaling.
         if (mIconBitmap == null || mActualWidth == 0 || mActualHeight == 0) {
             showNoImage();
             return;
         }
 
         if (mScalingExpected && mActualWidth != mIconBitmap.getWidth()) {
             scaleBitmap();
             // Don't scale the image every time something changes.