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

Side by Side Diff: samples-dev/swarm/swarm_ui_lib/touch/Scrollbar.dart

Issue 2957593002: Spelling fixes e to i. (Closed)
Patch Set: Created 3 years, 6 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 | « runtime/vm/thread_test.cc ('k') | samples-dev/swarm/swarm_ui_lib/view/view.dart » ('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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of touch; 5 part of touch;
6 6
7 /** 7 /**
8 * Implementation of a scrollbar for the custom scrolling behavior 8 * Implementation of a scrollbar for the custom scrolling behavior
9 * defined in [:Scroller:]. 9 * defined in [:Scroller:].
10 */ 10 */
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 // DOM drive. 124 // DOM drive.
125 _frame.onClick.listen((Event e) { 125 _frame.onClick.listen((Event e) {
126 // Always focus on click as one of our children isn't all focused. 126 // Always focus on click as one of our children isn't all focused.
127 if (!_frame.contains(document.activeElement)) { 127 if (!_frame.contains(document.activeElement)) {
128 scrollerEl.focus(); 128 scrollerEl.focus();
129 } 129 }
130 }); 130 });
131 _frame.onMouseOver.listen((Event e) { 131 _frame.onMouseOver.listen((Event e) {
132 final activeElement = document.activeElement; 132 final activeElement = document.activeElement;
133 // TODO(jacobr): don't steal focus from a child element or a truly 133 // TODO(jacobr): don't steal focus from a child element or a truly
134 // focusable element. Only support stealing focus ffrom another 134 // focusable element. Only support stealing focus from another
135 // element that was given fake focus. 135 // element that was given fake focus.
136 if (activeElement is BodyElement || 136 if (activeElement is BodyElement ||
137 (!_frame.contains(activeElement) && activeElement is DivElement)) { 137 (!_frame.contains(activeElement) && activeElement is DivElement)) {
138 scrollerEl.focus(); 138 scrollerEl.focus();
139 } 139 }
140 if (_hovering == false) { 140 if (_hovering == false) {
141 _hovering = true; 141 _hovering = true;
142 _cancelTimeout(); 142 _cancelTimeout();
143 _showScrollbars(true); 143 _showScrollbars(true);
144 refresh(); 144 refresh();
145 } 145 }
146 }); 146 });
147 _frame.onMouseOut.listen((e) { 147 _frame.onMouseOut.listen((e) {
148 _hovering = false; 148 _hovering = false;
149 // Start hiding immediately if we aren't 149 // Start hiding immediately if we aren't
150 // scrolling or already in the process of 150 // scrolling or already in the process of
151 // hidng the scrollbar 151 // hiding the scrollbar
152 if (!_scrollInProgress && _timer == null) { 152 if (!_scrollInProgress && _timer == null) {
153 _boundHideFn(); 153 _boundHideFn();
154 } 154 }
155 }); 155 });
156 } 156 }
157 } 157 }
158 158
159 void _onStart(/*MouseEvent | Touch*/ e) { 159 void _onStart(/*MouseEvent | Touch*/ e) {
160 Element elementOver = e.target; 160 Element elementOver = e.target;
161 if (elementOver == _verticalElement || elementOver == _horizontalElement) { 161 if (elementOver == _verticalElement || elementOver == _horizontalElement) {
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 style.setProperty(cssPos, '${pos}px', ''); 342 style.setProperty(cssPos, '${pos}px', '');
343 if (_cachedSize[cssSize] != size) { 343 if (_cachedSize[cssSize] != size) {
344 _cachedSize[cssSize] = size; 344 _cachedSize[cssSize] = size;
345 style.setProperty(cssSize, '${size}px', ''); 345 style.setProperty(cssSize, '${size}px', '');
346 } 346 }
347 if (element.parent == null) { 347 if (element.parent == null) {
348 _frame.nodes.add(element); 348 _frame.nodes.add(element);
349 } 349 }
350 } 350 }
351 } 351 }
OLDNEW
« no previous file with comments | « runtime/vm/thread_test.cc ('k') | samples-dev/swarm/swarm_ui_lib/view/view.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698