Commit 7ee0b6a5 authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

Clear tags on SemanticsNode.reset() (#11903)

parent 5f29abe2
......@@ -385,6 +385,7 @@ class SemanticsNode extends AbstractNode {
if (hadInheritedMergeAllDescendantsIntoThisNode)
_inheritedMergeAllDescendantsIntoThisNodeValue = true;
_label = '';
_tags.clear();
_markDirty();
}
......
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment