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

Issue 1112513005: Reload image bypassing the cache (Closed)

Created:
5 years, 7 months ago by megjablon
Modified:
5 years, 5 months ago
CC:
blink-reviews, blink-reviews-html_chromium.org, dglazkov+blink, gavinp+loader_chromium.org, groby+blinkspell_chromium.org, tyoshino+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Reload image bypassing the cache. Provide a way to reload an image node, bypassing the cache, to load an original image in place. Also, give the context menu the request's extra data for images. BUG=485295 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=195008

Patch Set 1 #

Total comments: 11

Patch Set 2 : WebNode instead of WebPoint #

Total comments: 6

Patch Set 3 : forceReload and remove bypassCache #

Patch Set 4 : Using ExtraData #

Total comments: 12

Patch Set 5 : japhet comments #

Total comments: 1

Patch Set 6 : nit #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -1 line) Patch
M Source/core/fetch/ResourceFetcher.cpp View 1 chunk +3 lines, -0 lines 0 comments Download
M Source/core/html/HTMLImageElement.h View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download
M Source/core/html/HTMLImageElement.cpp View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/loader/ImageLoader.h View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M Source/core/loader/ImageLoader.cpp View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M Source/web/ContextMenuClientImpl.cpp View 1 2 3 4 3 chunks +7 lines, -0 lines 0 comments Download
M Source/web/WebLocalFrameImpl.h View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M Source/web/WebLocalFrameImpl.cpp View 1 2 3 4 2 chunks +10 lines, -0 lines 1 comment Download
M public/web/WebContextMenuData.h View 1 2 3 4 3 chunks +6 lines, -0 lines 1 comment Download
M public/web/WebLocalFrame.h View 1 2 3 4 5 2 chunks +6 lines, -0 lines 1 comment Download

Messages

Total messages: 39 (8 generated)
bengr
https://codereview.chromium.org/1112513005/diff/1/Source/web/ContextMenuClientImpl.cpp File Source/web/ContextMenuClientImpl.cpp (right): https://codereview.chromium.org/1112513005/diff/1/Source/web/ContextMenuClientImpl.cpp#newcode239 Source/web/ContextMenuClientImpl.cpp:239: data.imageChromeProxyResponseHeader = imageElement->imageLoader().image()->response().httpHeaderField("via").utf8().data(); There shouldn't be anything DRP-specific in ...
5 years, 7 months ago (2015-04-29 00:23:21 UTC) #2
Yoav Weiss
Can you please explain the logic behind this menu item and what it should do? ...
5 years, 7 months ago (2015-04-29 06:13:24 UTC) #4
Yoav Weiss
On 2015/04/29 06:13:24, Yoav Weiss wrote: > Can you please explain the logic behind this ...
5 years, 7 months ago (2015-04-29 07:16:47 UTC) #5
Nate Chapin
yoav: megjablon sent me a link to https://docs.google.com/a/chromium.org/document/d/1v8F7SjFJJ0aGql3lWHfbVwUwcgjVCIUNkwDfaPUcQkg/edit?usp=sharing, which should be visible with a @chromium.org ...
5 years, 7 months ago (2015-04-30 20:33:56 UTC) #7
Yoav Weiss
On 2015/04/30 20:33:56, Nate Chapin wrote: > yoav: megjablon sent me a link to > ...
5 years, 7 months ago (2015-04-30 20:54:20 UTC) #8
Nate Chapin
https://codereview.chromium.org/1112513005/diff/1/Source/core/editing/Editor.cpp File Source/core/editing/Editor.cpp (right): https://codereview.chromium.org/1112513005/diff/1/Source/core/editing/Editor.cpp#newcode973 Source/core/editing/Editor.cpp:973: void Editor::reloadImage(const HitTestResult& result, bool bypassCache) This doesn't really ...
5 years, 7 months ago (2015-04-30 20:59:41 UTC) #9
megjablon
https://codereview.chromium.org/1112513005/diff/1/Source/core/editing/Editor.cpp File Source/core/editing/Editor.cpp (right): https://codereview.chromium.org/1112513005/diff/1/Source/core/editing/Editor.cpp#newcode973 Source/core/editing/Editor.cpp:973: void Editor::reloadImage(const HitTestResult& result, bool bypassCache) On 2015/04/30 20:59:41, ...
5 years, 7 months ago (2015-04-30 22:00:55 UTC) #10
Nate Chapin
On 2015/04/30 22:00:55, megjablon wrote: > https://codereview.chromium.org/1112513005/diff/1/Source/core/editing/Editor.cpp > File Source/core/editing/Editor.cpp (right): > > https://codereview.chromium.org/1112513005/diff/1/Source/core/editing/Editor.cpp#newcode973 > ...
5 years, 7 months ago (2015-04-30 22:24:03 UTC) #11
Nate Chapin
https://codereview.chromium.org/1112513005/diff/1/Source/core/loader/ImageLoader.cpp File Source/core/loader/ImageLoader.cpp (right): https://codereview.chromium.org/1112513005/diff/1/Source/core/loader/ImageLoader.cpp#newcode269 Source/core/loader/ImageLoader.cpp:269: resourceRequest.setCachePolicy(ResourceRequestCachePolicy::ReloadBypassingCache); On 2015/04/30 22:00:54, megjablon wrote: > On 2015/04/30 ...
5 years, 7 months ago (2015-04-30 22:26:55 UTC) #12
megjablon
https://codereview.chromium.org/1112513005/diff/1/Source/core/loader/ImageLoader.cpp File Source/core/loader/ImageLoader.cpp (right): https://codereview.chromium.org/1112513005/diff/1/Source/core/loader/ImageLoader.cpp#newcode269 Source/core/loader/ImageLoader.cpp:269: resourceRequest.setCachePolicy(ResourceRequestCachePolicy::ReloadBypassingCache); On 2015/04/30 22:26:54, Nate Chapin wrote: > On ...
5 years, 7 months ago (2015-04-30 22:35:50 UTC) #13
Nate Chapin
On 2015/04/30 22:35:50, megjablon wrote: > https://codereview.chromium.org/1112513005/diff/1/Source/core/loader/ImageLoader.cpp > File Source/core/loader/ImageLoader.cpp (right): > > https://codereview.chromium.org/1112513005/diff/1/Source/core/loader/ImageLoader.cpp#newcode269 > ...
5 years, 7 months ago (2015-04-30 22:37:49 UTC) #14
megjablon
On 2015/04/30 22:24:03, Nate Chapin wrote: > On 2015/04/30 22:00:55, megjablon wrote: > > > ...
5 years, 7 months ago (2015-05-01 00:35:56 UTC) #15
megjablon
On 2015/04/30 22:37:49, Nate Chapin wrote: > On 2015/04/30 22:35:50, megjablon wrote: > > > ...
5 years, 7 months ago (2015-05-01 00:36:39 UTC) #16
Nate Chapin
On 2015/05/01 00:35:56, megjablon wrote: > On 2015/04/30 22:24:03, Nate Chapin wrote: > > On ...
5 years, 7 months ago (2015-05-01 17:15:08 UTC) #17
Nate Chapin
On 2015/05/01 00:36:39, megjablon wrote: > On 2015/04/30 22:37:49, Nate Chapin wrote: > > On ...
5 years, 7 months ago (2015-05-01 17:17:18 UTC) #18
megjablon
On 2015/05/01 17:15:08, Nate Chapin wrote: > On 2015/05/01 00:35:56, megjablon wrote: > > On ...
5 years, 7 months ago (2015-05-01 18:25:24 UTC) #19
megjablon
On 2015/05/01 17:17:18, Nate Chapin wrote: > On 2015/05/01 00:36:39, megjablon wrote: > > On ...
5 years, 7 months ago (2015-05-01 18:27:27 UTC) #20
Nate Chapin
https://codereview.chromium.org/1112513005/diff/20001/Source/core/html/HTMLImageElement.h File Source/core/html/HTMLImageElement.h (left): https://codereview.chromium.org/1112513005/diff/20001/Source/core/html/HTMLImageElement.h#oldcode148 Source/core/html/HTMLImageElement.h:148: HTMLImageLoader& imageLoader() const { return *m_imageLoader; } This should ...
5 years, 7 months ago (2015-05-01 18:46:51 UTC) #21
megjablon
https://codereview.chromium.org/1112513005/diff/20001/Source/core/html/HTMLImageElement.h File Source/core/html/HTMLImageElement.h (left): https://codereview.chromium.org/1112513005/diff/20001/Source/core/html/HTMLImageElement.h#oldcode148 Source/core/html/HTMLImageElement.h:148: HTMLImageLoader& imageLoader() const { return *m_imageLoader; } On 2015/05/01 ...
5 years, 7 months ago (2015-05-01 19:15:24 UTC) #22
Yoav Weiss
Again, tests would be good :) I have to say that I'd be significantly more ...
5 years, 7 months ago (2015-05-01 21:54:07 UTC) #23
Nate Chapin
Almost there! Just a few cleanup items. https://codereview.chromium.org/1112513005/diff/60001/Source/core/html/HTMLImageElement.cpp File Source/core/html/HTMLImageElement.cpp (right): https://codereview.chromium.org/1112513005/diff/60001/Source/core/html/HTMLImageElement.cpp#newcode650 Source/core/html/HTMLImageElement.cpp:650: return 0; ...
5 years, 7 months ago (2015-05-05 22:03:49 UTC) #24
Nate Chapin
https://codereview.chromium.org/1112513005/diff/60001/Source/web/ContextMenuClientImpl.cpp File Source/web/ContextMenuClientImpl.cpp (right): https://codereview.chromium.org/1112513005/diff/60001/Source/web/ContextMenuClientImpl.cpp#newcode236 Source/web/ContextMenuClientImpl.cpp:236: if (imageElement && imageElement->getResponse()) Oh, I forgot. Since response() ...
5 years, 7 months ago (2015-05-05 22:05:44 UTC) #25
megjablon
https://codereview.chromium.org/1112513005/diff/60001/Source/core/html/HTMLImageElement.cpp File Source/core/html/HTMLImageElement.cpp (right): https://codereview.chromium.org/1112513005/diff/60001/Source/core/html/HTMLImageElement.cpp#newcode650 Source/core/html/HTMLImageElement.cpp:650: return 0; On 2015/05/05 22:03:49, Nate Chapin wrote: > ...
5 years, 7 months ago (2015-05-06 18:33:02 UTC) #27
Nate Chapin
lgtm with one nitpick https://codereview.chromium.org/1112513005/diff/100001/public/web/WebLocalFrame.h File public/web/WebLocalFrame.h (right): https://codereview.chromium.org/1112513005/diff/100001/public/web/WebLocalFrame.h#newcode139 public/web/WebLocalFrame.h:139: // Reload the image located ...
5 years, 7 months ago (2015-05-06 18:40:54 UTC) #28
megjablon
On 2015/05/06 18:40:54, Nate Chapin wrote: > lgtm with one nitpick > > https://codereview.chromium.org/1112513005/diff/100001/public/web/WebLocalFrame.h > ...
5 years, 7 months ago (2015-05-06 18:43:48 UTC) #29
Nate Chapin
On 2015/05/06 18:43:48, megjablon wrote: > On 2015/05/06 18:40:54, Nate Chapin wrote: > > lgtm ...
5 years, 7 months ago (2015-05-06 18:45:35 UTC) #30
bengr
On 2015/05/06 18:45:35, Nate Chapin wrote: > On 2015/05/06 18:43:48, megjablon wrote: > > On ...
5 years, 7 months ago (2015-05-06 20:47:20 UTC) #31
Nate Chapin
On 2015/05/06 20:47:20, bengr wrote: > On 2015/05/06 18:45:35, Nate Chapin wrote: > > On ...
5 years, 7 months ago (2015-05-06 20:51:46 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1112513005/140001
5 years, 7 months ago (2015-05-06 23:35:05 UTC) #36
commit-bot: I haz the power
Committed patchset #6 (id:140001) as https://src.chromium.org/viewvc/blink?view=rev&revision=195008
5 years, 7 months ago (2015-05-06 23:39:03 UTC) #37
esprehn
5 years, 5 months ago (2015-07-15 20:53:58 UTC) #39
Message was sent while issue was closed.
Can we add an API that's more specific, like WebElement::reloadLofiImage() and
make blink aware of the lofi images. Having the wrong entries in the cache
doesn't seem right. You want the image resources to actually be different and
the fetch layer above it to select one or the other.

https://codereview.chromium.org/1112513005/diff/140001/Source/web/WebLocalFra...
File Source/web/WebLocalFrameImpl.cpp (right):

https://codereview.chromium.org/1112513005/diff/140001/Source/web/WebLocalFra...
Source/web/WebLocalFrameImpl.cpp:927: void WebLocalFrameImpl::reloadImage(const
WebNode& webNode)
This should be a method on WebElement, not WebLocalFrame.

https://codereview.chromium.org/1112513005/diff/140001/public/web/WebContextM...
File public/web/WebContextMenuData.h (right):

https://codereview.chromium.org/1112513005/diff/140001/public/web/WebContextM...
public/web/WebContextMenuData.h:82: // If |media_type| is MediaTypeImage and
|has_image_contents| is true, then
mediaType and hasImageContents

https://codereview.chromium.org/1112513005/diff/140001/public/web/WebLocalFra...
File public/web/WebLocalFrame.h (right):

https://codereview.chromium.org/1112513005/diff/140001/public/web/WebLocalFra...
public/web/WebLocalFrame.h:140: virtual void reloadImage(const WebNode&) = 0;
This should be on WebElement

Powered by Google App Engine
This is Rietveld 408576698