423 Commits

Author SHA1 Message Date
Chris Bracken
495467648f [win32] Disable a11y UIA unit tests (flutter/engine#31452)
Chrome's implementation of UI Automation support was only
partially-complete at the time we forked //third_party/accessibility. We
don't use UIA in Flutter, but rely instead entirely on the MSAA
accessiblity implementation.

Disabling these tests for now, rather than deleting, since we'll need to
make a decision on whetheer to port the updates from the Chromium tree,
or write our own simpler UIA implementation.

Issue: https://github.com/flutter/flutter/issues/98427
Related issue: https://github.com/flutter/flutter/issues/94782
2022-02-14 12:07:45 -08:00
Chris Bracken
81c662ef3d Enable a11y unittests on Windows (flutter/engine#31387)
This enables accessibility unittests on Windows as part of our CI testing.

It also corrects two unit tests which were fixed by
https://github.com/flutter/engine/pull/29773, which fixed
https://github.com/flutter/flutter/issues/78460.

Finally it disables an AXFragmentRoot test that times out. We don't use
AXFragmentRoot in Flutter as it's only used with UI Automation APIs,
which Flutter does not use (we use MSAA).

Issue: https://github.com/flutter/flutter/issues/98225
2022-02-12 12:51:01 -08:00
Chris Bracken
d232131bf0 [a11y] Delegate UTF8ToUTF16 to FML (flutter/engine#31376)
Delegates string encoding conversions between UTF-8 and UTF-16 strings
in //third_party/accessibility/base to our existing implementations in
FML.

Issue: https://github.com/flutter/flutter/issues/98061
2022-02-10 13:25:10 -08:00
Clement Skau
c988119386 Adds Tonic templates for Dart FFI bindings. (flutter/engine#29405)
This change adds additional Tonic templates for automatically generating bindings for Dart FFI, as well as serialisation of the bindings.

- Adds parallel FfiDispather templates to the existing DartDispatcher used for (old) native bindings.
- Adds serialisation of the bindings to enable automatic conversion and verification.
- Extends existing DartConverters with conversions to and from the FFI transport types.
- Adds new test (ffi_native_unittest.cc) for the above.

This will allow us to replace the existing native functions in e.g. dart:ui with new Dart FFI native functions.
2022-02-08 08:57:55 +01:00
Jason Simmons
f55649a744 Invalidate the ParagraphSkia line metrics caches when redoing layout (flutter/engine#31138) 2022-02-01 09:50:02 -08:00
Jason Simmons
a237fa84cd libtxt: Initialize ParagraphTxt::final_line_count_ (flutter/engine#30892) 2022-01-20 10:35:09 -08:00
Chris Bracken
55400d29eb Fix missing shcore.dll error on Windows 7 (flutter/engine#30699) 2022-01-05 15:50:03 -08:00
Jason Simmons
de66470b44 Roll HarfBuzz to version 3.1.1 (flutter/engine#30354)
Also migrates to the HarfBuzz 3.x font subsetting API
(see https://github.com/flutter/engine/pull/29266)
2021-12-16 08:13:08 -08:00
Greg Spencer
6079aa5f81 Reland: Accessibility number formatting improvements for Windows (#29773) (flutter/engine#30301)
This reverts commit e7c6dea to re-land the previous change in #29773.
Chinmay realized that because we link the whole engine into one DLL on Windows, the export settings for the symbols don't affect this code: If we include a second copy of the double-conversion library, the duplicate symbols are all internal to the DLL. Consequently, we need to link to the copy in the Dart runtime, so this is the correct implementation. If the Dart team decides to change/remove the library in the future, we will need to add in our own copy at that time.

This adds some accessibility improvements for reading out numbers. Currently this code is only used on Windows.
2021-12-14 13:24:45 -08:00
Greg Spencer
e7c6deaef6 Revert "Accessibility number formatting improvements for Windows (#29773)" (flutter/engine#30267) 2021-12-10 13:09:10 -08:00
Greg Spencer
3911c3d5d8 Accessibility number formatting improvements for Windows (flutter/engine#29773)
This adds some accessibility improvements for reading out numbers. Currently this code is only used on Windows.

Fixes flutter#78460
2021-12-09 13:04:00 -08:00
Chris Bracken
93f6d81c75 Accessibility: emit FOCUS_CHANGED events (flutter/engine#30091)
When calling Unserialize on an AXTreeUpdate, check whether the focus_id
has changed. If so, emit a FOCUS_CHANGED event from the event generator.
This allows the platform-specific FlutterPlatformNodeDelegate
implementations to handle focus changes originating from the framework,
and trigger the appropriate operating system focus-changed
notifications.

Issue: https://github.com/flutter/flutter/issues/77838
2021-12-02 18:14:15 -08:00
Chris Bracken
679e34a3e3 Eliminate hardcoded scale factor in a11y scroll (flutter/engine#30013)
When performing an accessibilty scroll, the default scroll distance is
kSmallScrollIncrement (40 pixels). This value is then multiplied by the
system scale factor, as set in the display settings drop-down in the Windows
system settings.

When we imported the AX tree from Chromium, we hard-coded the system
scale factor to 1.0 due to a fair amount of abstraction of the scale
factor lookup in their code. This fills it back in.

Issue: https://github.com/flutter/flutter/issues/78798
2021-12-01 12:32:32 -08:00
Chris Bracken
f8dfe2fab4 Win32 a11y bridge and platform node delegates (flutter/engine#29829)
* Win32 a11y bridge and platform node delegates

This is the third in a series of patches adding accessibility support
for the Windows embedder. This patch wires in the Accessibility bridge,
and lands the core structure of the Windows FlutterPlatformNodeDelegate
and AccessibilityBridgeDelegate classes, including:

* Instantiating the AccessibilityBridge when the semantics tree is
  enabled.
* Creating FlutterPlatformNodeDelegate wrappers for semantics tree
  nodes.
* Handling custom action updates.
* Building and updating the accessibility tree on semantics updates.
* Returning the native IAccessible objects when queried.

Breaking this out so that the follow-up patches can be reviewed and
landed in smaller, independent chunks.

Issue: https://github.com/flutter/flutter/issues/77838
Issue: https://github.com/flutter/flutter/issues/93928
2021-11-29 13:23:42 -08:00
ColdPaleLight
9ecd4c1899 Make FlutterEngineGroup support dart entrypoint args (flutter/engine#29096) 2021-11-18 18:08:03 -08:00
Zachary Anderson
03c0f7e453 Add 'explicit' to header files (flutter/engine#29741) 2021-11-17 12:49:16 -08:00
George Wright
c859ffd744 Update third-party benchmark library (flutter/engine#29627)
* Roll benchmark to upstream github @ 431abd149fd76a072f821913c0340137cc755f36
Roll buildroot to bfa04ad85fed176aa909f880ef5c8009c945ba03 to get build files for benchmark

* Roll flutter_packages to b1fdbabbe70caa21566f6a815235d624c716ea16

* Add a task name to parse_and_send.dart's call to FlutterDestination.update()
2021-11-10 10:22:34 -08:00
Ahmed Ashour
acdc8a5c8b Fix typos (flutter/engine#29280) 2021-10-27 20:30:31 -07:00
Dan Field
f1dae7ad34 Delay default font manager to run concurrently with isolate setup (flutter/engine#29291)
* Delay default font manager to run concurrently with isolate setup

* test
2021-10-21 16:20:32 -07:00
Chris Bracken
8af486c93a Use accessibility_config for accessibility/ax (flutter/engine#29275)
//flutter/third_party/accessiblity/ax/ax_event_generator.cc includes the
AXEventGenerator::Iterator class which subclasses std::iterator, which
triggers an MSVC C++17 deprecation warning. This warning, can be
suppressed by defining _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING
which is already done in the accessibility_config config.

Also updates the TODO to reference the issue tracking the cleanup and
removal of that definition.

Issue: https://github.com/flutter/flutter/issues/92229
2021-10-21 09:42:57 -07:00
Filip Filmar
5debecb677 Update the ICU library to 2b50fa94b07b601293d7c1f791e853bba8ffbb84 (flutter/engine#28646)
Originally I wanted to update to 3f443830bd52d3aa5fab3c1aa2b6d0848bb5039d.
However, that change had a problem with a misspelled build target which
I also had to fix.

But, that fix turned out to be infeasible on its own, and led to a
bugfix in `gn`.

Fixes:

- Updates gn to commit 0153d369bbccc908f4da4993b1ba82728055926a to take
  in the fix at https://gn-review.googlesource.com/c/gn/+/12220 which
  prevented the correct treatment of target refactoring.

- Updates ICU to commit 2b50fa94b07b601293d7c1f791e853bba8ffbb84 to
  correct the target naming, which should now work thanks to the
  previous update to gn.  See
  https://gn-review.googlesource.com/c/gn/+/12220 for the details of
  that bug.

- Fixed the visibility declaration in `//flutter/third_party/accessibility:accessibility_config`
  which used to not be enforced due to a bug in `gn` which was fixed in
  https://gn.googlesource.com/gn/+/46b572ce4ceedfe57f4f84051bd7da624c98bf01,
  a revision which we took in by updating `gn` in the first bullet.

Fun times.

See: https://chromium-review.googlesource.com/c/chromium/deps/icu/+/3163524

Please see the linked issue for details about why this update.
2021-09-24 12:27:21 -07:00
Darren Chan
b82554ae4a Implement a default font manager for Fuchsia. (flutter/engine#28673)
This helps us get rid of our hacky font switch after engine initialization.

See https://fxbug.dev/76406 and https://github.com/flutter/flutter/issues/82202.
2021-09-21 12:33:37 -07:00
Jason Simmons
d85d394682 Fix Libtxt unit test errors found by ASAN (flutter/engine#28146) 2021-08-17 15:27:01 -07:00
Chinmay Garde
dbc0d4d4b1 Ensure gclient sync is successful on an M1 Mac host. (flutter/engine#27354) 2021-07-13 15:26:02 -07:00
Martin Kustermann
91ff075a74 Make dart wrappable classes use only one native field (flutter/engine#27350)
* Make dart wrappable classes use only one native field

It appears like the second native field is never really used for
anything: It is set, cleared and verified it was cleared, but that is
it.

=> The only native field that is necessary is the `this` pointer of the
   equivalent C++ object.
=> The [DartWrapperInfo] object which was stored as second native field
   is always accessible via the virtual `GetDartWrapperInfo()` method on
   `this`.
2021-07-13 16:39:22 +02:00
Jason Simmons
663678b9de Use unstripped executables when running tests on Linux (flutter/engine#26921) 2021-06-29 07:31:02 -07:00
Jason Simmons
864165a64d Reserve space for the line metrics styles created by ParagraphSkia::GetLineMetrics (flutter/engine#26909) 2021-06-25 11:11:01 -07:00
chunhtai
d9a591eb9c Support text editing voiceover feedback in macOS (flutter/engine#25600) 2021-06-01 12:00:05 -07:00
Brandon DeRosier
a83c8ab61d Refactor: Group together externally-managed UIDartState. (flutter/engine#26247)
Group together externally-managed UIDartState.

It's a frequent pattern to enable access to shell resources from the
framework via UIDartState. These handles are passed through several
other objects, where they lay mostly dormant. This refactor just aims
to ease maintenance of this state.

UIDartState is essentially just an easy to extend bus for dropping
off the shell kids in UIDartState, with constructors/operators that
remove the need for providing a full initializer lists in unittests.
2021-05-20 18:01:53 -07:00
Brandon DeRosier
b9982cdec7 Add image generator registry (flutter/engine#25987)
Add image generator protocol and priority registry.

The protocol supports multi-frame images as well as optional
subpixel/downsampled decoding.
2021-05-17 12:12:46 -07:00
heke123
c59ffe8b9a Use "blur_sigma" instead of "blur_radius" in Shadow. (flutter/engine#25760) 2021-04-30 14:34:02 -07:00
Michael Reed
d05dafab40 Remove override; method no longer called (flutter/engine#25806)
* Remove override; method no longer called

* Remove override; method no longer called

Co-authored-by: Mike Reed <reed@google.com>
2021-04-28 08:18:19 -07:00
Jason Simmons
9c2c4dd009 Manual Skia roll to be1c99658979972e87cad02e9e5b979c190f2c99 (flutter/engine#25786) 2021-04-27 11:42:41 -07:00
LongCatIsLooong
fe01e1acbb [libTxt] resolve null leading distribution in dart:ui. (flutter/engine#25510) 2021-04-19 13:49:01 -07:00
Jason Simmons
662fdf023c Fix the kernel path in the DartPersistentHandleTest.ClearAfterShutdown test (flutter/engine#25585) 2021-04-14 08:36:29 -07:00
gaaclarke
e5a0923572 Made sure not to delete handles of dart objects if the isolate has been deleted (flutter/engine#25506) 2021-04-13 17:42:28 -07:00
Emmanuel Garcia
1bad6de1da Reland Dart plugin registrant (flutter/engine#25496) 2021-04-12 13:30:01 -07:00
Chris Bracken
e8fd8f2e2b Eliminate error message for missing CMAP table (flutter/engine#25403)
CMAP tables are a component of fonts which map character codes to glyph
indices used in the font. In cases where this is missing for a font that
we attempt to load, there is not much gained by logging this. It's also
a common source of false positive bug reports and bug reports with
misleading symptoms in Flutter, such as
https://github.com/flutter/flutter/issues/78929

Instead of logging the error, simply suppress it, since it's not
actionable by the user.

CMAP Reference:
https://docs.microsoft.com/en-us/typography/opentype/spec/cmap
2021-04-03 09:06:18 -07:00
Chris Bracken
2797aa9c99 Add fallback for GetAbsoluteFilePath in UWP (flutter/engine#25379)
In UWP, GetFinalPathNameByHandle requires the app to declare appropriate
capabilities in the app's package manifest. Some of these capabilities are not
permitted in shipping apps on the app store, but may be fine for
development/debugging scenarios. If we can't resolve the full path due to
insufficient access, but have verified the handle is valid, return the original
path.

This gets hot reload requests working in the UWP embedder.

https://github.com/flutter/flutter/issues/79609
2021-04-01 23:34:59 -07:00
Chris Bracken
9b4a0264d5 Correct typos throughout the engine/embedder (flutter/engine#25346)
Used the the `misspell` tool available at
https://github.com/client9/misspell, then applied hand-corrections. It's
possible we could adopt this as a presubmit, but there are still enough
false positives that it may not be worth the effort.
2021-04-01 11:08:19 -07:00
James Clarke
c68996b4ef Fix WinUWP build (flutter/engine#25267) 2021-03-30 08:54:02 -07:00
LongCatIsLooong
b2ee2f3db8 [libTxt] multi-codeunit glyph hit test minor fix (flutter/engine#25270) 2021-03-29 09:49:02 -07:00
stuartmorgan
c16e3a3e5b Update string_utils.h (flutter/engine#25188) 2021-03-23 12:38:15 -04:00
George Wright
0317a21159 Add AXPlatformNodeWin and AXFragmentRootWin (flutter/engine#25121)
* Remove IAccessible and IChromeAccessible from AXPlatformNodeWin

* Fixes to make AXPlatformNodeWin, AXFragmentRootWin and associated unit
tests work and pass in Flutter/Windows
2021-03-22 16:59:38 -07:00
George Wright
7d55add368 Remove duplicate and inconsistent kInvalidAXID definition (flutter/engine#25123) 2021-03-19 19:58:12 -07:00
Jason Simmons
77995f0b9a Do not return a Minikin font collection if the SkFontStyleSet is unable to create any typefaces (flutter/engine#24951) 2021-03-19 11:36:01 -07:00
Chris Bracken
3acbafcda1 Prefer C++ standard headers to their C counterpart (flutter/engine#25095)
We currently use a mix of C standard includes (e.g. limits.h) and their
C++ variants (e.g. climits) in //flutter/third_party/accessibility. This
migrates to a consistent style for all cases where the C++ variants are
acceptable. C equivalents remain in place only where they are required,
such as in the embedder API and other headers that may be used from C.

This commit is analogous to d03692449b014377b0a9f5aded075a9515a268db.
2021-03-19 09:30:29 -07:00
Chris Bracken
df1b762c86 Make internal BSTR private in ScopedBstr (flutter/engine#25096)
There are no subclasses of this class in our codebase that would
necessitate a protected member.
2021-03-19 09:28:41 -07:00
George Wright
693da2d242 Modifications to imported a11y base classes to build in Flutter (flutter/engine#25028)
* Modifications to gtest_util.h to build in Flutter

* Modifications to Range to build in Flutter

* Modifications to UiaRegistrarWin to build in Flutter

* Modifications to EnumVariant to build in Flutter

* Modifications to AXActivePopup to build in Flutter

* Modifications to ScopedBstr to build in Flutter

* Modifications to atl.h/atl_module.h to build in Flutter

* Modifications to ScopedVariant to build in Flutter

* Modifications to VariantUtil to build in Flutter

* Modifications to ScopedSafearray to build in Flutter

* Modifications to VariantVector to build in Flutter

* Add BASE_UNLIKELY, BASE_LIKELY and BASE_FALLTHROUGH macros to compiler_specific.h

* Update BUILD files for Windows base/ and gfx/ unittests

Co-authored-by: Chris Bracken <chris@bracken.jp>
2021-03-18 12:21:13 -07:00
chunhtai
17e51505e7 fix numeric dependencies (flutter/engine#25053)
* fix numeric dependencies

* fix

* fix format
2021-03-18 10:22:35 -07:00