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

Side by Side Diff: ui/webui/resources/cr_elements/cr_scrollable_behavior.js

Issue 2664613002: Drop .clang-format in ui/webui now that Chromium JS defaults are the same (Closed)
Patch Set: 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 | « ui/webui/resources/.clang-format ('k') | ui/webui/resources/js/analytics.js » ('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 * @fileoverview Behavior for scrollable containers with <iron-list>. 6 * @fileoverview Behavior for scrollable containers with <iron-list>.
7 * 7 *
8 * Any containers with the 'scrollable' attribute set will have the following 8 * Any containers with the 'scrollable' attribute set will have the following
9 * classes toggled appropriately: can-scroll, is-scrolled, scrolled-to-bottom. 9 * classes toggled appropriately: can-scroll, is-scrolled, scrolled-to-bottom.
10 * These classes are used to style the container div and list elements 10 * These classes are used to style the container div and list elements
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 /** 106 /**
107 * This gets called once intially and any time a scrollable container scrolls. 107 * This gets called once intially and any time a scrollable container scrolls.
108 * @param {!HTMLElement} scrollable 108 * @param {!HTMLElement} scrollable
109 * @private 109 * @private
110 */ 110 */
111 updateScroll_: function(scrollable) { 111 updateScroll_: function(scrollable) {
112 scrollable.classList.toggle( 112 scrollable.classList.toggle(
113 'can-scroll', scrollable.clientHeight < scrollable.scrollHeight); 113 'can-scroll', scrollable.clientHeight < scrollable.scrollHeight);
114 scrollable.classList.toggle('is-scrolled', scrollable.scrollTop > 0); 114 scrollable.classList.toggle('is-scrolled', scrollable.scrollTop > 0);
115 scrollable.classList.toggle( 115 scrollable.classList.toggle(
116 'scrolled-to-bottom', scrollable.scrollTop + scrollable.clientHeight >= 116 'scrolled-to-bottom',
117 scrollable.scrollTop + scrollable.clientHeight >=
117 scrollable.scrollHeight); 118 scrollable.scrollHeight);
118 }, 119 },
119 }; 120 };
OLDNEW
« no previous file with comments | « ui/webui/resources/.clang-format ('k') | ui/webui/resources/js/analytics.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698