1552 Commits

Author SHA1 Message Date
Sarbagya Dhaubanjar
deb7c662d2
Updated return-type for PathMetric.extractPath to be non-nullable (#22292) 2020-11-04 14:54:03 -08:00
Ferhat
d5b726985f
[web] Enable Control+MouseWheel browser zoom (#22285) 2020-11-04 12:32:25 -08:00
Mouad Debbar
08cc9e7114
[web] Put the paragraph painting logic in the Paragraph class (#22239) 2020-11-03 21:10:44 -08:00
Yegor
d27ff811b9
Make some errors more idiomatic (#22261) 2020-11-03 12:57:51 -08:00
Mouad Debbar
5fe35fd416
[web] Canoncalize font family on input fields (#22215) 2020-11-03 11:53:04 -08:00
Ferhat
59b01e0e5a
[web] Fix repaint logic for cullrect,transform changes (#22273) 2020-11-03 11:31:48 -08:00
Daco Harkes
ccdb6819ce
WeakPersistentHandle migration (#19843)
and roll Dart to 52783837369de45d3372cb6c6b7cdd63e71cd829.
2020-11-03 13:06:53 +01:00
Yegor
e9c62e7495
do not print in _computePixelDensity (#22257) 2020-11-02 17:32:29 -08:00
Harry Terkelsen
7c8f57c07d
Report error when instantiating CanvasKit network image (#22159) 2020-11-02 14:58:49 -08:00
Ferhat
8defec6e8c
Fix nullability issue with Image.network (#22252) 2020-11-02 11:41:43 -08:00
Yegor
14437d6c00
fix _getArrayBuffer signature (#22251) 2020-11-02 11:12:52 -08:00
Jonah Williams
50dbe85541
[web] fix hot restart type error (#22248) 2020-11-02 08:55:32 -08:00
nturgut
9b34207a14
Fixing semantics borders on mobile web (#21856)
* logging

* fixing positions with wrong a11y borders screenreader-on/mobile browsers

* remove logs from the window class

* work on unit tests

* using reviewer suggestion for translations

* compute bounding matrix

* compute bounding matrix

* addding more comments

* reenable failing test case
2020-10-30 15:28:46 -07:00
Ferhat
1ad676529a
[web] Fixes canvas pixelation and overallocation due to transforms. (#22160) 2020-10-30 09:02:49 -07:00
Devon Carew
8c5b0a6abf
use the dart analyze command to analyze source (#22212) 2020-10-29 18:46:52 -07:00
Siva
baba31e838
Manual Roll of Dart to ba80ed989cc...9c6e76468ca (#22213)
* Manual Roll of Dart from ba80ed989c...9c6e76468c

dart-lang/sdk@ba80ed989c Version 2.11.0-277.0.dev
dart-lang/sdk@619e388a1d Breaking changes for analyzer version 0.41.
dart-lang/sdk@e46c31c24c Version 2.11.0-276.0.dev
dart-lang/sdk@13704520a0 [cfe] Indicate nullability as assignability issue when appropriate
dart-lang/sdk@33b7f1425e Migration: remove unreachable `break` statements
dart-lang/sdk@68fe2649f3 Migration: remove 2 pixel offset from CSS for `.region.informative-region`.
dart-lang/sdk@f506071e34 Add DartType.alias{Element,Arguments} and class TypeAliasElement
dart-lang/sdk@5b2f57d365 Fix changelog
dart-lang/sdk@d459f2244a Enable non-function type alias tests for CFE based tools
dart-lang/sdk@5ac5b710ee Migration --apply-changes implies --no-web-preview
dart-lang/sdk@8abf6c67ad Add test of potentially constant scopes.
dart-lang/sdk@146423c02d Version 2.11.0-275.0.dev
dart-lang/sdk@d38b366eb6 Add quick fix to remove unnecessary null-aware assignments
dart-lang/sdk@1a56b8e7eb Version 2.11.0-274.0.dev
dart-lang/sdk@d5118d5fc8 Reland "[ Service / dart:isolate ] Added getPorts RPC and 'debugName' optional"
dart-lang/sdk@2672eb34f6 Add Flutter plugins to the list of allowed null safety experiments
dart-lang/sdk@30d13109e7 Error on all ignored command line arguments with a named config.
dart-lang/sdk@a983155d44 [vm/ffi] Remove bytecode mode only runtime entries
dart-lang/sdk@5f5c0ec025 Version 2.11.0-273.0.dev
dart-lang/sdk@3c5d1d2575 fix nodes for path error reporting
dart-lang/sdk@0128ffa6d1 Add most of the remaining parser diagnostics to the data file parser
dart-lang/sdk@91be377fda [io/ssl] Avoid redundant handshake call that can break ongoing handshake try-retry sequence.
dart-lang/sdk@774e18d14a Issue 43925. Set the enclosing class for completion.
dart-lang/sdk@061848e97e Cleanup misc remaining references to bytecode
dart-lang/sdk@bc01cb740a [vm] Don't assume fields are already canonical when canonicalizing closures.
dart-lang/sdk@2fd4b4f562 [dart2js, ddc] Emit native null checks in sound mode only
dart-lang/sdk@8b68bb4191 Revert "Revert "[ddc] Move native null-checks to definitions""
dart-lang/sdk@d4c03fbc1b [ddc] Add more descriptive error for native null assertions
dart-lang/sdk@312a572ade [vm/ffi] Fix prepare_flutter_bundle.dart
dart-lang/sdk@31c065ef4c Change frontend server expression evaluation tests to use strong ddc platform sdk
dart-lang/sdk@2fafb4061f Remove LibrariesLog, we don't use it anymore.
dart-lang/sdk@2653b851d3 Version 2.11.0-272.0.dev
dart-lang/sdk@e5dfd38404 check for invalid git and path deps in publishable packages
dart-lang/sdk@f8fdb4be05 Remove return type from addSource().
dart-lang/sdk@7588ed86de Remove bytecode mode from the VM
dart-lang/sdk@c877d5bf3e [pkg/vm_service] remove three deprecation warnings
dart-lang/sdk@2eef1aa1ad Prepare analyzer_cli/ tests for turning Null Safety on by default.
dart-lang/sdk@80f0976e02 [pkg/nnbd_migration] mark package:nnbd_migration as not publishable
dart-lang/sdk@1958d61b02 Issue 43929. Report HintCode.DEPRECATED_MEMBER_USE for Null Safe from Legacy, refactoring.
dart-lang/sdk@68c50f7f92 Migration: re-work test_informationalRegion_containsTraceLinks_separateDrive.
dart-lang/sdk@ee740fae4a [dart2js] Inference of List.generate elements
dart-lang/sdk@c3ddc5c374 [vm/concurrency] Add EventLoopLatencyJson350KB bechmark
dart-lang/sdk@5851f8bc0c [Analyzer] Add a fix for unnecessary_non_null_assertion
dart-lang/sdk@e38d42fc7d [android] Switch to Flutter Android tooling
dart-lang/sdk@ed009afc4c [package:js] Add static errors for invalid extends
dart-lang/sdk@2e99e59369 Fix integration tests for analyzer/ and analysis_server/ in preparation for Null Safety turned on.
dart-lang/sdk@9181570513 Migration: Work around null reference exception with complex type parameters.
dart-lang/sdk@a777d2b798 Sort declarations in api_test.dart
dart-lang/sdk@a99904a45a [vm/nnbd] Explicitly opt-out test helper scripts from null safety to prepare for NNBD turned on
dart-lang/sdk@77a0daeda9 Update to latest package:collection
dart-lang/sdk@f78c40e32a Revert "Reland "[ Service / dart:isolate ] Added getPorts RPC and 'debugName' optional""
dart-lang/sdk@5a3e7bf18f [Dart CLI] Refactor analytics
dart-lang/sdk@7a87580ec4 [vm] Avoid racy access to SafepointRwLock::reader_ids_
dart-lang/sdk@e5184d71b7 Version 2.11.0-271.0.dev
dart-lang/sdk@7d764a6b3a Get the observatory tests correctly opting out of sound null safety.
dart-lang/sdk@38e3414748 analyzer_plugin: Prepare tests for Null safety flag flip.
dart-lang/sdk@e9bf10bda0 Version 2.11.0-270.0.dev
dart-lang/sdk@56947222cc Fixes for analysis_server/ tests for Windows.
dart-lang/sdk@7a60fd3fd2 Fix Glob creation, PubspecValidator dependencyPath.
dart-lang/sdk@a5d4511847 Reland "[ Service / dart:isolate ] Added getPorts RPC and 'debugName' optional"
dart-lang/sdk@6360dcbecb Version 2.11.0-269.0.dev
dart-lang/sdk@14e4d5fb48 [Tests] - Explicitly opt out vm/dart_2/splay_test.dart
dart-lang/sdk@20b8b1c0cf [vm/concurrency] Introduce a read lock acquisition of program_lock.
dart-lang/sdk@76118806bd [dart:io / Service] Rename State class to _State to avoid class name conflicts with Flutter
dart-lang/sdk@e2cc75e847 Fix the offset used when reporting errors inside of string literals
dart-lang/sdk@29c7474845 Add a test for accessing type arguments
dart-lang/sdk@297fb8606a Un-hide the dart migrate command from stable.
dart-lang/sdk@dac61ff879 Remove a message for pre-nnbd sdks.
dart-lang/sdk@05af48a5df Version 2.11.0-268.0.dev
dart-lang/sdk@a074c793b8 Rename to resolveTestCode() and resolveTestFile().
dart-lang/sdk@47a2ab2866 Prepare to publish analyzer 0.40.5 and _fe_analyzer_shared 12.0.0.
dart-lang/sdk@af8413d8e9 [vm/concurrency] Add write lock acquisiton when updating Class direct_subclasses.
dart-lang/sdk@4f630a9a16 [typed_data] Remove specific Errors from docs
dart-lang/sdk@d9d7324b27 Issue 43777. Update analysis_server/ tests to run when Null Safety is enabled by default in 2.12
dart-lang/sdk@3e856b8ace [vm/concurrency] Allow concurrent access to invocation dispatcher cache
dart-lang/sdk@e8ff7f9d29 Version 2.11.0-267.0.dev
dart-lang/sdk@c45d52b62a Rework the parser to parse code fragments rather than value generators
dart-lang/sdk@34cedb980c [kernel] Make Procedure.kind final
dart-lang/sdk@50d36afc34 [release] Add release notes for 2.10.3
dart-lang/sdk@2928af2b12 [kernel] Remove unused Class.level, ClassLevel enum and shift Library.flags down
dart-lang/sdk@ff60518cad [kernel] Remove getChildFromMember from CanonicalName
dart-lang/sdk@741bb5ec4e [kernel] Change library nnbd bit encoding slightly
dart-lang/sdk@ae5fc78992 [kernel] Remove 'addMember'

* Adjust comment.
2020-10-29 17:07:35 -07:00
张风捷特烈
fe85f946db
Update painting.dart (#22195) 2020-10-29 15:28:02 -07:00
Harry Terkelsen
38f6665bda
Set strut font to Roboto if the given font hasn't been registered (#22129) 2020-10-29 12:43:30 -07:00
Ferhat
fd94c863d5
Fix for firefox custom clipping (#22182) 2020-10-29 12:08:02 -07:00
Greg Spencer
ce1dd11f51
Standardize macro names for dartdoc macros (#22180) 2020-10-29 12:03:04 -07:00
Ferhat
e4dffc1070
[web] Fix scroll wheel line delta on Firefox. (#21928) 2020-10-29 11:06:37 -07:00
Ferhat
247139a8c8
[web] Fix transform not invalidating path bounds causing debugValidate failure (#22172) 2020-10-29 11:04:46 -07:00
Zachary Anderson
b54bb88f00
Migrate runZoned to runZonedGuarded (#22198) 2020-10-29 11:02:35 -07:00
Ferhat
07c780bd95
[web] Assign default natural width/height for svgs that report 0,0 on firefox and ie11 (#22184) 2020-10-29 09:54:49 -07:00
Mouad Debbar
005dec449a
[web] Clean up unused previousStyle logic (#22150) 2020-10-28 18:17:03 -07:00
Jonah Williams
b177edd069
[null-safety] update path version (#22134) 2020-10-26 18:49:42 -07:00
Ferhat
412e14d54e
[web] Fix positioning of canvas elements due to svg filters (#22070) 2020-10-25 22:15:03 -07:00
Chris Bracken
6e0262d37a
Fix _lerpInt precision bug (#22089)
Fixes a precision bug was introduced in 784e6d7, which improved the
precision of lerpDouble when the extrema differed significantly in
magnitude.

_lerpInt doesn't have this issue since the extrema are passed as 64-bit
twos-complement values, therefore the difference will always be accurate
so long as it doesn't overflow. This reverts the _lerpInt implementation
to the original a + (b - a) * t, but adds a test to avoid a regression
if anyone is tempted to make it consistent with the others.
2020-10-24 09:49:21 -07:00
Ferhat
6999c4d4e2
When picture is updated and bitmapcanvas reused, clear element cache (#22072) 2020-10-23 12:31:48 -07:00
Dan Field
b9520248c4
Add debugDisposed to Image (#21547) 2020-10-23 10:27:02 -07:00
Ferhat
f0b10c54bf
[web] Prevent using DOM nodes for canvas with large number of draws (#22064) 2020-10-22 22:38:08 -07:00
Angjie Li
cde1e3fca8
Auto detect mode to determine which rendering backend to use. (#21852) 2020-10-22 16:17:02 -07:00
Greg Spencer
6bc70e4a11
Reland: Migration to PlatformDispatcher and multi-window (#21932)
This re-lands #20496 and #21780 after fixing the semantics-enabling code that was causing the post-submit web_smoke_test to fail.

Below is the description from the original PR:

This is a PR for converting the dart:ui code in the engine to use a multi-window API. The goal here is to convert from the window singleton to an API that has the concept of multiple windows. Also, I'm matching up the new PlatformDispatcher class to talk directly to the PlatformConfiguration class in the engine. I'm not attempting to actually enable creating multiple windows here, just migrate to an API that has a concept of multiple windows. The multi-window API in this PR currently only ever creates one window.

The design doc for this change is here.

The major changes in this PR:

Move the platfom-specific attributes out of Window, and into the new PlatformDispatcher class that holds all of the platform state, so that the platform code need only update the configuration on this class.
Create FlutterView, FlutterWindow, and SingletonFlutterWindow classes to separate out the concepts of a view (of which there may be multiple in a window), a window (of which there may be multiple on a screen, and they host views), and a window where there is only ever expected to be one (this hosts the entire API of the former Window class, and will eventually be the type of the window singleton).
Next step after this PR lands:

Remove the Window class entirely (it is replaced by SingletonFlutterWindow). Some minor changes in the Framework are needed to switch to using SingletonFlutterWindow directly first.

The Window class still exists in this PR, but will be removed as soon as the framework is converted to point to the SingletonFlutterWindow class instead. They share the same API, just have different names (Window is currently a subclass of SingletonFlutterWindow). The intention is that the Window name will be freed up to use as a widget class name in the framework for managing windows. The singleton called window will remain, and keep the same API it has now.
2020-10-22 14:54:25 -07:00
Jonah Williams
6ce33dd4a9
[null-safety] fix soundness of Paragraph._addPlaceholder (#21994) 2020-10-20 09:57:59 -07:00
Zachary Anderson
2ef0f4228c
Revert "[web] Fix image gap due to svg element without position attribute (#21939)" (#21986)
This reverts commit 79879802e05edb2f8fb871428609f3db5a549273.
2020-10-19 23:54:07 -07:00
Jonah Williams
326157ee7e
[null-safety] fix Scene.toImage declaration (#21983) 2020-10-19 22:52:19 -07:00
Ferhat
79879802e0
[web] Fix image gap due to svg element without position attribute (#21939) 2020-10-19 22:15:06 -07:00
Ferhat
149ef70830
[web] Implement sweep gradient (#21873) 2020-10-19 22:14:42 -07:00
Chinmay Garde
fa11ee6e2a
Fix native constructor of list of zircon handles and remove unused list factory specializations. (#21980) 2020-10-19 19:42:01 -07:00
Ferhat
0747f2f4b1
[web] Fix 3d transforms for html backend (#21499)
* Workaround for canvas element lacking support for 3d setTransform

* update golden test

* Add webkit workaround

* Implement DOM rendering for perspective

* cleanup

* update goldens lock

* Add check for shader and filtermask for dom use

* Fix svg viewBox. Move zIndex check to bitmap canvas

* Fix null check warning

* Fix scene_builder zIndex=-1 test to force canvas usage

* Add blendmode handling for DOM mode

* Update maxdiff and golden locks

* Remove unused import

* Add drawcolor/drawpaint test. Fix bounds for drawColor/drawPaint

* update golden locks

* adjust drawColor for dpr

* Update test to use canvas

* Fix toDataUrl NNBD

* Update Picture.toImage to use canvas to obstain image data

* Remove write:true from golden calls

* Add fill-rule for _pathToSvgElement

* Update golden locks

* Fix sceneBuilder pushClip / add missing clipBehaviour

* Fix test now that clipping works correctly

* move overflow handling for tests into DOMClip.addOverflow

* Add clipRect to test to keep render inside bitmap canvas area

* Update compositing test, fix drawColor coordinates

* update golden locks

* Skip test for matchGolden infra fail

* update golden lock

* merge

* update maxdiff for text over canvas

* update golden diff

* update paint spread bounds maxdiff

* update paint spread maxDiff
2020-10-19 17:27:27 -07:00
Jonah Williams
895940081c
[null-safety] fix types of layer code (#21959) 2020-10-19 16:22:40 -07:00
Jonah Williams
1c35cc6416
[null-safety] fix type declaration of Picutre._toImage (#21942)
Fixes flutter/flutter#68377

Should be a nullable string. Looks like --null-assertions does not cover the native binding code.
2020-10-17 11:02:19 -07:00
Ferhat
890f016207
[web] Implement ClipOp.difference (#21901) 2020-10-17 00:09:41 -07:00
Chris Bracken
49c35b6177
Eliminate unnecessary linter opt-outs (#21935)
Eliminates FLUTTER_NOLINT where they can be landed without triggering
lint failures.
2020-10-16 17:24:23 -07:00
Harry Terkelsen
869d3c8c7a
Set strokeCap, strokeJoin, and strokeMiter when resurrecting Paint (#21926) 2020-10-16 16:08:46 -07:00
Chinmay Garde
5bd7260a1e
Enable loading snapshots with sound null safety enabled. (#21820)
Snapshots compiled with sound null-safety enabled require changes to the way in
which isolates are launched. Specifically, the `Dart_IsolateFlags::null_safety`
field needs to be known upfront. The value of this field can only be determined
once the kernel snapshot is available. This poses a problem in the engine
because the engine used to launch the isolate at shell initialization and only
need the kernel mappings later at isolate launch (when transitioning the root
isolate to the `DartIsolate::Phase::Running` phase). This patch delays launch of
the isolate on the UI task runner till a kernel mapping is available. The side
effects of this delay (callers no longer having access to the non-running
isolate handle) have been addressed in this patch. The DartIsolate API has also
been amended to hide the method that could return a non-running isolate to the
caller.  Instead, it has been replaced with a method that requires a valid
isolate configuration that returns a running root isolate. The isolate will be
launched by asking the isolate configuration for its null-safety
characteristics.

A side effect of enabling null-safety is that Dart APIs that work with legacy
types will now terminate the process if used with an isolate that has sound
null-safety enabled. These APIs may no longer be used in the engine. This
primarily affects the Dart Convertors in Tonic that convert certain C++ objects
into the Dart counterparts. All known Dart Converters have been updated to
convert C++ objects to non-nullable Dart types inferred using type traits of the
corresponding C++ object. The few spots in the engine that used the old Dart
APIs directly have been manually updated. To ensure that no usage of the legacy
APIs remain in the engine (as these would cause runtime process terminations),
the legacy APIs were prefixed with the `DART_LEGACY_API` macro and the macro
defined to `[[deprecated]]` in all engine translation units. While the engine
now primarily works with non-nullable Dart types, callers can still use
`Dart_TypeToNonNullableType` to acquire nullable types for use directly or with
Tonic. One use case that is not addressed with the Tonic Dart Convertors is the
creation of non-nullable lists of nullable types. This hasn’t come up so far in
the engine.

A minor related change is reworking tonic to define a single library target.
This allows the various tonic subsystems to depend on one another. Primarily,
this is used to make the Dart convertors use the logging utilities. This now
allows errors to be more descriptive as the presence of error handles is caught
(and logged) earlier.

Fixes https://github.com/flutter/flutter/issues/59879
2020-10-16 14:53:26 -07:00
Chris Bracken
c449c8ee50
Eliminate FLUTTER_NOLINT where possible (#21904)
This removes most of the remaining FLUTTER_NOLINT comments and opts
these files back into linter enforcement.

I've filed https://github.com/flutter/flutter/issues/68273 to require
that all FLUTTER_NOLINT comments be followed by a GitHub issue URL
describing the problem to be fixed.
2020-10-16 12:44:49 -07:00
Jason Simmons
c2080ec725
Check for null images in ImageFromCompressedData (#21891) 2020-10-15 16:57:02 -07:00
Harry Terkelsen
ddf978b8b9
Add more TextStyle support to Paragraph in CanvasKit mode (#21629)
* WIP on Paragraph

* WIP skparagraph

* Add more Paragraph features in CanvasKit mode

* Fix addRoundRect test

* Respond to review comments

* Remove unused (and potentially harmful) getters from Sk classes
2020-10-15 16:33:51 -07:00
nturgut
3b2da6be9f
[web] enabling firefox screenshot tests. adding to documentation (#21807)
* enabling firefox screenshot tests. adding to documentation

* test with correct goldens

* update goldens SHA

* change the goldens with flutter/goldens repo

* do not run preparation step twice. this will cause test_results to be deleted
2020-10-13 19:26:34 -07:00