67 Commits

Author SHA1 Message Date
Nurhan Turgut
7922bc80e9
[web] adding firefox unit tests to font loading (#14467)
* adding firefox unit tests to font loading

* reviewer suggestions
2019-12-13 07:28:27 -08:00
Yegor
18c89f1cf6
[web][refactor] Split html and canvaskit classes more (#14320)
* Split surface and canvaskit classes more

* fix licenses

* address comments
2019-12-12 13:20:49 -08:00
Nurhan Turgut
f650bcaf77
Refactoring text editing. Strategy pattern is used to handle different browser/operating system and a11y behavior. (#14131)
* adding the default text editing strategy

* [DRAFT] Refactoring text editing. Strategy pattern is used to handle different browser/operating system and a11y behaviour. Unit tests are missing. Documentation needs updating.

* addressing PR comments

* addressing PR comments. Fixing documentation

* fixing persistenttextediting element which is used in a11y mode

* removing texteditingelement and using texteditingstrategy from hybridtextediting. fixing the unit tests. fixing comments

* fix unit tests

* add todos for firefox tests

* fixing chrome/android a11y issue
2019-12-12 11:18:02 -08:00
Nurhan Turgut
2805da9e5d
Enable web engine unit tests on Firefox (#14267)
* Enable web engine unit tests on Firefox

* addressing PR comments

* addressing PR comments

* fix the version name on the lock file
2019-12-09 16:27:14 -08:00
Mouad Debbar
0506c65f59
[web] DOM text measurement return a LineMetrics list if single-line (#14138) 2019-12-05 12:15:03 -08:00
Mouad Debbar
8d1c59811c
[web] Fix text measurement when constraint width is infinite (#14132) 2019-12-04 13:27:14 -08:00
chunhtai
3e6d6bc612
add pointer data santizing in flutter web engine (#14082) 2019-12-03 18:41:36 -08:00
Nurhan Turgut
4bdd15cd54
more tests for enabling semantics (#14060)
* more tests for enabling semantics

* addressing pr comments
2019-11-27 14:53:48 -08:00
Mouad Debbar
bc07e6a239
[web] Initial support for LineMetrics (#13985) 2019-11-27 12:56:44 -08:00
Nurhan Turgut
e3e5f8dabc
Adding support for enabling semantics on desktop (#14003)
* DRAFT: adding support for enabling semantics on desktop

* Working solution for desktop.

* Refactoring class structure. Removing unrelated comments.

* Fixing enabling semantics from dom_renderer

* Adding unit tests.Fixing failing cases. More refactoring.

* more work on tests.

* Fixing licences

* addressing PR comments
2019-11-26 18:59:26 -08:00
Harry Terkelsen
7b07be61b9
Refactor CanvasKit backend in preparation for platform views (#13935)
* SkCanvas -> SkLayerCanvas

SkRecordingCanvas -> SkCanvas

* Move files

* WIP on canvas refactor

* Refactor CanvasKit backend

* fix tests

* update licenses

* Respond to PR comments
2019-11-25 18:21:45 -08:00
Jonah Williams
298e053bdc
Add support for FontLoader API for the web (#13999) 2019-11-25 11:07:13 -08:00
Mouad Debbar
72e167e47d
[web] Fix bug in rich text layout (#13981) 2019-11-22 12:20:16 -08:00
Mouad Debbar
96fc607b8a
[web] Refactor text editing to handle any order of platform messages gracefully (#13741) 2019-11-21 12:36:53 -08:00
Nurhan Turgut
df55ed4c5b
[web] Flutter for web autocorrect support (#13922)
* support for autocorrect

* fixing the unit tests. Note there is no unit tests for the autocorrect since the unit tests do not run on webkit

* addressing PR comments

* fix typo
2019-11-20 06:47:09 -08:00
Ferhat
84ed7be371
[web] Implement PathMetrics.length (#13909)
* Implement PathMetrics.length, add tests
2019-11-19 09:41:11 -08:00
Ferhat
73e1fb21fc
Fix withIn matcher distance function lookup (#13904) 2019-11-18 16:00:01 -08:00
Mouad Debbar
3a89662ca1
[web] Fix selectable text rendering (#13802) 2019-11-14 00:12:56 -08:00
Ferhat
b6a0fb77ed
[web] Fix blendmode for images (#13809)
* Fix blendmode for images
2019-11-13 13:09:16 -08:00
Ferhat
679a4369b2
[web] Implement TextStyle.shadows (#13769)
* Add shadows to Engine classes
* add text shadow test
* update golden locks file, update ui.ParagraphStyle, fix issues
* Change maxDiffRate for mac clients
2019-11-12 00:05:00 -08:00
Harry Terkelsen
726e8f54db
Add Helvetica and sans-serif as fallback font families (#13784)
* Add Helvetica and sans-serif as fallback font families

This prevents us from using an ugly serif default font when the
requested font isn't available.

* Use Arial when not on iOS
2019-11-11 16:54:28 -08:00
Ferhat
10d5ed19f8
[web] Fix path to svg for drrect (#13779) 2019-11-11 15:38:30 -08:00
Ferhat
7413304c37
[web] Support gif/webp animations, Speed up image drawing in BitmapCanvas. (#13748)
* Add draw image test
* Optimize drawImageScaled
* optimize cloning in HtmlImage, implement drawImageRect using image tag
2019-11-08 12:52:01 -08:00
Greg Spencer
f7e73b6236
Move TextRange from the framework to dart:ui. (#13747)
This removes TextRange from the framework and moves it to the engine, in preparation for using it to return text ranges from the text extent APIs, like Paragraph.getWordBoundary instead of a List<int>.

Also added new tests for TextRange.
2019-11-08 12:21:46 -08:00
Mouad Debbar
abaa85a394
[web] Proper support for text field's obscureText (#13722) 2019-11-06 13:20:23 -08:00
Mouad Debbar
a9ef2410f6
[web] Don't send keyboard events from text fields to flutter (#13699) 2019-11-05 19:00:51 -08:00
Mouad Debbar
5b87cd0773
Fix bug where Enter doesn't add new line in multi-line fields (#13630) 2019-11-05 13:31:40 -08:00
Yegor
6e0e2274f1
fix getBoxesForRange for zero-length ranges (#13483) 2019-11-04 10:16:38 -08:00
Nurhan Turgut
fb4366e52b
[web] Get the size from visualviewport instead of window.innerHeight/innerW… (#13462)
* get the size from visualviewport instead of window.innerHeight/innerWidth.

* merging 2 if statements to one.

* add more comments
2019-10-31 15:10:38 -07:00
Yegor
49971e2140
Implement basic Picture.toImage via BitmapCanvas (#13391)
Implement basic Picture.toImage via BitmapCanvas and update the dartdocs.
2019-10-28 12:50:43 -07:00
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