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
b8609829
Unverified
Commit
b8609829
authored
Aug 13, 2021
by
chunhtai
Committed by
GitHub
Aug 13, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove _AbortingSemanticsFragment (#88067)
parent
6e224ee0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
63 deletions
+1
-63
object.dart
packages/flutter/lib/src/rendering/object.dart
+1
-63
No files found.
packages/flutter/lib/src/rendering/object.dart
View file @
b8609829
...
...
@@ -2754,25 +2754,11 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
final
Set
<
_InterestingSemanticsFragment
>
toBeMarkedExplicit
=
<
_InterestingSemanticsFragment
>{};
final
bool
childrenMergeIntoParent
=
mergeIntoParent
||
config
.
isMergingSemanticsOfDescendants
;
// When set to true there's currently not enough information in this subtree
// to compute semantics. In this case the walk needs to be aborted and no
// SemanticsNodes in the subtree should be updated.
// This will be true for subtrees that are currently kept alive by a
// viewport but not laid out.
bool
abortWalk
=
false
;
visitChildrenForSemantics
((
RenderObject
renderChild
)
{
if
(
abortWalk
||
_needsLayout
)
{
abortWalk
=
true
;
return
;
}
assert
(!
_needsLayout
);
final
_SemanticsFragment
parentFragment
=
renderChild
.
_getSemanticsForParent
(
mergeIntoParent:
childrenMergeIntoParent
,
);
if
(
parentFragment
.
abortsWalk
)
{
abortWalk
=
true
;
return
;
}
if
(
parentFragment
.
dropsSemanticsOfPreviousSiblings
)
{
fragments
.
clear
();
toBeMarkedExplicit
.
clear
();
...
...
@@ -2803,10 +2789,6 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
}
});
if
(
abortWalk
)
{
return
_AbortingSemanticsFragment
(
owner:
this
);
}
for
(
final
_InterestingSemanticsFragment
fragment
in
toBeMarkedExplicit
)
fragment
.
markAsExplicit
();
...
...
@@ -3535,17 +3517,6 @@ abstract class _SemanticsFragment {
/// Returns [_InterestingSemanticsFragment] describing the actual semantic
/// information that this fragment wants to add to the parent.
List
<
_InterestingSemanticsFragment
>
get
interestingFragments
;
/// Whether this fragment wants to abort the semantics walk because the
/// information in the tree are not sufficient to calculate semantics.
///
/// This happens for subtrees that are currently kept alive by a viewport but
/// not laid out.
///
/// See also:
///
/// * [_AbortingSemanticsFragment], which sets this to true.
bool
get
abortsWalk
=>
false
;
}
/// A container used when a [RenderObject] wants to add multiple independent
...
...
@@ -3859,39 +3830,6 @@ class _SwitchableSemanticsFragment extends _InterestingSemanticsFragment {
bool
get
_needsGeometryUpdate
=>
_ancestorChain
.
length
>
1
;
}
/// [_SemanticsFragment] used to indicate that the current information in this
/// subtree is not sufficient to update semantics.
///
/// Anybody processing this [_SemanticsFragment] should abort the walk of the
/// current subtree without updating any [SemanticsNode]s as there is no semantic
/// information to compute. As a result, this fragment also doesn't carry any
/// semantics information either.
class
_AbortingSemanticsFragment
extends
_InterestingSemanticsFragment
{
_AbortingSemanticsFragment
({
required
RenderObject
owner
})
:
super
(
owner:
owner
,
dropsSemanticsOfPreviousSiblings:
false
);
@override
bool
get
abortsWalk
=>
true
;
@override
SemanticsConfiguration
?
get
config
=>
null
;
@override
void
addAll
(
Iterable
<
_InterestingSemanticsFragment
>
fragments
)
{
assert
(
false
);
}
@override
void
compileChildren
({
Rect
?
parentSemanticsClipRect
,
Rect
?
parentPaintClipRect
,
required
double
elevationAdjustment
,
required
List
<
SemanticsNode
>
result
})
{
result
.
add
(
owner
.
_semantics
!);
}
@override
void
markAsExplicit
()
{
// Is never explicit.
}
}
/// Helper class that keeps track of the geometry of a [SemanticsNode].
///
/// It is used to annotate a [SemanticsNode] with the current information for
...
...
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