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

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

Issue 1160013007: Expose _remove from fn2 (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 | 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/object.dart'; 8 import '../rendering/object.dart';
9 9
10 10
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 void insert(RenderObjectWrapper child, ScaffoldSlots slot) { 180 void insert(RenderObjectWrapper child, ScaffoldSlots slot) {
181 root[slot] = child != null ? child.root : null; 181 root[slot] = child != null ? child.root : null;
182 } 182 }
183 183
184 void removeChild(UINode node) { 184 void removeChild(UINode node) {
185 assert(node != null); 185 assert(node != null);
186 root.remove(node.root); 186 root.remove(node.root);
187 super.removeChild(node); 187 super.removeChild(node);
188 } 188 }
189 189
190 void remove() {
191 if (toolbar != null)
192 removeChild(toolbar);
193 if (body != null)
194 removeChild(body);
195 if (statusbar != null)
196 removeChild(statusbar);
197 if (drawer != null)
198 removeChild(drawer);
199 if (floatingActionButton != null)
200 removeChild(floatingActionButton);
201 super.remove();
202 }
203
190 void syncRenderObject(UINode old) { 204 void syncRenderObject(UINode old) {
191 super.syncRenderObject(old); 205 super.syncRenderObject(old);
192 syncChild(toolbar, old is Scaffold ? old.toolbar : null, ScaffoldSlots.toolb ar); 206 syncChild(toolbar, old is Scaffold ? old.toolbar : null, ScaffoldSlots.toolb ar);
193 syncChild(body, old is Scaffold ? old.body : null, ScaffoldSlots.body); 207 syncChild(body, old is Scaffold ? old.body : null, ScaffoldSlots.body);
194 syncChild(statusbar, old is Scaffold ? old.statusbar : null, ScaffoldSlots.s tatusBar); 208 syncChild(statusbar, old is Scaffold ? old.statusbar : null, ScaffoldSlots.s tatusBar);
195 syncChild(drawer, old is Scaffold ? old.drawer : null, ScaffoldSlots.drawer) ; 209 syncChild(drawer, old is Scaffold ? old.drawer : null, ScaffoldSlots.drawer) ;
196 syncChild(floatingActionButton, old is Scaffold ? old.floatingActionButton : null, ScaffoldSlots.floatingActionButton); 210 syncChild(floatingActionButton, old is Scaffold ? old.floatingActionButton : null, ScaffoldSlots.floatingActionButton);
197 } 211 }
198 212
199 } 213 }
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