Kate Lovett
a04fb324be
Bump Dart to 3.8 and reformat ( #171703 )
...
Bumps the Dart version to 3.8 across the repo (excluding
engine/src/flutter/third_party) and applies formatting updates from Dart
3.8.
## Pre-launch Checklist
- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel
on [Discord].
<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-07-07 17:58:32 +00:00
Conner Kasten
a13f7717bf
Public nodes needing paint or layout ( #166148 )
...
<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->
This PR adds 2 new `@protected` fields to `PipelineOwner` which list the
RenderObjects currently needing paint or layout for the next frame.
This PR addresses https://github.com/flutter/flutter/issues/166147 ,
which has further discussion of the motivation.
## Pre-launch Checklist
- [X] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [X] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [X] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [X] I signed the [CLA].
- [X] I listed at least one issue that this PR fixes in the description
above.
- [X] I updated/added relevant documentation (doc comments with `///`).
- [X] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [X] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [X] All existing and new tests are passing.
<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-03-31 20:13:32 +00:00
Tong Mu
0357b45337
Add clipRSuperellipse, and use them for dialogs ( #161111 )
...
This PR makes Flutter support `clipRSuperellipse`, and apply it to
`CupertinoAlertDialog`.
Hit tests related to RSuperellipse are performed based on its bounding
box, since the computation is too complicated and pixel perfect hit test
is not needed practically.
Native:
<img
src="https://github.com/user-attachments/assets/8f9b472a-e624-4eef-9cea-e81b80f32b86 "
width="400"/>
Native vs before: (The two screenshots are stacked and offset by (1, 1)
pixels. See the bottom right corner for comparison.)
<img
src="https://github.com/user-attachments/assets/ffaf62fc-a82f-4c7a-9ff1-52374f4f2a67 "
width="400"/>
Native vs after:
<img
src="https://github.com/user-attachments/assets/3dfde2b0-bcc6-492a-8d97-ecabdf97f6f0 "
width="400"/>
After only:
<img
src="https://github.com/user-attachments/assets/32b2a665-a0da-498f-acdb-598553940964 "
width="400"/>
## Pre-launch Checklist
- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel
on [Discord].
<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-03-05 02:06:12 +00:00
chunhtai
1d85de0fc8
Introduce caching mechanism during compile semantics tree monorepo and formatted version ( #161195 )
...
<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->
old pr: https://github.com/flutter/flutter/pull/150394
## Pre-launch Checklist
- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel
on [Discord].
<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-02-06 03:08:23 +00:00
Michael Goderbauer
5491c8c146
Auto-format Framework ( #160545 )
...
This auto-formats all *.dart files in the repository outside of the
`engine` subdirectory and enforces that these files stay formatted with
a presubmit check.
**Reviewers:** Please carefully review all the commits except for the
one titled "formatted". The "formatted" commit was auto-generated by
running `dev/tools/format.sh -a -f`. The other commits were hand-crafted
to prepare the repo for the formatting change. I recommend reviewing the
commits one-by-one via the "Commits" tab and avoiding Github's "Files
changed" tab as it will likely slow down your browser because of the
size of this PR.
---------
Co-authored-by: Kate Lovett <katelovett@google.com>
Co-authored-by: LongCatIsLooong <31859944+LongCatIsLooong@users.noreply.github.com>
2024-12-19 20:06:21 +00:00
yim
7814641bd8
fix fade_transition issue ( #157663 )
...
Fixes : #157312
A simpler way to reproduce this issue:
```dart
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> with SingleTickerProviderStateMixin {
late AnimationController controller = AnimationController(
duration: const Duration(seconds: 2),
value: 1,
vsync: this,
);
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Center(
child: FadeTransition(
opacity: controller,
child: Builder(
builder: (context) {
return GestureDetector(
onTap: () {
controller.value = 0.5;
context.findRenderObject()?.markNeedsPaint();
controller.value = 0;
},
child: Text("Click"),
);
},
),
),
),
),
);
}
}
```
The main reason is that updating the opacity with
`markNeedsCompositedLayerUpdate` followed by `markNeedsPaint` causes it
to be added to `owner!._nodesNeedingPaint` twice.
## Pre-launch Checklist
- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel
on [Discord].
<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
---------
Co-authored-by: Nate Wilson <nathan.wilson1232@gmail.com>
Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
2024-12-11 00:54:07 +00:00
PurplePolyhedron
a0ba2decab
improve ContainerRenderObjectMixin error message when parentData is not set up properly ( #157846 )
...
Previously when subclassing `MultiChildRenderObjectWidget` and
`RenderObject with ContainerRenderObjectMixin`, if one forgot to set up
parent data, the error message does not give hint that `setupParentData`
need to be implemented by the `RenderObject`.
This PR add assertion that check parent data type before type cast and
give hints if it is was not properly set.
## Pre-launch Checklist
- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel
on [Discord].
<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2024-11-29 08:20:31 +00:00
LongCatIsLooong
a766945bdd
Allow RenderObject.getTransformTo to take an arbitrary RenderObject in the same tree ( #148897 )
...
This is https://github.com/flutter/flutter/pull/130192 but without the additional parameter.
Fixes https://github.com/flutter/flutter/issues/146764 , https://github.com/flutter/flutter/issues/148410
2024-05-22 23:32:24 +00:00
Binni Goel
e2d5e8fdce
Instrumented PipelineOwner for leak tracking ( #137494 )
2023-11-02 07:48:22 -07:00
Alex Wallen
23d258df57
Remove deprecated updateSemantics API usage. ( #113382 )
2022-10-26 20:20:41 +00:00
Dan Field
d54cdf9e18
Add a mechanism to observe layer tree composition. ( #103378 )
2022-05-17 11:22:11 -07:00
Ian Hickson
ab89ce285f
Clean up the bindings APIs. ( #89451 )
2022-02-03 14:55:15 -08:00
chunhtai
e17a1858e5
LayerLink can temporary allow multiple leaders ( #95977 )
2022-01-07 17:50:10 -08:00
Dan Field
c1fe2bd1e0
Reland "Dispose render objects when owning element is unmounted. ( #82883 )" ( #83790 ) ( #83920 )
2021-06-07 18:39:02 -07:00
Ren You
63c49c3d83
Revert "Dispose render objects when owning element is unmounted. ( #82883 )" ( #83790 )
...
This reverts commit c75edc268ca336c66a103f1c0d82c4dff140fca0.
2021-06-02 07:54:19 -07:00
Dan Field
c75edc268c
Dispose render objects when owning element is unmounted. ( #82883 )
2021-06-01 22:29:02 -07:00
Todd Volkert
0cc58fd046
Fix assert in RenderObject.getTransformTo() ( #81590 )
...
The assert was never hitting because it was first hitting a
null cast error in the `renderer.parent!` line in the for
loop.
2021-04-30 21:08:54 -07:00
Alexandre Ardhuin
59fc92168a
add missing trailing commas ( #81065 )
2021-04-23 22:47:40 +02:00
Alexandre Ardhuin
4acc790252
enable lint cast_nullable_to_non_nullable ( #67629 )
2020-10-08 21:05:43 +02:00
Kate Lovett
019e90f7df
[NNBD] Migrates some rendering tests ( #67449 )
2020-10-07 16:27:06 -07:00
Alexandre Ardhuin
4d7525f05c
Opt out nnbd in packages/flutter ( #59186 )
...
* add language version 2.8 in packages/flutter
* enable non-nullable analyzer flag
2020-06-11 14:11:30 +02:00
Dan Field
8b2993337a
revert #48985 ( #49572 )
2020-01-27 14:36:02 -08:00
Anthony
b67d5ec6e9
[a11y] Make sure RenderFractionalTranslation updates its semantics after the translation field is set ( #48985 )
2020-01-17 15:13:01 -08:00
Alexandre Ardhuin
003541499b
use isA<Xxx>() matcher ( #48482 )
2020-01-16 12:43:03 -08:00
Alexandre Ardhuin
dfbd585668
implicit-casts:false in flutter/test ( #46245 )
2019-12-16 15:03:02 -08:00
Ian Hickson
449f4a6673
License update ( #45373 )
...
* Update project.pbxproj files to say Flutter rather than Chromium
Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright.
* Update the copyright notice checker to require a standard notice on all files
* Update copyrights on Dart files. (This was a mechanical commit.)
* Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine.
Some were already marked "The Flutter Authors", not clear why. Their
dates have been normalized. Some were missing the blank line after the
license. Some were randomly different in trivial ways for no apparent
reason (e.g. missing the trailing period).
* Clean up the copyrights in non-Dart files. (Manual edits.)
Also, make sure templates don't have copyrights.
* Fix some more ORGANIZATIONNAMEs
2019-11-27 15:04:02 -08:00
Alexandre Ardhuin
e9965f5636
add missing trailing commas in packages/flutter ( #41076 )
2019-09-24 08:05:41 +02:00
Yegor
34c692659e
Teach render objects to reuse engine layers ( #36402 )
...
Teach Layer and its implementations, RenderObject and its implementations, and PaintingContext to reuse engine layers. The idea is that a concrete RenderObject creates a Layer and holds on to it as long as it needs it (i.e. when it is composited, and the layer type does not change). In return, each Layer object holds on to an EngineLayer and reports it to the engine via addRetained and oldLayer. This allows the Web engine to reuse DOM elements across frames. Without it, each frame drops all previously rendered HTML and regenerates it from scratch.
2019-08-16 15:27:12 -07:00
Michael Goderbauer
4cf1a3504b
Remove bogus code in ContainerParentDataMixin.detach ( #37479 )
2019-08-07 09:22:51 -07:00
Jacob Richman
38f849015c
Add more structure to errors messages. ( #34684 )
...
Breaking change to extremely rarely used ParentDataWidget.debugDescribeInvalidAncestorChain api changing the return type of the method from String to DiagnosticsNode.
2019-06-20 10:56:03 -07:00
Dan Field
fe9512fa72
Re-enable const ( #31600 )
...
* Re-enable const
2019-04-29 16:02:42 -07:00
Alexandre Ardhuin
a0d1f93b07
fix block formatting ( #29051 )
2019-03-09 09:03:11 +01:00
Matt Carroll
92125ed38f
Enable dependency injection of Window instead of using static property ( #27389 )
2019-02-04 16:46:04 -08:00
Michael Goderbauer
8d249c25ea
Fix semantics compiler for offstage children ( #24862 )
...
Fixes #20313 .
2018-12-10 08:58:14 -08:00
Alexandre Ardhuin
d927c93310
Unnecessary new ( #20138 )
...
* enable lint unnecessary_new
* fix tests
* fix tests
* fix tests
2018-09-12 08:29:29 +02:00
Ian Hickson
686d8f8a22
Shim package:test to avoid matcher issues ( #20602 )
...
* Upgrade everything except matcher.
* Roll matcher (and test)
* Adjust tests that depend on flutter:test directly to depend on a shim
* Require use of package:test shim and remove other references to package:test
2018-08-14 20:33:58 -07:00
Michael Goderbauer
a9e2781132
Do not do semantics for detached objects ( #15320 )
2018-03-08 22:33:46 -08:00
Michael Goderbauer
6493c8b43d
Adapt markNeedsSemanticsUpdate algorithm to new semantics tree compiler ( #13274 )
...
* ensures that only semantics boundaries will be added to owner._nodesNeedingSemantics as expected by compiler.
* no longer throws assert if markNeedsSemanticsUpdate is called on non-semantic-boundary render object with a non-semantic-boundary parent.
* Fixes #13109 .
* removes onlyLocalUpdates from markNeedsSemanticsUpdate as its no longer needed.
2017-11-30 12:18:33 -08:00
Michael Goderbauer
f8a2bd20e9
Redesign Semantic Tree Compilation Algorithm ( #12605 )
...
* Oct 12 10:12am
* implicit_semantics_test.dart passes
* refactoring
* works in nice
* minor rename
* more doc comments
* to be explicit check better
* fix test
* ++
* ++
* semantics_9_test (BlockSemantics) and implicit_semantics_test are passing
* doc updates
* tiny refactor
* fix static errors in tests
* fix gesture detector
* ++
* ++
* geometry
* ++
* remove noGeometry
* revert test
* +
* all tests but scrolling/clipping pass
* clipping works
* scrolling halfway
* sliver tests pass
* ALL TESTS PASS
* SemanticsNode changed
* docs and tiny fixes
* card test
* more doc comments
* remove missed print
* more tests
* make test pass on Linux
* remove changes to intellij proj file
* review comments
2017-10-18 16:28:24 -07:00
Ian Hickson
953dabc70b
Fix some typos ( #12233 )
2017-09-24 01:40:42 -07:00
Michael Goderbauer
f265301519
Doc updates for Semantics; always reset SemanticsNode ( #11770 )
...
* refactor to ensureAction + some related doc fixes
* Update docs for markNeedsSemanticsUpdate
* rewording
* rewording
* ensureAction test
* ensureAction test
* ensureAction test
* more tests
* refactor to allways reset node
* tiny fixes
* more test
* doc fixes
* one more test
* review comments
2017-08-25 17:21:46 -07:00
Michael Goderbauer
744921fa02
Ensure that a frame is scheduled when a RenderObject calls markNeedsSemanticsUpdate ( #11207 )
...
* Ensure that a frame is allways scheduled when a RenderObject marks itself as needing a semantics update
Fixes issue 2 described in https://github.com/flutter/flutter/issues/10971
Previously, an object could call `markNeedsSemanticsUpdate` and its wish would never be granted because no frame was scheduled that would actually update the semantics. This caused an issue during scrolling on Android where at the end of the scroll the `RenderIgnorePointer` would stop blocking the semantics of the scrolled view, call `markNeedsSemanticsUpdate`, but then no frame was scheduled to actually put the semantics of the scrolled view back into the semantics tree. That made the scrolled view unusable for a11y users.
At first I was a bit wary to call `requestVisualUpdate` within `markNeedsSemanticsUpdate` because technically the visual is fine, we only need the frame it schedules to update the semantics. However, it seems like we are using `requestVisualUpdate` for exactly that purpose in other places already where we just need an update to the semantics (e.g. 76a50fe0ca/packages/flutter/lib/src/rendering/object.dart (L2408) ).
* add tests
2017-07-17 16:49:05 -07:00