Commit e0308301 authored by rbpotter's avatar rbpotter Committed by Commit Bot

Print Preview: Fix flash of more settings expansion

Initialize everything to available, so that we don't briefly expand more
settings due to having <= 6 available settings between setting
availability from document settings and setting availability from
destination capabilities for PDFs.

Bug: 1013045
Change-Id: Idbcaa78d433f314415425e6ebaf699122c6d7803
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1853824
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#705147}
parent d816efbf
......@@ -189,9 +189,9 @@ Polymer({
/**
* Object containing current settings of Print Preview, for use by Polymer
* controls.
* Initialize settings that are only available on some printers to
* unavailable, and settings that are provided by PDF generation to
* available.
* Initialize all settings to available so that more settings always stays
* in a collapsed state during startup, when document information and
* printer capabilities may arrive at slightly different times.
* @type {!print_preview.Settings}
*/
settings: {
......@@ -243,7 +243,7 @@ Polymer({
value: true, /* color */
unavailableValue: false,
valid: true,
available: false,
available: true,
setByPolicy: false,
setFromUi: false,
key: 'isColorEnabled',
......@@ -256,7 +256,7 @@ Polymer({
height_microns: 279400,
},
valid: true,
available: false,
available: true,
setByPolicy: false,
setFromUi: false,
key: 'mediaSize',
......@@ -286,7 +286,7 @@ Polymer({
value: {},
unavailableValue: {},
valid: true,
available: false,
available: true,
setByPolicy: false,
setFromUi: false,
key: 'dpi',
......@@ -326,7 +326,7 @@ Polymer({
value: true,
unavailableValue: false,
valid: true,
available: false,
available: true,
setByPolicy: false,
setFromUi: false,
key: 'isDuplexEnabled',
......@@ -386,7 +386,7 @@ Polymer({
value: {},
unavailableValue: {},
valid: true,
available: false,
available: true,
setByPolicy: false,
setFromUi: false,
key: 'vendorOptions',
......@@ -441,7 +441,7 @@ Polymer({
value: false,
unavailableValue: false,
valid: true,
available: false,
available: true,
setByPolicy: false,
setFromUi: false,
key: 'isPinEnabled',
......@@ -451,7 +451,7 @@ Polymer({
value: '',
unavailableValue: '',
valid: true,
available: false,
available: true,
setByPolicy: false,
setFromUi: false,
key: 'pinValue',
......
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