提交 ee7bb52b 编写于 作者: A Adam Barth

Rename setupPos to setParentData

As recommend by Ian.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1149843003
上级 0a09212f
......@@ -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();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册