11402 Commits

Author SHA1 Message Date
puelo
8ca4f647dd Added keyEvent support for iOS 13.4+ (flutter/engine#20972) 2020-10-19 16:22:02 -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
skia-flutter-autoroll
befaf27535 Roll Skia from be8004d2fb6c to 27f7fe32f49b (1 revision) (flutter/engine#21956) 2020-10-19 09:42:02 -07:00
Jason Simmons
a66f8a65ad Restore missing call to RuntimeDelegate.OnRootIsolateCreated (flutter/engine#21953)
Fixes https://github.com/flutter/flutter/issues/68411
2020-10-17 20:33:13 -07:00
Jonah Williams
7a4234a418 [null-safety] fix type declaration of Picutre._toImage (flutter/engine#21942)
Fixes flutter/flutter#68377

Should be a nullable string. Looks like --null-assertions does not cover the native binding code.
2020-10-17 11:02:19 -07:00
Ferhat
519ad2a581 [web] Implement ClipOp.difference (flutter/engine#21901) 2020-10-17 00:09:41 -07:00
godofredoc
f5f38e9000 Collect logs in the background. (flutter/engine#21828)
* Collect logs in the background.

* Use fuchsia_ctl log_file option.

* Delete the correct file.

* Remove commented code.
2020-10-16 21:51:37 -07:00
Chinmay Garde
2f755560eb Add FML_UNREACHABLE to declare points in code that should never be reached. (flutter/engine#21941)
A version of this macro is present in most code-bases. The use of this macro
must satisfy two requirements:

1: If reached, the process must be terminated in all runtime modes and at all
   optimization levels.
2: If the compiler requires a value to be returned from the function,
   encountering this macro should not make the compiler insist on a return value
  (since the process is about to die anyway).

We used to have a version of this macro that wasn't widely used and didn't
satisfy the two requirements. I have removed the same and another unused macro
in fml/logging.h

Fixes https://github.com/flutter/flutter/issues/68164.
2020-10-16 20:47:43 -07:00
Jason Simmons
341f3036a6 Roll the process_runner package used by the formatter script (flutter/engine#21937) 2020-10-16 18:39:25 -07:00
skia-flutter-autoroll
5e3a5dd580 Roll Skia from f60a76e2ac01 to be8004d2fb6c (1 revision) (flutter/engine#21936) 2020-10-16 18:32:02 -07:00
Chris Bracken
7665dde319 Require that FLUTTER_NOLINT include issue link (flutter/engine#21922)
This adds enforcement to the linter that all FLUTTER_NOLINT comments be
of the form:

    // FLUTTER_NOLINT: https://github.com/flutter/flutter/issue/ID

Every linter opt-out should have an associated bug describing what issue
it works around so that others can work on eliminating it, or at least
understanding the rationale and whether it's still relevant.

This also reduces the likelihood of inadvertent copy-pasting into new
files either because the author fails to spot it when copying the
copyright block from another file, or assumes that it's necessary for
some subcomponent of the engine.

Bug: https://github.com/flutter/flutter/issues/68273
2020-10-16 17:46:42 -07:00
Chris Bracken
2a726cbb36 Eliminate unnecessary linter opt-outs (flutter/engine#21935)
Eliminates FLUTTER_NOLINT where they can be landed without triggering
lint failures.
2020-10-16 17:24:23 -07:00
skia-flutter-autoroll
c6a6b74dd4 Roll Skia from f9c7b2803461 to f60a76e2ac01 (4 revisions) (flutter/engine#21929) 2020-10-16 16:22:01 -07:00
Harry Terkelsen
c3a9f74b86 Set strokeCap, strokeJoin, and strokeMiter when resurrecting Paint (flutter/engine#21926) 2020-10-16 16:08:46 -07:00
Chris Bracken
aa0ad5a83e Update FLUTTER_NOLINT uses to include issue link (flutter/engine#21921)
In an upcoming patch, we'll enable enforcement that all FLUTTER_NOLINT
comments include an issue link. This migrates the remaining uses to that
format.

Bug: https://github.com/flutter/flutter/issues/68273
2020-10-16 16:08:36 -07:00
George Wright
db22aa743f Add plumbing to grab dart entrypoint args on macOS (flutter/engine#21789) 2020-10-16 16:07:02 -07:00
Ren You
cecec62028 Revert "[fuchsia] External view embedder will be shared with platform view (#21850)" (flutter/engine#21924)
This reverts commit 8b0b5acd5a8a5db5a77de78e9f89cf931fa9f688.
2020-10-16 15:25:13 -07:00
Jason Simmons
7f47aac6f2 Break the reference cycle between the surface factory and the external view embedder (flutter/engine#21918)
See https://github.com/flutter/flutter/issues/68315
2020-10-16 15:03:26 -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
skia-flutter-autoroll
6b24d82afc Roll Skia from 418eda2c599a to f9c7b2803461 (3 revisions) (flutter/engine#21923) 2020-10-16 14:52:02 -07:00
skia-flutter-autoroll
31e9f351e6 Roll Skia from 839fb228ac44 to 418eda2c599a (9 revisions) (flutter/engine#21917) 2020-10-16 13:32:02 -07:00
Chris Bracken
ef868edd36 Eliminate FLUTTER_NOLINT where possible (flutter/engine#21904)
This removes most of the remaining FLUTTER_NOLINT comments and opts
these files back into linter enforcement.

I've filed https://github.com/flutter/flutter/issues/68273 to require
that all FLUTTER_NOLINT comments be followed by a GitHub issue URL
describing the problem to be fixed.
2020-10-16 12:44:49 -07:00
skia-flutter-autoroll
1e35056e8e Roll Skia from db0288d747ae to 839fb228ac44 (1 revision) (flutter/engine#21911) 2020-10-16 09:02:01 -07:00
Mehmet Fidanboylu
681ffacfe6 Forward Error objects to uncaught exception handler if there is one. (flutter/engine#21806) 2020-10-16 08:21:04 -07:00
skia-flutter-autoroll
8f61a2ab97 Roll Skia from f1b53836b705 to db0288d747ae (7 revisions) (flutter/engine#21910) 2020-10-16 07:42:02 -07:00
Kaushik Iska
ce530b3770 [ios] Refactor IOSSurface factory and unify surface creation (flutter/engine#21877) 2020-10-15 19:56:13 -07:00
Kaushik Iska
6109d23046 [embedder] Platform View owns lifecycle of external view embedder (flutter/engine#21847)
Changing it to shared_ptr and migrating the ownership from surface
to platform view.
2020-10-15 17:48:14 -07:00
Chris Bracken
90c2138fb5 Add multi-step IME support to TextInputModel (flutter/engine#21682)
* Add multi-step IME support to TextInputModel

This updates the platform-independent TextInputModel to add support for
input method (abbreviated IM or IME) composing regions.

In contrast to languages such as English, where keyboard input is
managed keystroke-by-keystroke, languages such as Japanese require a
multi-step input process wherein the user begins a composing sequence,
during which point their keystrokes are captured by a system input
method and converted into a text sequence. During composing, the user is
able to edit the composing range and manage the conversion from keyboard
input to text before eventually committing the text to the underlying
text input field.

To illustrate this, in Japanese, this sequence might look something like
the following:

1. User types 'k'. The character 'k' is added to the composing region.
   Typically, the text 'k' will be inserted inline into the underlying
   text field but the composing range will be highlighted in some manner,
   frequently with a highlight or underline.
2. User types 'a'. The composing range is replaced with the phonetic
   kana character 'か' (ka). The composing range continues to be
   highlighted.
3. User types 'k'. The character 'k' is appended to the composing
   range such that the highlighted text is now 'かk'
4. User types 'u'. The trailing 'k' is replaced with the phonetic kana
   character 'く' (ku) such that the composing range now reads 'かく'
   The composing range continues to be highlighted.
5. The user presses the space bar to convert the kana characters to
   kanji. The composing range is replaced with '書く' (kaku: to write).
6. The user presses the space bar again to show other conversions. The
   user's configured input method (for example, ibus) pops up a
   completions menu populated with alternatives such as 各 (kaku:
   every), 描く (kaku: to draw), 核 (kaku: pit of a fruit, nucleus), 角
   (kaku: angle), etc.
7. The user uses the arrow keys to navigate the completions menu and
   select the alternative to input. As they do, the inline composing
   region in the text field is updated. It continues to be highlighted
   or underlined.
8. The user hits enter to commit the composing region. The text is
   committed to the underlying text field and the visual highlighting is
   removed.
9. If the user presses another key, a new composing sequence begins.

If a selection is present when composing begins, it is preserved until
the first keypress of input is received, at which point the selection is
deleted. If a composing sequence is aborted before the first keypress,
the selection is preserved. Creating a new selection (with the mouse,
for example) aborts composing and the composing region is automatically
committed. A composing range and selection, both with an extent, are
not permitted to co-exist.

During composing, keyboard navigation via the arrow keys, or home and
end (or equivalent shortcuts) is restricted to the composing range, as
are deletions via backspace and the delete key. This patch adds two new
private convenience methods, `editing_range` and `text_range`. The
former returns the range for which editing is currently active -- the
composing range, if composing, otherwise the full range of the text. The
latter, returns a range from position 0 (inclusive) to `text_.length()`
exclusive.

* Move SetComposingLength to TextRange::set_*

Adds set_base, set_extent, set_start, set_end methods to TextRange.
2020-10-15 17:43:16 -07:00
Kaushik Iska
8b0b5acd5a [fuchsia] External view embedder will be shared with platform view (flutter/engine#21850) 2020-10-15 17:22:02 -07:00
skia-flutter-autoroll
3443d555f8 Roll Skia from f4bda743ff8d to f1b53836b705 (21 revisions) (flutter/engine#21892) 2020-10-15 17:17:03 -07:00
Chris Bracken
c3e83ddf84 Add TextRange::Contains tests spanning base/extent (flutter/engine#21874)
Adds tests for TextRange::Contains(const TextRange&) where the range
being tested spans the base/extent of the testing range.

This was originally intended to land in #21854, but it seems I didn't
push the additional tests before landing.
2020-10-15 16:59:15 -07:00
Jason Simmons
35c366442a Check for null images in ImageFromCompressedData (flutter/engine#21891) 2020-10-15 16:57:02 -07:00
Kaushik Iska
fea7e59a66 Fix incldues to be flutter/shell rather than shell/ (flutter/engine#21889) 2020-10-15 16:51:17 -07:00
gaaclarke
2758d604ba disabled the auto assign bot (flutter/engine#21341) 2020-10-15 16:40:23 -07:00
Harry Terkelsen
2407e893a3 Add more TextStyle support to Paragraph in CanvasKit mode (flutter/engine#21629)
* WIP on Paragraph

* WIP skparagraph

* Add more Paragraph features in CanvasKit mode

* Fix addRoundRect test

* Respond to review comments

* Remove unused (and potentially harmful) getters from Sk classes
2020-10-15 16:33:51 -07:00
Adlai Holler
986c45ae4a Update more class names from GrContext to GrDirectContext (flutter/engine#21864)
This name change has to do with SkDeferredDisplayList, which Flutter
does not use. As far as Flutter is concerned, this is a no-op.
2020-10-15 16:14:23 -07:00
Jenn Magder
14dee41f00 Add flag to not publish the observatory port over mDNS (flutter/engine#21883) 2020-10-15 14:53:20 -07:00
Jenn Magder
1be440e077 Revert "Add flag to not publish the observatory port over mDNS (#21632)" (flutter/engine#21882)
This reverts commit a23a450aebfb917907e3e9647dffc210e2f31bde.
2020-10-15 12:32:24 -07:00
stuartmorgan
ac99ac4c27 Fix destruction order in C++ plugin registrar (flutter/engine#21840)
The C++ wrapper's plugin registrar can own plugins to provided lifetime
management. However, plugins expect the registrar to be valid for the
life of the object, including during destruction, so any owned plugins
must be explicitly cleared before any registrar-specific destruction
happens.
2020-10-15 10:54:08 -07:00
Jenn Magder
a23a450aeb Add flag to not publish the observatory port over mDNS (flutter/engine#21632)
* Add flag to not publish the observatory port over mDNS

* Review edits

* Format
2020-10-15 10:48:50 -07:00
stuartmorgan
dae32b99fb Add a style note about Linux embedding style (flutter/engine#21819) 2020-10-15 10:47:01 -07:00
Chris Bracken
60e1170f62 Migrate TextInputPlugin API to TextRange (flutter/engine#21854)
Replaces selection_base() and selection_extent() with selection() and
SetSelection(int, int) with SetSelection(range).

This also adds the following convenience methods to TextRange:
* reversed()
* Contains(size_t position)
* Contains(const TextRange& range)

as well as operator== for use in unit tests. When Flutter migrates to
C++20, we can replace that method with a default declaration.
2020-10-15 09:54:06 -07:00
skia-flutter-autoroll
fefa1d8811 Roll Skia from 99446001182c to f4bda743ff8d (22 revisions) (flutter/engine#21848) 2020-10-14 17:27:04 -07:00
gaaclarke
12cd3076af Revert "Explicitly make the X connection for EGL. (#21831)" (flutter/engine#21851)
This reverts commit a9019523c09d8c50e2f9e29d3246825cad886f64.
2020-10-14 16:30:40 -07:00
Robert Ancell
a9019523c0 Explicitly make the X connection for EGL. (flutter/engine#21831)
Explicitly make the X connection for EGL.

EGL can mistakenly choose the GBM backend when using EGL_DEFAULT_DISPLAY.

Fixes https://github.com/flutter/flutter/issues/60429
2020-10-15 11:06:08 +13:00
Jason Simmons
d6720f7085 Prevent a race between SurfaceTexture.release and updateTexImage (flutter/engine#21777) 2020-10-14 15:02:02 -07:00
Greg Spencer
14b9c22b2c Upgrade to latest process runner, fix commands that throw to fail test (flutter/engine#21827)
This fixes the lint script to fail when the clang-tidy command itself fails to execute, and print the exception that was raised.
2020-10-14 14:33:42 -07:00
Kaushik Iska
fba087b5e3 [android] Refactor surface factory and wire in external view embedder (flutter/engine#21839) 2020-10-14 14:27:02 -07:00
egdaniel
19f8afc6bc Update flutter to pass Skia the VkImageUsageFlags and Samples (flutter/engine#21842)
Previously Skia did not require the clients to pass in the usage flags and Skia would just assumed they contained specific ones depending on how the client wrapped the VkImage. Now Skia allows the client to pass in the specific usage flags used so that Skia knows exactly what type of operations are legal without having to guess/assume what the client did.

Also update to set the sample count as well while I'm in here.
2020-10-14 13:55:09 -07:00