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
7ee0b6a5
Commit
7ee0b6a5
authored
Sep 05, 2017
by
Michael Goderbauer
Committed by
GitHub
Sep 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clear tags on SemanticsNode.reset() (#11903)
parent
5f29abe2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
semantics.dart
packages/flutter/lib/src/rendering/semantics.dart
+1
-0
semantics_test.dart
packages/flutter/test/rendering/semantics_test.dart
+15
-0
No files found.
packages/flutter/lib/src/rendering/semantics.dart
View file @
7ee0b6a5
...
...
@@ -385,6 +385,7 @@ class SemanticsNode extends AbstractNode {
if
(
hadInheritedMergeAllDescendantsIntoThisNode
)
_inheritedMergeAllDescendantsIntoThisNodeValue
=
true
;
_label
=
''
;
_tags
.
clear
();
_markDirty
();
}
...
...
packages/flutter/test/rendering/semantics_test.dart
View file @
7ee0b6a5
...
...
@@ -110,6 +110,21 @@ void main() {
' └SemanticsNode(6; Rect.fromLTRB(0.0, 0.0, 0.0, 0.0))
\n
'
);
});
test
(
'reset clears tags'
,
()
{
const
SemanticsTag
tag
=
const
SemanticsTag
(
'tag for testing'
);
final
SemanticsNode
node
=
new
SemanticsNode
();
expect
(
node
.
hasTag
(
tag
),
isFalse
);
node
.
addTag
(
tag
);
expect
(
node
.
hasTag
(
tag
),
isTrue
);
node
.
reset
();
expect
(
node
.
hasTag
(
tag
),
isFalse
);
});
}
class
TestRender
extends
RenderProxyBox
{
...
...
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