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

Issue 654055 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug

Blocking:
issue 632867



Sign in to add a comment

Reloading a Lo-Fi image to show the original while the Lo-Fi image was still loading causes observers to be notified of completion prematurely.

Project Member Reported by sclit...@chromium.org, Oct 7 2016

Issue description

Version: 56.0.2884.0
OS: Android

I don't know of any user visible effects of this issue, but it's possible that on some pages it could cause the layout to be incorrect, e.g. if the Lo-Fi image and the full original image have different dimensions somehow.

What steps will reproduce the problem?
(1) Start loading a page while in Lo-Fi mode
(2) While one of the images is loading, somehow cause that image to be reloaded, e.g. by long-pressing and clicking "show original"

What is the expected output?

ResourceClients and ImageResourceObservers of that ImageResource should be notified of completion after the reload completes.

What do you see instead?

ResourceClients and ImageResourceObservers of that ImageResource are notified of completion when the original load is cancelled.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 13 2016

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

commit 1e457676004f8af16e0086280b73d87c1e5efba7
Author: sclittle <sclittle@chromium.org>
Date: Thu Oct 13 01:00:13 2016

Wait to notify completion until after a Lo-Fi image is reloaded.

Currently, if ImageResource::reloadIfLoFi() is called while that
ImageResource is still loading, the resource's clients and observers are
notified of completion when the current load is cancelled.

After this CL, the ImageResource waits to notify of completion until the
reload completes.

BUG= 654055 

Review-Url: https://codereview.chromium.org/2407573002
Cr-Commit-Position: refs/heads/master@{#424926}

[modify] https://crrev.com/1e457676004f8af16e0086280b73d87c1e5efba7/third_party/WebKit/Source/core/fetch/ImageResource.cpp
[modify] https://crrev.com/1e457676004f8af16e0086280b73d87c1e5efba7/third_party/WebKit/Source/core/fetch/ImageResource.h
[modify] https://crrev.com/1e457676004f8af16e0086280b73d87c1e5efba7/third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp
[modify] https://crrev.com/1e457676004f8af16e0086280b73d87c1e5efba7/third_party/WebKit/Source/core/fetch/MockResourceClients.cpp
[modify] https://crrev.com/1e457676004f8af16e0086280b73d87c1e5efba7/third_party/WebKit/Source/core/fetch/MockResourceClients.h

Status: Fixed (was: Started)
Blocking: 632867

Sign in to add a comment