Bug 526721 - "View Image Info" displays the wrong size if the document's first image has the same url, same alt but different scale. r=dao
authorTanner M. Young <mozilla.bugs@alyoung.com>
Thu, 12 Nov 2009 08:59:56 +0100
changeset 34788 499fab2b6aa4aa3b63a1b40b923a7ab2dd04a26a
parent 34787 ca31932ed41b4405be2c5631f28c539251959b51
child 34789 2cbc734b023cdfa9f771dec1acb211e1e62f8a3c
push id10253
push userdgottwald@mozilla.com
push dateThu, 12 Nov 2009 08:00:46 +0000
treeherdermozilla-central@499fab2b6aa4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdao
bugs526721
milestone1.9.3a1pre
Bug 526721 - "View Image Info" displays the wrong size if the document's first image has the same url, same alt but different scale. r=dao
browser/base/content/pageinfo/pageInfo.js
browser/base/content/test/browser_bug517902.js
--- a/browser/base/content/pageinfo/pageInfo.js
+++ b/browser/base/content/pageinfo/pageInfo.js
@@ -80,17 +80,17 @@ pageInfoTreeView.prototype = {
   {
     this.data[row][column.index] = value;
   },
 
   addRow: function(row)
   {
     this.rows = this.data.push(row);
     this.rowCountChanged(this.rows - 1, 1);
-    if (this.selection.count == 0 && this.rowCount)
+    if (this.selection.count == 0 && this.rowCount && !gImageElement)
       this.selection.select(0);
   },
 
   rowCountChanged: function(index, count)
   {
     this.tree.rowCountChanged(index, count);
   },
 
--- a/browser/base/content/test/browser_bug517902.js
+++ b/browser/base/content/test/browser_bug517902.js
@@ -26,13 +26,13 @@ function test() {
           finish();
         });
       });
     }, true);
   }, true);
 
   content.location =
     "data:text/html," +
+    "<img src='about:logo?b' height=300 width=350 alt=2>" +
     "<img src='about:logo?a' height=200 width=250>" +
     "<img src='about:logo?b' height=200 width=250 alt=1>" +
-    "<img src='about:logo?b' height=200 width=250 alt=2>" +
     "<img src='about:logo?b' height=100 width=150 alt=2 id='test-image'>";
 }