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

Unified Diff: java/org/chromium/distiller/webdocument/WebDocument.java

Issue 2203563002: Extract image URLs in srcset as well (Closed) Base URL: git@github.com:chromium/dom-distiller.git@master
Patch Set: format Created 4 years, 5 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 | « java/org/chromium/distiller/DomUtil.java ('k') | java/org/chromium/distiller/webdocument/WebImage.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: java/org/chromium/distiller/webdocument/WebDocument.java
diff --git a/java/org/chromium/distiller/webdocument/WebDocument.java b/java/org/chromium/distiller/webdocument/WebDocument.java
index 021851baa3f4a138c09382fc7682b5030e4df40a..0b8f482e517d754a8e9f3a3387d3b3f8bed4d9d7 100644
--- a/java/org/chromium/distiller/webdocument/WebDocument.java
+++ b/java/org/chromium/distiller/webdocument/WebDocument.java
@@ -41,11 +41,12 @@ public class WebDocument {
return elements;
}
- public List<WebImage> getContentImages() {
- List<WebImage> images = new ArrayList<>();
+ public List<String> getImageUrls() {
+ List<String> images = new ArrayList<>();
for (WebElement e : elements) {
- if (e instanceof WebImage && e.getIsContent()) {
- images.add((WebImage) e);
+ if (!e.getIsContent()) continue;
+ if (e instanceof WebImage) {
+ images.addAll(((WebImage) e).getUrlList());
}
}
return images;
« no previous file with comments | « java/org/chromium/distiller/DomUtil.java ('k') | java/org/chromium/distiller/webdocument/WebImage.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698