321 Commits

Author SHA1 Message Date
LongCatIsLooong
9893a29366
account for inline placeholders in longest line calculation (#20370) 2020-08-11 16:23:26 -07:00
Daco Harkes
8e1d48eece
Migrate some Dart_WeakPersistentHandle uses to Dart_FinalizableHandle (#20107) 2020-07-30 15:56:00 +02:00
Siva
b955e15ee9
Manual roll of Dart from 24c7666def...40fd1c456e (#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
1cb875156f
[tonic] Log stack trace for unhandles exceptions (#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
9353692cdb
fuchsia: Enable most unittests (#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
ed5df03dcd
Word substitutions (#19111) 2020-06-18 11:05:24 -07:00
Jason Simmons
9fcfec39c0
Avoid creating a vector when constructing Dart typed data objects for platform messages (#18838) 2020-06-18 09:58:03 -07:00
Gary Qian
c9c80011bb
Fix windows SkParagraph compilation (#19073) 2020-06-17 02:14:34 -07:00
bungeman
9ccb2e7f14
Mark conditional SkParagraph include nogncheck. (#18741) 2020-06-02 11:18:03 -07:00
Dan Field
c9e51d074a
Make GetAllocationSize const (#18713) 2020-06-01 15:58:03 -07:00
Jason Simmons
46a6d966ad
[SkParagraph] Copy text height behavior to the Skia paragraph style (#18178) 2020-05-07 18:24:08 -07:00
Alexander Aprelev
1c8ee9856b
Introduce runtime check that it is root isolate that makes UI native calls. (#18050)
* Revert "Do not register UI-related native functions in secondary isolates (#6401)"

This reverts commit 69ae5694de54d2a163743dcec727fcea1c7bc8e1 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
Ali Mahdiyar
b6bb7e796a
Handle paragraph alignment and direction in newline rectangles (#17750) 2020-04-20 14:35:01 -07:00
Jason Simmons
6c431f021c
Remove unused parameter from GetLineXOffset (#17745) 2020-04-17 12:24:58 -07:00
Vyacheslav Egorov
9afc6faaa3
Release acquired typed data before calling Dart_SetReturnValue. (#17729) 2020-04-15 10:35:04 -07:00
Chris Bracken
e55b4476f1
Use const refs in for loops where reasonable (#17484)
This patch optimizes C++11 range-based for loops where the variable is
copied in each iteration but it would suffice to obtain it by const
reference. This is only applied to loop variables of types that are
expensive to copy which means they are not trivially copyable or have a
non-trivial copy constructor or destructor.

To ensure that it is safe to replace the copy with a const reference
only the following cases are modified:
  * The loop variable is const-qualified.
  * The loop variable is not const, but only const methods or operators
    are invoked on it, or it is used as const reference or value argument
    in constructors or function calls.

This is an application of the internal performance-for-range-copy
clang-tidy analysis.
2020-04-03 11:44:35 -07:00
Dan Field
ff62dec5c9
Roll to clang11, mark 4 (#17483)
* "Reland Clang 11, roll buildroot to 1bc40a5f916adb93d87e2a2230a0ec43db876c1c, take 4 (#17467)" (#17482)"

This reverts commit 8166a91bca11b83c16fba8f8fd407e937a2ac89c.

* format code

* Roll buildroot to 3a27de1c5bb0f50be7d3efe3e00de4f6068c9f30
2020-04-02 13:04:49 -07:00
Greg Spencer
8ff6948e23
Make GetDefaultFontFamilies return a vector<string> instead of… (#16928)
On Linux, there is rarely just one default font that can reasonably be expected to be on the platform. This PR changes the GetDefaultFontFamily call to be GetDefaultFontFamilies, and it now returns a vector<string> so that the font collection code can look up all of them, and if any of them exist, add them to the fallback list.

For Linux, I supplied the list "Ubuntu", "Cantarell", "DejaVu Sans", "Liberation Sans", and "Arial", which should cover a large proportion of linux machines. For the other platforms, I supplied a list of length one, containing the one fallback font that used to be defined. On Windows, I added "Segoe UI" as a default, since that is the default system font on newer Windows.

The goal of this function is to provide at least one font family that is installed, since otherwise linux (or any platform) will just have no font at all if the default font isn't found.
2020-03-05 00:45:53 +01:00
Ryan Macnak
79a53b2ea2
Roll Dart to df5036eb6e738c723339ed74c1e8ca93bea2570d. (#16936) 2020-03-04 13:45:24 -08:00
Chris Bracken
78a1c7ebf9
Revert "Drop last usages of Dart_New from engine (#16838)" (#16915)
We believe this may be implicated in a Windows-specific crash during the
Flutter Gallery integration test.

See:
https://github.com/flutter/flutter/issues/51896

This reverts commit f9b78c5db2bc3087e1793947b11ca643c2d747cf.
2020-03-03 14:52:56 -08:00
Dan Field
f9b78c5db2
Drop last usages of Dart_New from engine (#16838)
Image
Codec
FrameInfo
Scene/Picture toImage
2020-03-02 21:30:28 -08:00
Jason Simmons
a7a7afcfd2
[libtxt] Fix the flag used to check validity of the strikeout position in Skia font metrics (#15981) 2020-02-27 11:36:54 -08:00
Dan Field
e18aba3321
Refactor of ClaimDartHandle -> AssociateWithDartWrapper (#16720) 2020-02-20 17:31:03 -08:00
Dan Field
60b27fd545
Reland "Remove usage of Dart_AllocateWithNativeFields" (#16713) 2020-02-20 16:06:02 -08:00
Dan Field
f2f8c342be
Revert "Remove usage of Dart_AllocateWithNativeFields from tonic (#16588)" (#16684)
This reverts commit 4941ff7bf608e0bca764e1edad769a3f8cca797f.
2020-02-19 10:00:05 -08:00
Ben Konyi
4941ff7bf6
Remove usage of Dart_AllocateWithNativeFields from tonic (#16588)
This API is being removed from the Dart SDK.
2020-02-14 13:55:38 -08:00
Jason Simmons
ea56ad22da
libtxt: use a fixture in the benchmarks (#16531) 2020-02-11 10:24:47 -08:00
Jason Simmons
a195a92cc8
[SkParagraph] Text layout benchmarks using SkParagraph (#16373)
Imported from @Rusino's branch
2020-02-07 14:17:57 -08:00
stuartmorgan
473f55940f
Suppress some deprecation warnings on Windows (#16416)
Targeted suppression of some deprecation warnings that are build errors under
clang:
- Ignore the deprecation of codecvt's unicode conversion until we decide on
  a replacement strategy.
- Allow the deprecated posix names of functions in third_party/txt.

Part of https://github.com/flutter/flutter/issues/16256
2020-02-05 21:10:25 -08:00
Chinmay Garde
f7b78e001d
Remove all uses of the redundant flutter_root variable. (#16311)
This was only necessary when the Engine had to build in multiple buildroots
where the sources where checked out at different paths relative to the
buildroot. This is no longer the case and there are already cases GN rules
have been written that mix and match variable usage with the direct
specification of the path to the Flutter sources relative to the sole buildroot.
2020-01-31 21:49:48 -08:00
Gary Qian
ee297aa699
Reland "Engine/LibTxt/dart:ui impl of TextHeightBehavior #15087" (#16155) 2020-01-29 10:52:24 -08:00
Dan Field
53baa7aee5
Revert breaking PRs (#16148)
* Revert "Web PargraphStyle TextHeightBehavior integration (#16075)"

This reverts commit 86682a2d09e7d111a5c4fd2156b9971bd65fb693.

* Revert "Engine/LibTxt/dart:ui impl of TextHeightBehavior (#15087)"

This reverts commit cbf4536d158e25e372469c242e326c48cc730de7.
2020-01-28 10:40:05 -08:00
Chinmay Garde
da1a5d58c2
Remove tonic/platform. (#16062)
This is unused.
2020-01-27 14:41:15 -08:00
Gary Qian
cbf4536d15
Engine/LibTxt/dart:ui impl of TextHeightBehavior (#15087) 2020-01-27 13:37:11 -08:00
Chinmay Garde
276481c4d3
Move tonic into //flutter/third_party. (#15895)
Tonic used to be used by multiple consumers outside of Flutter Engine. Due to
this, it has an unnecessary abstraction layer as well as utilities duplicated in
FML and other engine subsystems. The sole user of Tonic is now the Flutter
Engine. It is intended that the Flutter Engine team now owns this subsystem,
remove unnecessary utilities and document the headers. This is the first step in
the transition. No history is being imported as the initial history was already
lost in the transition of this component to fuchsia.googlesource. As this
component was unmaintained there, I could see no additional value in importing
the history of the patches there.

No functional change. Just moved the repo from //third_party to
//flutter/third_party and updates GN refs.
2020-01-25 17:01:56 -08:00
Dan Field
89f3471fa7
the the fix (#15973) 2020-01-24 12:43:32 -08:00
Jason Simmons
766f53c0c7 [libtxt] Assign a unique ID to each glyph cluster within a line (#15742) 2020-01-22 10:38:03 -08:00
Gary Qian
329154171c
Add FML_DCHECK to ensure layout before calling getters (#15635) 2020-01-14 13:44:29 -08:00
Jason Simmons
fd269f60bf
Use Skia's CSS3 style matcher for dynamically loaded font sets (#15468)
This will improve font matching for SkParagraph, which relies on the
FontStyleSet's matchStyle implementation to find the closest match for a
FontStyle.
2020-01-13 17:35:56 -08:00
Jason Simmons
0535b5e7df
[SkParagraph] Copy font features to the Skia layout engine text style (#15562) 2020-01-13 15:47:31 -08:00
Jason Simmons
bd322a69b0
[SkParagraph] Cache the font collection created for use by the Skia text shaper library (#15317) 2020-01-08 15:21:35 -08:00
Gary Qian
f9a2fab7c0
Fix RectHeightStyle::kMax ascent computation bug (#15106) 2020-01-07 10:43:42 -08:00
Jason Simmons
d6172fdcfa
libtxt: cache fallback fonts found by a Minikin font collection (#14482)
If a new fallback font is discovered during paragraph layout, the fallback
font cache in txt::FontCollection will use that font in future layouts.

However, that cache is not available if the new fallback font needs to be
used for other characters within the current layout.  This PR adds a cache
to minikin::FontCollection and checks whether fonts in the cache can handle
a character before calling the fallback font provider.

See https://github.com/flutter/engine/pull/13257
2019-12-13 15:18:37 -08:00
Jason Simmons
76d264ee71
[SkParagraph] Convert the height override flag in text styles (#14283) 2019-12-10 13:40:54 -08:00
Jason Simmons
bf99efe65b
libtxt: pass an RTL bool flag instead of a bidiFlags enum to measureText (#13736)
Fixes https://github.com/flutter/flutter/issues/41086
2019-11-08 15:18:06 -08:00
Gary Qian
0928c1af2f
Add 'Cough' test font and support multiple test fonts. (#13649) 2019-11-05 12:27:34 -08:00
Gary Qian
728e473f1a
Pass LinearTextFlat to SkFont - iOS13 letter spacing (#13321) 2019-10-28 11:09:26 -07:00
Gary Qian
5061b61a9a
Update harfbuzz to 2.6.2, Roll buildroot to a518e (#13242) 2019-10-22 15:18:36 -07:00
Gary Qian
ee1a140fa9
Add utils to disable on mac/windows, disable invalid LibLxt tests on mac (#13189) 2019-10-16 16:43:31 -07:00
Chinmay Garde
b6858d2092
Use the fixtures mechanism for txt unit-tests and benchmarks. (#13180)
These tests and benchmarks can now be run without needing additional flags on the command line.
2019-10-16 16:29:55 -07:00