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

Unified Diff: ios/chrome/browser/dom_distiller/distiller_viewer.cc

Issue 2754803003: Reading List iOS: Handle multiple pages. (Closed)
Patch Set: rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ios/chrome/browser/reading_list/reading_list_distiller_page.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 44edeb700c82b33fbae29f760fd301b3bf1542ee..f9fa0bfb7eed5677fc731415bc02a918129ad32f 100644
--- a/ios/chrome/browser/dom_distiller/distiller_viewer.cc
+++ b/ios/chrome/browser/dom_distiller/distiller_viewer.cc
@@ -68,9 +68,11 @@ void DistillerViewer::OnArticleReady(
article_proto->pages(0).html().empty();
if (!is_empty) {
std::vector<ImageInfo> images;
- for (int i = 0; i < article_proto->pages(0).image_size(); i++) {
- auto image = article_proto->pages(0).image(i);
- images.push_back(ImageInfo{GURL(image.url()), image.data()});
+ for (int p = 0; p < article_proto->pages_size(); p++) {
+ for (int i = 0; i < article_proto->pages(p).image_size(); i++) {
+ auto image = article_proto->pages(p).image(i);
+ images.push_back(ImageInfo{GURL(image.url()), image.data()});
+ }
}
const std::string html = viewer::GetUnsafeArticleTemplateHtml(
url_.spec(), distilled_page_prefs_->GetTheme(),
« no previous file with comments | « no previous file | ios/chrome/browser/reading_list/reading_list_distiller_page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698