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

Unified Diff: third_party/WebKit/public/platform/WebDistillability.h

Issue 1248643004: Test distillability without JavaScript (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@early
Patch Set: fix browsertest, merge webkit CL, merge http://crrev.com/1403413004 Created 5 years, 1 month 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 | « third_party/WebKit/Source/web/WebDocument.cpp ('k') | third_party/WebKit/public/web/WebDocument.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/public/platform/WebDistillability.h
diff --git a/third_party/WebKit/public/platform/WebDistillability.h b/third_party/WebKit/public/platform/WebDistillability.h
new file mode 100644
index 0000000000000000000000000000000000000000..51d348f86e3ee57066a0ef73f3ddd306fc4112f5
--- /dev/null
+++ b/third_party/WebKit/public/platform/WebDistillability.h
@@ -0,0 +1,30 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WebDistillability_h
+#define WebDistillability_h
+
+namespace blink {
+
+struct WebDistillabilityFeatures {
+ bool isMobileFriendly;
+ // The rest of the fields are only valid when isMobileFriendly==false.
+ bool openGraph;
+ unsigned elementCount;
+ unsigned anchorCount;
+ unsigned formCount;
+ unsigned textInputCount;
+ unsigned passwordInputCount;
+ unsigned pCount;
+ unsigned preCount;
+ // The following scores are derived from the triggering logic in Readability from Mozilla.
+ // https://github.com/mozilla/readability/blob/85101066386a0872526a6c4ae164c18fcd6cc1db/Readability.js#L1704
+ double mozScore;
+ double mozScoreAllSqrt;
+ double mozScoreAllLinear;
+};
+
+} // namespace blink
+
+#endif // WebDistillability_h
« no previous file with comments | « third_party/WebKit/Source/web/WebDocument.cpp ('k') | third_party/WebKit/public/web/WebDocument.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698