Commit 276e0ebd authored by nyquist's avatar nyquist Committed by Commit bot

Roll dom_distiller_js

This also changes the way DomDistillerResult is read from base::Values by
updating to the new version of DomDistillerResult::ReadFromValue which
takes in a pointer to DomDistillerResult.

This CL also makes it possible to continue using the
update_domdistiller_js.sh script without modification by moving the
BUILD.gn file for protos to outside of the generated package folder.

Picked up changes:
432b2dc Added support for reading protos into a pointer.
32f096c don't prune a subtree when its only child is a text node.
90dc83c bump up nested-table heuristic
6f59530 Make comment filter a little more restrictive.

BUG=368941,408292,409274

Review URL: https://codereview.chromium.org/514423002

Cr-Commit-Position: refs/heads/master@{#293275}
parent c25f7fb9
......@@ -55,14 +55,14 @@ static_library("core") {
"//net",
"//skia",
"//sync",
"//third_party/dom_distiller_js/package/proto",
"//third_party/dom_distiller_js:proto",
"//ui/base",
"//url",
]
forward_dependent_configs_from = [
"//components/dom_distiller/core/proto",
"//third_party/dom_distiller_js/package/proto",
"//third_party/dom_distiller_js:proto",
]
if (is_android) {
......
......@@ -73,16 +73,18 @@ void DistillerPage::OnDistillationDone(const GURL& page_url,
DCHECK(!ready_);
ready_ = true;
scoped_ptr<dom_distiller::proto::DomDistillerResult> distiller_result;
scoped_ptr<dom_distiller::proto::DomDistillerResult> distiller_result(
new dom_distiller::proto::DomDistillerResult());
bool found_content;
if (value->IsType(base::Value::TYPE_NULL)) {
found_content = false;
} else {
found_content = true;
distiller_result.reset(new dom_distiller::proto::DomDistillerResult(
dom_distiller::proto::json::DomDistillerResult::ReadFromValue(value)));
if (distiller_result->has_timing_info()) {
found_content =
dom_distiller::proto::json::DomDistillerResult::ReadFromValue(
value, distiller_result.get());
if (!found_content) {
DVLOG(1) << "Unable to parse DomDistillerResult.";
} else if (distiller_result->has_timing_info()) {
const dom_distiller::proto::TimingInfo& timing =
distiller_result->timing_info();
if (timing.has_markup_parsing_time()) {
......
......@@ -16,6 +16,6 @@ source_set("proto") {
proto_library("dom_distiller_proto") {
visibility = ":*"
sources = [ "dom_distiller.proto" ]
sources = [ "package/proto/dom_distiller.proto" ]
proto_out_dir = "third_party/dom_distiller_js"
}
Name: dom-distiller-js
URL: https://code.google.com/p/dom-distiller
Version: 078e633ac4
Version: 432b2dc38e
License: BSD
Security Critical: yes
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment