commit | 23d56446306d77ebd5364523d8de92546ef0140c | [log] [tgz] |
---|---|---|
author | K Moon <kmoon@chromium.org> | Thu Oct 03 05:06:23 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Oct 03 05:06:23 2019 |
tree | 0fc673a6411e80365500375222dab2c6798c2b6b | |
parent | ee489fb62602435f0e903388c1d4dd5fe1767412 [diff] |
Serialize LayoutOptions to DocumentDimensions Add ToVar() and FromVar() methods to DocumentLayout::Options, allowing serialization to and from a pp::Var. This serialization is then used to pass layout options (such as default page orientation) to and from JavaScript (via the "documentDimensions" message). pp::Var is non-trivial to unit test, due to dependencies on the browser's PPAPI interfaces. Instead, this change adds 2 browser_tests, PDFExtensionTest.Layout3 and PDFExtensionTest.Layout4. Each runs the same layout_test.js suite over two slightly different test PDF files, test-layout3.pdf (with 3 pages) and test-layout4.pdf (with 4 pages). There's currently no coverage of deserialization, as we're not doing anything with the layout options sent back from JavaScript yet. We'll start using FromVar() in an upcoming CL (such as crrev.com/c/1747170). Bug: 885110 Change-Id: I8c93b74062576ee07445070e0b4a82f0f861a82e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1830398 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: K Moon <kmoon@chromium.org> Auto-Submit: K Moon <kmoon@chromium.org> Cr-Commit-Position: refs/heads/master@{#702324}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .