241 Commits

Author SHA1 Message Date
Mouad Debbar
3f01328edb
[web] Remove commented import (#21247) 2020-09-17 14:01:30 -07:00
nturgut
c5588af6fa
[web] run safari desktop tests on luci (#21228)
* run safari desktop tests on luci

* fix safari issue. focus on dom element when new transform is received. add transform to test cases

* Update text_editing.dart

minor change to retrigger tests (recipe change is merged)
2020-09-17 13:00:06 -07:00
Mouad Debbar
27691a5ec1
[web] Allow updating input configuration while connection is active (#21048) 2020-09-16 08:51:34 -07:00
Mouad Debbar
7bda396b0f
[web] Fix mis-aligned widget spans (#21112) 2020-09-15 12:58:07 -07:00
nturgut
1cabedf8ac
running screenshot tests on ios-safari unit tests (#20963)
* running screenshot tests on ios-safari unit tests

* fixing the golden_smoke tests. changes to the documentation

* addressing reviewer comments

* cropping footer from the simulator screenshot. addressing some reviewer comments

* use .dart_tools for recording the screenshots

* fix the usage of the method

* adding TODO's for missing documentation and not supported windows tests

* addressing comments

* changing to incremental counter for file names

* add comment to the counter

* fix anaylze issues

* using takescreenshot method from the iosSimulator.

* address reviewer comments

* fix the scaling issue. disable eronous test

* change the smoke file for top gap 282

* change the variable name for scale factor
2020-09-15 12:36:00 -07:00
chunhtai
833c6a2e00
Implement browser history class for router widget (#20794) 2020-09-10 21:00:02 -07:00
Chris Bracken
cf8c6b8ba1
Update web lerpDouble to match C++ behaviour (#21010)
This updates the web_ui implementation of lerpDouble to match the
behaviour of the C++ engine implementation in dart:ui.

Specifically this covers the following changes:
* #20871: stricter handling of NaN and infinity
* #20879: Improve the precision of lerpDouble

lerpDouble: stricter handling of NaN and infinity (#20871)
----------------------------------------------------------

Previously, the behaviour of lerpDouble with respect to NaN and infinity
was relatively complex and difficult to reason about. This patch
simplifies the behaviour with respect to those conditions and adds
documentation and tests.

In general, if `a == b` or both values are null, infinite, or NaN, `a`
is returned. Otherwise we require `a` and `b` and `t` to be finite or
null and the result of the linear interpolation is returned.

Improve the precision of lerpDouble (#20879)
--------------------------------------------

Reduces errors caused by the loss of floating point precision when the
two extrema of the lerp differ significantly in magnitude. Previously,
we used the calculation:

    a + (b - a) * t

When the difference in magnitude between `a` and `b` exceeds the
precision representable by double-precision floating point math, `b - a`
results in the larger-magnitude value of `a` or `b`. The error between
the value produced and the correct value is then scaled by t.

A simple example of the impact can be seen when `a` is significantly
larger in magnitude than `b`. In that case, `b - a` results in `a` and
when `t` is 1.0, the resulting value is `a - (a) * 1.0 == 0`.

The patch transforms the computation to the mathematically-equivalent
expression:

    a * (1.0 - t) + b * t

By scaling each value independently, the behaviour is more accurate.
From the point of view of performance, this adds an extra
multiplication, but multiplication is relatively cheap and the behaviour
is significantly better.

This patch also adds a `precisionErrorTolerance` constant to
test_utils.dart and migrates existing tests to use `closeTo()` for
testing.

The tests themselves *do* currently use values that have an exact
floating-point representation, but we should allow for flexibility in
future implementation changes.
2020-09-08 16:04:11 -07:00
Jim Graham
6a6986da47
improve sensitivity of BackdropFilter web tests (#20915) 2020-09-03 21:47:41 -07:00
Gábor
d67bda725a
Image.toByteData and Picture.toImage implementations (#3) (#20750)
* `Image.toByteData()` was not implemented in either DomCanvas or CanvasKit. This PR covers **both.**
* `Picture.toImage()` was not implemented in either DomCanvas or CanvasKit. This PR covers **CanvasKit**
2020-09-01 17:01:18 -07:00
Ferhat
bada9fc5f3
[web] Fix path clip crash when reused (#20846) 2020-08-30 19:35:39 -07:00
Mouad Debbar
7a890f27ca
[web] Better format for line break tests (#20767) 2020-08-28 14:43:01 -07:00
Ferhat
3ccf1ed2ec
Cliprect op (#20837)
* Switched PathCommand apply parameter to non-nullable. Add clip op parameter to ClipCommand.
2020-08-27 22:38:03 -07:00
Ferhat
e67ae1e307
[web] Fix path rendering when addPolygon is chained with other verbs. (#20803) 2020-08-27 20:25:38 -07:00
Ferhat
f0a8230fca
[web] Implement SceneBuilder.pushColorFilter for html (#20821)
* Implement Color filter layer
* Add test with BlendMode color
* update licenses file
* Move blend functions into color_filter.dart
* dartfmt
* Add missing default clause
* Remove switch default
2020-08-27 12:06:22 -07:00
Zachary Anderson
fe0a995fdf
Revert "[web] Implement SceneBuilder.pushColorFilter for html (#20802)" (#20820)
This reverts commit 2decf195d2def7aa82b2d6e4c29ce932a78c73f2.
2020-08-27 10:12:55 -07:00
Ferhat
2decf195d2
[web] Implement SceneBuilder.pushColorFilter for html (#20802)
* Implement Color filter layer
* Add test with BlendMode color
* update licenses file
* Move blend functions into color_filter.dart
* dartfmt
2020-08-27 08:49:12 -07:00
Ferhat
87fd0e497c
Guard recording_canvas against restore calls without ending recording (#20786) 2020-08-26 11:19:07 -07:00
Erick
b08c6b95e2
Fixing synthesizing keys for multiple keys pressed down on flutter web (#19632) 2020-08-26 10:33:03 -07:00
Mouad Debbar
282792ad38
[web] Make word boundary consistent with native flutter (#20747) 2020-08-25 17:05:18 -07:00
nturgut
93a179071f
updating editing state after location change. focusing on the element (#20620) 2020-08-19 14:03:30 -07:00
Mouad Debbar
bf6d7b4e48
[web] Prepare for read-only input fields (#20520) 2020-08-18 23:11:02 -07:00
nturgut
bb24b4938f
[web] Build unit tests with dart2js instead of build_runner (#20390)
* change from build_runner to dart2js

* add internalBootstrapBrowserTest to some of the tests

* add internalBootstrapBrowserTest to all remaining tests

* make tests build in paralel. Total time dropped from 586 to 177 seconds for 8 core MacBook

* change isolates with pool

* fixing analysis errors

* skipping canvaskit tests for ios-safari

* copy image files to the build directory

* adding internalBootstrapBrowserTest to newly added tests

* add internalBootstrapBrowserTest to faling path iterator test

* necessary changes to make chrome windows work

* in windows test in chrome instead of edge. our edge code was for legacy edge

* do not run golden unit tests on Windows LUCI bots for now

* addressing reviewer comments. Adding a method for deciding when to run integration tests.

* remove lines that I forgot to remove

* fixing analysis error. add issue for todo

* add bootstap to a test file

* adding bootstrap to another test

* add internalBootstrapBrowserTest to a golden test

* return test result in bat file. use archieve package to unzip

* fixing logs for chrome_installer

* use archieve and archieve entity instead of dynamic

* adding comments for windows platform archieve part

* addressing reviewer comments

* change readme file
2020-08-17 16:19:27 -07:00
Jason Simmons
9993228251
Fix web_ui warnings flagged by the next Dart analyzer update (#20524) 2020-08-14 13:29:50 -07:00
Yegor
5c8a62608b
Delete CSS paint code (#20426)
* Delete CSS paint code
2020-08-12 14:42:34 -07:00
Yegor
e0d515369f
Make CkVertices a ManagedSkiaObject (#20421) 2020-08-12 09:32:08 -07:00
Yegor
be78eba183
CanvasKit: memory management for image and shader classes (#20349)
* memory-manage images and shaders
2020-08-11 11:16:42 -07:00
Ferhat
6988f01779
Add Path iterator tests, sync verbs with skia enums, fix PathIterator.peek. (#20381)
* Sync verb enum to skia. Fix PathIterator.peek, add tests
* Add constant for iterator buffer size
2020-08-10 17:24:28 -07:00
Yegor
e35fbbd90d
switch to non-overloaded arcTo methods (#20341) 2020-08-10 15:07:17 -07:00
Yegor
8780859f0a
remove write parameter from _checkScreenshot (#20340) 2020-08-10 08:57:37 -07:00
Mouad Debbar
02daceb261
[web] Implement support for WidgetSpan (aka paragraph placeholders) (#20276) 2020-08-08 18:10:28 -07:00
nturgut
5be470ae91
[web] Save the autofill information (#20256)
* changes for autofill. Commit save=false works. added submit button. set form actions

* save the forms on the dom

* fix tests. fix input element location. fix single element forms

* fix failing ios test. add more unit test methods for submitting the form

* address reviewer comments

* remove only the forms from the map

* remove debug line

* fix issues with login info saving. format file

* fix textarea id. fix unit tests methods

* remove debug line

* fixes flickering in safari. remove an unnecessary secind append in firefox

* address reviewer comments

* address reviewer comments
2020-08-07 13:28:50 -07:00
Yegor
0809f21392
fix clipped and transformed content in HTML clip (#20310)
* fixed clipped and transformed content in HTML clip
2020-08-07 11:28:00 -07:00
Yegor
e020907bac
Use weak references instead of resurrection, if available (#20283)
* Use weak references instead of resurrection, if available
2020-08-06 21:42:12 -07:00
Mouad Debbar
cfd852892e
[web] Eagerly calculate relevant indices during line break detection (#20278) 2020-08-06 19:29:11 -07:00
MichealReed
06c89cd1c8
Implemented web image codec instantiation for CanvasKit. (#20194) 2020-08-04 15:01:02 -07:00
Mouad Debbar
c6fba72b4f
[web] Include trailing spaces in text box measurements (#20208) 2020-08-03 12:38:42 -07:00
Mouad Debbar
f288fe563d
[web] Enable canvas measurement by default (#19924) 2020-07-29 16:18:07 -07:00
nturgut
d2d02917d9
[a11y-web] Semantics fix (#19898)
* fixinf enable semantics

* fix unit tests

* fix indentation

* addressing reviewer comments

* fix comment

* make commnt starts upper case

* fix grammar in comment

* Add one more comment
2020-07-28 10:29:02 -07:00
Jason Simmons
02c11acc24
Add Dart 2.10 annotations to the web engine sources (#20019) 2020-07-24 15:56:17 -07:00
Ferhat
37fa2850d1
[web] Prevent crash when restore is called incorrectly after recording ends. (#19948)
* Prevent crash when restore is called after picture recording ends
* Addressed reviewer comments
2020-07-22 12:55:22 -07:00
Ferhat
5d921fcb57
[web] Fixes arc scaling when counter clockwise (#19927)
* [web] Fix arc scaling when counter clockwise
* update golden write
* Removed unused var
2020-07-22 10:02:07 -07:00
Jason Simmons
128dbc3e88
Fix failing Dart analyzer checks in the web UI tests (#19871) 2020-07-19 21:50:54 -07:00
Yegor
e51642e450
JS-interop clean-up (#19850) 2020-07-17 13:15:15 -07:00
Yegor
94b23abaae
Move CkCanvas to new JS-interop (#19748)
* Move CkCanvas to new JS-interop
* Make SkiaObject compatible with JS-interop; text bindings
* fix drawVertices
2020-07-16 11:56:37 -07:00
Mouad Debbar
86f1b645f3
[web][3/3] Handle surrogate during line break detection (#19745) 2020-07-15 12:29:52 -07:00
Mouad Debbar
480d3e72f9
[web][2/3] Implement rules of the line break algorithm (#19610) 2020-07-14 09:31:40 -07:00
Yegor
d0b8706936
Rebuild CkPath on top of @JS bindings with 3.28x speed-up on the path benchmark (#19694)
* SkPath bindings
* CkPath uses SkPath
2020-07-14 09:09:00 -07:00
Ferhat
df23044897
[web] Implement ulps for path ops (#19711)
* Implement ulps for path ops
* Address review comments
* cache abs()
* dartfmt and update licenses
2020-07-13 13:43:11 -07:00
nturgut
1e02bfd6a8
Support decimal information on the TextInputType (#19664)
* adding decimal inoutmode

* change intentation
2020-07-13 13:08:54 -07:00
Yegor
c99deb009a
CkPaint uses SkPaint (#19562) 2020-07-11 11:34:42 -07:00