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

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

Issue 1174623002: Add boxShadow to BoxDecoration#toString (Closed) Base URL: git@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 | « no previous file | 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 'package:vector_math/vector_math.dart'; 9 import 'package:vector_math/vector_math.dart';
10 import 'package:sky/framework/net/image_cache.dart' as image_cache; 10 import 'package:sky/framework/net/image_cache.dart' as image_cache;
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 final Color backgroundColor; 655 final Color backgroundColor;
656 final Border border; 656 final Border border;
657 final List<BoxShadow> boxShadow; 657 final List<BoxShadow> boxShadow;
658 658
659 String toString([String prefix = '']) { 659 String toString([String prefix = '']) {
660 List<String> result = []; 660 List<String> result = [];
661 if (backgroundColor != null) 661 if (backgroundColor != null)
662 result.add('${prefix}backgroundColor: $backgroundColor'); 662 result.add('${prefix}backgroundColor: $backgroundColor');
663 if (border != null) 663 if (border != null)
664 result.add('${prefix}border: $border'); 664 result.add('${prefix}border: $border');
665 // if (boxShadow != null) 665 if (boxShadow != null) {
666 // result.add('${prefix}boxShadow: $boxShadow'); 666 for (BoxShadow shadow in boxShadow)
667 result.add('${prefix}boxShadow: $shadow');
668 }
667 if (result.isEmpty) 669 if (result.isEmpty)
668 return '${prefix}<no decorations specified>'; 670 return '${prefix}<no decorations specified>';
669 return result.join('\n'); 671 return result.join('\n');
670 } 672 }
671 } 673 }
672 674
673 class RenderDecoratedBox extends RenderProxyBox { 675 class RenderDecoratedBox extends RenderProxyBox {
674 676
675 RenderDecoratedBox({ 677 RenderDecoratedBox({
676 BoxDecoration decoration, 678 BoxDecoration decoration,
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
1007 1009
1008 void defaultPaint(RenderObjectDisplayList canvas) { 1010 void defaultPaint(RenderObjectDisplayList canvas) {
1009 RenderBox child = firstChild; 1011 RenderBox child = firstChild;
1010 while (child != null) { 1012 while (child != null) {
1011 assert(child.parentData is ParentDataType); 1013 assert(child.parentData is ParentDataType);
1012 canvas.paintChild(child, child.parentData.position); 1014 canvas.paintChild(child, child.parentData.position);
1013 child = child.parentData.nextSibling; 1015 child = child.parentData.nextSibling;
1014 } 1016 }
1015 } 1017 }
1016 } 1018 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698