New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 884959 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 20
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Images not loading progressively

Reported by clon...@yahoo.com.au, Sep 18

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.92 Safari/537.36

Example URL:
https://i.imgur.com/6FURTkC.jpg

Steps to reproduce the problem:
1. Go to https://i.imgur.com/6FURTkC.jpg (or some other large image URL)
2. If your internet is fast, open dev tools and enable Slow 3G throttling
3. Press Ctrl+F5 to force refresh

What is the expected behavior?
The image should begin loading, and more of the image should become visible the longer it loads.

Firefox 62.0 demonstrates the correct behaviour. Even Edge 42.17134.1.0 and IE 11.228.17134.0 work correctly. Only Chrome does not.

What went wrong?
Only a small section of the image appears at the top, then nothing more until the image is completely loaded.

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? Yes Definitely works in 65.0.3325.181, definitely broken in 66.0.3359.181 and later, not sure the exact version where it broke

Does this work in other browsers? Yes

Chrome version: 69.0.3497.92  Channel: stable
OS Version: 10.0
Flash Version: 

This is an extremely annoying problem for me. I'm a web developer and I constantly have to view large images via an API. I don't need to see the whole image but I'm forced to wait until the whole thing is loaded just because Chrome won't progressively display the image as it loads.

The test image is attached in case it's removed from Imgur.
 
Whoops, didn't attach the image. Attached here.
6FURTkC.jpg
3.5 MB View Download
Labels: Needs-Bisect Needs-Triage-M69
Cc: vamshi.kommuri@chromium.org
Labels: -Type-Bug -Pri-2 -Needs-Bisect hasbisect-per-revision Triaged-ET Target-70 Target-71 M-71 FoundIn-71 FoundIn-70 RegressedIn-66 Target-69 FoundIn-69 OS-Linux OS-Mac Pri-1 Type-Bug-Regression
Owner: hajimehoshi@chromium.org
Status: Assigned (was: Unconfirmed)
Thanks for filing the issue!

Able to reproduce the issue on reported chrome version 69.0.3497.92 and on the latest canary 71.0.3554.0 using Mac 10.13.1, Ubuntu 14.04 and Windows 10

Bisect Information:
-------------------
Good Build: 66.0.3350.0
Bad Build:  66.0.3352.0
Note: We have run the per-revision bisect for above versions as 66.0.3351.0 isn't available.

You are probably looking for a change made after 537586 (known good), but no later than 537587 (first known bad).
CHANGELOG URL:
https://chromium.googlesource.com/chromium/src/+log/610354a921791e1f7be329acae17694f79620ffa..085dec01a176f8f6fb3b1e9b1ff8a34cb8152b22
Suspecting: https://chromium.googlesource.com/chromium/src/+/085dec01a176f8f6fb3b1e9b1ff8a34cb8152b22
Review URL: https://chromium-review.googlesource.com/903903

@Hajime Hoshi: Please help in assigning it to the right owner if this is not related to your change.
Cc: yhirano@chromium.org
Cc: altimin@chromium.org
Status: Started (was: Assigned)
Looks like tasks posted to the task runner (Loader()->GetLoadingTaskRunner()) are not executed as we expected.

+altimin@ fyi
Cc: hajimehoshi@chromium.org tasak@chromium.org
Owner: hirosh...@chromium.org
Status: Assigned (was: Started)
I found the cause: in ImageResource::AppendData, Loader() is always null for that image since the image is created via ImageLoader::UpdateFromElement. Loader() returns ResourceLoader, and this is not related to ImageLoader(). Unfortunately, there is no way to get the document/context from ImageResource so far.

My suggestion is to add a document or a task runner member to ImageResource passed via its constructor and use it. Hiroshige-san, do you think this is a feasible way? (If we agree how to fix this, I'm fine I create the CL.)
Components: -Blink Blink>Loader
Hmm, another possible fix is to immediately update the image (i.e. at Line 340)
https://codesearch.chromium.org/chromium/src/third_party/blink/renderer/core/loader/resource/image_resource.cc?type=cs&g=0&l=340
if Loader() is null.

Also, the task runner might be passed as an argument of AppendData().

I full don't understand the relationship between ResourceLoader and ImageResource, but actually calling UpdateImage fixed that. This sounds the simplest way.
s/full don't/don't fully/
sed syntax always confuses me :P
FYI In the ImageDocument cases a ResourceLoader loads a RawResource, and ImageDocument etc. forwards Resource notification calls to ImageResource. The ImageResource itself doesn't have ResourceLoader directly attached.

The downside of calling UpdateImage() is that disables throttling progressive image loading (i.e. updating the partial progressively-loaded image not toooo frequently).

Do we want to merge the fix to beta and/or stable?

> FYI In the ImageDocument cases a ResourceLoader loads a RawResource, and ImageDocument etc. forwards Resource notification calls to ImageResource. The ImageResource itself doesn't have ResourceLoader directly attached.

I was wondering when ImageResource::Loader() is available.

> The downside of calling UpdateImage() is that disables throttling progressive image loading (i.e. updating the partial progressively-loaded image not toooo frequently).

Ah good point.

> Do we want to merge the fix to beta and/or stable?

I think no since this bug has already been in stable for long time, and this fix doesn't sound urgent.

> I was wondering when ImageResource::Loader() is available.

I expect Loader() is always non-null if and only if it is loading and not loaded by ImageDocument.
(Not codesearched and confirmed though)
Aha, thanks!

Project Member

Comment 16 by bugdroid1@chromium.org, Sep 20

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c298489d1b884a0fd2f25bdcfdd9534a1fe72a40

commit c298489d1b884a0fd2f25bdcfdd9534a1fe72a40
Author: Hajime Hoshi <hajimehoshi@chromium.org>
Date: Thu Sep 20 09:42:24 2018

Call ImageResourse::UpdateImage when its ResourceLoader is missing

There are some cases when a ResourceLoader for an ImageResource is
missing. In this case, the task runner in AppendData is never available
and this caused a bug that the image is not updated when AppendData is
called.

This CL fixes this by calling UpdateImage when the ResourceLoader is not
available.

Bug:  884959 
Change-Id: If92f1181290a8a451e8bf4faf8e126d3161eb116
Reviewed-on: https://chromium-review.googlesource.com/1235485
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Hajime Hoshi <hajimehoshi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592736}
[modify] https://crrev.com/c298489d1b884a0fd2f25bdcfdd9534a1fe72a40/third_party/blink/renderer/core/loader/resource/image_resource.cc

Status: Fixed (was: Assigned)
Thanks so much for fixing this, guys. I look forward to it being in stable! :)
Do we need to merge this back to M70?
I didn't think so as I commented at #13, but I'm fine with either.
Labels: TE-Verified-M71 TE-Verified-71.0.3558.0
Verified the fix on Mac 10.13.1, Windows-10 and Ubuntu 14.04 using Chrome version #71.0.3558.0 as per the comment #0.
Attaching screen cast for reference.
Observed the image loaded progressively.
Hence, the fix is working as expected. 
Adding the verified labels.
Note: Able to reproduce the issue on chrome version with out fix.

Thanks...!!



884959 CL Verification.mp4
505 KB View Download

Sign in to add a comment