mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Rename setupPos to setParentData
As recommend by Ian. R=ianh@google.com Review URL: https://codereview.chromium.org/1149843003
This commit is contained in:
parent
0a09212fe5
commit
ee7bb52bdd
@ -74,7 +74,7 @@ abstract class RenderNode extends AbstractNode {
|
||||
// node out, and any other nodes who happen to know exactly what
|
||||
// kind of node that is.
|
||||
ParentData parentData;
|
||||
void setupPos(RenderNode child) {
|
||||
void setParentData(RenderNode child) {
|
||||
// override this to setup .parentData correctly for your class
|
||||
if (child.parentData is! ParentData)
|
||||
child.parentData = new ParentData();
|
||||
@ -83,7 +83,7 @@ abstract class RenderNode extends AbstractNode {
|
||||
void adoptChild(RenderNode child) { // only for use by subclasses
|
||||
// call this whenever you decide a node is a child
|
||||
assert(child != null);
|
||||
setupPos(child);
|
||||
setParentData(child);
|
||||
super.adoptChild(child);
|
||||
}
|
||||
void dropChild(RenderNode child) { // only for use by subclasses
|
||||
@ -311,7 +311,7 @@ class RenderCSSContainer extends RenderCSS with ContainerRenderNodeMixin<RenderC
|
||||
|
||||
RenderCSSContainer(debug) : super(debug);
|
||||
|
||||
void setupPos(RenderNode child) {
|
||||
void setParentData(RenderNode child) {
|
||||
if (child.parentData is! CSSParentData)
|
||||
child.parentData = new CSSParentData();
|
||||
}
|
||||
@ -365,7 +365,7 @@ class RenderCSSFlex extends RenderCSSContainer {
|
||||
markNeedsLayout();
|
||||
}
|
||||
|
||||
void setupPos(RenderNode child) {
|
||||
void setParentData(RenderNode child) {
|
||||
if (child.parentData is! FlexBoxParentData)
|
||||
child.parentData = new FlexBoxParentData();
|
||||
}
|
||||
@ -422,7 +422,7 @@ class RenderCSSStack extends RenderCSSContainer {
|
||||
|
||||
RenderCSSStack(debug) : super(debug);
|
||||
|
||||
void setupPos(RenderNode child) {
|
||||
void setParentData(RenderNode child) {
|
||||
if (child.parentData is! StackParentData)
|
||||
child.parentData = new StackParentData();
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ abstract class RenderNode extends AbstractNode {
|
||||
// node out, and any other nodes who happen to know exactly what
|
||||
// kind of node that is.
|
||||
ParentData parentData;
|
||||
void setupPos(RenderNode child) {
|
||||
void setParentData(RenderNode child) {
|
||||
// override this to setup .parentData correctly for your class
|
||||
if (child.parentData is! ParentData)
|
||||
child.parentData = new ParentData();
|
||||
@ -57,7 +57,7 @@ abstract class RenderNode extends AbstractNode {
|
||||
void adoptChild(RenderNode child) { // only for use by subclasses
|
||||
// call this whenever you decide a node is a child
|
||||
assert(child != null);
|
||||
setupPos(child);
|
||||
setParentData(child);
|
||||
super.adoptChild(child);
|
||||
}
|
||||
void dropChild(RenderNode child) { // only for use by subclasses
|
||||
@ -404,7 +404,7 @@ class BoxParentData extends ParentData {
|
||||
|
||||
abstract class RenderBox extends RenderNode {
|
||||
|
||||
void setupPos(RenderNode child) {
|
||||
void setParentData(RenderNode child) {
|
||||
if (child.parentData is! BoxParentData)
|
||||
child.parentData = new BoxParentData();
|
||||
}
|
||||
@ -568,7 +568,7 @@ class RenderBlock extends RenderBox with ContainerRenderNodeMixin<RenderBox, Blo
|
||||
}
|
||||
}
|
||||
|
||||
void setupPos(RenderBox child) {
|
||||
void setParentData(RenderBox child) {
|
||||
if (child.parentData is! BlockParentData)
|
||||
child.parentData = new BlockParentData();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user