Bug 539068 - View Image Info selects the CSS background-image of an image rather than the image itself. r=dao

This commit is contained in:
Tanner M. Young 2010-01-14 11:47:24 +01:00
parent bee00f60ec
commit 17eab0c6a3
2 changed files with 4 additions and 1 deletions

View File

@ -1179,7 +1179,8 @@ function selectImage() {
var tree = document.getElementById("imagetree");
for (var i = 0; i < tree.view.rowCount; i++) {
if (gImageElement == gImageView.data[i][COL_IMAGE_NODE]) {
if (gImageElement == gImageView.data[i][COL_IMAGE_NODE] &&
!gImageView.data[i][COL_IMAGE_BG]) {
tree.view.selection.select(i);
tree.treeBoxObject.ensureRowIsVisible(i);
tree.focus();

View File

@ -31,6 +31,8 @@ function test() {
content.location =
"data:text/html," +
"<style type='text/css'>#test-image,#not-test-image {background-image: url('about:logo?c');}</style>" +
"<img src='about:logo?b' height=300 width=350 alt=2 id='not-test-image'>" +
"<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>" +