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

Issue 1248643004: Test distillability without JavaScript (Closed)

Created:
5 years, 5 months ago by wychen
Modified:
4 years, 10 months ago
CC:
chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, jam, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@early
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Test distillability without JavaScript In order to save memory usage, a native version of feature extraction is used for distillability test. The features are inspired by the original extract_features.js code. Some tests are moved from components_browsertests to browser_tests because DistillabilityAgent() is created in chrome layer renderer. BUG=509869 TEST=browser_tests --gtest_filter="Distillable*" TEST=components_browsertests --gtest_filter="DomDistillerDistillablePageUtilsTest.*" TEST=components_unittests --gtest_filter="DomDistillerPageFeaturesTest*"

Patch Set 1 #

Patch Set 2 : merge master #

Patch Set 3 : fix merge and add webkit #

Patch Set 4 : move IPC to components content #

Patch Set 5 : fix gn build #

Patch Set 6 : fix gn deps #

Patch Set 7 : fix gyp dependencies #

Patch Set 8 : move tests, remove dbg msg #

Total comments: 12

Patch Set 9 : address mdjones' comments, fix deps #

Patch Set 10 : merge master #

Patch Set 11 : webkit impl, send features up to driver #

Patch Set 12 : fix oopsies #

Total comments: 16

Patch Set 13 : address comments from dglazkov #

Patch Set 14 : draft (WIP) #

Patch Set 15 : update model, functionally correct locally #

Total comments: 7

Patch Set 16 : address mdjones' comments, mobile-friendliness check, merge blink changes #

Patch Set 17 : fix browsertest, merge webkit CL, merge http://crrev.com/1403413004 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1143 lines, -754 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/ReaderModeManager.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 chunks +11 lines, -23 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +2 lines, -0 lines 0 comments Download
A chrome/browser/dom_distiller/distillable_page_utils_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +154 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/print_preview/print_preview_handler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/browser/ui/webui/print_preview/print_preview_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +1 line, -11 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M chrome/renderer/chrome_content_renderer_client.cc View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -0 lines 0 comments Download
A + chrome/test/data/dom_distiller/non_og_article.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/test/data/dom_distiller/og_article.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 0 chunks +-1 lines, --1 lines 0 comments Download
M chrome/test/data/dom_distiller/simple_article.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +6 lines, -0 lines 0 comments Download
M components/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -1 line 0 comments Download
M components/components_tests.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -1 line 0 comments Download
M components/dom_distiller.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 7 chunks +28 lines, -2 lines 0 comments Download
M components/dom_distiller/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M components/dom_distiller/android/java/src/org/chromium/components/dom_distiller/content/DistillablePageUtils.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +7 lines, -8 lines 0 comments Download
M components/dom_distiller/content/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +25 lines, -0 lines 0 comments Download
M components/dom_distiller/content/DEPS View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
A components/dom_distiller/content/browser/distillability_driver.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +43 lines, -0 lines 0 comments Download
A components/dom_distiller/content/browser/distillability_driver.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +58 lines, -0 lines 0 comments Download
M components/dom_distiller/content/browser/distillable_page_utils.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -16 lines 0 comments Download
M components/dom_distiller/content/browser/distillable_page_utils.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +9 lines, -75 lines 0 comments Download
M components/dom_distiller/content/browser/distillable_page_utils_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +14 lines, -15 lines 0 comments Download
M components/dom_distiller/content/browser/distillable_page_utils_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -179 lines 0 comments Download
A components/dom_distiller/content/common/distiller_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +19 lines, -0 lines 0 comments Download
A + components/dom_distiller/content/common/distiller_messages.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +6 lines, -6 lines 0 comments Download
A components/dom_distiller/content/renderer/distillability_agent.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +24 lines, -0 lines 0 comments Download
A components/dom_distiller/content/renderer/distillability_agent.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +118 lines, -0 lines 0 comments Download
M components/dom_distiller/core/data/distillable_page_model.bin View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Binary file 0 comments Download
M components/dom_distiller/core/page_features.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +12 lines, -20 lines 0 comments Download
M components/dom_distiller/core/page_features.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +31 lines, -107 lines 0 comments Download
M components/dom_distiller/core/page_features_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +72 lines, -75 lines 0 comments Download
D components/test/data/dom_distiller/core_features.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -1 line 0 comments Download
D components/test/data/dom_distiller/derived_features.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -194 lines 0 comments Download
D components/test/data/dom_distiller/non_og_article.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -8 lines 0 comments Download
D components/test/data/dom_distiller/og_article.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -9 lines 0 comments Download
M content/content_common.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M ipc/ipc_message_start.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/core.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +3 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +22 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +251 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/dom/DocumentStatisticsCollectorTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +157 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebDocument.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +16 lines, -0 lines 0 comments Download
A third_party/WebKit/public/platform/WebDistillability.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +30 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/WebDocument.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +6 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 45 (20 generated)
wychen
PTAL. This relies on Blink changes in https://codereview.chromium.org/1255483003/, and contentAsTextForTesting(). These should be fixed. It ...
5 years, 5 months ago (2015-07-22 23:02:53 UTC) #2
cjhopman
I really don't think we should be putting so much dom_distiller implementation into content/. We ...
5 years, 5 months ago (2015-07-22 23:34:03 UTC) #3
dglazkov
We shouldn't be doing DOM Walking outside of Blink. Please avoid writing DOM traversal/introspection code ...
5 years, 5 months ago (2015-07-23 20:54:14 UTC) #4
wychen
mdjones: PTAL. The WebKit part is not done yet though. The DOM traversal in distillability_agent.cc ...
5 years, 2 months ago (2015-09-28 18:34:46 UTC) #7
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1248643004/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1248643004/60001
5 years, 2 months ago (2015-09-28 18:47:22 UTC) #9
commit-bot: I haz the power
Dry run: 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/104361)
5 years, 2 months ago (2015-09-28 19:13:30 UTC) #11
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1248643004/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1248643004/140001
5 years, 2 months ago (2015-09-29 05:50:43 UTC) #13
commit-bot: I haz the power
Dry run: No L-G-T-M from a valid reviewer yet. Only full committers are accepted. Even ...
5 years, 2 months ago (2015-09-29 05:50:45 UTC) #15
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1248643004/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1248643004/140001
5 years, 2 months ago (2015-09-29 15:49:19 UTC) #17
commit-bot: I haz the power
Dry run: 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/104740)
5 years, 2 months ago (2015-09-29 15:59:35 UTC) #19
mdjones
https://codereview.chromium.org/1248643004/diff/140001/chrome/browser/ui/tab_helpers.cc File chrome/browser/ui/tab_helpers.cc (right): https://codereview.chromium.org/1248643004/diff/140001/chrome/browser/ui/tab_helpers.cc#newcode44 chrome/browser/ui/tab_helpers.cc:44: #include "components/dom_distiller/content/browser/distillability_driver.h" Is this needed? https://codereview.chromium.org/1248643004/diff/140001/chrome/renderer/chrome_content_renderer_client.cc File chrome/renderer/chrome_content_renderer_client.cc (right): ...
5 years, 2 months ago (2015-09-29 17:31:42 UTC) #20
wychen
https://codereview.chromium.org/1248643004/diff/140001/chrome/browser/ui/tab_helpers.cc File chrome/browser/ui/tab_helpers.cc (right): https://codereview.chromium.org/1248643004/diff/140001/chrome/browser/ui/tab_helpers.cc#newcode44 chrome/browser/ui/tab_helpers.cc:44: #include "components/dom_distiller/content/browser/distillability_driver.h" On 2015/09/29 17:31:42, mdjones wrote: > Is ...
5 years, 2 months ago (2015-09-29 21:46:57 UTC) #21
wychen
dglazkov, esprehn: Could you take a look at the WebKit part? The connection with the ...
5 years, 2 months ago (2015-10-21 23:26:11 UTC) #23
dglazkov
Made a quick pass, there's lots of work to do there. One thing to consider ...
5 years, 2 months ago (2015-10-22 16:30:31 UTC) #24
wychen
Thanks for reviewing! I've split the Blink-side to another CL: https://codereview.chromium.org/1419033004/ It is the same ...
5 years, 2 months ago (2015-10-23 02:51:30 UTC) #25
wychen
Could you take another look at this? This CL has the following dependencies merged in, ...
5 years, 1 month ago (2015-11-02 17:52:31 UTC) #32
mdjones
A few nits. https://codereview.chromium.org/1248643004/diff/300001/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/ReaderModeManager.java File chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/ReaderModeManager.java (right): https://codereview.chromium.org/1248643004/diff/300001/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/ReaderModeManager.java#newcode84 chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/ReaderModeManager.java:84: private boolean mSetCallback; mIsCallbackSet; the current ...
5 years, 1 month ago (2015-11-03 02:54:46 UTC) #33
esprehn
https://codereview.chromium.org/1248643004/diff/300001/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp File third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp (right): https://codereview.chromium.org/1248643004/diff/300001/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp#newcode77 third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp:77: for (auto word : {"banner", "combx", "comment", "community", "disqus", ...
5 years, 1 month ago (2015-11-03 04:12:10 UTC) #34
esprehn
On 2015/11/03 at 04:12:10, esprehn wrote: > https://codereview.chromium.org/1248643004/diff/300001/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp > File third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp (right): > > https://codereview.chromium.org/1248643004/diff/300001/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp#newcode77 ...
5 years, 1 month ago (2015-11-03 07:20:20 UTC) #35
wychen
https://codereview.chromium.org/1248643004/diff/300001/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/ReaderModeManager.java File chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/ReaderModeManager.java (right): https://codereview.chromium.org/1248643004/diff/300001/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/ReaderModeManager.java#newcode84 chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/ReaderModeManager.java:84: private boolean mSetCallback; On 2015/11/03 02:54:45, mdjones wrote: > ...
5 years, 1 month ago (2015-11-03 07:56:39 UTC) #37
esprehn
This patch is so massive, I don't think we want to land something this big.
5 years, 1 month ago (2015-11-04 00:52:03 UTC) #38
wychen
On 2015/11/04 00:52:03, esprehn wrote: > This patch is so massive, I don't think we ...
5 years, 1 month ago (2015-11-04 01:37:20 UTC) #39
wychen
On 2015/11/04 01:37:20, wychen wrote: > On 2015/11/04 00:52:03, esprehn wrote: > > This patch ...
5 years, 1 month ago (2015-11-04 19:11:33 UTC) #43
nyquist
Thanks for splitting this up. Feel free to add me to the other reviews if ...
5 years, 1 month ago (2015-11-08 15:15:00 UTC) #44
dglazkov
4 years, 10 months ago (2016-02-05 22:03:16 UTC) #45
Are we ready to close this issue?

Powered by Google App Engine
This is Rietveld 408576698