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") { ...@@ -55,14 +55,14 @@ static_library("core") {
"//net", "//net",
"//skia", "//skia",
"//sync", "//sync",
"//third_party/dom_distiller_js/package/proto", "//third_party/dom_distiller_js:proto",
"//ui/base", "//ui/base",
"//url", "//url",
] ]
forward_dependent_configs_from = [ forward_dependent_configs_from = [
"//components/dom_distiller/core/proto", "//components/dom_distiller/core/proto",
"//third_party/dom_distiller_js/package/proto", "//third_party/dom_distiller_js:proto",
] ]
if (is_android) { if (is_android) {
......
...@@ -73,16 +73,18 @@ void DistillerPage::OnDistillationDone(const GURL& page_url, ...@@ -73,16 +73,18 @@ void DistillerPage::OnDistillationDone(const GURL& page_url,
DCHECK(!ready_); DCHECK(!ready_);
ready_ = true; 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; bool found_content;
if (value->IsType(base::Value::TYPE_NULL)) { if (value->IsType(base::Value::TYPE_NULL)) {
found_content = false; found_content = false;
} else { } else {
found_content = true; found_content =
distiller_result.reset(new dom_distiller::proto::DomDistillerResult( dom_distiller::proto::json::DomDistillerResult::ReadFromValue(
dom_distiller::proto::json::DomDistillerResult::ReadFromValue(value))); value, distiller_result.get());
if (distiller_result->has_timing_info()) { if (!found_content) {
DVLOG(1) << "Unable to parse DomDistillerResult.";
} else if (distiller_result->has_timing_info()) {
const dom_distiller::proto::TimingInfo& timing = const dom_distiller::proto::TimingInfo& timing =
distiller_result->timing_info(); distiller_result->timing_info();
if (timing.has_markup_parsing_time()) { if (timing.has_markup_parsing_time()) {
......
...@@ -16,6 +16,6 @@ source_set("proto") { ...@@ -16,6 +16,6 @@ source_set("proto") {
proto_library("dom_distiller_proto") { proto_library("dom_distiller_proto") {
visibility = ":*" visibility = ":*"
sources = [ "dom_distiller.proto" ] sources = [ "package/proto/dom_distiller.proto" ]
proto_out_dir = "third_party/dom_distiller_js" proto_out_dir = "third_party/dom_distiller_js"
} }
Name: dom-distiller-js Name: dom-distiller-js
URL: https://code.google.com/p/dom-distiller URL: https://code.google.com/p/dom-distiller
Version: 078e633ac4 Version: 432b2dc38e
License: BSD License: BSD
Security Critical: yes 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