Closed Bug 1176081 Opened 11 years ago Closed 11 years ago

Consider not showing placeholders for images that are loading

Categories

(Core :: Layout: Images, Video, and HTML Frames, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: snorp, Assigned: tnikkel)

Details

Attachments

(2 files, 2 obsolete files)

If we paint the page while it is stil loading, and there are images that are not yet loaded, we show the "broken image" icon. I think it would probably look nicer to just not do that while the page is loading. If the image load fails, show it then.
I think you are talking about the loading image placeholder, it is distinct from the broken image placeholder. I think the ideal behaviour for all images (regardless of page loading or not) would be to draw nothing or a light gray outline for some fixed time (say 500ms) and then if the image is still not available show the loading image placeholder. Or we could redesign the loading image placeholder to more subtle all the time.
I guess we sorta have a pref for this, browser.display.show_image_placeholders. But that looks like it might disable them entirely, which is not quite the same.
Summary: Consider not showing the 'broken image' icon during page load → Consider not showing placeholders for images that are loading
I concur; I also really dislike the appearance of the current placeholders. Maybe we should just show a shaded region where the image would go? Like a black rect the size of the image with 33% alpha or something?
Attached patch patch (obsolete) — Splinter Review
This adds a pref to control drawing the loading image placeholder (assuming the image placeholder pref is enabled) and disables that pref on android and b2g. If this works well we should do the same on desktop. We will still draw a border in nsImageFrame::DisplayAltFeedback, this should give the user an indication that an image will go there, without being too visually busy.
Assignee: nobody → tnikkel
Attachment #8624512 - Flags: review?(seth)
Attachment #8624512 - Flags: feedback?(snorp)
Comment on attachment 8624512 [details] [diff] [review] patch Review of attachment 8624512 [details] [diff] [review]: ----------------------------------------------------------------- Looks good!
Attachment #8624512 - Flags: review?(seth) → review+
There is a bunch of churn here that just allow us to not add the nsDisplayAltFeedback item if we don't need it
Attachment #8624877 - Flags: review?(tnikkel)
Comment on attachment 8624512 [details] [diff] [review] patch Review of attachment 8624512 [details] [diff] [review]: ----------------------------------------------------------------- Hah, I didn't even see that you already posted a patch. Looks fine to me :)
Attachment #8624512 - Flags: feedback?(snorp) → feedback+
Attachment #8624877 - Attachment is obsolete: true
Attachment #8624877 - Flags: review?(tnikkel)
I think I want to kill the border now too. It's terrible. It looks like a MOTIF widget. We should just not show anything at all while an image is loading. A good test site is: http://www.deelay.me/
I did more testing, and Chrome/Safari never draw a border, even if the image size is given. This patch also removes the border based on snorps patch. And I went ahead and flipped the pref to disable the loading icon/border everywhere.
Attachment #8624512 - Attachment is obsolete: true
Attachment #8631476 - Flags: review?(seth)
Comment on attachment 8631476 [details] [diff] [review] patch v2 - disable border too, and flip the pref everywhere Review of attachment 8631476 [details] [diff] [review]: ----------------------------------------------------------------- Love it.
Attachment #8631476 - Flags: review?(seth) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Can someone reopen this, it's causing what looks to be artifacts. I've attached a screenshot. I'm using Nightly 20150811011940 ec77f5c19262 but I ran mozregression and bisected it to acc0b3f3daba. Also see a short video at https://vid.me/OkZ5 demonstrating the problem. The steps to reproduce are: - Go to https://github.com/mozilla/mozregression - Scroll down the page until the README is in view and you can see the following links: - - Latest Version Downloads Python versions License - Click on setup.py - Click the back button on your mouse - Note that the links are truncated and not rendering properly - To coax the issue you may have to repeat clicking forward and then back up to several dozen times. In this particular case I don't think the prior behavior is correct either though. You can see in prior builds, eg 20150710030206, instead of those artifacts there'd occasionally be missing image placeholders which never went away; which is weird because they're just links and if I'm going back a page those should already be rendered and never missing. Should I file that as a different bug?
Flags: needinfo?(tnikkel)
Can you file a new bug for this please? Usually we handle regressions in new bugs (unless we back out the original patch, but this doesn't seem bad enough to back out for).
Flags: needinfo?(raysatiro)
Flags: needinfo?(tnikkel)
Flags: needinfo?(raysatiro)
Product: Core → Core Graveyard
Product: Core Graveyard → Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: