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

Side by Side Diff: client/touch/Scrollbar.dart

Issue 8360025: Move the individual property definitions from client/base/Css to CSSStyleDeclaration. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 2 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 | Annotate | Revision Log
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 /** 5 /**
6 * Implementation of a scrollbar for the custom scrolling behavior 6 * Implementation of a scrollbar for the custom scrolling behavior
7 * defined in [:Scroller:]. 7 * defined in [:Scroller:].
8 */ 8 */
9 class Scrollbar implements ScrollListener { 9 class Scrollbar implements ScrollListener {
10 /** 10 /**
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 show = true; 291 show = true;
292 } 292 }
293 _toggleOpacity(_verticalElement, show); 293 _toggleOpacity(_verticalElement, show);
294 _toggleOpacity(_horizontalElement, show); 294 _toggleOpacity(_horizontalElement, show);
295 } 295 }
296 296
297 _toggleOpacity(Element element, bool show) { 297 _toggleOpacity(Element element, bool show) {
298 if (show) { 298 if (show) {
299 element.style.removeProperty("opacity"); 299 element.style.removeProperty("opacity");
300 } else { 300 } else {
301 Css.setOpacity(element.style, '0'); 301 element.style.opacity = '0';
302 } 302 }
303 } 303 }
304 304
305 num _defaultScrollSize(num frameSize, num contentSize) { 305 num _defaultScrollSize(num frameSize, num contentSize) {
306 return GoogleMath.clamp( 306 return GoogleMath.clamp(
307 (frameSize -_PADDING_LENGTH * 2) * frameSize / contentSize, 307 (frameSize -_PADDING_LENGTH * 2) * frameSize / contentSize,
308 _MIN_SIZE, frameSize -_PADDING_LENGTH * 2); 308 _MIN_SIZE, frameSize -_PADDING_LENGTH * 2);
309 } 309 }
310 310
311 /** 311 /**
(...skipping 29 matching lines...) Expand all
341 style.setProperty(cssPos, '${pos}px', ''); 341 style.setProperty(cssPos, '${pos}px', '');
342 if (_cachedSize[cssSize] != size) { 342 if (_cachedSize[cssSize] != size) {
343 _cachedSize[cssSize] = size; 343 _cachedSize[cssSize] = size;
344 style.setProperty(cssSize, '${size}px', ''); 344 style.setProperty(cssSize, '${size}px', '');
345 } 345 }
346 if (element.parent == null) { 346 if (element.parent == null) {
347 _frame.nodes.add(element); 347 _frame.nodes.add(element);
348 } 348 }
349 } 349 }
350 } 350 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698