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

Issue 1502563004: Save-Page-As-Complete-Html: Each frame links to a distinct local file. (Closed)

Created:
5 years ago by Łukasz Anforowicz
Modified:
4 years, 11 months ago
CC:
asanka, blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, dglazkov+blink, jam, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@no-url-deduping-for-frame-and-adding-save-item-id
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Save-Page-As-Complete-Html: Each frame links to a distinct local file. Previous CL (crrev.com/1484093002) made it possible to save contents of all frames - even if some of them have the same URI, they still get saved into separate files / SaveItems. This CL makes sure that we rewrite links in a html document, based on frame identity if possible (rather than always doing the rewriting based on the uri): - SaveItem now stores a frame_tree_node_id that can be potentially used (if the SaveItem is for a frame rather than for a savable resource) as a key in the map into the local paths. - WebFrameSerializerImpl now rewrites link uris based on 2 maps (url -> local path map as well as frame -> local path map). BUG=106364, 106158, 538188 Committed: https://crrev.com/777a7dd63a55b297f0c9543f1892cecb54505a1f Cr-Commit-Position: refs/heads/master@{#371349}

Patch Set 1 #

Patch Set 2 : Rebasing... #

Total comments: 2

Patch Set 3 : Introduced WebPageSerializer::LinkRewritingDelegate [also rebasing :-( ]. #

Patch Set 4 : Rebased + cleaned-up refactoring leftovers from previous patchset. #

Patch Set 5 : Rebasing... (on top of Page->FrameSerializer rename). #

Patch Set 6 : Rebasing... #

Patch Set 7 : Fixing building of dom_serializer_browsertest.cc :-/ #

Total comments: 6

Patch Set 8 : Method signature changes: rewriteFrameSource + s/const WebFrame&/WebFrame*/ #

Total comments: 8

Patch Set 9 : Addressed feedback from Randy (and apparently accidentally rebased as well...). #

Total comments: 4

Patch Set 10 : Addressed CR feedback from Nasko. #

Patch Set 11 : Rebasing... #

Unified diffs Side-by-side diffs Delta from patch set Stats (+256 lines, -107 lines) Patch
M chrome/browser/download/save_page_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -3 lines 0 comments Download
M chrome/test/data/save_page/frames-runtime-changes.htm View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M content/browser/download/save_item.h View 1 2 3 4 5 3 chunks +7 lines, -1 line 0 comments Download
M content/browser/download/save_item.cc View 1 2 3 4 5 1 chunk +3 lines, -1 line 0 comments Download
M content/browser/download/save_package.h View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/download/save_package.cc View 1 2 3 4 5 6 7 8 8 chunks +40 lines, -14 lines 0 comments Download
M content/common/frame_messages.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -3 lines 0 comments Download
M content/renderer/dom_serializer_browsertest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +27 lines, -5 lines 0 comments Download
M content/renderer/render_frame_impl.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +43 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/web/WebFrameSerializer.cpp View 1 2 3 4 5 6 7 8 3 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/web/WebFrameSerializerImpl.h View 1 2 3 4 5 2 chunks +10 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/web/WebFrameSerializerImpl.cpp View 1 2 3 4 5 6 7 4 chunks +48 lines, -39 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebFrameSerializerTest.cpp View 1 2 3 4 5 6 7 1 chunk +30 lines, -3 lines 0 comments Download
M third_party/WebKit/public/web/WebFrameSerializer.h View 1 2 3 4 5 6 7 8 3 chunks +28 lines, -12 lines 0 comments Download

Messages

Total messages: 37 (15 generated)
Łukasz Anforowicz
Daniel, could you please take a look? https://codereview.chromium.org/1502563004/diff/20001/third_party/WebKit/Source/web/WebPageSerializerImpl.cpp File third_party/WebKit/Source/web/WebPageSerializerImpl.cpp (right): https://codereview.chromium.org/1502563004/diff/20001/third_party/WebKit/Source/web/WebPageSerializerImpl.cpp#newcode314 third_party/WebKit/Source/web/WebPageSerializerImpl.cpp:314: frame = ...
5 years ago (2015-12-16 21:39:02 UTC) #6
dcheng
Can we change this to use a delegate (similar to the MHTML deduplication patch) to ...
4 years, 11 months ago (2015-12-29 18:39:20 UTC) #7
Łukasz Anforowicz
On 2015/12/29 18:39:20, dcheng wrote: > Can we change this to use a delegate (similar ...
4 years, 11 months ago (2015-12-29 22:07:03 UTC) #8
Łukasz Anforowicz
+rdsmith@ (see 1st paragraph below) Daniel, I thought a bit more about the newly introduced ...
4 years, 11 months ago (2016-01-04 19:53:03 UTC) #9
Randy Smith (Not in Mondays)
On 2016/01/04 19:53:03, Łukasz Anforowicz wrote: > +rdsmith@ (see 1st paragraph below) > > Daniel, ...
4 years, 11 months ago (2016-01-05 19:06:05 UTC) #10
dcheng
https://codereview.chromium.org/1502563004/diff/120001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/1502563004/diff/120001/content/renderer/render_frame_impl.cc#newcode598 content/renderer/render_frame_impl.cc:598: int routing_id = GetRoutingIdForFrameOrProxy(const_cast<WebFrame*>(&frame)); I wonder if we'd be ...
4 years, 11 months ago (2016-01-12 00:10:47 UTC) #13
Łukasz Anforowicz
Daniel, can you take another look please? https://codereview.chromium.org/1502563004/diff/120001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/1502563004/diff/120001/content/renderer/render_frame_impl.cc#newcode598 content/renderer/render_frame_impl.cc:598: int routing_id ...
4 years, 11 months ago (2016-01-13 22:32:23 UTC) #14
dcheng
lgtm
4 years, 11 months ago (2016-01-13 22:40:42 UTC) #15
Łukasz Anforowicz
Randy, could you please take a look?
4 years, 11 months ago (2016-01-13 23:09:28 UTC) #17
Randy Smith (Not in Mondays)
Lukasz: Detailed review still in process, but I didn't see a response from you to ...
4 years, 11 months ago (2016-01-22 15:13:10 UTC) #18
Randy Smith (Not in Mondays)
Sorry I took so long--didn't actually take very long when I sat down and focussed ...
4 years, 11 months ago (2016-01-22 15:28:39 UTC) #19
Łukasz Anforowicz
Randy, I've replied to your feedback (thanks!) but haven't actually made changes in the CL ...
4 years, 11 months ago (2016-01-22 17:39:40 UTC) #21
Randy Smith (Not in Mondays)
> https://codereview.chromium.org/1502563004/diff/140001/content/browser/download/save_package.cc#newcode1037 > content/browser/download/save_package.cc:1037: if (routing_id == > MSG_ROUTING_NONE) > On 2016/01/22 15:28:39, Randy Smith ...
4 years, 11 months ago (2016-01-22 22:00:17 UTC) #22
Łukasz Anforowicz
https://codereview.chromium.org/1502563004/diff/140001/chrome/browser/download/save_page_browsertest.cc File chrome/browser/download/save_page_browsertest.cc (right): https://codereview.chromium.org/1502563004/diff/140001/chrome/browser/download/save_page_browsertest.cc#newcode1134 chrome/browser/download/save_page_browsertest.cc:1134: "a.com", "/save_page/frames-runtime-changes.htm?do_runtime_changes=1")); On 2016/01/22 17:39:39, Łukasz Anforowicz wrote: > ...
4 years, 11 months ago (2016-01-25 19:04:05 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1502563004/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1502563004/160001
4 years, 11 months ago (2016-01-25 19:06:31 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/138667)
4 years, 11 months ago (2016-01-25 19:19:02 UTC) #28
Łukasz Anforowicz
Nasko - could you please do an owners review for: content/renderer/dom_serializer_browsertest.cc content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.h ?
4 years, 11 months ago (2016-01-25 19:30:45 UTC) #29
nasko
content/renderer/dom_serializer_browsertest.cc content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.h LGTM with a couple of nits. https://codereview.chromium.org/1502563004/diff/160001/content/renderer/dom_serializer_browsertest.cc File content/renderer/dom_serializer_browsertest.cc (right): https://codereview.chromium.org/1502563004/diff/160001/content/renderer/dom_serializer_browsertest.cc#newcode168 content/renderer/dom_serializer_browsertest.cc:168: ...
4 years, 11 months ago (2016-01-25 21:26:43 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1502563004/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1502563004/200001
4 years, 11 months ago (2016-01-25 22:11:54 UTC) #33
Łukasz Anforowicz
Ooops, I forgot to publish my comments before pushing to CQ. Better late than never? ...
4 years, 11 months ago (2016-01-25 23:11:37 UTC) #34
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years, 11 months ago (2016-01-25 23:55:59 UTC) #35
commit-bot: I haz the power
4 years, 11 months ago (2016-01-25 23:59:04 UTC) #37
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/777a7dd63a55b297f0c9543f1892cecb54505a1f
Cr-Commit-Position: refs/heads/master@{#371349}

Powered by Google App Engine
This is Rietveld 408576698