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

Side by Side Diff: sky/sdk/lib/framework/rendering/box.dart

Issue 1174023003: Remove one more use of mirrors: Components now have to explicitly sync their fields. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 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 | « sky/sdk/lib/framework/fn2.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 import 'dart:math' as math; 5 import 'dart:math' as math;
6 import 'dart:sky' as sky; 6 import 'dart:sky' as sky;
7 import 'dart:typed_data'; 7 import 'dart:typed_data';
8 import 'object.dart'; 8 import 'object.dart';
9 import '../painting/shadows.dart'; 9 import '../painting/shadows.dart';
10 import 'package:vector_math/vector_math.dart'; 10 import 'package:vector_math/vector_math.dart';
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 } 790 }
791 791
792 return _cachedBackgroundPaint; 792 return _cachedBackgroundPaint;
793 } 793 }
794 794
795 void paint(RenderObjectDisplayList canvas) { 795 void paint(RenderObjectDisplayList canvas) {
796 assert(size.width != null); 796 assert(size.width != null);
797 assert(size.height != null); 797 assert(size.height != null);
798 798
799 if (_decoration.backgroundColor != null || _decoration.boxShadow != null || 799 if (_decoration.backgroundColor != null || _decoration.boxShadow != null ||
800 _deocration.gradient != null) { 800 _decoration.gradient != null) {
801 Rect rect = new Rect.fromLTRB(0.0, 0.0, size.width, size.height); 801 Rect rect = new Rect.fromLTRB(0.0, 0.0, size.width, size.height);
802 if (_decoration.borderRadius == null) 802 if (_decoration.borderRadius == null)
803 canvas.drawRect(rect, _backgroundPaint); 803 canvas.drawRect(rect, _backgroundPaint);
804 else 804 else
805 canvas.drawRRect(new sky.RRect()..setRectXY(rect, _decoration.borderRadi us, _decoration.borderRadius), _backgroundPaint); 805 canvas.drawRRect(new sky.RRect()..setRectXY(rect, _decoration.borderRadi us, _decoration.borderRadius), _backgroundPaint);
806 } 806 }
807 807
808 if (_decoration.border != null) { 808 if (_decoration.border != null) {
809 assert(_decoration.borderRadius == null); // TODO(abarth): Implement borde rs with border radius. 809 assert(_decoration.borderRadius == null); // TODO(abarth): Implement borde rs with border radius.
810 810
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
1089 1089
1090 void defaultPaint(RenderObjectDisplayList canvas) { 1090 void defaultPaint(RenderObjectDisplayList canvas) {
1091 RenderBox child = firstChild; 1091 RenderBox child = firstChild;
1092 while (child != null) { 1092 while (child != null) {
1093 assert(child.parentData is ParentDataType); 1093 assert(child.parentData is ParentDataType);
1094 canvas.paintChild(child, child.parentData.position); 1094 canvas.paintChild(child, child.parentData.position);
1095 child = child.parentData.nextSibling; 1095 child = child.parentData.nextSibling;
1096 } 1096 }
1097 } 1097 }
1098 } 1098 }
OLDNEW
« no previous file with comments | « sky/sdk/lib/framework/fn2.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698