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

Issue 1015463004: Consistent content placement method for dom-distiller (Closed)

Created:
5 years, 9 months ago by mdjones
Modified:
5 years, 8 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Consistent content placement method for dom-distiller This change introduces a consistent method of placing content on the page (via JavaScript and the function "addToPage()"). The content is no longer in the HTML template by default. This fixes a bug with the loading icon not appearing until after the second page of a multi-page article. Error pages have content placed by a web new observer. BUG= Committed: https://crrev.com/83653dd1da59dfa7ddd9e48d4cd507a11cefd968 Cr-Commit-Position: refs/heads/master@{#323527}

Patch Set 1 #

Patch Set 2 : Nits and cl format #

Patch Set 3 : Add test #

Patch Set 4 : Bug fix & related cleanup #

Total comments: 2

Patch Set 5 : Template observer #

Total comments: 2

Patch Set 6 : Use single observer #

Total comments: 2

Patch Set 7 : Clean up pointers #

Patch Set 8 : Comments #

Patch Set 9 : More concise fix #

Patch Set 10 : Fix IOS version of code #

Total comments: 4

Patch Set 11 : IOS content fix #

Total comments: 4

Patch Set 12 : Todos #

Patch Set 13 : Handle IOS string correctly #

Patch Set 14 : Revert ios code #

Unified diffs Side-by-side diffs Delta from patch set Stats (+154 lines, -140 lines) Patch
M chrome/browser/dom_distiller/dom_distiller_viewer_source_browsertest.cc View 1 2 2 chunks +25 lines, -0 lines 0 comments Download
M components/dom_distiller/content/distiller_page_web_contents_browsertest.cc View 1 2 3 1 chunk +11 lines, -81 lines 0 comments Download
M components/dom_distiller/content/dom_distiller_viewer_source.cc View 1 2 3 4 5 6 7 8 9 10 11 9 chunks +35 lines, -20 lines 0 comments Download
M components/dom_distiller/core/html/dom_distiller_viewer.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +4 lines, -4 lines 0 comments Download
M components/dom_distiller/core/viewer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +14 lines, -5 lines 0 comments Download
M components/dom_distiller/core/viewer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 8 chunks +65 lines, -30 lines 0 comments Download

Messages

Total messages: 45 (15 generated)
mdjones
5 years, 9 months ago (2015-03-18 15:14:15 UTC) #2
cjhopman
https://codereview.chromium.org/1015463004/diff/60001/components/dom_distiller/content/dom_distiller_viewer_source.cc File components/dom_distiller/content/dom_distiller_viewer_source.cc (right): https://codereview.chromium.org/1015463004/diff/60001/components/dom_distiller/content/dom_distiller_viewer_source.cc#newcode36 components/dom_distiller/content/dom_distiller_viewer_source.cc:36: class WebContentsErrorObserver If distillation returned really really fast, could ...
5 years, 9 months ago (2015-03-21 02:33:22 UTC) #3
mdjones
https://codereview.chromium.org/1015463004/diff/60001/components/dom_distiller/content/dom_distiller_viewer_source.cc File components/dom_distiller/content/dom_distiller_viewer_source.cc (right): https://codereview.chromium.org/1015463004/diff/60001/components/dom_distiller/content/dom_distiller_viewer_source.cc#newcode36 components/dom_distiller/content/dom_distiller_viewer_source.cc:36: class WebContentsErrorObserver On 2015/03/21 02:33:22, cjhopman wrote: > If ...
5 years, 9 months ago (2015-03-24 01:32:42 UTC) #4
cjhopman
https://codereview.chromium.org/1015463004/diff/80001/components/dom_distiller/content/dom_distiller_viewer_source.cc File components/dom_distiller/content/dom_distiller_viewer_source.cc (right): https://codereview.chromium.org/1015463004/diff/80001/components/dom_distiller/content/dom_distiller_viewer_source.cc#newcode309 components/dom_distiller/content/dom_distiller_viewer_source.cc:309: SendJavaScript(viewer::GetUnsafeIncrementalDistilledPageJs(&page, false)); Isn't it possible now that the second ...
5 years, 9 months ago (2015-03-24 01:45:36 UTC) #5
mdjones
I have consolidated the two observers but think the potential script execution order problem should ...
5 years, 9 months ago (2015-03-24 18:41:32 UTC) #6
mdjones
https://codereview.chromium.org/1015463004/diff/80001/components/dom_distiller/content/dom_distiller_viewer_source.cc File components/dom_distiller/content/dom_distiller_viewer_source.cc (right): https://codereview.chromium.org/1015463004/diff/80001/components/dom_distiller/content/dom_distiller_viewer_source.cc#newcode309 components/dom_distiller/content/dom_distiller_viewer_source.cc:309: SendJavaScript(viewer::GetUnsafeIncrementalDistilledPageJs(&page, false)); On 2015/03/24 01:45:36, cjhopman wrote: > Isn't ...
5 years, 9 months ago (2015-03-24 18:42:52 UTC) #7
cjhopman
https://codereview.chromium.org/1015463004/diff/100001/components/dom_distiller/content/dom_distiller_viewer_source.cc File components/dom_distiller/content/dom_distiller_viewer_source.cc (right): https://codereview.chromium.org/1015463004/diff/100001/components/dom_distiller/content/dom_distiller_viewer_source.cc#newcode368 components/dom_distiller/content/dom_distiller_viewer_source.cc:368: WebContentsTemplateObserver* template_observer = Who owns this? When is it ...
5 years, 9 months ago (2015-03-25 02:30:50 UTC) #8
mdjones
https://codereview.chromium.org/1015463004/diff/100001/components/dom_distiller/content/dom_distiller_viewer_source.cc File components/dom_distiller/content/dom_distiller_viewer_source.cc (right): https://codereview.chromium.org/1015463004/diff/100001/components/dom_distiller/content/dom_distiller_viewer_source.cc#newcode368 components/dom_distiller/content/dom_distiller_viewer_source.cc:368: WebContentsTemplateObserver* template_observer = On 2015/03/25 02:30:50, cjhopman wrote: > ...
5 years, 9 months ago (2015-03-25 21:29:21 UTC) #9
mdjones
This is a more concise fix that uses the existing observer rather than a new ...
5 years, 9 months ago (2015-03-26 22:17:41 UTC) #10
cjhopman
lgtm
5 years, 9 months ago (2015-03-26 22:23:40 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1015463004/160001
5 years, 9 months ago (2015-03-26 22:28:59 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/9100)
5 years, 9 months ago (2015-03-26 22:33:19 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1015463004/170001
5 years, 9 months ago (2015-03-26 22:54:50 UTC) #18
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/52225)
5 years, 9 months ago (2015-03-26 23:01:13 UTC) #20
mdjones
+noyau I have added you to the list of reviewers because my changes require affect ...
5 years, 9 months ago (2015-03-27 00:37:40 UTC) #22
cjhopman
https://codereview.chromium.org/1015463004/diff/170001/ios/chrome/browser/dom_distiller/distiller_viewer.cc File ios/chrome/browser/dom_distiller/distiller_viewer.cc (right): https://codereview.chromium.org/1015463004/diff/170001/ios/chrome/browser/dom_distiller/distiller_viewer.cc#newcode42 ios/chrome/browser/dom_distiller/distiller_viewer.cc:42: &article_proto->pages(0), distilled_page_prefs_->GetTheme(), It looks like your change will make ...
5 years, 9 months ago (2015-03-27 00:45:15 UTC) #23
cjhopman
https://codereview.chromium.org/1015463004/diff/170001/ios/chrome/browser/dom_distiller/distiller_viewer.cc File ios/chrome/browser/dom_distiller/distiller_viewer.cc (right): https://codereview.chromium.org/1015463004/diff/170001/ios/chrome/browser/dom_distiller/distiller_viewer.cc#newcode42 ios/chrome/browser/dom_distiller/distiller_viewer.cc:42: &article_proto->pages(0), distilled_page_prefs_->GetTheme(), On 2015/03/27 00:45:15, cjhopman wrote: > It ...
5 years, 9 months ago (2015-03-27 00:48:33 UTC) #24
mdjones
https://codereview.chromium.org/1015463004/diff/170001/ios/chrome/browser/dom_distiller/distiller_viewer.cc File ios/chrome/browser/dom_distiller/distiller_viewer.cc (right): https://codereview.chromium.org/1015463004/diff/170001/ios/chrome/browser/dom_distiller/distiller_viewer.cc#newcode42 ios/chrome/browser/dom_distiller/distiller_viewer.cc:42: &article_proto->pages(0), distilled_page_prefs_->GetTheme(), On 2015/03/27 00:45:15, cjhopman wrote: > It ...
5 years, 8 months ago (2015-03-30 23:12:27 UTC) #25
noyau (Ping after 24h)
https://codereview.chromium.org/1015463004/diff/190001/components/dom_distiller/content/dom_distiller_viewer_source.cc File components/dom_distiller/content/dom_distiller_viewer_source.cc (right): https://codereview.chromium.org/1015463004/diff/190001/components/dom_distiller/content/dom_distiller_viewer_source.cc#newcode232 components/dom_distiller/content/dom_distiller_viewer_source.cc:232: } This logic needs to be moved into a ...
5 years, 8 months ago (2015-04-01 11:42:08 UTC) #26
mdjones
https://codereview.chromium.org/1015463004/diff/190001/components/dom_distiller/content/dom_distiller_viewer_source.cc File components/dom_distiller/content/dom_distiller_viewer_source.cc (right): https://codereview.chromium.org/1015463004/diff/190001/components/dom_distiller/content/dom_distiller_viewer_source.cc#newcode232 components/dom_distiller/content/dom_distiller_viewer_source.cc:232: } On 2015/04/01 11:42:08, noyau wrote: > This logic ...
5 years, 8 months ago (2015-04-01 22:25:34 UTC) #27
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1015463004/210001
5 years, 8 months ago (2015-04-02 01:02:56 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device_ninja/builds/53519)
5 years, 8 months ago (2015-04-02 01:10:30 UTC) #32
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1015463004/230001
5 years, 8 months ago (2015-04-02 02:08:16 UTC) #35
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/53543)
5 years, 8 months ago (2015-04-02 02:18:54 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1015463004/250001
5 years, 8 months ago (2015-04-02 16:45:22 UTC) #40
commit-bot: I haz the power
Committed patchset #14 (id:250001)
5 years, 8 months ago (2015-04-02 17:26:37 UTC) #41
noyau (Ping after 24h)
On 2015/04/01 22:25:34, mdjones wrote: > https://codereview.chromium.org/1015463004/diff/190001/components/dom_distiller/content/dom_distiller_viewer_source.cc > File components/dom_distiller/content/dom_distiller_viewer_source.cc (right): > > https://codereview.chromium.org/1015463004/diff/190001/components/dom_distiller/content/dom_distiller_viewer_source.cc#newcode232 > ...
5 years, 8 months ago (2015-04-02 17:53:21 UTC) #42
chromium-reviews
I will resubmit the IOS stuff once all the feedback changes that depended on this ...
5 years, 8 months ago (2015-04-02 18:08:06 UTC) #43
cjhopman
On 2015/04/02 17:53:21, noyau wrote: > On 2015/04/01 22:25:34, mdjones wrote: > > > https://codereview.chromium.org/1015463004/diff/190001/components/dom_distiller/content/dom_distiller_viewer_source.cc ...
5 years, 8 months ago (2015-04-02 18:12:54 UTC) #44
commit-bot: I haz the power
5 years, 8 months ago (2015-04-03 20:27:20 UTC) #45
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/83653dd1da59dfa7ddd9e48d4cd507a11cefd968
Cr-Commit-Position: refs/heads/master@{#323527}

Powered by Google App Engine
This is Rietveld 408576698