In Firefox, a broken image is displayed as a hollow outline the size of the image (when known), with a broken image icon in the upper left. In Safari, a broken image is displayed as an icon centered where the image would go, but with no border. The lack of a border can make it harder to figure out what images on a page, exactly, are broken, and with very large images means it's easy to miss the icon entirely. It would be nice to extend RenderImage.cpp to show a border in this case.
Created attachment 16286 [details]
Simple patch. Some archaeology in trac tells me that this code dates from almost the very beginning of WebCore, back when all the commits were huge "land all the changes in SNAZZY_WEBKIT_BRANCH_3" affairs.
Comment on attachment 16286 [details]
You need to adjust the usableWidth/Height to exclude the drawn outline, since the error image will potentially draw on top of the outline otherwise.
We'll need to discuss this change I think, since it constitutes a UI change to Safari. It's definitely too late to make a change like this for Leopard, so it will have to wait for a bit.
alt text has the same bug (already). That should be fixed too.
Honestly it seems OK if the error image draws over the outline (as long as the two aren't crazily alpha-blended), but I'll take a look at making that change for both the broken image icon and the alt text in the next iteration of the patch.
Waiting for the trunk to go to some post-Leopard-branch state is fine with me, but I'm not totally clear on what the schedule for such things is. Maybe there's already a wiki page explaining such things?
Created attachment 16295 [details]
This subtracts off the outline pixels when calculating the usable dimensions.
It might be good to go even further and subtract 4 in each direction instead of 2, to leave a 1 px buffer inside the outline. Another possible change to this patch is that, when there's an error, we could avoid drawing the outline if the error image would fit without it but not with it (since if you have to pick one or the other, the error image is probably better than the outline). Input welcome.
Created attachment 16311 [details]
Test case (broken image)
I asked some of the more UI-oriented people on the Safari team what they think of this change.
Comment on attachment 16295 [details]
r=me for feature-branch (or after feature-branch is merged back).
Landed in r26591.