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

Side by Side Diff: chrome/browser/resources/uber/uber.js

Issue 2691883002: Uprefix CSS transitions in ui/ and chrome/ styles (Closed)
Patch Set: transitions only Created 3 years, 10 months 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 | « chrome/browser/resources/uber/uber.css ('k') | chrome/browser/resources/uber/uber_frame.css » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 cr.define('uber', function() { 5 cr.define('uber', function() {
6 /** 6 /**
7 * Options for how web history should be handled. 7 * Options for how web history should be handled.
8 */ 8 */
9 var HISTORY_STATE_OPTION = { 9 var HISTORY_STATE_OPTION = {
10 PUSH: 1, // Push a new history state. 10 PUSH: 1, // Push a new history state.
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 * immediately, rather than only after the transition ends. 452 * immediately, rather than only after the transition ends.
453 */ 453 */
454 function ensureNonSelectedFrameContainersAreHidden() { 454 function ensureNonSelectedFrameContainersAreHidden() {
455 var containers = document.querySelectorAll('.iframe-container'); 455 var containers = document.querySelectorAll('.iframe-container');
456 for (var i = 0; i < containers.length; i++) { 456 for (var i = 0; i < containers.length; i++) {
457 var container = containers[i]; 457 var container = containers[i];
458 if (!container.classList.contains('selected')) { 458 if (!container.classList.contains('selected')) {
459 container.hidden = true; 459 container.hidden = true;
460 container.setAttribute('aria-hidden', 'true'); 460 container.setAttribute('aria-hidden', 'true');
461 } 461 }
462 container.addEventListener('webkitTransitionEnd', function(event) { 462 container.addEventListener('transitionend', function(event) {
463 if (!event.target.classList.contains('selected')) 463 if (!event.target.classList.contains('selected'))
464 event.target.hidden = true; 464 event.target.hidden = true;
465 }); 465 });
466 } 466 }
467 } 467 }
468 468
469 return { 469 return {
470 onLoad: onLoad, 470 onLoad: onLoad,
471 onPopHistoryState: onPopHistoryState 471 onPopHistoryState: onPopHistoryState
472 }; 472 };
473 }); 473 });
474 474
475 window.addEventListener('popstate', uber.onPopHistoryState); 475 window.addEventListener('popstate', uber.onPopHistoryState);
476 document.addEventListener('DOMContentLoaded', uber.onLoad); 476 document.addEventListener('DOMContentLoaded', uber.onLoad);
OLDNEW
« no previous file with comments | « chrome/browser/resources/uber/uber.css ('k') | chrome/browser/resources/uber/uber_frame.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698