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

Side by Side Diff: chrome/browser/resources/settings/settings_page/main_page_behavior.js

Issue 2184863002: MD Settings: Remove paper-header-panel, use IntersectionObserver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: resolve conflicts Created 3 years, 8 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 | « no previous file | chrome/browser/resources/settings/settings_page_css.html » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 * Responds to route changes by expanding, collapsing, or scrolling to sections 6 * Responds to route changes by expanding, collapsing, or scrolling to sections
7 * on the page. Expanded sections take up the full height of the container. At 7 * on the page. Expanded sections take up the full height of the container. At
8 * most one section should be expanded at any given time. 8 * most one section should be expanded at any given time.
9 * @polymerBehavior MainPageBehavior 9 * @polymerBehavior MainPageBehavior
10 */ 10 */
(...skipping 23 matching lines...) Expand all
34 34
35 /** @type {?HTMLElement} The scrolling container. */ 35 /** @type {?HTMLElement} The scrolling container. */
36 scroller: null, 36 scroller: null,
37 37
38 listeners: { 38 listeners: {
39 'neon-animation-finish': 'onNeonAnimationFinish_' 39 'neon-animation-finish': 'onNeonAnimationFinish_'
40 }, 40 },
41 41
42 /** @override */ 42 /** @override */
43 attached: function() { 43 attached: function() {
44 if (this.domHost && this.domHost.parentNode.tagName == 'PAPER-HEADER-PANEL') 44 this.scroller = this.domHost ? this.domHost.parentNode : document.body;
45 this.scroller = this.domHost.parentNode.scroller;
46 else
47 this.scroller = document.body; // Used in unit tests.
48 }, 45 },
49 46
50 /** 47 /**
51 * Remove the is-animating attribute once the animation is complete. 48 * Remove the is-animating attribute once the animation is complete.
52 * This may catch animations finishing more often than needed, which is not 49 * This may catch animations finishing more often than needed, which is not
53 * known to cause any issues (e.g. when animating from a shallower page to a 50 * known to cause any issues (e.g. when animating from a shallower page to a
54 * deeper page; or when transitioning to the main page). 51 * deeper page; or when transitioning to the main page).
55 * @private 52 * @private
56 */ 53 */
57 onNeonAnimationFinish_: function() { 54 onNeonAnimationFinish_: function() {
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 return /** @type {?SettingsSectionElement} */( 344 return /** @type {?SettingsSectionElement} */(
348 this.$$('settings-section[section="' + section + '"]')); 345 this.$$('settings-section[section="' + section + '"]'));
349 }, 346 },
350 }; 347 };
351 348
352 /** @polymerBehavior */ 349 /** @polymerBehavior */
353 var MainPageBehavior = [ 350 var MainPageBehavior = [
354 settings.RouteObserverBehavior, 351 settings.RouteObserverBehavior,
355 MainPageBehaviorImpl, 352 MainPageBehaviorImpl,
356 ]; 353 ];
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/settings/settings_page_css.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698