projects
/
platform
/
framework
/
web
/
crosswalk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git]
/
src
/
chrome
/
browser
/
resources
/
print_preview
/
search
/
destination_search.js
diff --git
a/src/chrome/browser/resources/print_preview/search/destination_search.js
b/src/chrome/browser/resources/print_preview/search/destination_search.js
index
f8a17c0
..
a0a2857
100644
(file)
--- a/
src/chrome/browser/resources/print_preview/search/destination_search.js
+++ b/
src/chrome/browser/resources/print_preview/search/destination_search.js
@@
-121,9
+121,15
@@
cr.define('print_preview', function() {
/** @param {boolean} isVisible Whether the component is visible. */
setIsVisible: function(isVisible) {
/** @param {boolean} isVisible Whether the component is visible. */
setIsVisible: function(isVisible) {
+ if (this.getIsVisible() == isVisible) {
+ return;
+ }
if (isVisible) {
if (isVisible) {
+ setIsVisible(this.getElement(), true);
+ setTimeout(function(element) {
+ element.classList.remove('transparent');
+ }.bind(this, this.getElement()), 0);
this.searchBox_.focus();
this.searchBox_.focus();
- this.getElement().classList.remove('transparent');
var promoEl = this.getChildElement('.cloudprint-promo');
if (getIsVisible(promoEl)) {
this.metrics_.incrementDestinationSearchBucket(
var promoEl = this.getChildElement('.cloudprint-promo');
if (getIsVisible(promoEl)) {
this.metrics_.incrementDestinationSearchBucket(
@@
-166,6
+172,15
@@
cr.define('print_preview', function() {
/** @override */
enterDocument: function() {
print_preview.Component.prototype.enterDocument.call(this);
/** @override */
enterDocument: function() {
print_preview.Component.prototype.enterDocument.call(this);
+
+ this.getElement().addEventListener('webkitTransitionEnd', function f(e) {
+ if (e.target != e.currentTarget || e.propertyName != 'opacity')
+ return;
+ if (e.target.classList.contains('transparent')) {
+ setIsVisible(e.target, false);
+ }
+ });
+
this.tracker.add(
this.getChildElement('.page > .close-button'),
'click',
this.tracker.add(
this.getChildElement('.page > .close-button'),
'click',