| OLD | NEW |
| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 if (box != null) { | 123 if (box != null) { |
| 124 assert(box.parentData is BoxParentData); | 124 assert(box.parentData is BoxParentData); |
| 125 if (new sky.Rect.fromPointAndSize(box.parentData.position, box.size).con
tains(position)) { | 125 if (new sky.Rect.fromPointAndSize(box.parentData.position, box.size).con
tains(position)) { |
| 126 if (box.hitTest(result, position: (position - box.parentData.position)
.toPoint())) | 126 if (box.hitTest(result, position: (position - box.parentData.position)
.toPoint())) |
| 127 return; | 127 return; |
| 128 } | 128 } |
| 129 } | 129 } |
| 130 } | 130 } |
| 131 } | 131 } |
| 132 | 132 |
| 133 String debugDescribeChildren(String prefix) { |
| 134 return _slots.keys.map((slot) => '${prefix}${slot}: ${_slots[slot].toString(
prefix)}').join('\n'); |
| 135 } |
| 133 } | 136 } |
| 134 | 137 |
| 135 class Scaffold extends RenderObjectWrapper { | 138 class Scaffold extends RenderObjectWrapper { |
| 136 | 139 |
| 137 // static final Style _style = new Style(''' | 140 // static final Style _style = new Style(''' |
| 138 // ${typography.typeface}; | 141 // ${typography.typeface}; |
| 139 // ${typography.black.body1};'''); | 142 // ${typography.black.body1};'''); |
| 140 | 143 |
| 141 Scaffold({ | 144 Scaffold({ |
| 142 Object key, | 145 Object key, |
| (...skipping 28 matching lines...) Expand all Loading... |
| 171 void syncRenderObject(UINode old) { | 174 void syncRenderObject(UINode old) { |
| 172 super.syncRenderObject(old); | 175 super.syncRenderObject(old); |
| 173 syncChild(toolbar, old is Scaffold ? old.toolbar : null, ScaffoldSlots.toolb
ar); | 176 syncChild(toolbar, old is Scaffold ? old.toolbar : null, ScaffoldSlots.toolb
ar); |
| 174 syncChild(body, old is Scaffold ? old.body : null, ScaffoldSlots.body); | 177 syncChild(body, old is Scaffold ? old.body : null, ScaffoldSlots.body); |
| 175 syncChild(statusbar, old is Scaffold ? old.statusbar : null, ScaffoldSlots.s
tatusBar); | 178 syncChild(statusbar, old is Scaffold ? old.statusbar : null, ScaffoldSlots.s
tatusBar); |
| 176 syncChild(drawer, old is Scaffold ? old.drawer : null, ScaffoldSlots.drawer)
; | 179 syncChild(drawer, old is Scaffold ? old.drawer : null, ScaffoldSlots.drawer)
; |
| 177 syncChild(floatingActionButton, old is Scaffold ? old.floatingActionButton :
null, ScaffoldSlots.floatingActionButton); | 180 syncChild(floatingActionButton, old is Scaffold ? old.floatingActionButton :
null, ScaffoldSlots.floatingActionButton); |
| 178 } | 181 } |
| 179 | 182 |
| 180 } | 183 } |
| OLD | NEW |