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

Side by Side Diff: third_party/polymer/v1_0/components-chromium/iron-dropdown/iron-dropdown-scroll-manager-extracted.js

Issue 1862213002: Roll third_party/polymer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove obsolete appearance_browsertest.js, result of a previous bad merge. Created 4 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
OLDNEW
1 (function() { 1 (function() {
2 'use strict'; 2 'use strict';
3 3
4 /** 4 /**
5 * The IronDropdownScrollManager is intended to provide a central source 5 * The IronDropdownScrollManager is intended to provide a central source
6 * of authority and control over which elements in a document are currently 6 * of authority and control over which elements in a document are currently
7 * allowed to scroll. 7 * allowed to scroll.
8 */ 8 */
9 9
10 Polymer.IronDropdownScrollManager = { 10 Polymer.IronDropdownScrollManager = {
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 if (this._composedTreeContains(distributedNodes[nodeIndex], child)) { 154 if (this._composedTreeContains(distributedNodes[nodeIndex], child)) {
155 return true; 155 return true;
156 } 156 }
157 } 157 }
158 } 158 }
159 159
160 return false; 160 return false;
161 }, 161 },
162 162
163 _scrollInteractionHandler: function(event) { 163 _scrollInteractionHandler: function(event) {
164 var scrolledElement =
165 /** @type {HTMLElement} */(Polymer.dom(event).rootTarget);
164 if (Polymer 166 if (Polymer
165 .IronDropdownScrollManager 167 .IronDropdownScrollManager
166 .elementIsScrollLocked(Polymer.dom(event).rootTarget)) { 168 .elementIsScrollLocked(scrolledElement)) {
167 if (event.type === 'keydown' && 169 if (event.type === 'keydown' &&
168 !Polymer.IronDropdownScrollManager._isScrollingKeypress(event)) { 170 !Polymer.IronDropdownScrollManager._isScrollingKeypress(event)) {
169 return; 171 return;
170 } 172 }
171 173
172 event.preventDefault(); 174 event.preventDefault();
173 } 175 }
174 }, 176 },
175 177
176 _lockScrollInteractions: function() { 178 _lockScrollInteractions: function() {
(...skipping 30 matching lines...) Expand all
207 document.body.style.overflowY = this._originalBodyStyles.overflowY; 209 document.body.style.overflowY = this._originalBodyStyles.overflowY;
208 210
209 document.removeEventListener('wheel', this._scrollInteractionHandler, tr ue); 211 document.removeEventListener('wheel', this._scrollInteractionHandler, tr ue);
210 document.removeEventListener('mousewheel', this._scrollInteractionHandle r, true); 212 document.removeEventListener('mousewheel', this._scrollInteractionHandle r, true);
211 document.removeEventListener('DOMMouseScroll', this._scrollInteractionHa ndler, true); 213 document.removeEventListener('DOMMouseScroll', this._scrollInteractionHa ndler, true);
212 document.removeEventListener('touchmove', this._scrollInteractionHandler , true); 214 document.removeEventListener('touchmove', this._scrollInteractionHandler , true);
213 document.removeEventListener('keydown', this._scrollInteractionHandler, true); 215 document.removeEventListener('keydown', this._scrollInteractionHandler, true);
214 } 216 }
215 }; 217 };
216 })(); 218 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698