| Index: chrome/browser/resources/print_preview/print_preview_animations.js
|
| diff --git a/chrome/browser/resources/print_preview/print_preview_animations.js b/chrome/browser/resources/print_preview/print_preview_animations.js
|
| index b864d552aa3d40fd2b9fca007d549cbfaa31cfa7..56f293019a990aeabaaf7be96ad809c974ba6ac8 100644
|
| --- a/chrome/browser/resources/print_preview/print_preview_animations.js
|
| +++ b/chrome/browser/resources/print_preview/print_preview_animations.js
|
| @@ -73,7 +73,11 @@ function fadeOutElement(el) {
|
| el.style.height = 'auto';
|
| var height = el.offsetHeight;
|
| el.style.height = height + 'px';
|
| - el.offsetHeight; // Should force an update of the computed style.
|
| + /**
|
| + * Should force an update of the computed style.
|
| + * @suppress {uselessCode}
|
| + */
|
| + el.offsetHeight;
|
| animationEventTracker_.add(
|
| el, 'webkitTransitionEnd', onFadeOutTransitionEnd.bind(el), false);
|
| el.classList.add('closing');
|
| @@ -129,9 +133,11 @@ function fadeInOption(el, opt_justShow) {
|
| // To make the option visible during the first fade in.
|
| el.hidden = false;
|
|
|
| - var leftColumn = el.querySelector('.left-column');
|
| + var leftColumn = assertInstanceof(el.querySelector('.left-column'),
|
| + HTMLElement);
|
| wrapContentsInDiv(leftColumn, ['invisible']);
|
| - var rightColumn = el.querySelector('.right-column');
|
| + var rightColumn = assertInstanceof(el.querySelector('.right-column'),
|
| + HTMLElement);
|
| wrapContentsInDiv(rightColumn, ['invisible']);
|
|
|
| var toAnimate = el.querySelectorAll('.collapsible');
|
| @@ -150,9 +156,11 @@ function fadeOutOption(el, opt_justHide) {
|
| if (!el.classList.contains('visible'))
|
| return;
|
|
|
| - var leftColumn = el.querySelector('.left-column');
|
| + var leftColumn = assertInstanceof(el.querySelector('.left-column'),
|
| + HTMLElement);
|
| wrapContentsInDiv(leftColumn, ['visible']);
|
| - var rightColumn = el.querySelector('.right-column');
|
| + var rightColumn = assertInstanceof(el.querySelector('.right-column'),
|
| + HTMLElement);
|
| wrapContentsInDiv(rightColumn, ['visible']);
|
|
|
| var toAnimate = el.querySelectorAll('.collapsible');
|
| @@ -173,7 +181,7 @@ function fadeOutOption(el, opt_justHide) {
|
| * |classes| in the new div, only if has not been already done. It is necessary
|
| * for animating the height of table cells.
|
| * @param {HTMLElement} el The element to be processed.
|
| - * @param {array} classes The css classes to add.
|
| + * @param {Array} classes The css classes to add.
|
| */
|
| function wrapContentsInDiv(el, classes) {
|
| var div = el.querySelector('div');
|
|
|