93 Commits

Author SHA1 Message Date
Greg Spencer
ce1dd11f51
Standardize macro names for dartdoc macros (#22180) 2020-10-29 12:03:04 -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
Yuqian Li
c2938d06b1
Revert "Migration to PlatformDispatcher and multi-window #20496" (#21792)
* Revert "Fix documentation build for window changes. (#21780)"

This reverts commit 931a04683d6eb49fc92059b2384ac5b1618d5422.

* Revert "Migration to PlatformDispatcher and multi-window (#20496)"

This reverts commit 85b0031f73544e448354047dc6a236c0b0808252.
2020-10-12 19:26:41 -07:00
Greg Spencer
85b0031f73
Migration to PlatformDispatcher and multi-window (#20496)
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-09 16:29:16 -07:00
Sam Rawlins
cda059e55c
Fix erroneous dartdoc @tool directive. (#21109) 2020-09-11 12:00:02 -07:00
Siva
d77dd31013
Manual roll of Dart b29f228f62...016e8880f0 (#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
Michael Goderbauer
19368efcc3
Fix dartdocs of dart:ui (#20140) 2020-07-29 23:56:02 -07:00
Siva
3bb6cc265e
Manual merge of Dart a3815b6590...24c7666def (#19967)
* Manual merge or Dart into flutter a3815b6590...24c7666def

dart-lang/sdk@24c7666def Update tests that have the current version number hardcoded
dart-lang/sdk@f88ce7aef5 Increase Dart version to 2.10

* Update language version.

* Update license.

* Hpdate language version.

* Update license.
2020-07-24 11:00:34 -07:00
Alexandre Ardhuin
218d98f4d8
Operator equals (#19303)
* use Object for operator==

* apply style guide for operator==
2020-06-30 23:16:31 +02:00
Yegor
194acdfaed
apply null safety syntax to mobile dart:ui (#18933)
* apply null safety syntax to mobile dart:ui
2020-06-12 12:42:12 -07:00
Yegor
612568c67b
add nullability annotations to ui/text.dart (#18400)
* add nullability annotations to ui/text.dart
2020-06-05 08:19:14 -07:00
Dan Field
c2fc31d19d
remove usage of Dart_New for paragraph/libtxt (#16837) 2020-02-28 00:15:40 -08:00
vsmenon
0ef67b5e74
opt out dart:ui from nnbd (#16473)
* opt out dart:ui from nnbd

* Annotate tests as well
2020-02-20 11:04:00 -08:00
Michael Goderbauer
e4f46f32f1
Doc fixes in BoxHeightStyle (#16424) 2020-02-07 13:41:50 -08:00
Gary Qian
b98a39e0bb
Add docs (#16368) 2020-02-04 13:53:02 -08:00
Gary Qian
ee297aa699
Reland "Engine/LibTxt/dart:ui impl of TextHeightBehavior #15087" (#16155) 2020-01-29 10:52:24 -08:00
Dan Field
53baa7aee5
Revert breaking PRs (#16148)
* Revert "Web PargraphStyle TextHeightBehavior integration (#16075)"

This reverts commit 86682a2d09e7d111a5c4fd2156b9971bd65fb693.

* Revert "Engine/LibTxt/dart:ui impl of TextHeightBehavior (#15087)"

This reverts commit cbf4536d158e25e372469c242e326c48cc730de7.
2020-01-28 10:40:05 -08:00
Gary Qian
86682a2d09
Web PargraphStyle TextHeightBehavior integration (#16075) 2020-01-27 17:35:40 -08:00
Gary Qian
cbf4536d15
Engine/LibTxt/dart:ui impl of TextHeightBehavior (#15087) 2020-01-27 13:37:11 -08:00
Dan Field
1970c0624d
implicit casts and add missing docs (#15698) 2020-01-16 17:03:33 -08:00
chunhtai
1f4c593032 loadfontfromlist should send fontchange message to framework (#14805) 2020-01-16 17:03:04 -08:00
Greg Spencer
f68de3f451
Add line boundary information to LineMetrics. (#13727)
This exposes the line boundary information a line by adding getLineBoundary to return the indices corresponding to a line around a TextPosition. The information is already calculated when calculating line metrics, so that we can enable moving the selection/cursor to the beginning/end of a line in a text field.
2019-11-11 16:42:40 -08:00
Greg Spencer
e0b9a2bb23
Change wordBoundary to take dynamic temporarily (#13765)
Converting the argument to Paragraph.wordBoundary to dynamic temporarily until the framework code is converted to send a TextPosition instead of an int.

I'll submit this, then update the framework side to send a TextPosition, and expect a TextRange
or a List<int>, and then submit that, then I'll change this code to send a TextRange and take a TextPostion only, removing the dynamic here. Once that's done, I'll remove the code in the framework that expects a TextRange or a List<int>, and have it just expect a TextRange.

This is so that we can change the API without breaking the builds.

Landing on red to kick the engine builds.
2019-11-08 16:27:00 -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
Gary Qian
13ece5c7fc
Update the ui.LineMetrics.height metric to be more useful to external users (#11456) 2019-08-28 12:26:42 -07:00
Gary Qian
9f1eab2f1f
Expose LineMetrics in dart:ui (#10670) 2019-08-26 13:40:22 -07:00
Tim Sneath
418fe5b2d5
Document FontFeature class (#9808)
Add typography sample from the Flutter 1.7 announcement blog.
2019-07-15 10:55:20 -07:00
Gary Qian
84fd7eb06e
Fix typo in PlaceholderAlignment docs (#9793) 2019-07-11 15:38:09 -07:00
Gary Qian
75387dbc14
TextStyle.height property as a multiple of font size instead of multiple of ascent+descent+leading. (#9041) 2019-07-08 15:32:02 -07:00
Gary Qian
a4abfb2333
Text inline widget LibTxt/dart:ui implementation (#8207) 2019-06-03 10:32:46 -07:00
Chris Bracken
0f1ff3bdb3
Correct typos, adopt US spellings (#9081)
Corects a bnuch of typeos throughout teh engien codebsae. Also makes
a couple minor Commonwealth -> US spelling adjustments for consistency
with the rest of Flutter's codebase.

Made use of `misspell` tool:
https://github.com/client9/misspell
2019-05-25 13:14:46 -07:00
Jason Simmons
82ccba3030
libtxt: have GetRectsForRange(strut) fall back to tight bounds if layout isn't forcing use of the strut (#9058) 2019-05-22 13:57:59 -07:00
Jason Simmons
135a140591
Add font features (such as tabular numbers) as an option in text styles (#8823)
Fixes https://github.com/flutter/flutter/issues/31691
2019-05-21 16:47:57 -07:00
Dan Field
065fe5b210
remove unnecessary [new from docs (#8986) 2019-05-16 19:14:10 -07:00
Jason Simmons
aa63f090fd
libtxt: add a BoxHeightStyle option based on the height of the strut (#8927)
See https://github.com/flutter/flutter/issues/32332
2019-05-16 11:17:20 -07:00
Dan Field
2b1f9925e4
new lints (#8849)
Dart lints added:
* Avoid optional new
* Avoid optional const
* Prefer single quotes
* Prefer default assignment `=`
2019-05-07 16:10:21 -07:00
Jonah Williams
1d062db4db
remove unecessary usage of runtimeType in dart:ui (#8844) 2019-05-04 00:24:41 -07:00
Justin McCandless
3493dcfbae
Rename tightWidth to longestLine (#8706)
Renaming a brand new and unused parameter due to some discussion about connecting with the framework.
2019-04-26 16:06:12 -07:00
Justin McCandless
a144f17aee
Tight Paragraph Width (#8530)
Calculate and expose paragraph tightWidth to the framework to allow drawing Text based on this.
2019-04-18 09:08:41 -07:00
MH Johnson
3796d98918
[ui] Add null check in FontWeight.lerp (#8274)
* Add null check in FontWeight.lerp

* Add Unit tests for FontWeight.lerp
2019-04-01 21:56:19 -04:00
Kate Lovett
af64f725f6
Fixing links between higher and lower classes. (#8295) 2019-03-25 15:44:14 -07:00
Kate Lovett
5f8ae420c1 Linking Higher & Lower Class Docs (#8265)
* Linking lower layer classes to higher layers in API Docs.
2019-03-22 13:43:34 -07:00
Gary Qian
2daebebf4b
Fix text.dart height docs (#8079) 2019-03-13 11:13:53 -07:00
Gary Qian
31b289f277
Fix indexing error in dart:ui TextStyle.toString (#8143) 2019-03-12 16:48:47 -07:00
Gary Qian
073aadde14
Fix TextStyle decode misalignment (#8141) 2019-03-12 13:55:31 -07:00
Gary Qian
52b67fdd5a
Expose decorationThickness to dart:ui (#8008) 2019-03-11 16:43:11 -07:00
Greg Spencer
a1d84996dd
Fix spelling errors in dartdocs (#7997)
Fix the spelling errors in the dartdocs for the engine.

There are no functionality changes here, just documentation fixes.
2019-02-28 14:42:55 -08:00
Gary Qian
c92df428ef
Strut implementation (#7414)
Engine half of flutter/flutter#26332
2019-01-30 10:16:37 -08:00
Justin McCandless
39a99b0050
Docs improvements per @Hixie's comments (#7387) 2019-01-10 07:46:50 +08:00