358 Commits

Author SHA1 Message Date
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
Chun-Heng Tai
da504d2db0 fork additional raw chromium a11y code 2020-12-21 13:31:48 -08:00
liguisheng
1387021a0d fix crash in FontCollection::init() when FontFamily is empty (flutter/engine#23019) 2020-12-16 15:29:02 -08:00
George Wright
3294070ac5 Formatting changes 2020-12-15 18:03:58 -08:00
George Wright
4e7009f6a1 Initial import of accessibility code from Chromium. There are no
modifications to this code.
2020-12-15 18:03:58 -08:00
Dan Field
77c7096efb Reland path volatility tracker (flutter/engine#23063)
* Revert "Revert "Set SkPath::setIsVolatile based on whether the path survives at least two frames (#22620)" (#23044)"

This reverts commit feda80cb42f99e2588a9a6b9ab3dd1f812d0f45b.

* Fix tracing
2020-12-14 17:21:55 -08:00
Dan Field
feda80cb42 Revert "Set SkPath::setIsVolatile based on whether the path survives at least two frames (#22620)" (flutter/engine#23044)
This reverts commit 2d52a3c87c97660a050e4bf5559091d0cec262f3.
2020-12-11 15:39:24 -08:00
Dan Field
2d52a3c87c Set SkPath::setIsVolatile based on whether the path survives at least two frames (flutter/engine#22620)
This patch defaults the volatility bit on SkPaths to false, and then flips it to true if the path survives at least two frames.
2020-12-10 13:57:23 -08:00
Zachary Anderson
1f4cc8b4ee Revert "Roll buildroot and benchmark (#22804)" (flutter/engine#22816)
This reverts commit 0d078a2b1661236e3a813b30788d367943599085.
2020-12-01 18:32:10 -08:00
Dan Field
0d078a2b16 Roll buildroot and benchmark (flutter/engine#22804)
Roll benchmark to google/benchmark@bf585a2

Roll buildroot to flutter/buildroot@084f0d3
2020-12-01 13:39:37 -08:00
Jason Simmons
dcbace3a9d libtxt: Clone an ICU line break iterator for each Paragraph/WordBreaker (flutter/engine#22594) 2020-11-20 13:43:03 -08:00
Filip Filmar
6381d11abd Roll ICU to c2a4cae149aae7fd30c4cbe3cf1b30df03b386f1 (flutter/engine#22465)
Changes to make this work:

- Had to change the use of an UBool constant `FALSE` to 0 because
  the file referring to it does not include the respective header.

- Had to change the license checker to ignore files in the directory
  icu/source/samples.  There were random changes to the licensing
  headers which tripped up license checks.  And since we don't include
  samples in the binaries we build, the most efficient way to fix it is
  to exclude sample code from license checks.

Issue: https://github.com/flutter/flutter/issues/70370
2020-11-13 14:52:11 -08:00
Filip Filmar
b52a40fcc9 Add an include in minikin (flutter/engine#22466)
FontLanguageListCache.cpp uses the ICU constant FALSE of type UBool, but
does not #include <umachine.h> where it is defined.

This makes the code brittle with respect to header file reorganization,
and I found this while trying to roll ICU version 68.1 to Flutter
engine.
2020-11-12 11:08:10 -08:00
Jason Simmons
5441ac8cf5 libtxt: use a placeholder run's width as the width of the placeholder character's glyph (flutter/engine#22451) 2020-11-12 10:24:01 -08:00
Daco Harkes
b6c5eff614 WeakPersistentHandle migration (flutter/engine#19843)
and roll Dart to 52783837369de45d3372cb6c6b7cdd63e71cd829.
2020-11-03 13:06:53 +01:00
Jason Simmons
edd1e923fc Invalidate the cached SkParagraph font collection when a new font manager is installed (flutter/engine#22157) 2020-10-29 09:31:04 -07:00
Chinmay Garde
927393d54b Fix native constructor of list of zircon handles and remove unused list factory specializations. (flutter/engine#21980) 2020-10-19 19:42:01 -07:00
Jason Simmons
546df582bb Forward font collection APIs to the SkParagraph font collection (flutter/engine#21734) 2020-10-19 16:27:03 -07:00
Jason Simmons
4e7a837cfa Specify the Noto Naskh Arabic font to get consistent results in tests using Arabic characters (flutter/engine#21974)
See https://github.com/flutter/flutter/issues/68493
2020-10-19 13:51:39 -07:00
gaaclarke
faa1ea2490 Temporarily disabled tests that were using latin and arabic characters (flutter/engine#21971)
while we fix them.
2020-10-19 11:51:34 -07:00
Chinmay Garde
db5c793ed5 Enable loading snapshots with sound null safety enabled. (flutter/engine#21820)
Snapshots compiled with sound null-safety enabled require changes to the way in
which isolates are launched. Specifically, the `Dart_IsolateFlags::null_safety`
field needs to be known upfront. The value of this field can only be determined
once the kernel snapshot is available. This poses a problem in the engine
because the engine used to launch the isolate at shell initialization and only
need the kernel mappings later at isolate launch (when transitioning the root
isolate to the `DartIsolate::Phase::Running` phase). This patch delays launch of
the isolate on the UI task runner till a kernel mapping is available. The side
effects of this delay (callers no longer having access to the non-running
isolate handle) have been addressed in this patch. The DartIsolate API has also
been amended to hide the method that could return a non-running isolate to the
caller.  Instead, it has been replaced with a method that requires a valid
isolate configuration that returns a running root isolate. The isolate will be
launched by asking the isolate configuration for its null-safety
characteristics.

A side effect of enabling null-safety is that Dart APIs that work with legacy
types will now terminate the process if used with an isolate that has sound
null-safety enabled. These APIs may no longer be used in the engine. This
primarily affects the Dart Convertors in Tonic that convert certain C++ objects
into the Dart counterparts. All known Dart Converters have been updated to
convert C++ objects to non-nullable Dart types inferred using type traits of the
corresponding C++ object. The few spots in the engine that used the old Dart
APIs directly have been manually updated. To ensure that no usage of the legacy
APIs remain in the engine (as these would cause runtime process terminations),
the legacy APIs were prefixed with the `DART_LEGACY_API` macro and the macro
defined to `[[deprecated]]` in all engine translation units. While the engine
now primarily works with non-nullable Dart types, callers can still use
`Dart_TypeToNonNullableType` to acquire nullable types for use directly or with
Tonic. One use case that is not addressed with the Tonic Dart Convertors is the
creation of non-nullable lists of nullable types. This hasn’t come up so far in
the engine.

A minor related change is reworking tonic to define a single library target.
This allows the various tonic subsystems to depend on one another. Primarily,
this is used to make the Dart convertors use the logging utilities. This now
allows errors to be more descriptive as the presence of error handles is caught
(and logged) earlier.

Fixes https://github.com/flutter/flutter/issues/59879
2020-10-16 14:53:26 -07:00
Jason Simmons
640ac5dce9 Fix the offset passed to minikin::GraphemeBreak::isGraphemeBreak (flutter/engine#21706)
The character offset passed to isGraphemeBreak is relative to the beginning
of the string (not relative to the text_start parameter).  This caused bad
results when searching for grapheme breaks beyond the first line of text
(see https://github.com/flutter/flutter/issues/24802).

This PR fixes the offset value.  It also reverts the workaround applied in
https://github.com/flutter/engine/pull/10063, which caused incorrect
calculation of boundaries between graphemes within ligatures.
2020-10-14 11:44:38 -07:00
Jason Simmons
b285a0fd74 Clear the Minikin layout cache during engine destruction (flutter/engine#21473) 2020-10-08 13:53:04 -07:00
Jason Simmons
742b168680 Add an adjustment to currentLineWidth comparisons when pushing greedy line breaks (flutter/engine#21356)
This is similar to the workaround used for
https://github.com/flutter/flutter/issues/30347

The Minikin line breaker inserts greedy breaks based on a comparison of
postBreak width and currentLineWidth.  currentLineWidth is provided by
the framework based on previous calls to Layout::measureText.
That calculation may not exactly match the calculation of postBreak.

This change ensures that breaks are only added if the difference
between postBreak and currentLineWidth is significant.

Fixes https://github.com/flutter/flutter/issues/65419
2020-10-07 15:34:59 -07:00
Dan Field
9377073f34 Fix windows popup (flutter/engine#21522) 2020-09-30 14:38:44 -07:00
Chris Bracken
2586db3b22 Clean up C++ includes (flutter/engine#21127)
Cleans up header order/grouping for consistency: associated header, C/C++ system/standard library headers, library headers, platform-specific #includes.

Adds <cstring> where strlen, memcpy are being used: there are a bunch of places we use them transitively.

Applies linter-required cleanups. Disables linter on one file due to included RapidJson header. See https://github.com/flutter/flutter/issues/65676

This patch does not cover flutter/shell/platform/darwin. There's a separate, slightly more intensive cleanup for those in progress.
2020-09-11 21:18:35 -07:00
Chris Bracken
d03692449b Prefer C++ standard headers to their C counterpart (flutter/engine#21091)
We currently use a mix of C standard includes (e.g. limits.h) and their
C++ variants (e.g. climits). This migrates to a consistent style for all
cases where the C++ variants are acceptable, but leaves the C
equivalents in place where they are required, such as in the embedder
API and other headers that may be used from C.
2020-09-11 17:10:00 -07:00
Chris Bracken
9ff7d7ca44 Copyright header hygiene improvements (flutter/engine#21089)
Add copyright headers in a few files where they were missing.

Trim trailing blank comment line where present, for consistency with
other engine code.

Use the standard libtxt copyright header in one file where it differed
(extra (C) and comma compared to other files in libtxt).

This also amends tools/const_finder/test/const_finder_test.dart to look
for a const an additional four lines down to account for the copyright
header added to the test fixture.
2020-09-11 08:55:37 -07:00
Alexander Aprelev
84121702c9 Log exception in addition to the stack trace for unhandled exceptions. (flutter/engine#20935)
* Log exception in addition to the stack trace for unhandled exceptions.

Having exception logged can be especially useful when stack trace is blank.
2020-09-02 09:47:09 -07:00
xster
4774c05cb1 Fix font sorting problem due to iOS 14 fonts being broader (flutter/engine#20557) 2020-08-24 13:03:20 -07:00
LongCatIsLooong
fcfd260ae9 Reland "account for inline placeholders in longest line calculation (#20370)" reverted in (#20669) (flutter/engine#20678) 2020-08-21 16:31:02 -07:00
Zachary Anderson
e9fcab4436 Revert "account for inline placeholders in longest line calculation (#20370)" (flutter/engine#20669)
This reverts commit fd97c2487f24ef5f82fe240b6bb19f9a48939922.

Landing on red to fix the build.
2020-08-20 12:35:48 -07:00
LongCatIsLooong
fd97c2487f account for inline placeholders in longest line calculation (flutter/engine#20370) 2020-08-11 16:23:26 -07:00