| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @typedef {{accessibility: Function, | 6 * @typedef {{accessibility: Function, |
| 7 * documentLoadComplete: Function, | 7 * documentLoadComplete: Function, |
| 8 * getHeight: Function, | 8 * getHeight: Function, |
| 9 * getHorizontalScrollbarThickness: Function, | 9 * getHorizontalScrollbarThickness: Function, |
| 10 * getPageLocationNormalized: Function, | 10 * getPageLocationNormalized: Function, |
| (...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 | 512 |
| 513 /** | 513 /** |
| 514 * Set the visibility of the message overlay. | 514 * Set the visibility of the message overlay. |
| 515 * @param {boolean} visible Whether to make the overlay visible or not | 515 * @param {boolean} visible Whether to make the overlay visible or not |
| 516 * @private | 516 * @private |
| 517 */ | 517 */ |
| 518 setOverlayVisible_: function(visible) { | 518 setOverlayVisible_: function(visible) { |
| 519 this.overlayEl_.classList.toggle( | 519 this.overlayEl_.classList.toggle( |
| 520 PreviewArea.Classes_.INVISIBLE, | 520 PreviewArea.Classes_.INVISIBLE, |
| 521 !visible); | 521 !visible); |
| 522 this.overlayEl_.setAttribute('aria-hidden', !visible); |
| 522 | 523 |
| 523 // Hide/show all controls that will overlap when the overlay is visible. | 524 // Hide/show all controls that will overlap when the overlay is visible. |
| 524 var marginControls = this.getElement().getElementsByClassName( | 525 var marginControls = this.getElement().getElementsByClassName( |
| 525 PreviewArea.Classes_.MARGIN_CONTROL); | 526 PreviewArea.Classes_.MARGIN_CONTROL); |
| 526 for (var i = 0; i < marginControls.length; ++i) { | 527 for (var i = 0; i < marginControls.length; ++i) { |
| 527 marginControls[i].classList.toggle(PreviewArea.Classes_.OVERLAYED, | 528 marginControls[i].classList.toggle(PreviewArea.Classes_.OVERLAYED, |
| 528 visible); | 529 visible); |
| 529 } | 530 } |
| 530 var previewAreaControls = this.getElement().getElementsByClassName( | 531 var previewAreaControls = this.getElement().getElementsByClassName( |
| 531 PreviewArea.Classes_.PREVIEW_AREA); | 532 PreviewArea.Classes_.PREVIEW_AREA); |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 793 new print_preview.Size(viewportWidth, viewportHeight)); | 794 new print_preview.Size(viewportWidth, viewportHeight)); |
| 794 } | 795 } |
| 795 } | 796 } |
| 796 }; | 797 }; |
| 797 | 798 |
| 798 // Export | 799 // Export |
| 799 return { | 800 return { |
| 800 PreviewArea: PreviewArea | 801 PreviewArea: PreviewArea |
| 801 }; | 802 }; |
| 802 }); | 803 }); |
| OLD | NEW |