When loading image placeholders, detect if the received subrange is the entire resource, and if so then show the full image instead of a placeholder. |
||
Issue descriptionSee Image Replacement Design Doc: https://docs.google.com/document/d/1691W7yFDI1FJv69N2MEtaSzpnqO2EqkgGD3T0O-pQ08/edit?usp=sharing
,
Feb 15 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a2ef21fb88052a7c445d8646430170eb8e4447fd commit a2ef21fb88052a7c445d8646430170eb8e4447fd Author: sclittle <sclittle@chromium.org> Date: Wed Feb 15 23:09:33 2017 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} [modify] https://crrev.com/a2ef21fb88052a7c445d8646430170eb8e4447fd/third_party/WebKit/Source/core/loader/resource/ImageResourceContent.cpp [modify] https://crrev.com/a2ef21fb88052a7c445d8646430170eb8e4447fd/third_party/WebKit/Source/core/loader/resource/ImageResourceTest.cpp [modify] https://crrev.com/a2ef21fb88052a7c445d8646430170eb8e4447fd/third_party/WebKit/Source/platform/network/HTTPParsers.cpp [modify] https://crrev.com/a2ef21fb88052a7c445d8646430170eb8e4447fd/third_party/WebKit/Source/platform/network/HTTPParsers.h
,
Feb 15 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, Feb 11 2017