347 Commits

Author SHA1 Message Date
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
Daco Harkes
8e7d90d2c4 Migrate some Dart_WeakPersistentHandle uses to Dart_FinalizableHandle (flutter/engine#20107) 2020-07-30 15:56:00 +02:00
Siva
03706dce89 Manual roll of Dart from 24c7666def...40fd1c456e (flutter/engine#20092)
* Manual roll of Dart from 24c7666def...40fd1c456e

dart-lang/sdk@40fd1c456e Revert "[dart:io] Add Abort() on HttpClientRequest"
dart-lang/sdk@17d7296a42 [vm/nnbd/bytecode] Fix reuse of type arguments in bytecode
dart-lang/sdk@58b6f40c73 Issue 42797. Understand in legacy libraries that a function returning Never (in Null Safety library) never returns. (reland)
dart-lang/sdk@fc8a6d9f9b [VM/compiler] Dereference TypeRef literal when propagating constants.
dart-lang/sdk@0689ec527a Move "test.dart" (well, most of its contents) into pkg/test_runner.
dart-lang/sdk@1094b3c61d Prepare static error test updater tool to handle web tests.
dart-lang/sdk@b258585f2f [observatory] Migrate from deprecated isInstanceOf to isA.
dart-lang/sdk@dfe1d9b682 Disable OverrideContributor for Cider.
dart-lang/sdk@aea99b2f5c scope debug property assist to Diagnosticables
dart-lang/sdk@4b96f20a79 [dart:io] Add Abort() on HttpClientRequest
dart-lang/sdk@1b1a39708c [build] Use frameworks instead of libs
dart-lang/sdk@3fef522496 Revert "Reland "[vm] Replaces fuchsia.deprecatedtimezone""
dart-lang/sdk@8c664d4f3f Revert "Issue 42797. Understand in legacy libraries that a function returning Never (in Null Safety library) never returns."
dart-lang/sdk@2efb5bebc7 [ dart:_http ] Fix typo in HTTP response timeline event
dart-lang/sdk@0884dae36c Revert "Fix the #include path for ICU headers"
dart-lang/sdk@5171534e81 Scope tweaks. Report REFERENCED_BEFORE_DECLARATION in more places.
dart-lang/sdk@6bba75079a Issue 42797. Understand in legacy libraries that a function returning Never (in Null Safety library) never returns.
dart-lang/sdk@b4ebbb7f5c [build] Update gn to match Fuchsia
dart-lang/sdk@cb428a7a02 [dart2js] Remove old bug work around in collector.
dart-lang/sdk@08663c20ab Change flutter patch to match existing DEPS on master branch
dart-lang/sdk@146ad014d9 update js/meta for the 2.10 dev sdk
dart-lang/sdk@488c718793 [co19] Roll co19 to d79951e06e443213243e54c2c32694b79a221b65
dart-lang/sdk@ba20edd7be Add patch for flutter-engine when changing to version 2.10

* Rev buildroot to latest version.

* Update license.

* update.

* Update gn revision.

* Format BUILD.gn files as the gn revision has been updated.
2020-07-29 13:10:15 -07:00
Kaushik Iska
132bfaa975 [tonic] Log stack trace for unhandles exceptions (flutter/engine#19811)
Before this change, when we encounter an unhandles exception,
we see:

```
[00050.147083][37665][67367][klog] ERROR: [ERROR:flutter/shell/common/shell.cc(209)] Dart Error: Unhandled exception:
[00050.147087][37665][67367][klog] INFO: UnimplementedError
```

This doesn't help identify the root cause. Adding stack trace will help
the cause.
2020-07-16 12:03:02 -07:00
David Worsham
cbd3cd9c0d fuchsia: Enable most unittests (flutter/engine#19583)
Tweak the primary flutter build rule so that fuchsia is more similar to
other platforms in how tests and the shell are built.

Only embedder_unittests and GLFW tests are disabled on Fuchsia now.

TEST: Ran unittests on host/fuchsia; workstation on fuchsia
BUG: fxb/53847, fxb/54056
2020-07-13 17:36:19 -07:00
Michael Goderbauer
0b0c2c68d0 Word substitutions (flutter/engine#19111) 2020-06-18 11:05:24 -07:00
Jason Simmons
c7bc6e9ad0 Avoid creating a vector when constructing Dart typed data objects for platform messages (flutter/engine#18838) 2020-06-18 09:58:03 -07:00
Gary Qian
85c98bef38 Fix windows SkParagraph compilation (flutter/engine#19073) 2020-06-17 02:14:34 -07:00
bungeman
6282eb8094 Mark conditional SkParagraph include nogncheck. (flutter/engine#18741) 2020-06-02 11:18:03 -07:00
Dan Field
65afbec58a Make GetAllocationSize const (flutter/engine#18713) 2020-06-01 15:58:03 -07:00
Jason Simmons
ded9b51e21 [SkParagraph] Copy text height behavior to the Skia paragraph style (flutter/engine#18178) 2020-05-07 18:24:08 -07:00
Alexander Aprelev
4b5878c6ab Introduce runtime check that it is root isolate that makes UI native calls. (flutter/engine#18050)
* Revert "Do not register UI-related native functions in secondary isolates (#6401)"

This reverts commit c23deb818efc3813273d28ce7d965d0eb261cca9 as it doesn't work when root and secondary isolates run in the same isolate group.

* Confirm it is root isolate that makes UI native calls.

* Fix format, UIDartState reference from Fuchsia source

* No UI isolate check for fuchsia calls

* Fix typo. Remove redundant runtime calls
2020-05-01 09:05:41 -07:00