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

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

Issue 2669723002: Fix more partially hidden articles (Closed)
Patch Set: don't rely on article Created 3 years, 11 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 | javatests/org/chromium/distiller/webdocument/DomConverterTest.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: java/org/chromium/distiller/webdocument/DomConverter.java
diff --git a/java/org/chromium/distiller/webdocument/DomConverter.java b/java/org/chromium/distiller/webdocument/DomConverter.java
index 0157fbc1bd75577910375e4b01e151297cbb3b23..56fee56e243ae57f901c42e500581d26bdc3277f 100644
--- a/java/org/chromium/distiller/webdocument/DomConverter.java
+++ b/java/org/chromium/distiller/webdocument/DomConverter.java
@@ -96,17 +96,23 @@ public class DomConverter implements DomWalker.Visitor {
boolean keepAnyway = false;
boolean hasHiddenClassName = false;
if (!visible) {
+ // Process more hidden elements in a marked article in mobile-friendly pages
+ // because some sites hide the lower part of the article.
if (isMobileFriendly && hasArticleElement) {
if (!isHiddenClass) {
hasHiddenClassName = DomUtil.hasClassName(e, "hidden");
}
if (isHiddenClass || hasHiddenClassName) {
- // Process more hidden elements in a marked article in mobile-friendly pages
- // because some sites hide the lower part of the article.
// See crbug.com/599121
keepAnyway = true;
}
}
+ if (isMobileFriendly) {
+ if (e.getAttribute("class").contains("continue")) {
+ // See crbug.com/687071
+ keepAnyway = true;
+ }
+ }
}
logVisibilityInfo(e, visible || keepAnyway);
if (!visible && !keepAnyway) {
« no previous file with comments | « no previous file | javatests/org/chromium/distiller/webdocument/DomConverterTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698