781 Commits

Author SHA1 Message Date
Mouad Debbar
bb1ec63121 Add a build command to felt (flutter/engine#12303)
- The build command supports a `--watch` or `-w` flag to watch for
changes and rebuild.

Fixes https://github.com/flutter/flutter/issues/40392
2019-09-17 10:31:13 -07:00
Michael Goderbauer
a94cccbeee Cleanup in web_ui (flutter/engine#12307) 2019-09-16 16:04:12 -07:00
Jonah Williams
ba1ef5f758 Include firefox in check to quote font families (flutter/engine#12288) 2019-09-16 14:17:17 -07:00
Mouad Debbar
8a818032d0 Refactor and polish the 'felt' tool (flutter/engine#12258)
1. Various functionalities offered by this tool are now organized into commands (e.g. `felt test`, `felt check-licenses`).
2. The felt tool can now be invoked from anywhere, not necessarily from the web_ui directory.
3. This new structure helps us scale better as we add more commands (e.g. soon a `build/watch` command is coming).
2019-09-16 10:41:34 -07:00
Michael Goderbauer
bffaa526a2 a11y: expose max character count for text fields (flutter/engine#12269) 2019-09-16 09:37:25 -07:00
Kaushik Iska
d413a493d6 Fix flutter runner paths (flutter/engine#12289) 2019-09-15 16:22:35 -07:00
Kaushik Iska
8bdeed3670 [flutter_runner] Change the path to artifacts (flutter/engine#12282)
This is to account for fxb/36483
2019-09-13 16:18:03 -07:00
Nurhan Turgut
9d793c6959 Editable text fix (flutter/engine#12249)
* enabling spellcheck for text editing

* Fixing errors in the input box, which arrises when the fontweight is null.

* Rollback the spellcheck change. Still not tested in safari mobile.

* Carrying the assignment of fontweight from index to EditingStyle constructor. This reduce # of null checks to one.
2019-09-12 13:41:14 -07:00
Yegor
eb965c8465 pin and auto-install chrome version (flutter/engine#12228)
pin and auto-install chrome version
2019-09-12 10:25:37 -07:00
Kaushik Iska
71429d47c1 Do not generate kernel platform files on topaz tree (flutter/engine#12222) 2019-09-11 12:42:27 -07:00
Harry Terkelsen
21f124118f Don't disable toString in release mode for dart:ui classes (flutter/engine#12204) 2019-09-11 10:26:15 -07:00
Kaushik Iska
f4ecd9c175 Namespace patched SDK names to not conflict with Topaz (flutter/engine#12218) 2019-09-11 08:19:58 -07:00
Harry Terkelsen
bcad5fd2d7 Don't load Roboto by default (flutter/engine#12205)
Fixes https://github.com/flutter/flutter/issues/39260
2019-09-10 16:40:41 -07:00
Yegor
51e48deb34 add a convenience CLI tool for building and testing web engine (flutter/engine#12197) 2019-09-10 14:52:57 -07:00
Yegor
0a3bdb877f Add custom test plugin that supports screenshot tests (flutter/engine#12079)
- Add a custom `PlatformPlugin` that spins up a server waiting for test to request a screenshot.
  - When a screenshot is requested the plugin talks to Chrome via the debug port, captures a screenshot, and compares it with a golden file
- This PR also adds proper CLI for `dev/test.dart` with an `ArgParser` for future extension into a proper developer tool for the team.
  - As a first couple of features, it adds `--debug` option to launch Chrome in debug mode, a `--target` option to choose a single test to run rather than all tests, and `--shard` option to choose a subset of tests to run.

Limitations:
 - While screenshot test will run on Cirrus, they are configured to not fail on Cirrus. Need to solve Chrome version skew.
 - Stack maps do not work yet (you get stacks, but they are nonsensical)
 - When requesting a single test, build_runner builds all tests anyway
 - Nothing but desktop Chrome is supported
 - Nothing but Linux is supported
 - There's no Chrome version pinning; currently assumed stable Chrome channel
2019-09-10 13:53:47 -07:00
Jonah Williams
e412093624 Make ImageShader implement Shader for web ui (flutter/engine#12161) 2019-09-10 10:15:32 -07:00
Ferhat
173674166f Add GradientRadial paintStyle implementation (flutter/engine#12081) 2019-09-09 14:13:10 -07:00
Harry Terkelsen
c314ab5b5b Don't quote generic font families (flutter/engine#12080)
* Don't quote generic font families

This is a change that should have been upstreamed before.

* Change generic family List to a Set

* Add test
2019-09-09 14:05:40 -07:00
Kaushik Iska
ed39cbade1 [flutter_runner] Kernel platform files can now be built in topaz (flutter/engine#12016)
- Tested this compatibility in topaz repo. The build rules can now be
used to build kernel_platform_files in topaz tree, after this change we
can migrate the platform*dill and vm*snapshot files in topaz to use the
engine built artifacts.

- Also removes some namespace conflicts for dart configuration.
2019-09-06 14:34:26 -07:00
Ferhat
d01050e5fc Fix multi span text ruler cache lookup failure. (flutter/engine#12023) 2019-09-06 14:05:52 -07:00
liyuqian
df4c16f947 Revert "Add a BroadcastStream to FrameTiming (#11041)" (flutter/engine#11841)
This reverts commit 226c44ba3c24cd89b4e47d0ce59b21ac7af6946e.

Reason for revert: Stream is considered a bad API: https://github.com/flutter/engine/pull/11041#issuecomment-526892247
2019-09-05 10:41:55 -07:00
Mouad Debbar
04095305ed Handle new navigation platform messages (flutter/engine#11880) 2019-09-04 15:13:24 -07:00
Harry Terkelsen
21a7659d61 Provide a hook for a plugin handler to receive messages on the web (flutter/engine#11796)
* WIP on web plugin registry

* WIP on web plugins

* More WIP on registering web plugins

* remove flutter_web_plugins

* add license header

* Update year of license header to 2013

* Update the license goldens file
2019-08-30 17:08:31 -07:00
gaaclarke
3aaf1637b7 Started logging warnings if we drop platform messages. (flutter/engine#11792) 2019-08-30 12:48:03 -07:00
Yegor
457198bd53 last flutter web sync: cc38319841 (flutter/engine#11732)
* last flutter web sync: cc38319841

* revert text.dart changes

* revert paragraph.dart

* link to issue
2019-08-29 18:50:50 -07:00
Harry Terkelsen
922255f860 Quote the font family name whenever setting the font-family property. (flutter/engine#11722)
Browsers will only allow font names with spaces or '/' if they are
in quotes.

Fixes https://github.com/flutter/flutter/issues/39486
2019-08-29 15:58:32 -07:00
Martin Kustermann
442d4de7a2 Roll src/third_party/dart 35382f9b14..05c28c6115 (flutter/engine#11702)
* Roll src/third_party/dart 35382f9b14..05c28c6115

dart-lang/sdk@05c28c6115 Reland "Scaffolding for dart:wasm"
dart-lang/sdk@d57a8f7451 [vm/bytecode] Remove DebugCheck in synthetic non-local transfer (no source pos).
dart-lang/sdk@b565c8c20f Don't serialize not serializable constant variable initializers.
dart-lang/sdk@ce12a2722d Migration: handle named parameters in _substituteFunctionAfterFormals.
dart-lang/sdk@a290271dea [vm/bytecode] Throw should be 'debug checked', but not ReThrow.
dart-lang/sdk@63133a2a8c [cfe] Handle extension instance method tearoff
dart-lang/sdk@a147d4e8d2 [cfe] Handle simple use of extension instance members
dart-lang/sdk@e9fdeb2db8 Migration: add support for creating instances without supplying type arguments.
dart-lang/sdk@66e349da9c Migration: Clean up substitution logic in getOrComputeElementType
dart-lang/sdk@e9a44ba6a8 fix extension instance field error
dart-lang/sdk@15a7b57d8e split endFields into endClass/Mixin/ExtensionFields events
dart-lang/sdk@ed1b4ffba1 Add tests of extensions of mixins
dart-lang/sdk@ef36f1ba0d [vm/fuzzer] Reduce limit on methods and classes
dart-lang/sdk@7b17602c74 [vm/bytecode] Include function name into source fingerprints
dart-lang/sdk@851701d2a4 add BREAK suggestions to switch cases
dart-lang/sdk@57f7941eef [cfe] Remove 'functionNestingLevel' for VariableDeclaration.forValue
2019-08-29 22:06:42 +02:00
David Iglesias
6792c2ceae Don't crash while loading improperly formatted fonts on Safari (flutter/engine#11655)
(cl/265763028)

Fixes https://github.com/flutter/flutter/issues/39259
2019-08-29 09:03:14 -07:00
Yegor
cf1da7b72c remove Web test blacklist; all tests should pass now (flutter/engine#11640)
* copy ahem.ttf where web_ui can find it
* remove Web test blacklist; all tests should pass now
2019-08-28 12:37:34 -07:00
Gary Qian
1a646c18bb Update the ui.LineMetrics.height metric to be more useful to external users (flutter/engine#11456) 2019-08-28 12:26:42 -07:00
Chris Bracken
4336d71016 Add missing newline at EOF (flutter/engine#11473)
This was required by the C++ spec pre-C++11 and still gets picked up in
the Fuchsia tree due to -Wnewline-eof. It fixes:

    ../../third_party/flutter/lib/ui/text/line_metrics.h:75:47: error: no newline at end of file [-Werror,-Wnewline-eof]
    #endif  // FLUTTER_LIB_UI_TEXT_LINE_METRICS_H_
2019-08-26 21:11:57 -07:00
Gary Qian
5a4bdf5ef6 Expose LineMetrics in dart:ui (flutter/engine#10670) 2019-08-26 13:40:22 -07:00
Yegor
a5db220340 sync Flutter Web engine to the latest (flutter/engine#11421)
* sync Flutter Web engine to the latest
2019-08-26 08:16:09 -07:00
Chinmay Garde
05d4ab774d Remove deprecated ThreadTest::GetThreadTaskRunner and use the newer CreateNewThread API. (flutter/engine#11395)
We will end up creating fewer threads in tests.
2019-08-23 12:21:46 -07:00
Yegor
2a764289e5 preventDefault on touchend to show iOS keyboard (flutter/engine#11390) 2019-08-22 17:35:07 -07:00
Yegor
3c08ceeae6 sync web engine; run web engine tests (flutter/engine#11031)
sync web engine; run web engine tests
2019-08-22 16:38:03 -07:00
liyuqian
226c44ba3c Add a BroadcastStream to FrameTiming (flutter/engine#11041)
Without this, developers have to override `onReportTimings` to listen for `FrameTiming`.
That can potentially break previous `onReportTimings` listeners if they forget to call
the old listener in their new callback.

This PR replaces the similar RP in the framework: https://github.com/flutter/flutter/pull/38574

Once this PR landed, we'll have to create another framework PR to use the stream to replace
`onReportTimings` usages.

Once that's done, we can then propose the breaking change of removing the deprecated
`onReportTimings`.
2019-08-19 10:52:16 -07:00
Shi-Hao Hong
cb707fb34a Pass Android Q insets.systemGestureInsets to Window (flutter/engine#10413)
* Pass Android Q system gesture inset information from insets.systemGestureInsets to Window.systemGestureInsets
2019-08-16 13:42:56 -04:00
Brian Osman
152e8dfa20 Remove unused dstColorSpace argument to MakeCrossContextFromPixmap (flutter/engine#11052) 2019-08-16 12:57:53 -04:00
Jason Simmons
7f2aaefb8b Remove the ParagraphImpl class from the text API (flutter/engine#11012)
ParagraphImpl was used to switch between libtxt and Blink implementations
of text rendering and is now obsolete.
2019-08-15 15:23:00 -07:00
Chinmay Garde
591f55b39d Allow embedder controlled composition of Flutter layers. (flutter/engine#10195)
This patch allows embedders to split the Flutter layer tree into multiple
chunks. These chunks are meant to be composed one on top of another. This gives
embedders a chance to interleave their own contents between these chunks.

The Flutter embedder API already provides hooks for the specification of
textures for the Flutter engine to compose within its own hierarchy (for camera
feeds, video, etc..). However, not all embedders can render the contents of such
sources into textures the Flutter engine can accept. Moreover, this composition
model may have overheads that are non-trivial for certain use cases. In such
cases, the embedder may choose to specify multiple render target for Flutter to
render into instead of just one.

The use of this API allows embedders to perform composition very similar to the
iOS embedder. This composition model is used on that platform for the embedding
of UIKit view such and web view and map views within the Flutter hierarchy.
However, do note that iOS also has threading configurations that are currently
not available to custom embedders.

The embedder API updates in this patch are ABI stable and existing embedders
will continue to work are normal. For embedders that want to enable this
composition mode, the API is designed to make it easy to opt into the same in an
incremental manner.

Rendering of contents into the “root” rendering surface remains unchanged.
However, now the application can push “platform views” via a scene builder.
These platform views need to handled by a FlutterCompositor specified in a new
field at the end of the FlutterProjectArgs struct.

When a new platform view in introduced within the layer tree, the compositor
will ask the embedder to create a new render target for that platform view.
Render targets can currently be OpenGL framebuffers, OpenGL textures or software
buffers. The type of the render target returned by the embedder must be
compatible with the root render surface. That is, if the root render surface is
an OpenGL framebuffer, the render target for each platform view must either be a
texture or a framebuffer in the same OpenGL context. New render target types as
well as root renderers for newer APIs like Metal & Vulkan can and will be added
in the future. The addition of these APIs will be done in an ABI & API stable
manner.

As Flutter renders frames, it gives the embedder a callback with information
about the position of the various platform views in the effective hierarchy.
The embedder is then meant to put the contents of the render targets that it
setup and had previously given to the engine onto the screen (of course
interleaving the contents of the platform views).

Unit-tests have been added that test not only the structure and properties of
layer hierarchy given to the compositor, but also the contents of the texels
rendered by a test compositor using both the OpenGL and software rendering
backends.

Fixes b/132812775
Fixes flutter/flutter#35410
2019-08-13 14:53:19 -07:00
Yegor
92407929f4 rename stub_ui to web_ui (flutter/engine#10776)
* rename stub_ui to web_ui

* update licenses
2019-08-09 11:11:20 -07:00
Dan Field
5a9ac6e780 expose max depth on Window (flutter/engine#10414) 2019-08-02 20:37:24 -07:00
Jason Simmons
430bed2f4f Ensure that the SingleFrameCodec stays alive until the ImageDecoder invokes its callback (flutter/engine#10297)
SingleFrameCodec had been holding a persistent handle to the peer Dart object
while waiting for the decoder callback.  However, Dart code could call
Codec.dispose during that interval, which would cause the Dart peer to drop
its reference to the SingleFrameCodec and potentially delete the
SingleFrameCodec.

Fixes https://github.com/flutter/flutter/issues/36631
2019-07-31 14:58:44 -07:00
Kaushik Iska
e20083819a [fuchsia] Push CMX to fars and add product mode support (flutter/engine#10144)
* Capture stderr for ninja command

* br

* [fuchsia] Push CMX to fars and add product mode support.

* fix shit

* fix GN format
2019-07-25 15:09:04 -07:00
gaaclarke
8d52ae8514 Revert "[fuchsia] Use the patched sdk to generate the flutter jit runner far (#10122)" (flutter/engine#10140)
This reverts commit 2c7cabdff9c346ac28b49044726c551c93132f3d.
2019-07-25 10:52:27 -07:00
Kaushik Iska
2c7cabdff9 [fuchsia] Use the patched sdk to generate the flutter jit runner far (flutter/engine#10122) 2019-07-24 17:10:48 -07:00
Jason Simmons
4e67ab7b5f Change ParagraphBuilder to replace the parent style's font families with the child style's font families (flutter/engine#10074)
Previously ParagraphBuilder was concatenating the child's fonts to the
parent's font list, causing the parent's fonts to take precedence.

Fixes https://github.com/flutter/flutter/issues/35992
2019-07-23 17:57:56 -07:00
Jason Simmons
8afed18167 Fix caching of Locale.toString (flutter/engine#9920) 2019-07-19 15:57:28 -07:00
Jason Simmons
2f63de4797 Fix reentrancy handling in SingleFrameCodec (flutter/engine#9931)
After the frame is decoded SingleFrameCodec will invoke pending callbacks
from calls to getNextFrame.  The callbacks could result in more calls to
getNextFrame.  Those calls should receive the frame instead of being added
to the pending list.
2019-07-18 15:54:21 -07:00