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

Side by Side Diff: client/samples/total/src/InnerMenuView.dart

Issue 8966029: Report errors and warnings for hiding elements, issue 572. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years 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 // TODO: RE: implements RequestAnimationFrameCallback. File bug 5 // TODO: RE: implements RequestAnimationFrameCallback. File bug
6 // against dom libs because it should be possible to pass a function 6 // against dom libs because it should be possible to pass a function
7 // to webkitRequestAnimationFrame just like addEventListener. 7 // to webkitRequestAnimationFrame just like addEventListener.
8 class InnerMenuView { 8 class InnerMenuView {
9 static final List<String> _textAlignmentClassNames = const <String>[ "l", "c", "r" ]; 9 static final List<String> _textAlignmentClassNames = const <String>[ "l", "c", "r" ];
10 static final List<int> _textAlignmentValues = const <int>[ 10 static final List<int> _textAlignmentValues = const <int>[
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 } 333 }
334 334
335 // During CSS transitions, we use a webkitRequestAnimationFrame based 335 // During CSS transitions, we use a webkitRequestAnimationFrame based
336 // animation loop to keep visual state in sync. 336 // animation loop to keep visual state in sync.
337 void _onRequestAnimationFrame(int time) { 337 void _onRequestAnimationFrame(int time) {
338 updateSize(); 338 updateSize();
339 339
340 _selectionManager.updateSelection(); 340 _selectionManager.updateSelection();
341 341
342 if (!_transitionDidComplete) { 342 if (!_transitionDidComplete) {
343 _window.webkitRequestAnimationFrame((int time) { 343 _window.webkitRequestAnimationFrame((int time_) {
344 _onRequestAnimationFrame(time); 344 _onRequestAnimationFrame(time_);
345 }, _row); 345 }, _row);
346 } 346 }
347 } 347 }
348 348
349 void _selectTextStyle(int index, String className, bool selected) { 349 void _selectTextStyle(int index, String className, bool selected) {
350 Element element = _textStyleButtons[index]; 350 Element element = _textStyleButtons[index];
351 if (selected) { 351 if (selected) {
352 element.parent.style.setProperty("border", "1px solid black"); 352 element.parent.style.setProperty("border", "1px solid black");
353 className = "${className}-selected"; 353 className = "${className}-selected";
354 } else { 354 } else {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 for (int i = 0; i < 4; i++) { 416 for (int i = 0; i < 4; i++) {
417 if (_textStyleButtons[i].attributes["class"].length > 1) { 417 if (_textStyleButtons[i].attributes["class"].length > 1) {
418 textStyle += _textStyleValues[i]; 418 textStyle += _textStyleValues[i];
419 } 419 }
420 } 420 }
421 421
422 _execute(Style _(Style s, int selectedIndex) 422 _execute(Style _(Style s, int selectedIndex)
423 => s.setTextFormatByIndex(selectedIndex), textStyle); 423 => s.setTextFormatByIndex(selectedIndex), textStyle);
424 } 424 }
425 } 425 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698