Index: ios/chrome/browser/dom_distiller/distiller_viewer.cc |
diff --git a/ios/chrome/browser/dom_distiller/distiller_viewer.cc b/ios/chrome/browser/dom_distiller/distiller_viewer.cc |
index bf30950290303c6a3d4115fdb5eac1a290cf37f5..e72975aa3465fa45772d4e55e8b9b5da9d0e00ee 100644 |
--- a/ios/chrome/browser/dom_distiller/distiller_viewer.cc |
+++ b/ios/chrome/browser/dom_distiller/distiller_viewer.cc |
@@ -38,10 +38,16 @@ DistillerViewer::~DistillerViewer() { |
void DistillerViewer::OnArticleReady( |
const DistilledArticleProto* article_proto) { |
- const std::string html = viewer::GetUnsafeArticleHtml( |
- article_proto, distilled_page_prefs_->GetTheme(), |
+ const std::string html = viewer::GetUnsafeArticleTemplateHtml( |
+ &article_proto->pages(0), distilled_page_prefs_->GetTheme(), |
distilled_page_prefs_->GetFontFamily()); |
+ std::string content_js = viewer::GetUnsafeArticleContentJs(article_proto); |
+ // TODO(mdjones): This needs to eventually be placed somewhere better than |
+ // after the closing HTML tag. |
+ html += "<script>" + content_js + "</script>"; |
noyau (Ping after 24h)
2015/04/01 11:42:08
This is definitely not the right way to do this.
mdjones
2015/04/01 22:25:33
Done.
|
+ |
+ |
callback_.Run(url_, html); |
// No need to hold on to the ViewerHandle now that distillation is complete. |