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

Issue 1442733002: Save-Page-As-Complete-Html: Fixing how links are rewritten in subframes. (Closed)

Created:
5 years, 1 month ago by Łukasz Anforowicz
Modified:
5 years, 1 month ago
CC:
asanka, chromium-reviews, darin-cc_chromium.org, jam, site-isolation-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@multi-frame-tests
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Save-Page-As-Complete-Html: Fixing how links are rewritten in subframes. This CL fixes how links are rewritten in subframes, by tweaking save_package.cc to exclude the "directory" part from links rewritten for subframes (i.e. only links rewritten for the main frame should include the "directory" part). Rewriting of links in subframes has regressed in crrev.com/1320453004 [1], which stopped using "recursive" serialization mode of WebPageSerializerImpl. In "recursive" serialization mode only the main frame would use a non-empty directory name in WebPageSerializerImpl::serialize [2]. Note that crrev.com/1320453004 has initially landed in 47.0.2522.0. This regression meant that we used local links of the form "./foo_files/img.png" in all frames (i.e. in ./foo_files/subframe.htm) rather than only in the main frame (i.e. in foo.htm). Note that saving subframes had some issues also before the regression (i.e. 46.0.2490.80 has trouble saving https://anforowicz.github.io/nested-frames/index.htm as noted in crbug.com/554666), but the regression in crrev.com/1320453004 made things even worse... :-/ [1] See in crrev.com/1320453004/patch/180001/190008 how WebPageSerializer::serialize is called. [2] https://chromium.googlesource.com/chromium/src/+/11d41626fbe8e88fb507371df3beda99fce268a1/third_party/WebKit/Source/web/WebPageSerializerImpl.cpp#504 BUG=554666 Committed: https://crrev.com/0296979a51bf3e6347371c9b3432d7c90f73cec1 Cr-Commit-Position: refs/heads/master@{#359705}

Patch Set 1 #

Patch Set 2 : Rebasing... #

Patch Set 3 : Fixed the name of a test. #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+96 lines, -62 lines) Patch
M chrome/browser/download/save_page_browsertest.cc View 1 2 4 chunks +55 lines, -60 lines 3 comments Download
A chrome/test/data/save_page/frames-nested.htm View 1 chunk +23 lines, -0 lines 0 comments Download
A chrome/test/data/save_page/frames-nested2.htm View 1 chunk +13 lines, -0 lines 0 comments Download
M content/browser/download/save_package.cc View 1 chunk +5 lines, -2 lines 0 comments Download

Messages

Total messages: 23 (9 generated)
Łukasz Anforowicz
Asanka, can you take a look please?
5 years, 1 month ago (2015-11-12 18:14:32 UTC) #2
Łukasz Anforowicz
Asanka / Randy - ping :-) ? My apologies for pinging before the expected 24h ...
5 years, 1 month ago (2015-11-13 00:25:46 UTC) #3
asanka
I'm tagging in rdsmith@ who I hope isn't on a plane. Otherwise I'll familiarize myself ...
5 years, 1 month ago (2015-11-13 22:00:31 UTC) #5
Randy Smith (Not in Mondays)
On 2015/11/13 22:00:31, asanka wrote: > I'm tagging in rdsmith@ who I hope isn't on ...
5 years, 1 month ago (2015-11-13 22:18:32 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1442733002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1442733002/40001
5 years, 1 month ago (2015-11-13 22:20:51 UTC) #8
Randy Smith (Not in Mondays)
LGTM with nits below. https://codereview.chromium.org/1442733002/diff/40001/chrome/browser/download/save_page_browsertest.cc File chrome/browser/download/save_page_browsertest.cc (right): https://codereview.chromium.org/1442733002/diff/40001/chrome/browser/download/save_page_browsertest.cc#newcode982 chrome/browser/download/save_page_browsertest.cc:982: // as MHTML (crbug.com/539936). I ...
5 years, 1 month ago (2015-11-13 22:39:07 UTC) #9
Łukasz Anforowicz
Thanks for reviewing Randy. I hope you won't mind if I push this out to ...
5 years, 1 month ago (2015-11-13 22:55:05 UTC) #10
Randy Smith (Not in Mondays)
On 2015/11/13 22:55:05, Łukasz Anforowicz wrote: > Thanks for reviewing Randy. I hope you won't ...
5 years, 1 month ago (2015-11-13 23:02:13 UTC) #11
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 1 month ago (2015-11-14 00:05:57 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1442733002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1442733002/40001
5 years, 1 month ago (2015-11-14 00:09:02 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1442733002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1442733002/40001
5 years, 1 month ago (2015-11-14 00:11:16 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1442733002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1442733002/40001
5 years, 1 month ago (2015-11-14 00:36:00 UTC) #21
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 1 month ago (2015-11-14 00:48:34 UTC) #22
commit-bot: I haz the power
5 years, 1 month ago (2015-11-14 00:49:27 UTC) #23
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/0296979a51bf3e6347371c9b3432d7c90f73cec1
Cr-Commit-Position: refs/heads/master@{#359705}

Powered by Google App Engine
This is Rietveld 408576698