Rename insert() to insertChildRoot() so it's consistent with detachChildRoot().

TBR=abarth

Review URL: https://codereview.chromium.org/1187023005.
This commit is contained in:
Hixie 2015-06-17 16:00:14 -07:00
parent fa88ab16f3
commit 1ab539735f
3 changed files with 8 additions and 8 deletions

View File

@ -359,7 +359,7 @@ class Inline extends RenderObjectWrapper {
root.inline = text;
}
void insert(RenderObjectWrapper child, dynamic slot) {
void insertChildRoot(RenderObjectWrapper child, dynamic slot) {
assert(false);
// Inline does not support having children currently
}
@ -398,7 +398,7 @@ class Image extends RenderObjectWrapper {
root.requestedSize = size;
}
void insert(RenderObjectWrapper child, dynamic slot) {
void insertChildRoot(RenderObjectWrapper child, dynamic slot) {
assert(false);
// Image does not support having children currently
}
@ -424,7 +424,7 @@ class WidgetToRenderBoxAdapter extends RenderObjectWrapper {
}
}
void insert(RenderObjectWrapper child, dynamic slot) {
void insertChildRoot(RenderObjectWrapper child, dynamic slot) {
assert(false);
// WidgetToRenderBoxAdapter cannot have Widget children; by
// definition, it is the transition out of the Widget world.

View File

@ -181,7 +181,7 @@ class Scaffold extends RenderObjectWrapper {
RenderScaffold get root => super.root;
RenderScaffold createNode() => new RenderScaffold();
void insert(RenderObjectWrapper child, ScaffoldSlots slot) {
void insertChildRoot(RenderObjectWrapper child, ScaffoldSlots slot) {
root[slot] = child != null ? child.root : null;
}

View File

@ -491,7 +491,7 @@ abstract class RenderObjectWrapper extends Widget {
static RenderObjectWrapper _getMounted(RenderObject node) => _nodeMap[node];
RenderObjectWrapper _ancestor;
void insert(RenderObjectWrapper child, dynamic slot);
void insertChildRoot(RenderObjectWrapper child, dynamic slot);
void detachChildRoot(RenderObjectWrapper child);
void _sync(Widget old, dynamic slot) {
@ -503,7 +503,7 @@ abstract class RenderObjectWrapper extends Widget {
_root = createNode();
_ancestor = findAncestor(RenderObjectWrapper);
if (_ancestor is RenderObjectWrapper)
_ancestor.insert(this, slot);
_ancestor.insertChildRoot(this, slot);
} else {
_root = old.root;
_ancestor = old._ancestor;
@ -563,7 +563,7 @@ abstract class OneChildRenderObjectWrapper extends RenderObjectWrapper {
_child = syncChild(child, oldChild, null);
}
void insert(RenderObjectWrapper child, dynamic slot) {
void insertChildRoot(RenderObjectWrapper child, dynamic slot) {
final root = this.root; // TODO(ianh): Remove this once the analyzer is cleverer
assert(root is RenderObjectWithChildMixin);
assert(slot == null);
@ -600,7 +600,7 @@ abstract class MultiChildRenderObjectWrapper extends RenderObjectWrapper {
final List<Widget> children;
void insert(RenderObjectWrapper child, dynamic slot) {
void insertChildRoot(RenderObjectWrapper child, dynamic slot) {
final root = this.root; // TODO(ianh): Remove this once the analyzer is cleverer
assert(slot == null || slot is RenderObject);
assert(root is ContainerRenderObjectMixin);