Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Side by Side Diff: chrome/browser/resources/help/help_page.js

Issue 1525953002: Fix flaky logo spin animation restart logic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Call getter instead of reading property Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 cr.define('help', function() { 5 cr.define('help', function() {
6 var Page = cr.ui.pageManager.Page; 6 var Page = cr.ui.pageManager.Page;
7 var PageManager = cr.ui.pageManager.PageManager; 7 var PageManager = cr.ui.pageManager.PageManager;
8 8
9 /** 9 /**
10 * Encapsulated handling of the About page. Called 'help' internally to avoid 10 * Encapsulated handling of the About page. Called 'help' internally to avoid
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 158
159 // Unhide the regulatory label if/when the image loads. 159 // Unhide the regulatory label if/when the image loads.
160 $('regulatory-label').onload = function() { 160 $('regulatory-label').onload = function() {
161 $('regulatory-label-container').hidden = false; 161 $('regulatory-label-container').hidden = false;
162 }; 162 };
163 } 163 }
164 164
165 var logo = $('product-logo'); 165 var logo = $('product-logo');
166 logo.onclick = function(e) { 166 logo.onclick = function(e) {
167 logo.classList.remove('spin'); 167 logo.classList.remove('spin');
168 setTimeout(function() { logo.classList.add('spin'); }, 0); 168 // Force a style recalc that cancels the animation specified by "spin".
169 getComputedStyle(logo).getPropertyValue('animation-name');
170 logo.classList.add('spin');
169 }; 171 };
170 172
171 // Attempt to update. 173 // Attempt to update.
172 chrome.send('onPageLoaded'); 174 chrome.send('onPageLoaded');
173 }, 175 },
174 176
175 /** @override */ 177 /** @override */
176 didClosePage: function() { 178 didClosePage: function() {
177 this.setMoreInfoVisible_(false); 179 this.setMoreInfoVisible_(false);
178 }, 180 },
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 HelpPage.setRegulatoryLabelText = function(text) { 673 HelpPage.setRegulatoryLabelText = function(text) {
672 assert(cr.isChromeOS); 674 assert(cr.isChromeOS);
673 HelpPage.getInstance().setRegulatoryLabelText_(text); 675 HelpPage.getInstance().setRegulatoryLabelText_(text);
674 }; 676 };
675 677
676 // Export 678 // Export
677 return { 679 return {
678 HelpPage: HelpPage 680 HelpPage: HelpPage
679 }; 681 };
680 }); 682 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698