DescriptionPass distillability updates from renderer to browser
The current distillability test does the following:
- In WebContentsObserver, wait for didFinishLoad and didFailLoad events.
(Was didFinishLoad and documentLoadedInFrame earlier. Read more on
http://crbug.com/510254.)
- In these events, send feature extraction JavaScript code to renderer.
The problems are:
- Mobile-friendliness detection might not be accurate because layout might
not have been done in these WebContentsObserver events.
- Executing JavaScript in an isolated world costs extra 8MB of memory.
With the new mechanism added in this CL, the problems can be solved.
- DidMeaningfulLayout guarantees layout is done, so mobile-friendliness
hint would be accurate.
- Features are extracted in native code (in http://crrev.com/1419033004/).
The reader mode switch kReaderModeHeuristics is passed to the renderer
process for it to use GetDistillerHeuristicsType().
BUG=509869, 525797
Committed: https://crrev.com/e556873497657ad7ce407109fa3a406fad6f61bf
Cr-Commit-Position: refs/heads/master@{#359607}
Patch Set 1 #Patch Set 2 : merge depend, and update interface #Patch Set 3 : merge depend, and update interface again #
Total comments: 6
Patch Set 4 : address nyquist's comments #Patch Set 5 : pass reader mode switches to the render process #Patch Set 6 : merge master #Patch Set 7 : fix merging #Patch Set 8 : fix gn deps #
Total comments: 2
Patch Set 9 : address tsepez's comment #Messages
Total messages: 51 (25 generated)
|