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

Issue 68613003: Merges the two different page serializers (Closed)

Created:
7 years, 1 month ago by Tiger
Modified:
7 years ago
Reviewers:
abarth-chromium
CC:
blink-reviews, dglazkov+blink, eae+blinkwatch, adamk+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

This review merges the two existing page serializers, WebPageSerializerImpl and PageSerializer, into one, PageSerializer. In addition to this it moves all the old tests from WebPageNewSerializerTest and WebPageSerializerTest to the PageSerializerTest structure and splits out one test for MHTML into a new MHTMLTest file. Saving as 'Webpage, Complete', 'Webpage, HTML Only' and as MHTML when the 'Save Page as MHTML' flag is enabled now uses the same code, and should thus have the same feature set. Meaning that both modes now should be a bit better. Detailed list of changes: - PageSerializerTest: Prepare for more DTD test - PageSerializerTest: Remove now unneccesary input image test - PageSerializerTest: Remove unused WebPageSerializer/Impl code - PageSerializerTest: Move data URI morph test - PageSerializerTest: Move data URI test - PageSerializerTest: Move namespace test - PageSerializerTest: Move SVG Image test - MHTMLTest: Move MHTML specific test to own test file - PageSerializerTest: Delete duplicate XML header test - PageSerializerTest: Move blank frame test - PageSerializerTest: Move CSS test - PageSerializerTest: Add frameset/frame test - PageSerializerTest: Move old iframe test - PageSerializerTest: Move old elements test - Use PageSerizer for saving web pages - PageSerializerTest: Test for rewriting links - PageSerializer: Add rewrite link accumulator - PageSerializer: Serialize images in iframes/frames src - PageSerializer: XHTML fix for meta tags - PageSerializer: Add presentation CSS - PageSerializer: Rename out parameter BUG=328354 R=abarth@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=162155 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=162294 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=164094

Patch Set 1 #

Total comments: 15

Patch Set 2 : Fix Review Issues #

Total comments: 6

Patch Set 3 : Rebase + review fixes #

Patch Set 4 : Fix outside test using pageserializer resources #

Patch Set 5 : Add back test functions #

Patch Set 6 : Rebase and fixes #

Patch Set 7 : IFrames object/embed not working anymore, added FIXMEs #

Patch Set 8 : Rebase #

Patch Set 9 : Remove newline after XML decl #

Unified diffs Side-by-side diffs Delta from patch set Stats (+717 lines, -2012 lines) Patch
M Source/core/dom/Element.h View 1 2 3 4 5 6 7 2 chunks +1 line, -2 lines 0 comments Download
M Source/core/editing/MarkupAccumulator.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/page/PageSerializer.h View 1 2 2 chunks +7 lines, -1 line 0 comments Download
M Source/core/page/PageSerializer.cpp View 1 2 3 4 5 6 7 8 chunks +119 lines, -24 lines 0 comments Download
M Source/web/WebPageSerializer.cpp View 1 2 3 4 3 chunks +15 lines, -160 lines 0 comments Download
D Source/web/WebPageSerializerImpl.h View 1 chunk +0 lines, -192 lines 0 comments Download
D Source/web/WebPageSerializerImpl.cpp View 1 2 1 chunk +0 lines, -527 lines 0 comments Download
A Source/web/tests/MHTMLTest.cpp View 1 2 1 chunk +169 lines, -0 lines 0 comments Download
M Source/web/tests/PageSerializerTest.cpp View 1 2 3 4 5 6 7 chunks +279 lines, -14 lines 0 comments Download
M Source/web/tests/WebFrameTest.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
D Source/web/tests/WebPageNewSerializerTest.cpp View 1 2 3 4 5 1 chunk +0 lines, -449 lines 0 comments Download
D Source/web/tests/WebPageSerializerTest.cpp View 1 2 3 4 5 1 chunk +0 lines, -202 lines 0 comments Download
D Source/web/tests/data/pageserialization/awesome.png View Binary file 0 comments Download
D Source/web/tests/data/pageserialization/beautifull.css View 1 chunk +0 lines, -1 line 0 comments Download
D Source/web/tests/data/pageserialization/embed_iframe.html View 1 chunk +0 lines, -5 lines 0 comments Download
D Source/web/tests/data/pageserialization/object_iframe.html View 1 chunk +0 lines, -5 lines 0 comments Download
D Source/web/tests/data/pageserialization/simple_iframe.html View 1 chunk +0 lines, -14 lines 0 comments Download
D Source/web/tests/data/pageserialization/simple_page.html View 1 chunk +0 lines, -50 lines 0 comments Download
D Source/web/tests/data/pageserialization/top_frame.html View 1 chunk +0 lines, -28 lines 0 comments Download
D Source/web/tests/data/pageserializer/blank_frames.html View 1 chunk +0 lines, -37 lines 0 comments Download
D Source/web/tests/data/pageserializer/blue_background.png View Binary file 0 comments Download
A + Source/web/tests/data/pageserializer/css/css_test_page.html View 1 chunk +3 lines, -5 lines 0 comments Download
A Source/web/tests/data/pageserializer/css/image.png View Binary file 0 comments Download
A + Source/web/tests/data/pageserializer/css/import_style_from_link.css View 0 chunks +-1 lines, --1 lines 0 comments Download
A + Source/web/tests/data/pageserializer/css/import_styles.css View 0 chunks +-1 lines, --1 lines 0 comments Download
A + Source/web/tests/data/pageserializer/css/link_styles.css View 0 chunks +-1 lines, --1 lines 0 comments Download
D Source/web/tests/data/pageserializer/css_test_page.html View 1 chunk +0 lines, -110 lines 0 comments Download
A + Source/web/tests/data/pageserializer/datauri/page_with_data.html View 1 chunk +4 lines, -3 lines 0 comments Download
A + Source/web/tests/data/pageserializer/datauri/page_with_morphing_data.html View 1 chunk +3 lines, -3 lines 0 comments Download
D Source/web/tests/data/pageserializer/dtd/dtd.html View 1 chunk +0 lines, -10 lines 0 comments Download
A + Source/web/tests/data/pageserializer/dtd/html5.html View 1 chunk +2 lines, -2 lines 0 comments Download
A Source/web/tests/data/pageserializer/elements/elements.html View 1 chunk +45 lines, -0 lines 0 comments Download
A Source/web/tests/data/pageserializer/elements/image.png View Binary file 0 comments Download
A Source/web/tests/data/pageserializer/elements/style.css View 1 chunk +3 lines, -0 lines 0 comments Download
A Source/web/tests/data/pageserializer/elements/text.txt View 1 chunk +1 line, -0 lines 0 comments Download
A + Source/web/tests/data/pageserializer/frames/blank_frames.html View 2 chunks +3 lines, -4 lines 0 comments Download
A + Source/web/tests/data/pageserializer/frames/embed_iframe.html View 1 chunk +0 lines, -2 lines 0 comments Download
A Source/web/tests/data/pageserializer/frames/image.png View Binary file 0 comments Download
A + Source/web/tests/data/pageserializer/frames/object_iframe.html View 1 chunk +0 lines, -2 lines 0 comments Download
A Source/web/tests/data/pageserializer/frames/simple_frames.html View 1 chunk +14 lines, -0 lines 0 comments Download
A + Source/web/tests/data/pageserializer/frames/simple_frames_1.html View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
A + Source/web/tests/data/pageserializer/frames/simple_frames_3.html View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
A Source/web/tests/data/pageserializer/frames/simple_frames_top.html View 1 chunk +7 lines, -0 lines 0 comments Download
A + Source/web/tests/data/pageserializer/frames/simple_iframe.html View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
A + Source/web/tests/data/pageserializer/frames/top_frame.html View 1 chunk +7 lines, -14 lines 0 comments Download
D Source/web/tests/data/pageserializer/green_background.png View Binary file 0 comments Download
D Source/web/tests/data/pageserializer/green_rectangle.svg View 1 chunk +0 lines, -11 lines 0 comments Download
D Source/web/tests/data/pageserializer/iframe.html View 1 chunk +0 lines, -9 lines 0 comments Download
D Source/web/tests/data/pageserializer/iframe2.html View 1 chunk +0 lines, -9 lines 0 comments Download
D Source/web/tests/data/pageserializer/import_style_from_link.css View 1 chunk +0 lines, -3 lines 0 comments Download
D Source/web/tests/data/pageserializer/import_styles.css View 1 chunk +0 lines, -3 lines 0 comments Download
D Source/web/tests/data/pageserializer/input-image/button.png View Binary file 0 comments Download
D Source/web/tests/data/pageserializer/input-image/input-image.html View 1 chunk +0 lines, -25 lines 0 comments Download
D Source/web/tests/data/pageserializer/link_styles.css View 1 chunk +0 lines, -5 lines 0 comments Download
A + Source/web/tests/data/pageserializer/namespace/namespace_element.html View 1 chunk +3 lines, -0 lines 0 comments Download
D Source/web/tests/data/pageserializer/namespace_element.html View 1 chunk +0 lines, -11 lines 0 comments Download
D Source/web/tests/data/pageserializer/ol-dot.png View Binary file 0 comments Download
D Source/web/tests/data/pageserializer/orange_background.png View Binary file 0 comments Download
D Source/web/tests/data/pageserializer/page_with_data.html View 1 chunk +0 lines, -9 lines 0 comments Download
D Source/web/tests/data/pageserializer/page_with_morphing_data.html View 1 chunk +0 lines, -9 lines 0 comments Download
D Source/web/tests/data/pageserializer/page_with_svg_image.html View 1 chunk +0 lines, -6 lines 0 comments Download
D Source/web/tests/data/pageserializer/purple_background.png View Binary file 0 comments Download
D Source/web/tests/data/pageserializer/red_background.png View Binary file 0 comments Download
A Source/web/tests/data/pageserializer/rewritelinks/image.png View Binary file 0 comments Download
A Source/web/tests/data/pageserializer/rewritelinks/rewritelinks_base.html View 1 chunk +13 lines, -0 lines 0 comments Download
A Source/web/tests/data/pageserializer/rewritelinks/rewritelinks_simple.html View 1 chunk +9 lines, -0 lines 0 comments Download
D Source/web/tests/data/pageserializer/simple.xhtml View 1 chunk +0 lines, -10 lines 0 comments Download
A + Source/web/tests/data/pageserializer/svg/green_rectangle.svg View 0 chunks +-1 lines, --1 lines 0 comments Download
A + Source/web/tests/data/pageserializer/svg/page_with_svg_image.html View 1 chunk +3 lines, -0 lines 0 comments Download
D Source/web/tests/data/pageserializer/top_frame.html View 1 chunk +0 lines, -12 lines 0 comments Download
D Source/web/tests/data/pageserializer/ul-dot.png View Binary file 0 comments Download
A + Source/web/tests/data/pageserializer/xml/simple.xhtml View 0 chunks +-1 lines, --1 lines 0 comments Download
A + Source/web/tests/data/pageserializer/xml/xmldecl.xml View 0 chunks +-1 lines, --1 lines 0 comments Download
D Source/web/tests/data/pageserializer/xmldecl/xmldecl.xml View 1 chunk +0 lines, -5 lines 0 comments Download
D Source/web/tests/data/pageserializer/yellow_background.png View Binary file 0 comments Download
M Source/web/web.gypi View 1 2 3 4 5 6 7 4 chunks +1 line, -6 lines 0 comments Download
M public/web/WebPageSerializer.h View 1 2 3 4 1 chunk +5 lines, -13 lines 0 comments Download
M public/web/WebPageSerializerClient.h View 1 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 32 (0 generated)
abarth-chromium
This looks great!!! Thank you for paying down this debt. LGTM. https://codereview.chromium.org/68613003/diff/1/Source/core/page/PageSerializer.cpp File Source/core/page/PageSerializer.cpp (right): ...
7 years, 1 month ago (2013-11-14 16:55:02 UTC) #1
Tiger
On 2013/11/14 16:55:02, abarth wrote: > This looks great!!! Thank you for paying down this ...
7 years, 1 month ago (2013-11-15 11:07:27 UTC) #2
abarth-chromium
On 2013/11/15 11:07:27, Tiger wrote: > One could probably spend a bit more time refactoring ...
7 years, 1 month ago (2013-11-15 15:53:56 UTC) #3
abarth-chromium
LGTM I'm going to put this in the CQ so that it lands, but would ...
7 years, 1 month ago (2013-11-15 15:58:50 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tiger@opera.com/68613003/120001
7 years, 1 month ago (2013-11-15 15:59:03 UTC) #5
commit-bot: I haz the power
Retried try job too often on linux_blink for step(s) blink_platform_unittests, webkit_lint, webkit_python_tests, webkit_tests, webkit_unit_tests, wtf_unittests ...
7 years, 1 month ago (2013-11-15 16:48:21 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tiger@opera.com/68613003/360001
7 years, 1 month ago (2013-11-15 23:46:33 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tiger@opera.com/68613003/360001
7 years, 1 month ago (2013-11-16 00:16:05 UTC) #8
commit-bot: I haz the power
Retried try job too often on linux_blink_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_blink_rel&number=12791
7 years, 1 month ago (2013-11-16 01:37:31 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tiger@opera.com/68613003/630001
7 years, 1 month ago (2013-11-16 13:09:21 UTC) #10
commit-bot: I haz the power
Change committed as 162155
7 years, 1 month ago (2013-11-16 15:15:04 UTC) #11
eae
This change broke compilation on all platforms, reverted in r162156.
7 years, 1 month ago (2013-11-16 19:19:03 UTC) #12
abarth-chromium
On 2013/11/16 19:19:03, eae wrote: > This change broke compilation on all platforms, reverted in ...
7 years, 1 month ago (2013-11-16 20:37:40 UTC) #13
eae
On 2013/11/16 20:37:40, abarth wrote: > On 2013/11/16 19:19:03, eae wrote: > > This change ...
7 years, 1 month ago (2013-11-17 00:36:17 UTC) #14
Tiger
On 2013/11/17 00:36:17, eae wrote: > On 2013/11/16 20:37:40, abarth wrote: > > On 2013/11/16 ...
7 years, 1 month ago (2013-11-19 11:24:13 UTC) #15
Tiger
On 2013/11/19 11:24:13, Tiger wrote: > On 2013/11/17 00:36:17, eae wrote: > > On 2013/11/16 ...
7 years, 1 month ago (2013-11-19 11:25:03 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tiger@opera.com/68613003/770001
7 years, 1 month ago (2013-11-19 11:25:22 UTC) #17
commit-bot: I haz the power
Change committed as 162294
7 years, 1 month ago (2013-11-19 12:46:15 UTC) #18
abarth-chromium
On 2013/11/19 11:24:13, Tiger wrote: > The problem was that there are unit test for ...
7 years, 1 month ago (2013-11-19 15:52:30 UTC) #19
jamesr
On 2013/11/19 15:52:30, abarth wrote: > On 2013/11/19 11:24:13, Tiger wrote: > > The problem ...
7 years, 1 month ago (2013-11-21 20:44:18 UTC) #20
abarth-chromium
On 2013/11/21 20:44:18, jamesr wrote: > On 2013/11/19 15:52:30, abarth wrote: > > If we're ...
7 years, 1 month ago (2013-11-21 20:50:05 UTC) #21
Tiger
On 2013/11/21 20:44:18, jamesr wrote: > On 2013/11/19 15:52:30, abarth wrote: > > On 2013/11/19 ...
7 years, 1 month ago (2013-11-21 22:09:24 UTC) #22
Tiger
I got this up and running in a VM, test are flaky here (Ubuntu 32-bit, ...
7 years ago (2013-12-13 12:19:55 UTC) #23
Tiger
On 2013/12/13 12:19:55, Tiger wrote: > I got this up and running in a VM, ...
7 years ago (2013-12-17 09:24:33 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tiger@opera.com/68613003/1150001
7 years ago (2013-12-17 09:25:21 UTC) #25
commit-bot: I haz the power
Failed to apply patch for Source/core/page/PageSerializer.cpp: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years ago (2013-12-17 09:25:41 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tiger@opera.com/68613003/1170001
7 years ago (2013-12-17 12:24:33 UTC) #27
commit-bot: I haz the power
Retried try job too often on linux_blink_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_blink_rel&number=15644
7 years ago (2013-12-17 13:58:22 UTC) #28
Tiger
Waiting for more Chromium fixes in: https://codereview.chromium.org/106023004/
7 years ago (2013-12-17 21:04:07 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tiger@opera.com/68613003/1180001
7 years ago (2013-12-18 13:15:42 UTC) #30
commit-bot: I haz the power
Change committed as 164094
7 years ago (2013-12-18 15:36:36 UTC) #31
abarth-chromium
7 years ago (2013-12-19 07:43:14 UTC) #32
Message was sent while issue was closed.
sgtm

Powered by Google App Engine
This is Rietveld 408576698