1427 Commits

Author SHA1 Message Date
chunhtai
da3c08e3ba Implement browser history class for router widget (flutter/engine#20794) 2020-09-10 21:00:02 -07:00
Harry Terkelsen
21c8ce0b47 Remove the type parameter from SkObjectFinalizationRegistry. (flutter/engine#21061) 2020-09-09 17:20:02 -07:00
Chris Bracken
6e37e9cd8f Check for dart2js on felt startup (flutter/engine#21046)
This adds a check for the presence of dart2js in the engine build.

Felt relies on an engine build with `--full-dart-sdk` set. Previously,
we checked for the presence of pub, but not for the presence of
web-specific tooling such as dart2js that felt relies on. Pub is built
as part of the default Dart SDK build when `--full-dart-sdk` is not set,
so its presence is insufficient to prove that other required tooling is
present.

Without this check, we get the following error on run:

    Unhandled exception:
    ProcessException: No such file or directory
      Command: /Users/cbracken/src/flutter/engine/src/out/host_debug_unopt/dart-sdk/bin/dart2js --no-minify --disable-inlining --enable-asserts --enable-experiment=non-nullable --no-sound-null-safety -O2 -o test/paragraph_builder_test.dart.browser_test.dart.js test/paragraph_builder_test.dart
2020-09-09 14:04:52 -07:00
Chris Bracken
753abd9f14 Update web lerpDouble to match C++ behaviour (flutter/engine#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
Chinmay Garde
521395b84f Avoid crashing and display error if the process cannot be prepared for JIT mode Dart VM. (flutter/engine#20980) 2020-09-08 13:41:31 -07:00
Jim Graham
6022f32281 adjust blur radius for HTML to match CanvasKit (flutter/engine#20840)
* adjust blur radius for HTML to match CanvasKit

* switch to new goldens for new blur radius logic
2020-09-04 12:10:48 -07:00
Jim Graham
3370791867 improve sensitivity of BackdropFilter web tests (flutter/engine#20915) 2020-09-03 21:47:41 -07:00
Siva
857b8eac52 Manual roll of Dart b29f228f62...016e8880f0 (flutter/engine#20967)
dart-lang/sdk@016e8880f0 Version 2.10.0-90.0.dev
dart-lang/sdk@34f636ce1d Revert "[vm/io] Fix FileSystemWatcher enum name typo."
dart-lang/sdk@7a02118a41 [vm/fuchsia]: Safely shutdown the async message loop.
dart-lang/sdk@334d368146 [analyzer_plugin] Remove unused dart:async imports
dart-lang/sdk@047c0f860a [Analyzer] Support analyzing open files without open workspaces
dart-lang/sdk@f846d0e7ea [analyzer_cli] Remove unused dart:async imports
dart-lang/sdk@ba372d6e8a [dartdev] Remove unused dart:async import
dart-lang/sdk@30cfb228c0 [nnbd_migration] Remove unused dart:async imports
dart-lang/sdk@1134a0f17c [analysis_server] Remove unused dart:async imports
dart-lang/sdk@3317d47c7d [_fe_analyzer_shared] Remove unused dart:async import
dart-lang/sdk@0a036db596 [vm/io] Fix FileSystemWatcher enum name typo.
dart-lang/sdk@000f3135a5 [analyzer] Remove unused dart:async imports
dart-lang/sdk@7817aa1796 [dartfix] Remove unused dart:async imports
dart-lang/sdk@0144087619 Version 2.10.0-89.0.dev
dart-lang/sdk@42dfb9d304 Add `generateCallGraphWithDominators` method to generate a `CallGraph` from a precompiler trace.
dart-lang/sdk@01024dfa5a Issue 43200. Report ASSIGNMENT_TO_FINAL when 'final late' has an initializer.
dart-lang/sdk@ab16d79af9 Revert "Flow analysis changes to fix mixed-mode unsoundness loophole."
dart-lang/sdk@7363adca67 [infra] Update checked-in SDKs to 2.10.0-79.0.dev
dart-lang/sdk@d833f2f65c Flow analysis changes to fix mixed-mode unsoundness loophole.
dart-lang/sdk@33e4a6bc2a Revert "[vm] Have Read/WriteStream use (S)LEB128 for variable-length encoding."
dart-lang/sdk@d9dc24b53e Version 2.10.0-88.0.dev
dart-lang/sdk@7130dd4d3d [cfe] Report error on non-void setter return type
dart-lang/sdk@a7cb764aa4 [tests/ffi] Reinstate deleted test
dart-lang/sdk@39689eb07c [co19] Roll co19 to 9c07e26d67665de7972ba6f7e87369933a978545
dart-lang/sdk@1f92293fd5 Revert "[dart:html] Add 'creates' type description to JS calls"
dart-lang/sdk@e44cf969c6 Fix creates value for getStats
dart-lang/sdk@15201ebe5f Version 2.10.0-87.0.dev
dart-lang/sdk@eb8dfee107 [CFE] Clean up duplicate entries in spell checker lists
2020-09-03 20:50:59 -07:00
0xZero
c70c748e0d Member variables should appear before the |WeakPtrFactory|. (flutter/engine#20899) 2020-09-03 14:34:01 -07:00
nturgut
0239bf949d renaming e2e tests to integration (flutter/engine#20954)
* renaming e2e tests to integration

* change the name of the files in the blocked list
2020-09-02 14:52:09 -07:00
Dan Field
3dcd0fb2b7 Revert external size changes to Picture (flutter/engine#20950) 2020-09-02 13:42:25 -07:00
Dan Field
f83e92cbaf Use hint freed specifically for image disposal (flutter/engine#20754)
* Use hint freed specifically for image disposal
2020-09-02 13:41:58 -07:00
Jim Graham
22e1f69704 Revert "Adds fuchsia node roles to accessibility bridge updates. (#20385)" (flutter/engine#20936)
This reverts commit 26659fa0fd05b2f3cc3c2e530298659702e1f869.
2020-09-01 21:21:07 -07:00
Gábor
70cb5eec9e Image.toByteData and Picture.toImage implementations (#3) (flutter/engine#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
Alexander Brusher
26659fa0fd Adds fuchsia node roles to accessibility bridge updates. (flutter/engine#20385) 2020-09-01 13:33:02 -07:00
Chris Bracken
5f363dcee6 Improve the precision of lerpDouble (flutter/engine#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-08-30 22:26:10 -07:00
Ferhat
aaefbb493c [web] Fix path clip crash when reused (flutter/engine#20846) 2020-08-30 19:35:39 -07:00
Chris Bracken
f113960205 lerpDouble: stricter handling of NaN and infinity (flutter/engine#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.
2020-08-30 11:08:59 -07:00
Mouad Debbar
fd88de8492 [web] Better format for line break tests (flutter/engine#20767) 2020-08-28 14:43:01 -07:00
nturgut
8a60d590bc Fix debugging issue (flutter/engine#20841) 2020-08-28 10:03:55 -07:00
Ferhat
02a654f8ea Cliprect op (flutter/engine#20837)
* Switched PathCommand apply parameter to non-nullable. Add clip op parameter to ClipCommand.
2020-08-27 22:38:03 -07:00
Ferhat
7ad78711f9 [web] Fix path rendering when addPolygon is chained with other verbs. (flutter/engine#20803) 2020-08-27 20:25:38 -07:00
Ferhat
5bb7ec6611 [web] Fix analyzer warnings in web engine. (flutter/engine#20825) 2020-08-27 14:55:43 -07:00
Ferhat
938d17ae5d [web] Implement SceneBuilder.pushColorFilter for html (flutter/engine#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
6dca441cc6 Revert "[web] Implement SceneBuilder.pushColorFilter for html (#20802)" (flutter/engine#20820)
This reverts commit b84b4e6df775c421ca7d1db45e9a1b25ac61329c.
2020-08-27 10:12:55 -07:00
Ferhat
b84b4e6df7 [web] Implement SceneBuilder.pushColorFilter for html (flutter/engine#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
Chris Bracken
d37e3846a8 Add tests for lerpDouble (flutter/engine#20778)
The behaviour of lerpDouble with respect to null inputs isn't entirely
obvious. In the case where both inputs are null, it returns null.
Otherwise, it defaults the null parameter to 0.0 and carries on.

Post non-null by default, it might be nice to strengthen the parameter
contract to require them to be non-null. While this would be a breaking
change, it seems likely that the framework either meets this guarantee
or can provide it without a framework breaking change.

https://github.com/flutter/flutter/issues/64617 tracks the above.

In the meantime, adding a test to lock in the current behaviour.
2020-08-26 11:32:15 -07:00
Ferhat
6a2c7ed9dc Guard recording_canvas against restore calls without ending recording (flutter/engine#20786) 2020-08-26 11:19:07 -07:00
Erick
2faca2ac4e Fixing synthesizing keys for multiple keys pressed down on flutter web (flutter/engine#19632) 2020-08-26 10:33:03 -07:00
Mouad Debbar
71b72d7a55 [web] Make word boundary consistent with native flutter (flutter/engine#20747) 2020-08-25 17:05:18 -07:00
Siva
459a732b4e Manual roll of Dart from 5ca1f32905 to 551e405d0b (flutter/engine#20758)
dart-lang/sdk@551e405d0b Version 2.10.0-57.0.dev
 dart-lang/sdk@ce494e7910 Add test for inference solving T? = dynamic.
 dart-lang/sdk@0e1d32f10c [fuchsia][time] Use C11 timespec APIs for UTC time
 dart-lang/sdk@08dd4b1faa Null-safe numbers: implement static typing rules, hook up for binary operators.
 dart-lang/sdk@9be24ce946 [benchmark] Import MD5/SHA1/SHA256/SkeletalAnimation/SkeletalAnimationSIMD benchmarks from benchmarks-internal
 dart-lang/sdk@675891ae0c Issue 43152. Use existing LineInfo in newDiagnosticMessage().
 dart-lang/sdk@e868d3076c Issue 43151. Fix crash when a field shadows a super-interface method.
2020-08-25 16:56:14 -07:00
Dan Field
35d014eee7 Revert hint_freed (flutter/engine#20746)
This caused over-aggressive GCs, which vastly increased CPU usage benchmarks.

* Revert "fix build (#20644)"

This reverts commit 5e03f90cdd9392f95b47d08b398c18cab6d16b12.

* Revert "Hint freed (#19842)"

This reverts commit 73490a2ca444c8ca491712cde21a459453af8795.
2020-08-25 11:55:40 -07:00
Jason Simmons
1945052c8e Remove image sizes from Picture::GetAllocationSize (flutter/engine#20673) 2020-08-21 16:26:02 -07:00
Srujan Gaddam
d9c5ff0499 Add null checks for CanvasElement attributes (flutter/engine#20580)
Changes in processing compatibility info in dart:html requires
these getters to be null-checked.
2020-08-20 15:50:01 -07:00
David Worsham
3a6e0d47c6 fuchsia: Convert legacy permutations to build flag (flutter/engine#20647) 2020-08-19 19:09:51 -07:00
Dan Field
73490a2ca4 Hint freed (flutter/engine#19842)
* Hint the VM when a layer or picture goes out of scope
2020-08-19 14:04:31 -07:00
nturgut
2919c3bbef updating editing state after location change. focusing on the element (flutter/engine#20620) 2020-08-19 14:03:30 -07:00
nturgut
7d3b44dd47 [web] update chrome version (flutter/engine#20470)
* update chrome version, should be merged after recipe changes

* changing directory to use chrome driver in LUCI

* changing directory path's order

* add cipd packages's chrome version for mac

* addressing reviewer comments

* more documentation. update readme

* remove late since it didn't build. remove distinction in paths for local and LUCI.

* addressing reviewer comments. (non-null fields needs rechanging)

* addressing reviewer comments. adding 2.6 on files missing the notation
2020-08-19 12:28:44 -07:00
Mouad Debbar
8f6c340c7b [web] Prepare for read-only input fields (flutter/engine#20520) 2020-08-18 23:11:02 -07:00
Greg Spencer
0764e7cf1a Remove doc comments in copied web interfaces (flutter/engine#20494)
* Remove doc comments in copied web interfaces

* Whitespace changes to improve readability
2020-08-18 17:15:16 -07:00
Yegor
a18f17805c rename "compositor"/"surface" to "canvaskit"/"html"; document conventions (flutter/engine#20579)
* rename "compositor"/"surface" to "canvaskit"/"html"; document conventions
2020-08-18 13:30:58 -07:00
nturgut
ab6a3aa43a [web] Build unit tests with dart2js instead of build_runner (flutter/engine#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
Yegor
a1e5e33bda use anonymous in some deletable Sk classes (flutter/engine#20528) 2020-08-17 11:57:12 -07:00
David Worsham
ad2bff1014 Reland: "fuchsia: Remove dead code / break dependencies" (flutter/engine#20532)
Reland #19396 with a fix for improper scale that was affecting internal tests

Tested: Ran all unittests, ran internal tests, and ran workstation on Fuchsia
BUG: 53062, 53063
2020-08-14 20:41:18 -07:00
Jason Simmons
0a9e612fdd Fix web_ui warnings flagged by the next Dart analyzer update (flutter/engine#20524) 2020-08-14 13:29:50 -07:00
xster
5ac78f5be6 Refactor initial route code take 2 (flutter/engine#20468) 2020-08-13 14:18:11 -07:00
Jason Simmons
a67e03a61c Do not access members after calling ClearDartWrapper (flutter/engine#20465) 2020-08-13 11:06:02 -07:00
Yegor
7f9b0eb7ca Clean-up CanvasKit canvas sizing. (flutter/engine#20387)
* Clean-up CanvasKit canvas sizing.

* cache size correctly
2020-08-13 09:21:08 -07:00
Mehmet Fidanboylu
0f611fe4b7 Plumbing for setting domain network policy (flutter/engine#20218) 2020-08-13 07:26:43 -07:00
Yegor
71ad89d9e6 Delete CSS paint code (flutter/engine#20426)
* Delete CSS paint code
2020-08-12 14:42:34 -07:00