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
2b0705a3
Commit
2b0705a3
authored
Mar 28, 2016
by
Kris Giesing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename debugOwner to debugCreator
Fixes #2940
parent
07f60e67
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
15 deletions
+15
-15
debug.dart
packages/flutter/lib/src/material/debug.dart
+2
-2
layer.dart
packages/flutter/lib/src/rendering/layer.dart
+3
-3
object.dart
packages/flutter/lib/src/rendering/object.dart
+7
-7
framework.dart
packages/flutter/lib/src/widgets/framework.dart
+3
-3
No files found.
packages/flutter/lib/src/material/debug.dart
View file @
2b0705a3
...
...
@@ -22,7 +22,7 @@ bool debugCheckHasMaterial(BuildContext context) {
'The specific widget that could not find a Material ancestor was:
\n
'
'
${context.widget}
'
'The ownership chain for the affected widget is:
\n
'
'
${element.debugGet
Ownership
Chain(10)}
'
'
${element.debugGet
Creator
Chain(10)}
'
);
}
return
true
;
...
...
@@ -41,7 +41,7 @@ bool debugCheckHasScaffold(BuildContext context) {
'The specific widget that could not find a Scaffold ancestor was:
\n
'
'
${context.widget}
'
'The ownership chain for the affected widget is:
\n
'
'
${element.debugGet
Ownership
Chain(10)}
'
'
${element.debugGet
Creator
Chain(10)}
'
);
}
return
true
;
...
...
packages/flutter/lib/src/rendering/layer.dart
View file @
2b0705a3
...
...
@@ -73,7 +73,7 @@ abstract class Layer {
@override
String
toString
()
=>
'
$runtimeType
'
;
dynamic
debug
Owne
r
;
dynamic
debug
Creato
r
;
String
toStringDeep
([
String
prefixLineOne
=
''
,
String
prefixOtherLines
=
''
])
{
String
result
=
'
$prefixLineOne$this
\n
'
;
...
...
@@ -89,8 +89,8 @@ abstract class Layer {
}
void
debugFillDescription
(
List
<
String
>
description
)
{
if
(
debug
Owne
r
!=
null
)
description
.
add
(
'
owner:
$debugOwne
r
'
);
if
(
debug
Creato
r
!=
null
)
description
.
add
(
'
creator:
$debugCreato
r
'
);
}
String
debugDescribeChildren
(
String
prefix
)
=>
''
;
...
...
packages/flutter/lib/src/rendering/object.dart
View file @
2b0705a3
...
...
@@ -73,7 +73,7 @@ class PaintingContext {
child
.
_layer
??=
new
OffsetLayer
();
child
.
_layer
.
removeAllChildren
();
assert
(()
{
child
.
_layer
.
debug
Owner
=
child
.
debugOwne
r
??
child
.
runtimeType
;
child
.
_layer
.
debug
Creator
=
child
.
debugCreato
r
??
child
.
runtimeType
;
return
true
;
});
PaintingContext
childContext
=
new
PaintingContext
.
_
(
child
.
_layer
,
child
.
paintBounds
);
...
...
@@ -111,7 +111,7 @@ class PaintingContext {
});
child
.
_layer
.
detach
();
assert
(()
{
child
.
_layer
.
debug
Owner
=
child
.
debugOwne
r
??
child
.
runtimeType
;
child
.
_layer
.
debug
Creator
=
child
.
debugCreato
r
??
child
.
runtimeType
;
return
true
;
});
}
...
...
@@ -871,7 +871,7 @@ abstract class RenderObject extends AbstractNode implements HitTestTarget {
/// Override in subclasses with children and call the visitor for each child
void
visitChildren
(
RenderObjectVisitor
visitor
)
{
}
dynamic
debug
Owne
r
;
dynamic
debug
Creato
r
;
static
int
_debugPrintedExceptionCount
=
0
;
void
_debugReportException
(
String
method
,
dynamic
exception
,
StackTrace
stack
)
{
try
{
...
...
@@ -884,8 +884,8 @@ abstract class RenderObject extends AbstractNode implements HitTestTarget {
debugPrint
(
'The following exception was raised during
$method
():'
);
debugPrint
(
'
$exception
'
);
debugPrint
(
'The following RenderObject was being processed when the exception was fired:
\n
${this}
'
);
if
(
debug
Owne
r
!=
null
)
debugPrint
(
'This RenderObject had the following
owner:
\n
$debugOwne
r
'
);
if
(
debug
Creato
r
!=
null
)
debugPrint
(
'This RenderObject had the following
creator:
\n
$debugCreato
r
'
);
int
depth
=
0
;
List
<
String
>
descendants
=
<
String
>[];
const
int
maxDepth
=
5
;
...
...
@@ -1803,8 +1803,8 @@ abstract class RenderObject extends AbstractNode implements HitTestTarget {
/// per string. Subclasses should override this to have their information
/// included in toStringDeep().
void
debugFillDescription
(
List
<
String
>
description
)
{
if
(
debug
Owne
r
!=
null
)
description
.
add
(
'
owner:
$debugOwne
r
'
);
if
(
debug
Creato
r
!=
null
)
description
.
add
(
'
creator:
$debugCreato
r
'
);
description
.
add
(
'parentData:
$parentData
'
);
description
.
add
(
'constraints:
$constraints
'
);
}
...
...
packages/flutter/lib/src/widgets/framework.dart
View file @
2b0705a3
...
...
@@ -1029,7 +1029,7 @@ abstract class Element implements BuildContext {
assert
(
false
);
}
String
debugGet
Ownership
Chain
(
int
limit
)
{
String
debugGet
Creator
Chain
(
int
limit
)
{
List
<
String
>
chain
=
<
String
>[];
Element
node
=
this
;
while
(
chain
.
length
<
limit
&&
node
!=
null
)
{
...
...
@@ -1512,7 +1512,7 @@ class ParentDataElement<T extends RenderObjectWidget> extends _ProxyElement {
'Incorrect use of ParentDataWidget.
\n
'
+
widget
.
debugDescribeInvalidAncestorChain
(
description:
"
$this
"
,
ownershipChain:
parent
.
debugGet
Ownership
Chain
(
10
),
ownershipChain:
parent
.
debugGet
Creator
Chain
(
10
),
foundValidAncestor:
ancestor
!=
null
,
badAncestors:
badAncestors
)
...
...
@@ -1634,7 +1634,7 @@ abstract class RenderObjectElement extends BuildableElement {
}
void
debugUpdateRenderObjectOwner
()
{
_renderObject
.
debug
Owner
=
debugGetOwnership
Chain
(
10
);
_renderObject
.
debug
Creator
=
debugGetCreator
Chain
(
10
);
}
@override
...
...
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