1462 Commits

Author SHA1 Message Date
Yegor
81b8c4ac67 re-enable CanvasKit path ops test (flutter/engine#21520)
* re-enable CanvasKit path ops test

* also test Path.combine
2020-09-30 14:30:01 -07:00
Yegor
a347148d5a fix EnginePicture.toImage; implement rawRgba toByteData; add test (flutter/engine#21370) 2020-09-29 12:17:03 -07:00
Paul Berry
d65187e6c2 Remove unnecessary ?s from web_ui. (flutter/engine#21444)
* Remove unnecessary `?`s from web_ui.

In https://dart-review.googlesource.com/c/sdk/+/163841, dart's flow
analysis is being changed so that an assignment like this:

    T? x = <non-nullable value>;

causes `x` to be immediately promoted to type `T`.  This exposed two
instances in which a variable was unnecessarily given a nullable type.
To avoid warnings, we need to fix these two types before
https://dart-review.googlesource.com/c/sdk/+/163841 can land.
2020-09-28 13:58:12 -07:00
Mouad Debbar
585f378429 [web] Respond with null for unimplemented method channels (flutter/engine#21423) 2020-09-25 18:49:41 -07:00
Dan Field
f7bbb7d405 Fix getNextFrame (flutter/engine#21422) 2020-09-25 17:26:59 -07:00
nturgut
03bf20acc4 [web] enable ios safari screenshot tests (flutter/engine#21226)
* enable ios safari screenshot tests

* this is the value used for screenshots in the repo.

* change revision

* fix the error made in the gaps

* do not try to fetch on LUCI

* lunix luci migth break existing prs. only skip fetching for mac

* add a placeholder tests for shadow golden test

* try to use iPhone 11 Pro on LUCI

* change the scale and the smoke test image

* add unmerged goldens PR to tests all the screenshots. will be removed later

* change the goldens lock back to flutter/goldens

* change wrong comment on screenshot tests block

* address reviewer comments

* change the commit number for goldens file

* skip canvas blend mode tests

* debugging LUCI error

* debugging LUCI error printing directory contents

* skip one test, remove the debug logs

* change the revision number to include the correct chrome files
2020-09-25 12:30:57 -07:00
Alexander Brusher
2afe2bffaf Revert "Revert "Adds fuchsia node roles to accessibility bridge updates. (#20385)" (#20936)" (flutter/engine#21367)
This reverts commit 22e1f69704ed0f67b6b57d72197abac4a35f94b3.
2020-09-25 11:07:10 -07:00
Dan Field
5e3ad78d3a Avoid sending a 0 DPR to framework (flutter/engine#21389)
* Avoid sending a 0 DPR to framework

* check width and height as well
2020-09-25 10:35:57 -07:00
Ian Hickson
49b2401dfe Revert "Make drain() consistently asynchronous. (#21062)" (flutter/engine#21391)
This reverts commit 7a237c9b68fc5fc2813c732d316e9cde5a932def.
2020-09-24 18:19:53 -07:00
Ian Hickson
7a237c9b68 Make drain() consistently asynchronous. (flutter/engine#21062) 2020-09-23 22:17:02 -07:00
David Iglesias
6d83eaebe2 [web] Add canUpdateAsMatch to PersistedPlatformView. (flutter/engine#21313) 2020-09-23 21:47:02 -07:00
Dan Field
972e469ebd implement decodeFromPixels (flutter/engine#21298) 2020-09-23 21:42:01 -07:00
Dan Field
3b207ab1f7 isCloneOf for Image (flutter/engine#21371)
* isCloneOf for Image

* Update docs, add missing impl
2020-09-23 21:09:44 -07:00
Yegor
e18520d3f1 web: make a few variables non-null (flutter/engine#21115)
* web: make a few variables non-null
2020-09-23 15:30:57 -07:00
Dan Field
182a38b446 Create an ImageHandle wrapper (flutter/engine#21057)
Allows for reference counting of images before disposal.

This will allow multiple callers to hold a reference to an image and dispose of their reference without disposing the underlying image until all handles have been disposed.

This will be used by the framework to help resolve some of the kludge I was trying to introduce in flutter/flutter#64582
2020-09-23 14:33:29 -07:00
Richard Cai
cf3f9f793a Update docs specifying addPlatformView offset param is not used (flutter/engine#21331)
for Android and iOS and remove offset from scenario_app test for iOS and Android.
2020-09-23 10:37:57 -07:00
nturgut
39dd63661e creating test result directory before running tests (flutter/engine#21324)
* creating test result directory. adding a prepare method to test runner

* addressing reviewer comments
2020-09-22 12:51:14 -07:00
Jonah Williams
587bfccae9 [web] dispatch browser event on flutter/service_worker channel (flutter/engine#21284)
Registering the service worker immediately after the documented has loaded may cause SW initialization to compete with framework initialization. It was recommended to us that we defer the service worker setup until after the framework is done with setup, which should be sometime after the first frame.

To implement this, the binding will dispatch a platform message on startup. This can be listened for in the html document
#66066
2020-09-22 07:37:23 -07:00
Dan Field
aab7bc8fd3 Implement toString for Images on web (flutter/engine#21304) 2020-09-21 17:22:02 -07:00
Yegor
6e408a8264 Make SkCanvas types @anonymous; reduce logging noise (flutter/engine#21297)
* Make SkCanvas types @anonymous; reduce logging noise

* make SkParagraphBuilderNamespace anonymous

* make SkParagraphStyle anonymous
2020-09-21 15:49:09 -07:00
LongCatIsLooong
f7449e0965 Implement iOS [UITextInput firstRectForRange:] with markedText (flutter/engine#19929) 2020-09-18 14:31:36 -07:00
Mouad Debbar
211c775d05 [web] Remove commented import (flutter/engine#21247) 2020-09-17 14:01:30 -07:00
nturgut
f070e26b18 [web] run safari desktop tests on luci (flutter/engine#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
e5c576fb40 [web] Allow updating input configuration while connection is active (flutter/engine#21048) 2020-09-16 08:51:34 -07:00
Thore Goebel
1290089227 Fix x-axis direction in Offset.direction doc (flutter/engine#21208)
Specify that the positive x direction is right, as opposed to left.
2020-09-16 07:57:44 -07:00
Mouad Debbar
11597d5c5f [web] Fix mis-aligned widget spans (flutter/engine#21112) 2020-09-15 12:58:07 -07:00
nturgut
a7b71d9116 running screenshot tests on ios-safari unit tests (flutter/engine#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
Chris Bracken
d3f54773b7 Define _USE_MATH_DEFINES on Windows where needed (flutter/engine#21166) 2020-09-15 08:37:02 -07:00
Chris Bracken
308206ddd1 Remove suppression of null-related warnings (flutter/engine#21157) 2020-09-14 13:37:01 -07:00
Pragya
5b645efd49 Updated ColorMatrix to ColorFilter (flutter/engine#19905) 2020-09-14 11:59:57 -07:00
Chris Bracken
59e39baf33 [felt] Eliminate ninja-jobs argument (flutter/engine#21135)
Migrate to autoninja which works out the ideal level of parallelism.
2020-09-14 11:12:16 -07:00
Chris Bracken
7f7616418b [felt] Use autoninja instead of hardcoding threads (flutter/engine#21130)
autoninja is included as part of depot_tools and automatically
determines the optimal thread count.

Also applies quoting on the affected lines.
2020-09-12 12:14:05 -07:00
Chris Bracken
2586db3b22 Clean up C++ includes (flutter/engine#21127)
Cleans up header order/grouping for consistency: associated header, C/C++ system/standard library headers, library headers, platform-specific #includes.

Adds <cstring> where strlen, memcpy are being used: there are a bunch of places we use them transitively.

Applies linter-required cleanups. Disables linter on one file due to included RapidJson header. See https://github.com/flutter/flutter/issues/65676

This patch does not cover flutter/shell/platform/darwin. There's a separate, slightly more intensive cleanup for those in progress.
2020-09-11 21:18:35 -07:00
Chris Bracken
d03692449b Prefer C++ standard headers to their C counterpart (flutter/engine#21091)
We currently use a mix of C standard includes (e.g. limits.h) and their
C++ variants (e.g. climits). This migrates to a consistent style for all
cases where the C++ variants are acceptable, but leaves the C
equivalents in place where they are required, such as in the embedder
API and other headers that may be used from C.
2020-09-11 17:10:00 -07:00
Sam Rawlins
b72dca37f3 Fix erroneous dartdoc @tool directive. (flutter/engine#21109) 2020-09-11 12:00:02 -07:00
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