37 Commits

Author SHA1 Message Date
Yegor
797e094f0c
Web: fix Color subclass handling (#13359) 2019-10-25 13:41:46 -07:00
Ferhat
227e44d9e5
[web] Cupertino dynamic color fix. (#13296)
* Fix cupertino theme rendering issues due to Color subclassing
Fixes flutter/flutter#41257
2019-10-22 16:46:38 -07:00
Mouad Debbar
4307a9b487
[web] Support input action (#13268) 2019-10-21 15:23:36 -07:00
Ferhat
6d0f075709
[web] Fix canvas reuse metrics. Refactor drawVertices code. (#13190)
* Draw vertices to shared offscreen canvas on browsers that support OffscreenCanvas.
* Move gl rendering code to render_vertices.dart.
* Reuse shaders and program across calls.
2019-10-18 10:41:16 -07:00
Harry Terkelsen
7f7e09c7ee
If we get a 'down' event, add that device to the active devices. (#13182)
This prevents us from synthesizing an 'add' event if we get a 'move'
event after a 'down' event. This was causing errors because on the
framework side, it will synthesize an 'add' event if it receives a
'down' event, and if you send another 'add' event (e.g. with a 'move'
after a 'down') then it will throw an AssertionError since it already
has received an 'add' event for that pointer.

Fixes https://github.com/flutter/flutter/issues/40385
2019-10-16 15:41:12 -07:00
Yegor
5fe6083d34
Move surface-based SceneBuilder implementation under surface/ (#13159)
Move surface-based SceneBuilder implementation under surface/
2019-10-15 20:07:28 -07:00
Ferhat
3fd877715b
[web] Add basic color per vertex drawVertices API support (#13066)
* Implement basic drawVertices for BlendMode.srcOver and hairline rendering
* Implement maxDiffRate parameter for screenshot tests
2019-10-14 13:16:05 -07:00
Mouad Debbar
c643366c19
Support keyboard types on mobile browsers (#13044) 2019-10-14 13:10:01 -07:00
Nurhan Turgut
3ad8c42591
do not wrap font family name (#12801)
* do not wrap font family name in webkit otherwise icons not show on safari 13 (both IOS and desktop)

* Changing the font loading to work in all browsers.

* Documentation, renaming, gramatical/spelling error related PR comments addressed. Regexp will be addressed in the next commit.

* Changing regular expressions to look simpler. Adding more unit tests.
2019-10-11 15:12:28 -07:00
Ferhat
d9c3afae26
[web] Implement basic radial gradient (TileMode.clamp, no transform) (#12811)
* Add GradientRadial paintStyle implementation
2019-10-09 15:51:31 -07:00
Harry Terkelsen
e693192167
[web_ui] Check if a pointer is already down for the specific device (#12470)
* WIP on fixing pointer event clicks

* Don't set canvaskit as enabled by default

* Use a Set of pressed buttons rather than a Map of button status to
avoid memory leaks

* Add test for pointer binding

Fix bug where event listeners weren't properly removed
2019-10-09 12:43:06 -07:00
Ferhat
f2a8b050d4
[web] Add support for path transform (#12794)
* Implement path.transform
2019-10-08 16:05:54 -07:00
Mouad Debbar
6113ef93ea
[web] Update the url when route is replaced (#13003) 2019-10-08 14:47:25 -07:00
David Iglesias
f48f0fa01b
Open source canvas tests from flutter_web_ui (#12819)
* Open source canvas tests from flutter_web_ui

Reimplement some painter tests as screenshot tests on canvas.

Needs https://github.com/flutter/goldens/pull/53
Fixes https://github.com/flutter/flutter/issues/42027

* Remove whitespace

* Address PR feedback

* Add latest hash to dev/goldens_lock.yaml
* Rename (with git mv) *scuba_test.dart -> *golden_test.dart
2019-10-08 09:40:09 -07:00
Mouad Debbar
dbb285d366
Prevent default when Tab is clicked (#12986) 2019-10-08 09:40:01 -07:00
Yegor
bba0065cf6
add option for bulk-updating screenshots; update screenshots (#12797)
* add option for bulk-updating screenshots; update screenshots
2019-10-04 15:07:05 -07:00
Nurhan Turgut
16a4df7a76
Fixing selection issues in Firefox (#12793)
* Fixing selection issues in Firefox. Moving text editing dom elements to glass pane.

* Addressing PR comments.

* Update text_editing.dart

fixing typo
2019-10-04 11:58:32 -07:00
Mouad Debbar
e9edb8e14f
Support correct keymap for web (#12712) 2019-10-02 15:09:08 -07:00
Nurhan Turgut
bfcafbec2b
[web_ui] Fixing invalid state bug for text editing (#12698)
* Fixing invalid state bug for text editing. Flutter Framework was sending editing state selection base and extent as -1. Since -1 is an invalid value for a dom element selection it was not applied to the last editing state. Now if the base or offset is sent as negative value, web engine will set 0 to the selection range.

* Addressing PR comments.
2019-09-30 12:31:17 -07:00
Nurhan Turgut
a3a991aef1
Refactoring text_editing.dart (#12479)
* Refacting text_editing.dart to use EditingState more efficiently and removing unused/unimplemented code.

* Addressing PR comments. Comment changes. Removing unused methods. Method renaming.

* commiting text_editing_test.dart changes.
2019-09-30 08:26:28 -07:00
Nurhan Turgut
d8d0d3f104
Reflect selection changes in Firefox for text editing (#12447)
* reflect selection changes in Firefox. With this change if the keyboard arrow keys to move the cursor the selection change is synced to Flutter Framework

* Addresing PR comments. Renaming. Adding the domelement to SelectionChangeDetection constructor.

* add initial value to selection start/end

add initial value to selection start/end
2019-09-26 15:24:10 -07:00
Yegor
c3bfbec9de
delete golden files; switch to flutter/goldens (#12434)
Delete golden files from flutter/engine; switch to flutter/goldens
2019-09-25 09:08:44 -07:00
David Iglesias
44279e27c9
Interpret negative radii as 0 in recording_canvas drawDRRect (#12431)
* Interpret negative radii as 0 in recording_canvas drawDRRect

This allows drawing DRRects that may have some negative values on
its corners (caused by deflating a RRect with some non-round corners,
for example)

See added unit test for an example of the above.

Fixes https://github.com/flutter/flutter/issues/40728
2019-09-24 17:55:45 -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
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
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
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
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
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
Ferhat
e50bfbe9f7
Fix multi span text ruler cache lookup failure. (#12023) 2019-09-06 14:05:52 -07:00
Mouad Debbar
cd920398e4
Handle new navigation platform messages (#11880) 2019-09-04 15:13:24 -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
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
Yegor
fad38e252f
sync web engine; run web engine tests (#11031)
sync web engine; run web engine tests
2019-08-22 16:38:03 -07:00
Yegor
708fc625d7
rename stub_ui to web_ui (#10776)
* rename stub_ui to web_ui

* update licenses
2019-08-09 11:11:20 -07:00