Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
a2e75eae
Commit
a2e75eae
authored
Aug 20, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename vestiges of `root`
We now use the term `renderObject`. Fixes #708
parent
654fc734
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
26 deletions
+26
-26
basic.dart
packages/flutter/lib/widgets/basic.dart
+1
-1
block_viewport.dart
packages/flutter/lib/widgets/block_viewport.dart
+3
-3
framework.dart
packages/flutter/lib/widgets/framework.dart
+20
-20
scaffold.dart
packages/flutter/lib/widgets/scaffold.dart
+2
-2
No files found.
packages/flutter/lib/widgets/basic.dart
View file @
a2e75eae
...
...
@@ -732,7 +732,7 @@ class WidgetToRenderBoxAdapter extends LeafRenderObjectWrapper {
RenderObjectWrapper
ancestor
=
findAncestorRenderObjectWrapper
();
assert
(
ancestor
is
RenderObjectWrapper
);
assert
(
ancestor
.
renderObject
==
renderObject
.
parent
);
ancestor
.
detachChildR
oo
t
(
this
);
ancestor
.
detachChildR
enderObjec
t
(
this
);
super
.
remove
();
}
}
...
...
packages/flutter/lib/widgets/block_viewport.dart
View file @
a2e75eae
...
...
@@ -98,7 +98,7 @@ class BlockViewport extends RenderObjectWrapper {
static
const
_omit
=
const
Object
();
// used as a slot when it's not yet time to attach the child
void
insertChildR
oo
t
(
RenderObjectWrapper
child
,
dynamic
slot
)
{
void
insertChildR
enderObjec
t
(
RenderObjectWrapper
child
,
dynamic
slot
)
{
if
(
slot
==
_omit
)
return
;
final
renderObject
=
this
.
renderObject
;
// TODO(ianh): Remove this once the analyzer is cleverer
...
...
@@ -108,7 +108,7 @@ class BlockViewport extends RenderObjectWrapper {
assert
(
renderObject
==
this
.
renderObject
);
// TODO(ianh): Remove this once the analyzer is cleverer
}
void
detachChildR
oo
t
(
RenderObjectWrapper
child
)
{
void
detachChildR
enderObjec
t
(
RenderObjectWrapper
child
)
{
final
renderObject
=
this
.
renderObject
;
// TODO(ianh): Remove this once the analyzer is cleverer
assert
(
renderObject
is
ContainerRenderObjectMixin
);
if
(
child
.
renderObject
.
parent
!=
renderObject
)
...
...
@@ -381,7 +381,7 @@ class BlockViewport extends RenderObjectWrapper {
// Remove any old children.
for
(
_Key
oldChildKey
in
childrenByKey
.
keys
)
{
if
(!
newChildren
.
containsKey
(
oldChildKey
))
syncChild
(
null
,
childrenByKey
[
oldChildKey
],
null
);
// calls detachChildR
oo
t()
syncChild
(
null
,
childrenByKey
[
oldChildKey
],
null
);
// calls detachChildR
enderObjec
t()
}
if
(
haveChildren
)
{
...
...
packages/flutter/lib/widgets/framework.dart
View file @
a2e75eae
...
...
@@ -310,7 +310,7 @@ abstract class Widget {
assert
(
node
.
parent
==
null
);
}
void
detachR
oo
t
();
void
detachR
enderObjec
t
();
// Returns the child which should be retained as the child of this node.
Widget
syncChild
(
Widget
newNode
,
Widget
oldNode
,
dynamic
slot
)
{
...
...
@@ -327,7 +327,7 @@ abstract class Widget {
if
(
newNode
==
null
)
{
// the child in this slot has gone away
assert
(
oldNode
.
mounted
);
oldNode
.
detachR
oo
t
();
oldNode
.
detachR
enderObjec
t
();
removeChild
(
oldNode
);
assert
(!
oldNode
.
mounted
);
return
null
;
...
...
@@ -347,7 +347,7 @@ abstract class Widget {
}
}
else
{
assert
(
oldNode
.
mounted
);
oldNode
.
detachR
oo
t
();
oldNode
.
detachR
enderObjec
t
();
removeChild
(
oldNode
);
oldNode
=
null
;
}
...
...
@@ -447,9 +447,9 @@ abstract class TagNode extends Widget {
super
.
remove
();
}
void
detachR
oo
t
()
{
void
detachR
enderObjec
t
()
{
if
(
child
!=
null
)
child
.
detachR
oo
t
();
child
.
detachR
enderObjec
t
();
}
}
...
...
@@ -623,10 +623,10 @@ abstract class Component extends Widget {
super
.
remove
();
}
void
detachR
oo
t
()
{
void
detachR
enderObjec
t
()
{
assert
(
_built
!=
null
);
assert
(
renderObject
!=
null
);
_built
.
detachR
oo
t
();
_built
.
detachR
enderObjec
t
();
}
void
dependenciesChanged
()
{
...
...
@@ -883,16 +883,16 @@ abstract class RenderObjectWrapper extends Widget {
Widget
target
=
RenderObjectWrapper
.
_getMounted
(
renderObject
);
if
(
target
==
null
)
return
;
RenderObject
targetR
oo
t
=
target
.
renderObject
;
while
(
target
!=
null
&&
target
.
renderObject
==
targetR
oo
t
)
{
RenderObject
targetR
enderObjec
t
=
target
.
renderObject
;
while
(
target
!=
null
&&
target
.
renderObject
==
targetR
enderObjec
t
)
{
yield
target
;
target
=
target
.
parent
;
}
}
RenderObjectWrapper
_ancestor
;
void
insertChildR
oo
t
(
RenderObjectWrapper
child
,
dynamic
slot
);
void
detachChildR
oo
t
(
RenderObjectWrapper
child
);
void
insertChildR
enderObjec
t
(
RenderObjectWrapper
child
,
dynamic
slot
);
void
detachChildR
enderObjec
t
(
RenderObjectWrapper
child
);
void
retainStatefulRenderObjectWrapper
(
RenderObjectWrapper
newNode
)
{
newNode
.
_renderObject
=
_renderObject
;
...
...
@@ -909,7 +909,7 @@ abstract class RenderObjectWrapper extends Widget {
assert
(
_renderObject
!=
null
);
_ancestor
=
findAncestorRenderObjectWrapper
();
if
(
_ancestor
is
RenderObjectWrapper
)
_ancestor
.
insertChildR
oo
t
(
this
,
slot
);
_ancestor
.
insertChildR
enderObjec
t
(
this
,
slot
);
}
else
{
assert
(
old
.
runtimeType
==
runtimeType
);
_renderObject
=
old
.
renderObject
;
...
...
@@ -961,10 +961,10 @@ abstract class RenderObjectWrapper extends Widget {
super
.
remove
();
}
void
detachR
oo
t
()
{
void
detachR
enderObjec
t
()
{
assert
(
_ancestor
!=
null
);
assert
(
renderObject
!=
null
);
_ancestor
.
detachChildR
oo
t
(
this
);
_ancestor
.
detachChildR
enderObjec
t
(
this
);
}
}
...
...
@@ -973,11 +973,11 @@ abstract class LeafRenderObjectWrapper extends RenderObjectWrapper {
LeafRenderObjectWrapper
({
Key
key
})
:
super
(
key:
key
);
void
insertChildR
oo
t
(
RenderObjectWrapper
child
,
dynamic
slot
)
{
void
insertChildR
enderObjec
t
(
RenderObjectWrapper
child
,
dynamic
slot
)
{
assert
(
false
);
}
void
detachChildR
oo
t
(
RenderObjectWrapper
child
)
{
void
detachChildR
enderObjec
t
(
RenderObjectWrapper
child
)
{
assert
(
false
);
}
...
...
@@ -1005,7 +1005,7 @@ abstract class OneChildRenderObjectWrapper extends RenderObjectWrapper {
assert
(
oldChild
==
null
||
child
==
oldChild
||
oldChild
.
parent
==
null
);
}
void
insertChildR
oo
t
(
RenderObjectWrapper
child
,
dynamic
slot
)
{
void
insertChildR
enderObjec
t
(
RenderObjectWrapper
child
,
dynamic
slot
)
{
final
renderObject
=
this
.
renderObject
;
// TODO(ianh): Remove this once the analyzer is cleverer
assert
(
renderObject
is
RenderObjectWithChildMixin
);
assert
(
slot
==
null
);
...
...
@@ -1013,7 +1013,7 @@ abstract class OneChildRenderObjectWrapper extends RenderObjectWrapper {
assert
(
renderObject
==
this
.
renderObject
);
// TODO(ianh): Remove this once the analyzer is cleverer
}
void
detachChildR
oo
t
(
RenderObjectWrapper
child
)
{
void
detachChildR
enderObjec
t
(
RenderObjectWrapper
child
)
{
final
renderObject
=
this
.
renderObject
;
// TODO(ianh): Remove this once the analyzer is cleverer
assert
(
renderObject
is
RenderObjectWithChildMixin
);
assert
(
renderObject
.
child
==
child
.
renderObject
);
...
...
@@ -1046,7 +1046,7 @@ abstract class MultiChildRenderObjectWrapper extends RenderObjectWrapper {
walker
(
child
);
}
void
insertChildR
oo
t
(
RenderObjectWrapper
child
,
dynamic
slot
)
{
void
insertChildR
enderObjec
t
(
RenderObjectWrapper
child
,
dynamic
slot
)
{
final
renderObject
=
this
.
renderObject
;
// TODO(ianh): Remove this once the analyzer is cleverer
assert
(
slot
==
null
||
slot
is
RenderObject
);
assert
(
renderObject
is
ContainerRenderObjectMixin
);
...
...
@@ -1054,7 +1054,7 @@ abstract class MultiChildRenderObjectWrapper extends RenderObjectWrapper {
assert
(
renderObject
==
this
.
renderObject
);
// TODO(ianh): Remove this once the analyzer is cleverer
}
void
detachChildR
oo
t
(
RenderObjectWrapper
child
)
{
void
detachChildR
enderObjec
t
(
RenderObjectWrapper
child
)
{
final
renderObject
=
this
.
renderObject
;
// TODO(ianh): Remove this once the analyzer is cleverer
assert
(
renderObject
is
ContainerRenderObjectMixin
);
assert
(
child
.
renderObject
.
parent
==
renderObject
);
...
...
packages/flutter/lib/widgets/scaffold.dart
View file @
a2e75eae
...
...
@@ -207,11 +207,11 @@ class Scaffold extends RenderObjectWrapper {
}
}
void
insertChildR
oo
t
(
RenderObjectWrapper
child
,
ScaffoldSlots
slot
)
{
void
insertChildR
enderObjec
t
(
RenderObjectWrapper
child
,
ScaffoldSlots
slot
)
{
renderObject
[
slot
]
=
child
!=
null
?
child
.
renderObject
:
null
;
}
void
detachChildR
oo
t
(
RenderObjectWrapper
child
)
{
void
detachChildR
enderObjec
t
(
RenderObjectWrapper
child
)
{
final
renderObject
=
this
.
renderObject
;
// TODO(ianh): Remove this once the analyzer is cleverer
assert
(
renderObject
is
RenderScaffold
);
assert
(
renderObject
==
child
.
renderObject
.
parent
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment