Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Issue 2543073002: Don't show a placeholder if the response contains the full image. (Closed)

Created:
4 years ago by sclittle
Modified:
3 years, 10 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, Yoav Weiss, tyoshino+watch_chromium.org, gavinp+loader_chromium.org, blink-reviews, loading-reviews+fetch_chromium.org, Nate Chapin
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Don't show a placeholder if the response contains the full image. When attempting to load a placeholder image, it's possible that the response contains the full image, e.g. if the image is smaller than the requested range (e.g. requested the first 2KB of a 1KB image), if the server ignored the range request header and returned a full 200 response, etc. In these cases, this CL causes the full image to be shown and not get treated as a placeholder image, instead of just showing a nondescript placeholder image. In order to detect when range responses contain the full image, this CL refactors Content-Range response header parsing into http_util and exposes it to Blink. BUG=657995 Review-Url: https://codereview.chromium.org/2543073002 Cr-Commit-Position: refs/heads/master@{#450830} Committed: https://chromium.googlesource.com/chromium/src/+/a2ef21fb88052a7c445d8646430170eb8e4447fd

Patch Set 1 : Initial patchset #

Total comments: 12

Patch Set 2 : Addressed mmenke comment #

Patch Set 3 : Separated net/ changes into a separate CL #

Patch Set 4 : Rebased on issue 2638383008 #

Patch Set 5 : Rebased on master #

Unified diffs Side-by-side diffs Delta from patch set Stats (+229 lines, -15 lines) Patch
M third_party/WebKit/Source/core/loader/resource/ImageResourceContent.cpp View 1 2 3 2 chunks +37 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/core/loader/resource/ImageResourceTest.cpp View 1 2 3 4 3 chunks +170 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/network/HTTPParsers.h View 1 2 3 4 2 chunks +13 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/network/HTTPParsers.cpp View 1 2 3 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 33 (13 generated)
sclittle
mmenke: net/* kouhei: Blink bengr: all Thanks in advance.
4 years ago (2016-12-02 00:26:40 UTC) #3
kouhei (in TOK)
+hiroshige,yhirano
4 years ago (2016-12-02 05:13:16 UTC) #5
kouhei (in TOK)
third_party/WebKit lgtm. Please ask platform/ OWNER for rs.
4 years ago (2016-12-02 06:13:45 UTC) #6
kinuko
Source/platform/ lgtm (if net people are happy)
4 years ago (2016-12-02 07:56:47 UTC) #7
mmenke
https://codereview.chromium.org/2543073002/diff/20001/net/http/http_response_headers.cc File net/http/http_response_headers.cc (right): https://codereview.chromium.org/2543073002/diff/20001/net/http/http_response_headers.cc#newcode1311 net/http/http_response_headers.cc:1311: *first_byte_position = *last_byte_position = *instance_length = -1; Can move ...
4 years ago (2016-12-02 19:05:08 UTC) #8
sclittle
https://codereview.chromium.org/2543073002/diff/20001/net/http/http_response_headers.cc File net/http/http_response_headers.cc (right): https://codereview.chromium.org/2543073002/diff/20001/net/http/http_response_headers.cc#newcode1311 net/http/http_response_headers.cc:1311: *first_byte_position = *last_byte_position = *instance_length = -1; On 2016/12/02 ...
4 years ago (2016-12-02 22:19:23 UTC) #9
mmenke
https://codereview.chromium.org/2543073002/diff/20001/net/http/http_response_headers.cc File net/http/http_response_headers.cc (right): https://codereview.chromium.org/2543073002/diff/20001/net/http/http_response_headers.cc#newcode1311 net/http/http_response_headers.cc:1311: *first_byte_position = *last_byte_position = *instance_length = -1; On 2016/12/02 ...
4 years ago (2016-12-02 22:31:56 UTC) #10
mmenke
https://codereview.chromium.org/2543073002/diff/20001/net/http/http_util.cc File net/http/http_util.cc (right): https://codereview.chromium.org/2543073002/diff/20001/net/http/http_util.cc#newcode328 net/http/http_util.cc:328: return false; Actually, we don't provide enough data to ...
4 years ago (2016-12-02 22:38:47 UTC) #11
sclittle
https://codereview.chromium.org/2543073002/diff/20001/net/http/http_response_headers.cc File net/http/http_response_headers.cc (right): https://codereview.chromium.org/2543073002/diff/20001/net/http/http_response_headers.cc#newcode1311 net/http/http_response_headers.cc:1311: *first_byte_position = *last_byte_position = *instance_length = -1; On 2016/12/02 ...
4 years ago (2016-12-03 00:43:13 UTC) #12
mmenke
https://codereview.chromium.org/2543073002/diff/20001/net/http/http_util.cc File net/http/http_util.cc (right): https://codereview.chromium.org/2543073002/diff/20001/net/http/http_util.cc#newcode311 net/http/http_util.cc:311: *first_byte_position = *last_byte_position = -1; On 2016/12/03 00:43:13, sclittle ...
4 years ago (2016-12-03 00:46:21 UTC) #13
mmenke
On 2016/12/03 00:46:21, mmenke wrote: > https://codereview.chromium.org/2543073002/diff/20001/net/http/http_util.cc > File net/http/http_util.cc (right): > > https://codereview.chromium.org/2543073002/diff/20001/net/http/http_util.cc#newcode311 > ...
4 years ago (2016-12-03 00:48:37 UTC) #14
sclittle
Re discussion with mmenke, I'm going to split the net/ part of this CL out ...
4 years ago (2016-12-03 00:56:34 UTC) #15
sclittle
I've separated the net/ changes out into other CLs, and pruned the list of reviewers. ...
4 years ago (2016-12-08 21:47:30 UTC) #18
mmenke
On 2016/12/08 21:47:30, sclittle wrote: > I've separated the net/ changes out into other CLs, ...
4 years ago (2016-12-08 22:48:08 UTC) #19
sclittle
I've rebased this change on the refactored ImageResource/ImageResourceContent and on https://codereview.chromium.org/2638383008 that makes it possible ...
3 years, 10 months ago (2017-02-01 00:58:38 UTC) #20
hiroshige
On 2017/02/01 00:58:38, sclittle wrote: > I've rebased this change on the refactored ImageResource/ImageResourceContent > ...
3 years, 10 months ago (2017-02-11 00:28:46 UTC) #25
sclittle
@hiroshige: I've rebased this on master, I'll wait for your LGTM before committing.
3 years, 10 months ago (2017-02-14 22:24:26 UTC) #26
hiroshige
lgtm
3 years, 10 months ago (2017-02-15 18:39:49 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2543073002/120001
3 years, 10 months ago (2017-02-15 18:41:50 UTC) #30
commit-bot: I haz the power
3 years, 10 months ago (2017-02-15 23:10:24 UTC) #33
Message was sent while issue was closed.
Committed patchset #5 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/a2ef21fb88052a7c445d86464301...

Powered by Google App Engine
This is Rietveld 408576698