390 Commits

Author SHA1 Message Date
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
George Wright
34ee06d973 Formatting for gtest_util.h and licence file update 2021-03-17 23:20:45 -07:00
George Wright
56d2c6f1c7 Initial import of DispatchStub and gtest_util.h from upstream Chromium 2021-03-17 23:20:45 -07:00
George Wright
fcc1a07ccd Add some APIs to StringUtils (flutter/engine#25043)
* Add the following APIs to StringUtils:

- NumberToString16
- JoinString
- ReplaceChars
- WideToUTF16
- UTF16ToWide

Implement the following APIs for Windows:

- UTF8ToUTF16
- UTF16ToUTF8

* Review comments

Add a couple TODOs for decimal formatting and use std::u16string::npos
rather than std::string::npos.

* Update licences_flutter

Co-authored-by: Chris Bracken <chris@bracken.jp>
2021-03-17 15:44:47 -07:00
George Wright
a219aacc41 Code formatting for imported Chromium code 2021-03-16 10:18:21 -07:00
George Wright
7c3d796a83 Initial import from upstream Chromium of:
AXActivePopup
AXFragmentRootWin
AXPlatformRelationWin
AXPlatformNodeDelegateUtilsWin
AXPlatformNodeWin
Range
ScopedVariant
ScopedBstr
ScopedSafearray
EnumVariant
UiaRegistrarWin
VariantUtil
VariantVector
atl.h
atl_module.h
base_export.h
2021-03-16 10:18:21 -07:00
George Wright
fbcf0800f1 Implement AXPlatformNodeBase::GetInstanceCountForTesting (flutter/engine#24999) 2021-03-15 16:13:02 -07:00
chunhtai
521edb0159 fix selectable text selections are not announced in voice over (flutter/engine#24933) 2021-03-15 14:23:02 -07:00
Chris Bracken
64a2844ce8 Fix attribute replace bug in TextAXNodeWrapper (flutter/engine#24986)
When replacing an int/float/bool attribute on the test node, we want to
erase the range from the iterator returned by remove_if to end(), which
may be an empty range. In the case where remove_if() returns end(), the
single-parameter variant of erase() attempts to remove an element past
the end of the container.
2021-03-12 22:35:02 -08:00
Chris Bracken
13cf185e1c Correct setup-related typos (flutter/engine#24846)
Corrects uses of setup as a verb to 'set up', leaves noun/noun-phrase
forms of setup as 'setup'. Also settles on 'teardown' as opposed to
tear-down for consistency across the codebase.

A few other minor comment/wording corrections.
2021-03-08 17:31:10 -08:00
Jason Simmons
b978d1fb46 Initialize max_ascent/descent from the strut only if the strut is valid (flutter/engine#24802) 2021-03-05 15:44:01 -08:00
Jason Simmons
71e7d8e96e SkParagraph: support multiple default font families (flutter/engine#24662) 2021-03-04 15:34:01 -08:00
Jason Simmons
6b98e883a1 Allow calls to legacyMakeTypeface in the AssetFontManager (flutter/engine#24612) 2021-03-04 14:54:01 -08:00
LongCatIsLooong
deec3a0d07 Reland "TextStyle level leadingDistribution (#24025)" reverted in #24665 (flutter/engine#24668) 2021-03-01 14:55:03 -08:00
LongCatIsLooong
b82a309954 Revert "TextStyle level leadingDistribution (#24025)" (flutter/engine#24665) 2021-02-26 12:41:01 -08:00
LongCatIsLooong
e10becadf3 TextStyle level leadingDistribution (flutter/engine#24025) 2021-02-25 11:46:02 -08:00
Jason Simmons
3356802d18 Define FLUTTER_ENABLE_SKSHAPER consistently when building txt_unittests and txt_benchmarks (flutter/engine#24253) 2021-02-09 14:11:02 -08:00
Jason Simmons
34b5763be8 libtxt: apply the justify offset to glyph positions instead of paint records (flutter/engine#24219) 2021-02-09 12:11:01 -08:00
George Wright
1b171451d0 Fixes required for libax to compile on Windows 2021-02-02 11:14:34 -08:00
George Wright
fa1a5c2f1f Delete ax_platform_text_boundary as it is not required for Windows 2021-02-02 11:14:34 -08:00
George Wright
b4a3dd5c60 Import windows_types.h from upstream ax 2021-02-02 11:14:34 -08:00
George Wright
9d00999aa7 Add stub types for Windows accessibility 2021-02-02 11:14:34 -08:00
Jason Simmons
a46c49db5b Remove libtxt styled runs benchmark (flutter/engine#23934) 2021-01-28 08:54:02 -08:00
chunhtai
053c0e3eb4 Implements accessibility bridge in common library (flutter/engine#23491) 2021-01-22 09:29:02 -08:00
Dan Field
e778949043 Reland path vol tracker (flutter/engine#23840)
This time making sure to deref the native object on GC.
2021-01-21 16:03:43 -08:00
Jason Simmons
43a836fd96 Use references when iterating over SkParagraph text boxes (flutter/engine#23837) 2021-01-21 14:24:12 -08:00
Dan Field
cb57183325 revert path volatility tracker (flutter/engine#23822) 2021-01-21 08:34:02 -08:00
chunhtai
e738d329d7 fix ax unique id flake (flutter/engine#23518) 2021-01-13 16:54:03 -08:00
gaaclarke
dbc486213c Plumbing refactor to allow the usage of Dart_CreateIsolateInGroup (flutter/engine#23549)
Did the plumbing refactor that allows us to call Dart_CreateIsolateInGroup when applicable.
2021-01-12 16:43:12 -08:00
chunhtai
25844bebd0 disable UnassignedIdsAreReused flaky test (flutter/engine#23511) 2021-01-07 15:07:08 -08:00
chunhtai
ec2eb68f80 Apply local patch to chromium accessibility code (flutter/engine#23110) 2021-01-06 17:39:02 -08:00
Dan Field
dedf9bd1af Reland path volatility tracker, disabling it if deterministic rendering is requested (flutter/engine#23226)
* Reland path volatility tracker (#23063)" (#23220)

This reverts commit b56fc25561417f96e17dacab375e66f474a54c94.

* allow disabling based on whether deterministic rendering is needed
2020-12-22 08:25:20 -08:00
Dan Field
b56fc25561 Revert "Reland path volatility tracker (#23063)" (flutter/engine#23220)
This reverts commit 77c7096efb0b1392acc9793c386561a3c36012ba.
2020-12-21 13:53:18 -08:00
Chun-Heng Tai
b4977cb51a format forked chromium accessibility code 2020-12-21 13:31:48 -08:00