93 Commits

Author SHA1 Message Date
Greg Spencer
6bc70e4a11
Reland: Migration to PlatformDispatcher and multi-window (#21932)
This re-lands #20496 and #21780 after fixing the semantics-enabling code that was causing the post-submit web_smoke_test to fail.

Below is the description from the original PR:

This is a PR for converting the dart:ui code in the engine to use a multi-window API. The goal here is to convert from the window singleton to an API that has the concept of multiple windows. Also, I'm matching up the new PlatformDispatcher class to talk directly to the PlatformConfiguration class in the engine. I'm not attempting to actually enable creating multiple windows here, just migrate to an API that has a concept of multiple windows. The multi-window API in this PR currently only ever creates one window.

The design doc for this change is here.

The major changes in this PR:

Move the platfom-specific attributes out of Window, and into the new PlatformDispatcher class that holds all of the platform state, so that the platform code need only update the configuration on this class.
Create FlutterView, FlutterWindow, and SingletonFlutterWindow classes to separate out the concepts of a view (of which there may be multiple in a window), a window (of which there may be multiple on a screen, and they host views), and a window where there is only ever expected to be one (this hosts the entire API of the former Window class, and will eventually be the type of the window singleton).
Next step after this PR lands:

Remove the Window class entirely (it is replaced by SingletonFlutterWindow). Some minor changes in the Framework are needed to switch to using SingletonFlutterWindow directly first.

The Window class still exists in this PR, but will be removed as soon as the framework is converted to point to the SingletonFlutterWindow class instead. They share the same API, just have different names (Window is currently a subclass of SingletonFlutterWindow). The intention is that the Window name will be freed up to use as a widget class name in the framework for managing windows. The singleton called window will remain, and keep the same API it has now.
2020-10-22 14:54:25 -07:00
Yuqian Li
c2938d06b1
Revert "Migration to PlatformDispatcher and multi-window #20496" (#21792)
* Revert "Fix documentation build for window changes. (#21780)"

This reverts commit 931a04683d6eb49fc92059b2384ac5b1618d5422.

* Revert "Migration to PlatformDispatcher and multi-window (#20496)"

This reverts commit 85b0031f73544e448354047dc6a236c0b0808252.
2020-10-12 19:26:41 -07:00
Greg Spencer
85b0031f73
Migration to PlatformDispatcher and multi-window (#20496)
This is a PR for converting the dart:ui code in the engine to use a multi-window API. The goal here is to convert from the window singleton to an API that has the concept of multiple windows. Also, I'm matching up the new PlatformDispatcher class to talk directly to the PlatformConfiguration class in the engine. I'm not attempting to actually enable creating multiple windows here, just migrate to an API that has a concept of multiple windows. The multi-window API in this PR currently only ever creates one window.

The design doc for this change is here.

The major changes in this PR:

Move the platfom-specific attributes out of Window, and into the new PlatformDispatcher class that holds all of the platform state, so that the platform code need only update the configuration on this class.
Create FlutterView, FlutterWindow, and SingletonFlutterWindow classes to separate out the concepts of a view (of which there may be multiple in a window), a window (of which there may be multiple on a screen, and they host views), and a window where there is only ever expected to be one (this hosts the entire API of the former Window class, and will eventually be the type of the window singleton).
Next step after this PR lands:

Remove the Window class entirely (it is replaced by SingletonFlutterWindow). Some minor changes in the Framework are needed to switch to using SingletonFlutterWindow directly first.

The Window class still exists in this PR, but will be removed as soon as the framework is converted to point to the SingletonFlutterWindow class instead. They share the same API, just have different names (Window is currently a subclass of SingletonFlutterWindow). The intention is that the Window name will be freed up to use as a widget class name in the framework for managing windows. The singleton called window will remain, and keep the same API it has now.
2020-10-09 16:29:16 -07:00
Nolan Scobie
d92c42f349
Minor a11y documentation breadcrumbs (#20330)
Adds a reference to RenderObject.describeSemanticsClip to
`SemanticsFlag.isHidden` and a hint that lets readers know that the
`SemanticsNode` rect is specified in local coordinates.
2020-10-02 23:30:23 -07:00
Alexander Brusher
de5f2b48fb
Revert "Revert "Adds fuchsia node roles to accessibility bridge updates. (#20385)" (#20936)" (#21367)
This reverts commit 96efe39272a2850092c9a1445dc5406dbe1fb645.
2020-09-25 11:07:10 -07:00
Jim Graham
96efe39272
Revert "Adds fuchsia node roles to accessibility bridge updates. (#20385)" (#20936)
This reverts commit 58a62076559585b167c89531dfb81092d744a552.
2020-09-01 21:21:07 -07:00
Alexander Brusher
58a6207655
Adds fuchsia node roles to accessibility bridge updates. (#20385) 2020-09-01 13:33:02 -07:00
Michael Goderbauer
19368efcc3
Fix dartdocs of dart:ui (#20140) 2020-07-29 23:56:02 -07:00
Siva
3bb6cc265e
Manual merge of Dart a3815b6590...24c7666def (#19967)
* Manual merge or Dart into flutter a3815b6590...24c7666def

dart-lang/sdk@24c7666def Update tests that have the current version number hardcoded
dart-lang/sdk@f88ce7aef5 Increase Dart version to 2.10

* Update language version.

* Update license.

* Hpdate language version.

* Update license.
2020-07-24 11:00:34 -07:00
gaaclarke
494e4e7e21
Added a more complete docstring for SemanticsFlags (#19817) 2020-07-16 13:13:26 -07:00
Yegor
194acdfaed
apply null safety syntax to mobile dart:ui (#18933)
* apply null safety syntax to mobile dart:ui
2020-06-12 12:42:12 -07:00
Yegor
4ce831e469
null-annotate semantics.dart (#18791) 2020-06-04 11:35:24 -07:00
Dan Field
343af33344
Live region announcements for iOS (#18798) 2020-06-03 19:13:04 -07:00
stuartmorgan
77617e47cf
Revert "null-annotate SemanticsUpdateBuilder.updateNode (#18552)" (#18785)
This reverts commit cc08940e6262ca6675eda145d7caf635e9774b4a.
2020-06-03 09:54:06 -07:00
Chris Bracken
cc08940e62
null-annotate SemanticsUpdateBuilder.updateNode (#18552)
The underlying _updateNode call requires that all parameters be set
non-null. There's a single call site in the framework in
lib/src/semantics/semantics.dart in SemanticsNode.updateWith(). At that
call site, all parameters are either asserted non-null in the
constructor of SemanticsData or defaulted to null, with the sole
exception of textDirection.

The ergonomics of this method are currently pretty ugly and we should
consider migrating most of the defaulting and assertions that we apply
at the call site up to the definition in dart:ui. That work is filed as
https://github.com/flutter/flutter/issues/57720.
2020-06-02 14:42:36 -07:00
Chris Bracken
9f4468602c
null-annotate semantics.dart (#18553)
Covers the remaining API surface of the semantics library.
2020-05-21 14:24:08 -07:00
Chris Bracken
af2b806700
null-annotate native calls in lib/ui/semantics.dart (#18436)
Also covers counterparts of these calls in web_ui.
2020-05-15 16:28:00 -07:00
Dan Field
e47fa0bee9
Avoid using Dart_New for semantics (#16849) 2020-02-28 10:31:03 -08:00
vsmenon
0ef67b5e74
opt out dart:ui from nnbd (#16473)
* opt out dart:ui from nnbd

* Annotate tests as well
2020-02-20 11:04:00 -08:00
Dan Field
89f3471fa7
the the fix (#15973) 2020-01-24 12:43:32 -08:00
Greg Spencer
77252d2371
Add missing focusable testing info (#13013)
This adds a couple of instances of semantic node isFocusable info that were missing that the framework testing depends upon.
2019-10-09 09:00:24 -07:00
Kate Lovett
58d7b84177
Re-land Adding Link Semantics (#12972) 2019-10-08 11:27:56 -07:00
Kate Lovett
ac45051f2a
Revert "Adding Link SemanticsFlag (#12453)" (#12815)
This reverts commit 974ca210f5275aee0775b363e9c3416e1603cf73.
2019-10-04 17:06:32 -07:00
Kate Lovett
974ca210f5
Adding Link SemanticsFlag (#12453) 2019-10-04 12:51:10 -07:00
Greg Spencer
05f4b33cd2
Add isFocusable to SemanticsFlag (#12618)
This adds an isFocusable to SemanticsFlag so that the framework can tell the engine what semantics nodes are allowed to be focused, which will affect what platform flags are applied to the semantics information.

This flag is not yet in use by the frame
2019-09-30 09:46:48 -07:00
Michael Goderbauer
ef7bcafd5c
a11y: expose max character count for text fields (#12269) 2019-09-16 09:37:25 -07:00
Mouad Debbar
ae14f04613
Add the isMultiline semantics flag to values (#9894) 2019-07-18 13:14:11 -07:00
Mouad Debbar
8849d3092d
Add multi-line flag to semantics (#9850) 2019-07-17 09:51:09 -07:00
chunhtai
9ab6550b45
Introduce read only text field semantics (#9281) 2019-06-19 09:42:23 -07:00
Dan Field
2b1f9925e4
new lints (#8849)
Dart lints added:
* Avoid optional new
* Avoid optional const
* Prefer single quotes
* Prefer default assignment `=`
2019-05-07 16:10:21 -07:00
Dan Field
09fae08271
fix assert (#8851) 2019-05-04 14:08:23 -07:00
Dan Field
bf89afdf6d
Add asserts to semantics.dart (#8846) 2019-05-04 07:47:22 -07:00
Michael Goderbauer
bd0f9085e5
Adds a platfromViewId to SemanticsNode (#8055) 2019-03-11 11:30:35 -07:00
Chris Bracken
e6a5201f0b
Add missing values to semantics action enums (#8033)
This brings the Dart and C++ semantics flag enums back in sync.

In #5902, the ability to move the cursor forward and backward one word
were added to dart:ui, and to the Android embedder, but not to the
SemanticsAction enum on the C++ side.
2019-03-05 07:58:26 -08:00
Chris Bracken
ed628da00a
Add missing kHasImplicitScrolling enum value (#8030)
This brings the Dart and C++ semantics flag enums back in sync.

In #5941, implicit scrolling support was added to SemanticsFlag in
dart:ui, and to the Android embedder, but not to the SemanticsFlags enum
on the C++ side.

This also clarifies/corrects the documentation for this value in dart:ui
and in the embedder API.
2019-03-04 22:00:54 -08:00
Greg Spencer
a1d84996dd
Fix spelling errors in dartdocs (#7997)
Fix the spelling errors in the dartdocs for the engine.

There are no functionality changes here, just documentation fixes.
2019-02-28 14:42:55 -08:00
Chris Bracken
abe9826a9d
Add accessibility semantics support to embedder (#7891)
Flutter's accessibility APIs consist of three main calls from the
embedder to the Dart application:

  1. FlutterEngineUpdateSemanticsEnabled: enables/disables semantics support.

  2. FlutterEngineUpdateAccessibilityFeatures: sets embedder-specific
     accessibility features.

  3. FlutterEngineDispatchSemanticsAction: dispatches an action (tap,
     long-press, scroll, etc.) to a semantics node.

and two main callbacks triggered by Dart code:

  1. FlutterUpdateSemanticsNodeCallback: notifies the embedder of
     updates to the properties of a given semantics node.

  2. FlutterUpdateSemanticsCustomActionCallback: notifies the embedder
     of updates to custom semantics actions registered in Dart code.

In the Flutter framework, when accessibility is first enabled, the
embedder will receive a stream of update callbacks notifying the
embedder of the full semantics tree. On further changes in the Dart
application, only updates will be sent.
2019-02-20 18:59:29 -08:00
Chris Bracken
a150cc125a
Fix minor typos in accessibility action docs (#7882)
Fixes a minor pluralisation error in docs for didGainAccessibilityFocus,
didLoseAccessibilityFocus.
2019-02-19 23:27:37 -08:00
Michael Goderbauer
6c68bf3caf
Revert "Revert "Add elevation and thickness to SemanticsNode (#7282)" (#7483)" (#7484)
This reverts commit 24cf93e2555da5f0b464b55c43fe4b1a7dd06eed.
2019-01-15 18:56:21 -08:00
Michael Goderbauer
24cf93e255
Revert "Add elevation and thickness to SemanticsNode (#7282)" (#7483)
This reverts commit 6c29fb4d5eeeba8aee7c484de185bf1d3679042a.
2019-01-15 10:45:49 -08:00
Michael Goderbauer
6c29fb4d5e
Add elevation and thickness to SemanticsNode (#7282) 2019-01-15 09:59:44 -08:00
Jonah Williams
42f449fa47
remove deprecated updateNode argument (#7413) 2019-01-08 16:39:38 -08:00
Jimmy Casey
f986a12e20 Correct spelling in doc comments (#7179)
Applies spelling corrections to accessibility-related doc comments and in the
license tool.
2018-12-16 12:51:00 -08:00
Siva
e6d6f18eb6
- Roll engine to version f9ebf2129732fd2b606286fdf58e500384b8a0bc (#6839)
* - Roll engine to version f9ebf2129732fd2b606286fdf58e500384b8a0bc
- Update @pragma directive for some classes in semantics.dart

* Update license file.
2018-11-13 09:03:58 -08:00
Michael Goderbauer
70a1106b50
Unify copyright lines (#6757) 2018-11-07 12:24:35 -08:00
sjindel-google
9e315e6465
Remove entries from dart_vm_entry_points.txt and use annotations (#6226)
The `dart_vm_entry_points.txt` file is now deprecated in favor of annotations.
Support for parsing and generating the entry-points files will be removed from Dart shortly.
2018-09-18 10:56:26 +02:00
Jonah Williams
abd918eb61
Add scrollIndex and scrollChildren to semantics, add Android implementation (#6239) 2018-09-13 10:28:27 -07:00
Jonah Williams
a5215ce500
Add hasImplicitScrolling SemanticFlag and support in Android bridge (#5941) 2018-08-06 13:57:00 -07:00
Jonah Williams
236d633a49
Add word movement granularities to android (#5902) 2018-07-30 17:53:17 -07:00
Jonah Williams
d559afb320
Support customizing standard accessibility actions on Android. (#5823) 2018-07-25 15:26:02 -07:00