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
a9ad84a8
Commit
a9ad84a8
authored
Sep 18, 2015
by
Ian Hickson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1241 from Hixie/ancestorOfType
Move findAncestorRenderObjectWrapper to RenderObjectWrapper
parents
93ebc9e4
c363a9a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
framework.dart
packages/flutter/lib/src/widgets/framework.dart
+8
-8
No files found.
packages/flutter/lib/src/widgets/framework.dart
View file @
a9ad84a8
...
@@ -354,13 +354,6 @@ abstract class Widget {
...
@@ -354,13 +354,6 @@ abstract class Widget {
// where to put this descendant. If you just defer to a child, then make sure
// where to put this descendant. If you just defer to a child, then make sure
// to pass them the slot.
// to pass them the slot.
Widget
findAncestorRenderObjectWrapper
()
{
var
ancestor
=
_parent
;
while
(
ancestor
!=
null
&&
ancestor
is
!
RenderObjectWrapper
)
ancestor
=
ancestor
.
_parent
;
return
ancestor
;
}
Set
<
Type
>
_dependencies
;
Set
<
Type
>
_dependencies
;
Inherited
inheritedOfType
(
Type
targetType
)
{
Inherited
inheritedOfType
(
Type
targetType
)
{
if
(
_dependencies
==
null
)
if
(
_dependencies
==
null
)
...
@@ -1103,6 +1096,13 @@ abstract class RenderObjectWrapper extends Widget {
...
@@ -1103,6 +1096,13 @@ abstract class RenderObjectWrapper extends Widget {
newNode
.
_ancestor
=
_ancestor
;
newNode
.
_ancestor
=
_ancestor
;
}
}
RenderObjectWrapper
findAncestorRenderObjectWrapper
()
{
Widget
ancestor
=
parent
;
while
(
ancestor
!=
null
&&
ancestor
is
!
RenderObjectWrapper
)
ancestor
=
ancestor
.
parent
;
return
ancestor
;
}
void
_sync
(
RenderObjectWrapper
old
,
dynamic
slot
)
{
void
_sync
(
RenderObjectWrapper
old
,
dynamic
slot
)
{
// TODO(abarth): We should split RenderObjectWrapper into two pieces so that
// TODO(abarth): We should split RenderObjectWrapper into two pieces so that
// RenderViewObject doesn't need to inherit all this code it
// RenderViewObject doesn't need to inherit all this code it
...
@@ -1113,7 +1113,7 @@ abstract class RenderObjectWrapper extends Widget {
...
@@ -1113,7 +1113,7 @@ abstract class RenderObjectWrapper extends Widget {
_renderObject
=
createNode
();
_renderObject
=
createNode
();
assert
(
_renderObject
!=
null
);
assert
(
_renderObject
!=
null
);
_ancestor
=
findAncestorRenderObjectWrapper
();
_ancestor
=
findAncestorRenderObjectWrapper
();
if
(
_ancestor
is
RenderObjectWrapper
)
if
(
_ancestor
!=
null
)
_ancestor
.
insertChildRenderObject
(
this
,
slot
);
_ancestor
.
insertChildRenderObject
(
this
,
slot
);
}
else
{
}
else
{
_renderObject
=
old
.
renderObject
;
_renderObject
=
old
.
renderObject
;
...
...
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