815 Commits

Author SHA1 Message Date
Mouad Debbar
fdff0787ed
Don't send pointer events when the framework isn't ready yet (#12403) 2019-09-23 15:43:49 -07:00
Nurhan Turgut
e822414322
Updating text field location in IOS as a pre-work for spellcheck (#12192)
* enabling spellcheck for text editing

* Finalize location changes in IOS. IOS is ready for spellcheck now. Disable spellcheck since we realized some tag/autocomplete transfer from Framework is necessary for complete spellcheck implementation.

* Remove todo since this PR fixes the updated location issue for IOS too. All browsers are supported now.

* Adding boolean flags to make conditions more readable. Fixing typos.

* Fixing unit tests. Addressing github PR comments.
2019-09-23 12:36:39 -07:00
Jaime Blasco
111a340b93 [Web] Implement dark mode support for web (#12335) 2019-09-23 09:42:20 -07:00
Yegor
94368ac0ec
Add macOS testing support (#12383)
- Add support for macOS in `felt test`
- Set viewport so it does not depend on real device pixel density
2019-09-22 11:49:44 -07:00
Yegor
d5820e956e
Store screenshot test output as Cirrus artifacts; do fuzzy comparison of non-matching screenshot pixels (#12274)
- Store screenshot test output as Cirrus artifacts
- Do fuzzy comparison of non-matching screenshot pixels
- Make screenshot tests fail on Cirrus
2019-09-20 14:46:00 -07:00
David Iglesias
b875c7a5ff
Add web engine screenshot (scuba) tests (#12353)
* Import all golden files and tests from internal repo.
* Adapt test files to new screenshot API, and tweak some settings.

(Check PR to see individual changes to each file)

Fixes https://github.com/flutter/flutter/issues/40975
2019-09-20 09:00:55 -07:00
Siva
50b3538399
 Roll src/third_party/dart 7c1821c4aa...ea969c358e (#12339)
* Roll src/third_party/dart 7c1821c4aa...ea969c358e (6 commits)

dart-lang/sdk@7c1821c4aa [NNBD/VM] Restructure VM patch files for the NNBD dart sdk split
dart-lang/sdk@0c23664c8f [vm/fuzzer] Reduce number of methods per class
dart-lang/sdk@3135eb569d [vm/bytecode] Fix initial scope in field initializers
dart-lang/sdk@1345fb80ac Use TypeParameterElement instead of TypeParameterType in inference.
dart-lang/sdk@430ff6d649 Migration: fix "matching" functionality of edge testing infrastructure.
dart-lang/sdk@f1bff1b512 Add option to run ddb with observatory
2019-09-19 16:07:34 -07:00
Kaushik Iska
7f7250f476
[flutter_runner] Do not use prebuilts just yet (#12340) 2019-09-18 15:31:57 -07:00
David Iglesias
d3c60acef8
More controls for Screenshot tests (for web) (#12284)
New features for golden tests (for web):

* Height/width of headless browser instance extracted to constants
* Remove border from the host iframe
* Added 'region' to matchGoldenFile, so screenshots can capture only
a subset of the viewport
* Added image-format-awareness (png) to screenshot comparison, so it
doesn't only look at raw bytes
* When a test fails, output a diff image alongside the unexpected
output.
2019-09-18 14:58:30 -07:00
David Iglesias
8814f6865c
Ensure DRRects without corners also draw. (#12330)
Uncovered this bug running some additional engine tests. Backported the
test here, and fixed the recording_canvas code.
2019-09-18 10:45:43 -07:00
Chinmay Garde
1c7300ed1e
Account for root surface transformation on the surfaces managed by the external view embedder. (#11384)
The earlier design speculated that embedders could affect the same
transformations on the layers post engine compositor presentation but before
final composition.

However, the linked issue points out that this design is not suitable for use
with hardware overlay planes. When rendering to the same, to affect the
transformation before composition, embedders would have to render to an
off-screen render target and then apply the transformation before presentation.
This patch negates the need for that off-screen render pass.

To be clear, the previous architecture is still fully viable. Embedders still
have full control over layer transformations before composition. This is an
optimization for the hardware overlay planes use-case.

Fixes b/139758641
2019-09-17 15:16:59 -07:00
Harry Terkelsen
d1692d4cc7
Update canvaskit backend (#12318)
* Improve the CanvasKit backend for Flutter Web

- Improve font handling by trying to load a "normal" font face
  instead of using the first face matching the family.
- Implement Vertices and drawVertices

* Add license header to vertices.dart

* Remove unused 'encodedPositions'

* Delete commented old code. Don't use Skia by default

* Add `vertices.dart` to licenses file
2019-09-17 14:42:18 -07:00
Mouad Debbar
b790d48ebc
README for the felt tool (#12323) 2019-09-17 14:03:31 -07:00
David Iglesias
851f4606f1
Improve check to render (or not) a DRRect when inner falls outside of outer on RecordingCanvas (#12229)
* Improve check to determine if a rrect is fully contained within another in RecordingCanvas.
* Add unit tests.

Fixes https://github.com/flutter/flutter/issues/37772 (and others)
2019-09-17 13:27:44 -07:00
gaaclarke
0a455a8207
Channel buffers (#12167)
Added channel buffers to 'ui' so that messages have a place to
go until message handling is setup.
2019-09-17 12:22:00 -07:00
Mouad Debbar
7ab695618e
Add a build command to felt (#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
d5139465f6
Cleanup in web_ui (#12307) 2019-09-16 16:04:12 -07:00
Jonah Williams
11bb2bffeb
Include firefox in check to quote font families (#12288) 2019-09-16 14:17:17 -07:00
Mouad Debbar
968c3aa169
Refactor and polish the 'felt' tool (#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
ef7bcafd5c
a11y: expose max character count for text fields (#12269) 2019-09-16 09:37:25 -07:00
Kaushik Iska
6fbbfe18e8
Fix flutter runner paths (#12289) 2019-09-15 16:22:35 -07:00
Kaushik Iska
00c8941dae [flutter_runner] Change the path to artifacts (#12282)
This is to account for fxb/36483
2019-09-13 16:18:03 -07:00
Nurhan Turgut
9c8465927e
Editable text fix (#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
d6f0b64d06
pin and auto-install chrome version (#12228)
pin and auto-install chrome version
2019-09-12 10:25:37 -07:00
Kaushik Iska
988efe376a
Do not generate kernel platform files on topaz tree (#12222) 2019-09-11 12:42:27 -07:00
Harry Terkelsen
6c46a173e3
Don't disable toString in release mode for dart:ui classes (#12204) 2019-09-11 10:26:15 -07:00
Kaushik Iska
2bdfb61a04
Namespace patched SDK names to not conflict with Topaz (#12218) 2019-09-11 08:19:58 -07:00
Harry Terkelsen
e174b4b9b0
Don't load Roboto by default (#12205)
Fixes https://github.com/flutter/flutter/issues/39260
2019-09-10 16:40:41 -07:00
Yegor
e9c998468e
add a convenience CLI tool for building and testing web engine (#12197) 2019-09-10 14:52:57 -07:00
Yegor
954f1988c5
Add custom test plugin that supports screenshot tests (#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
2438798147
Make ImageShader implement Shader for web ui (#12161) 2019-09-10 10:15:32 -07:00
Ferhat
c2e82892aa
Add GradientRadial paintStyle implementation (#12081) 2019-09-09 14:13:10 -07:00
Harry Terkelsen
c3eea0ac28
Don't quote generic font families (#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
7ea9884ab0
[flutter_runner] Kernel platform files can now be built in topaz (#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
e50bfbe9f7
Fix multi span text ruler cache lookup failure. (#12023) 2019-09-06 14:05:52 -07:00
liyuqian
4243324a03
Revert "Add a BroadcastStream to FrameTiming (#11041)" (#11841)
This reverts commit e97ed36e580c9b4c4a3d768cfe1a520f7bf8161d.

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
cd920398e4
Handle new navigation platform messages (#11880) 2019-09-04 15:13:24 -07:00
Harry Terkelsen
57f4ea4d37
Provide a hook for a plugin handler to receive messages on the web (#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
daf1a27d46
Started logging warnings if we drop platform messages. (#11792) 2019-08-30 12:48:03 -07:00
Yegor
81e010f771
last flutter web sync: cc38319841 (#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
1b1f78165e
Quote the font family name whenever setting the font-family property. (#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
74a3c73e3c
Roll src/third_party/dart 35382f9b14..05c28c6115 (#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
9a17d8e451
Don't crash while loading improperly formatted fonts on Safari (#11655)
(cl/265763028)

Fixes https://github.com/flutter/flutter/issues/39259
2019-08-29 09:03:14 -07:00
Yegor
479719b26d
remove Web test blacklist; all tests should pass now (#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
13ece5c7fc
Update the ui.LineMetrics.height metric to be more useful to external users (#11456) 2019-08-28 12:26:42 -07:00
Chris Bracken
bf86d08102
Add missing newline at EOF (#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
9f1eab2f1f
Expose LineMetrics in dart:ui (#10670) 2019-08-26 13:40:22 -07:00
Yegor
f38913b7c7
sync Flutter Web engine to the latest (#11421)
* sync Flutter Web engine to the latest
2019-08-26 08:16:09 -07:00
Chinmay Garde
b7d03138ed
Remove deprecated ThreadTest::GetThreadTaskRunner and use the newer CreateNewThread API. (#11395)
We will end up creating fewer threads in tests.
2019-08-23 12:21:46 -07:00
Yegor
ffe8c0b33d
preventDefault on touchend to show iOS keyboard (#11390) 2019-08-22 17:35:07 -07:00