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

Side by Side Diff: sky/sdk/lib/framework/components2/scaffold.dart

Issue 1151573020: Fix the crash when the drawer is hidden. (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 | « no previous file | sky/sdk/lib/framework/fn2.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 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 '../fn2.dart'; 5 import '../fn2.dart';
6 import 'dart:sky' as sky; 6 import 'dart:sky' as sky;
7 import '../rendering/box.dart'; 7 import '../rendering/box.dart';
8 import '../rendering/node.dart'; 8 import '../rendering/node.dart';
9 9
10 10
(...skipping 30 matching lines...) Expand all
41 if (old != null) 41 if (old != null)
42 dropChild(old); 42 dropChild(old);
43 _slots[slot] = value; 43 _slots[slot] = value;
44 if (value != null) 44 if (value != null)
45 adoptChild(value); 45 adoptChild(value);
46 markNeedsLayout(); 46 markNeedsLayout();
47 } 47 }
48 48
49 ScaffoldSlots remove(RenderBox child) { 49 ScaffoldSlots remove(RenderBox child) {
50 assert(child != null); 50 assert(child != null);
51 for (ScaffoldSlots slot in ScaffoldSlots) { 51 for (ScaffoldSlots slot in ScaffoldSlots.values) {
52 if (_slots[slot] == child) { 52 if (_slots[slot] == child) {
53 this[slot] = null; 53 this[slot] = null;
54 return slot; 54 return slot;
55 } 55 }
56 } 56 }
57 return null; 57 return null;
58 } 58 }
59 59
60 bool get sizedByParent => true; 60 bool get sizedByParent => true;
61 void performResize() { 61 void performResize() {
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 void syncRenderNode(UINode old) { 171 void syncRenderNode(UINode old) {
172 super.syncRenderNode(old); 172 super.syncRenderNode(old);
173 syncChild(toolbar, old is Scaffold ? old.toolbar : null, ScaffoldSlots.Toolb ar); 173 syncChild(toolbar, old is Scaffold ? old.toolbar : null, ScaffoldSlots.Toolb ar);
174 syncChild(body, old is Scaffold ? old.body : null, ScaffoldSlots.Body); 174 syncChild(body, old is Scaffold ? old.body : null, ScaffoldSlots.Body);
175 syncChild(statusbar, old is Scaffold ? old.statusbar : null, ScaffoldSlots.S tatusBar); 175 syncChild(statusbar, old is Scaffold ? old.statusbar : null, ScaffoldSlots.S tatusBar);
176 syncChild(drawer, old is Scaffold ? old.drawer : null, ScaffoldSlots.Drawer) ; 176 syncChild(drawer, old is Scaffold ? old.drawer : null, ScaffoldSlots.Drawer) ;
177 syncChild(floatingActionButton, old is Scaffold ? old.floatingActionButton : null, ScaffoldSlots.FloatingActionButton); 177 syncChild(floatingActionButton, old is Scaffold ? old.floatingActionButton : null, ScaffoldSlots.FloatingActionButton);
178 } 178 }
179 179
180 } 180 }
OLDNEW
« no previous file with comments | « no previous file | sky/sdk/lib/framework/fn2.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698