-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Reapply "Dynamic view sizing" (#140165) #140918
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why no leak tracking?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Between reverting and relanding this change the testWidgetsWithLeakTracking method was removed in #140239. It's functionality is now folded into testWidgets directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the ViewConfiguration doesn't use ViewConstraints anymore, do we need the distinction still? It doesn't appear to be used anywhere in the framework (although it is used in the engine).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still need it for the type used by FlutterView.physicalConstraints in the engine since the engine doesn't have access to the BoxConstraints type. This is similar to how the engine uses ViewPadding that the framework then translates to EdgeInsets at its earliest convenience because the second one is more powerful.
gspencergoog
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Waiting for confirmation on b/316813075 before merging this. |
This reverts commit d24c01b.
4593f2c to
3b00f9c
Compare
flutter/flutter@126302d...b840a60 2024-01-10 [email protected] Roll Flutter Engine from 3269fd84460d to b361a60ae224 (1 revision) (flutter/flutter#141271) 2024-01-10 [email protected] Roll Flutter Engine from a5d446da5495 to 3269fd84460d (1 revision) (flutter/flutter#141264) 2024-01-10 [email protected] Roll Flutter Engine from 3ccf66bed335 to a5d446da5495 (2 revisions) (flutter/flutter#141252) 2024-01-10 [email protected] Roll Flutter Engine from e57e418c02ae to 3ccf66bed335 (1 revision) (flutter/flutter#141241) 2024-01-10 [email protected] Roll Flutter Engine from 7e6f3d847e01 to e57e418c02ae (1 revision) (flutter/flutter#141240) 2024-01-10 [email protected] Roll Flutter Engine from 1cf2e0a603c7 to 7e6f3d847e01 (1 revision) (flutter/flutter#141237) 2024-01-10 [email protected] Roll Flutter Engine from 32bbf8be8d2c to 1cf2e0a603c7 (1 revision) (flutter/flutter#141232) 2024-01-10 [email protected] Roll Flutter Engine from 5b9d2132b7cd to 32bbf8be8d2c (1 revision) (flutter/flutter#141229) 2024-01-10 [email protected] Roll Flutter Engine from 941f268fc8bb to 5b9d2132b7cd (1 revision) (flutter/flutter#141228) 2024-01-10 [email protected] Roll Flutter Engine from 542fea9edae4 to 941f268fc8bb (3 revisions) (flutter/flutter#141224) 2024-01-10 [email protected] `NestedScrollView`'s outer scrollable jumping with `BouncingScrollPhysics` due to `double` precision errors (flutter/flutter#138319) 2024-01-10 [email protected] Roll Flutter Engine from 8c1501f3956d to 542fea9edae4 (1 revision) (flutter/flutter#141217) 2024-01-10 [email protected] Fix or except leaks. (flutter/flutter#141081) 2024-01-09 [email protected] Roll Flutter Engine from 693af0c699c5 to 8c1501f3956d (1 revision) (flutter/flutter#141215) 2024-01-09 [email protected] TextStyle: In copyWith, stop ignoring debugLabel when receiver has none (flutter/flutter#141141) 2024-01-09 [email protected] Roll Flutter Engine from a35e3b026e1d to 693af0c699c5 (5 revisions) (flutter/flutter#141209) 2024-01-09 [email protected] Replace deprecated `exists` in podhelper.rb (flutter/flutter#141169) 2024-01-09 [email protected] Correctly handle null case in ProcessText.queryTextActions (flutter/flutter#141205) 2024-01-09 [email protected] Add environment variable to leak tracking bots. (flutter/flutter#141137) 2024-01-09 [email protected] Reapply "Dynamic view sizing" (#140165) (flutter/flutter#140918) 2024-01-09 [email protected] Introduce new Form validation method (flutter/flutter#135578) 2024-01-09 [email protected] Update `RouteObserver` example and fix an error thrown (flutter/flutter#141166) 2024-01-09 [email protected] Upgrade leak_tracker. (flutter/flutter#141153) 2024-01-09 [email protected] [ci.yaml] Do not run packaging test on presubmit (flutter/flutter#141192) 2024-01-09 [email protected] Roll Flutter Engine from 036b39fa47fa to a35e3b026e1d (6 revisions) (flutter/flutter#141191) 2024-01-09 [email protected] Run tests on iOS 16 or iOS 17 (flutter/flutter#141178) 2024-01-09 [email protected] Remove conditions that depend on order. (flutter/flutter#141183) 2024-01-09 [email protected] Roll Flutter Engine from b3c8597df0e2 to 036b39fa47fa (1 revision) (flutter/flutter#141179) 2024-01-09 [email protected] resolved the issue of indeterminate CircularProgressIndicator.adaptive on Darwin (flutter/flutter#140947) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
This enables support for dynamic view resizing in non-web embedders. While this patch enables support for dynamic view resizing in non-web embedders, it does not *implement* support in any embedder. When Flutter applications call `FlutterView.render` with a non-null `size` parameter, the size will be compared to the existing view size (if any), and if different, a call to `PlatformView::ResizeView` will be triggered. Embedders can respond to this call by resizing the underlying platform-specific FlutterView to the appropriate size. Related patches: * `dart:ui`: flutter/engine#48090 * framework: flutter#138648 * framework reland: flutter#140918 * Web: flutter/engine#50271 Issue: flutter#169147 Issue: flutter#149033
This enables support for dynamic view resizing in non-web embedders. While this patch enables support for dynamic view resizing in non-web embedders, it does not *implement* support in any embedder. When Flutter applications call `FlutterView.render` with a non-null `size` parameter, the size will be compared to the existing view size (if any), and if different, a call to `PlatformView::ResizeView` will be triggered. Embedders can respond to this call by resizing the underlying platform-specific FlutterView to the appropriate size. Extracts a resize_view_callback to the embedder API that custom embedders can register to receive the updated size from the engine, and adapt their views accordingly. Related patches: * `dart:ui`: flutter/engine#48090 * framework: flutter#138648 * framework reland: flutter#140918 * Web: flutter/engine#50271 Issue: flutter#169147 Issue: flutter#149033
This enables support for dynamic view resizing in non-web embedders. While this patch enables support for dynamic view resizing in non-web embedders, it does not *implement* support in any embedder. When Flutter applications call `FlutterView.render` with a non-null `size` parameter, the size will be compared to the existing view size (if any), and if different, a call to `PlatformView::ResizeView` will be triggered. Embedders can respond to this call by resizing the underlying platform-specific FlutterView to the appropriate size. Extracts a resize_view_callback to the embedder API that custom embedders can register to receive the updated size from the engine, and adapt their views accordingly. Related patches: * `dart:ui`: flutter/engine#48090 * framework: flutter#138648 * framework reland: flutter#140918 * Web: flutter/engine#50271 Issue: flutter#169147 Issue: flutter#149033
This enables support for dynamic view resizing in non-web embedders. While this patch enables support for dynamic view resizing in non-web embedders, it does not *implement* support in any embedder. When Flutter applications call `FlutterView.render` with a non-null `size` parameter, the size will be compared to the existing view size (if any), and if different, a call to `PlatformView::ResizeView` will be triggered. Embedders can respond to this call by resizing the underlying platform-specific FlutterView to the appropriate size. Extracts a resize_view_callback to the embedder API that custom embedders can register to receive the updated size from the engine, and adapt their views accordingly. Related patches: * `dart:ui`: flutter/engine#48090 * framework: flutter#138648 * framework reland: flutter#140918 * Web: flutter/engine#50271 Issue: flutter#169147 Issue: flutter#149033
This enables support for dynamic view resizing in non-web embedders. While this patch enables support and exposes API for dynamic view resizing in non-web embedders and in the embedder API, it does not *implement* support in any embedder. This feature is restricted to embedders with merged UI and platform thread due to the need to inform the embedder of the updated view size synchronously with presenting the content. With some effort, we could implement synchronisation logic that supports non-thread-merged embedders. See ResizeSynchronizer in the macOS embedder for details of what's involved. When Flutter applications call `FlutterView.render` with a non-null `size` parameter, the size will be compared to the existing view size (if any), and if different, a call to `PlatformView::ResizeView` will be triggered. Embedders can respond to this call by resizing the underlying platform-specific FlutterView to the appropriate size. Extracts a resize_view_callback to the embedder API that custom embedders can register to receive the updated size from the engine, and adapt their views accordingly. Related patches: * `dart:ui`: flutter/engine#48090 * framework: flutter#138648 * framework reland: flutter#140918 * Web: flutter/engine#50271 Issue: flutter#169147 Issue: flutter#149033
This enables support for dynamic view resizing in non-web embedders. While this patch enables support and exposes API for dynamic view resizing in non-web embedders and in the embedder API, it does not *implement* support in any embedder. This feature is restricted to embedders with merged UI and platform thread due to the need to inform the embedder of the updated view size synchronously with presenting the content. With some effort, we could implement synchronisation logic that supports non-thread-merged embedders. See ResizeSynchronizer in the macOS embedder for details of what's involved. When Flutter applications call `FlutterView.render` with a non-null `size` parameter, the size will be compared to the existing view size (if any), and if different, a call to `PlatformView::ResizeView` will be triggered. Embedders can respond to this call by resizing the underlying platform-specific FlutterView to the appropriate size. Extracts a resize_view_callback to the embedder API that custom embedders can register to receive the updated size from the engine, and adapt their views accordingly. Related patches: * `dart:ui`: flutter/engine#48090 * framework: flutter#138648 * framework reland: flutter#140918 * Web: flutter/engine#50271 Issue: flutter#169147 Issue: flutter#149033
This enables support for dynamic view resizing in non-web embedders. While this patch enables support and exposes API for dynamic view resizing in non-web embedders and in the embedder API, it does not *implement* support in any embedder. This feature is restricted to embedders with merged UI and platform thread due to the need to inform the embedder of the updated view size synchronously with presenting the content. With some effort, we could implement synchronisation logic that supports non-thread-merged embedders. See ResizeSynchronizer in the macOS embedder for details of what's involved. When Flutter applications call `FlutterView.render` with a non-null `size` parameter, the size will be compared to the existing view size (if any), and if different, a call to `PlatformView::ResizeView` will be triggered. Embedders can respond to this call by resizing the underlying platform-specific FlutterView to the appropriate size. Extracts a resize_view_callback to the embedder API that custom embedders can register to receive the updated size from the engine, and adapt their views accordingly. Related patches: * `dart:ui`: flutter/engine#48090 * framework: flutter#138648 * framework reland: flutter#140918 * Web: flutter/engine#50271 Issue: flutter#169147 Issue: flutter#149033
This enables support for dynamic view resizing in non-web embedders. While this patch enables support and exposes API for dynamic view resizing in non-web embedders and in the embedder API, it does not *implement* support in any embedder. This feature is restricted to embedders with merged UI and platform thread due to the need to inform the embedder of the updated view size synchronously with presenting the content. With some effort, we could implement synchronisation logic that supports non-thread-merged embedders. See ResizeSynchronizer in the macOS embedder for details of what's involved. When Flutter applications call `FlutterView.render` with a non-null `size` parameter, the size will be compared to the existing view size (if any), and if different, a call to `PlatformView::ResizeView` will be triggered. Embedders can respond to this call by resizing the underlying platform-specific FlutterView to the appropriate size. Extracts a resize_view_callback to the embedder API that custom embedders can register to receive the updated size from the engine, and adapt their views accordingly. Related patches: * `dart:ui`: flutter/engine#48090 * framework: flutter#138648 * framework reland: flutter#140918 * Web: flutter/engine#50271 Issue: flutter#169147 Issue: flutter#149033
This enables support for dynamic view resizing in non-web embedders. While this patch enables support and exposes API for dynamic view resizing in non-web embedders and in the embedder API, it does not *implement* support in any embedder. This feature is restricted to embedders with merged UI and platform thread due to the need to inform the embedder of the updated view size synchronously with presenting the content. With some effort, we could implement synchronisation logic that supports non-thread-merged embedders. See ResizeSynchronizer in the macOS embedder for details of what's involved. When Flutter applications call `FlutterView.render` with a non-null `size` parameter, the size will be compared to the existing view size (if any), and if different, a call to `PlatformView::ResizeView` will be triggered. Embedders can respond to this call by resizing the underlying platform-specific FlutterView to the appropriate size. Extracts a resize_view_callback to the embedder API that custom embedders can register to receive the updated size from the engine, and adapt their views accordingly. Related patches: * `dart:ui`: flutter/engine#48090 * framework: flutter#138648 * framework reland: flutter#140918 * Web: flutter/engine#50271 Issue: flutter#169147 Issue: flutter#149033
This enables support for dynamic view resizing in non-web embedders. While this patch enables support and exposes API for dynamic view resizing in non-web embedders and in the embedder API, it does not *implement* support in any embedder. This feature is restricted to embedders with merged UI and platform thread due to the need to inform the embedder of the updated view size synchronously with presenting the content. With some effort, we could implement synchronisation logic that supports non-thread-merged embedders. See ResizeSynchronizer in the macOS embedder for details of what's involved. When Flutter applications call `FlutterView.render` with a non-null `size` parameter, the size will be compared to the existing view size (if any), and if different, a call to `PlatformView::ResizeView` will be triggered. Embedders can respond to this call by resizing the underlying platform-specific FlutterView to the appropriate size. Extracts a resize_view_callback to the embedder API that custom embedders can register to receive the updated size from the engine, and adapt their views accordingly. Related patches: * `dart:ui`: flutter/engine#48090 * framework: flutter#138648 * framework reland: flutter#140918 * Web: flutter/engine#50271 Issue: flutter#169147 Issue: flutter#149033
This enables support for dynamic view resizing in non-web embedders. While this patch enables support and exposes API for dynamic view resizing in non-web embedders and in the embedder API, it does not *implement* support in any embedder. This feature is restricted to embedders with merged UI and platform thread due to the need to inform the embedder of the updated view size synchronously with presenting the content. With some effort, we could implement synchronisation logic that supports non-thread-merged embedders. See ResizeSynchronizer in the macOS embedder for details of what's involved. When Flutter applications call `FlutterView.render` with a non-null `size` parameter, the size will be compared to the existing view size (if any), and if different, a call to `PlatformView::ResizeView` will be triggered. Embedders can respond to this call by resizing the underlying platform-specific FlutterView to the appropriate size. Extracts a resize_view_callback to the embedder API that custom embedders can register to receive the updated size from the engine, and adapt their views accordingly. Related patches: * `dart:ui`: flutter/engine#48090 * framework: flutter#138648 * framework reland: flutter#140918 * Web: flutter/engine#50271 Issue: flutter#169147 Issue: flutter#149033
This enables support for dynamic view resizing in non-web embedders. While this patch enables support and exposes API for dynamic view resizing in non-web embedders and in the embedder API, it does not *implement* support in any embedder. This feature is restricted to embedders with merged UI and platform thread due to the need to inform the embedder of the updated view size synchronously with presenting the content. With some effort, we could implement synchronisation logic that supports non-thread-merged embedders. See ResizeSynchronizer in the macOS embedder for details of what's involved. When Flutter applications call `FlutterView.render` with a non-null `size` parameter, the size will be compared to the existing view size (if any), and if different, a call to `PlatformView::ResizeView` will be triggered. Embedders can respond to this call by resizing the underlying platform-specific FlutterView to the appropriate size. Extracts a resize_view_callback to the embedder API that custom embedders can register to receive the updated size from the engine, and adapt their views accordingly. Related patches: * `dart:ui`: flutter/engine#48090 * framework: flutter#138648 * framework reland: flutter#140918 * Web: flutter/engine#50271 Issue: flutter#169147 Issue: flutter#149033
This enables support for dynamic view resizing in non-web embedders. While this patch enables support and exposes API for dynamic view resizing in non-web embedders and in the embedder API, it does not *implement* support in any embedder. This feature is restricted to embedders with merged UI and platform thread due to the need to inform the embedder of the updated view size synchronously with presenting the content. With some effort, we could implement synchronisation logic that supports non-thread-merged embedders. See ResizeSynchronizer in the macOS embedder for details of what's involved. When Flutter applications call `FlutterView.render` with a non-null `size` parameter, the size will be compared to the existing view size (if any), and if different, a call to `PlatformView::ResizeView` will be triggered. Embedders can respond to this call by resizing the underlying platform-specific FlutterView to the appropriate size. Extracts a resize_view_callback to the embedder API that custom embedders can register to receive the updated size from the engine, and adapt their views accordingly. Related patches: * `dart:ui`: flutter/engine#48090 * framework: flutter#138648 * framework reland: flutter#140918 * Web: flutter/engine#50271 Issue: flutter#169147 Issue: flutter#149033
This enables support for dynamic view resizing in non-web embedders. While this patch enables support and exposes API for dynamic view resizing in non-web embedders and in the embedder API, it does not *implement* support in any embedder. This feature is restricted to embedders with merged UI and platform thread due to the need to inform the embedder of the updated view size synchronously with presenting the content. With some effort, we could implement synchronisation logic that supports non-thread-merged embedders. See ResizeSynchronizer in the macOS embedder for details of what's involved. When Flutter applications call `FlutterView.render` with a non-null `size` parameter, the size will be compared to the existing view size (if any), and if different, a call to `PlatformView::ResizeView` will be triggered. Embedders can respond to this call by resizing the underlying platform-specific FlutterView to the appropriate size. Extracts a resize_view_callback to the embedder API that custom embedders can register to receive the updated size from the engine, and adapt their views accordingly. Related patches: * `dart:ui`: flutter/engine#48090 * framework: flutter#138648 * framework reland: flutter#140918 * Web: flutter/engine#50271 Issue: flutter#169147 Issue: flutter#149033
This enables support for dynamic view resizing in non-web embedders. While this patch enables support and exposes API for dynamic view resizing in non-web embedders and in the embedder API, it does not *implement* support in any embedder. This feature is restricted to embedders with merged UI and platform thread due to the need to inform the embedder of the updated view size synchronously with presenting the content. With some effort, we could implement synchronisation logic that supports non-thread-merged embedders. See ResizeSynchronizer in the macOS embedder for details of what's involved. When Flutter applications call `FlutterView.render` with a non-null `size` parameter, the size will be compared to the existing view size (if any), and if different, a call to `PlatformView::ResizeView` will be triggered. Embedders can respond to this call by resizing the underlying platform-specific FlutterView to the appropriate size. Extracts a resize_view_callback to the embedder API that custom embedders can register to receive the updated size from the engine, and adapt their views accordingly. Related patches: * `dart:ui`: flutter/engine#48090 * framework: flutter#138648 * framework reland: flutter#140918 * Web: flutter/engine#50271 Issue: flutter#169147 Issue: flutter#149033
This enables support for dynamic view resizing in non-web embedders. While this patch enables support and exposes API for dynamic view resizing in non-web embedders and in the embedder API, it does not *implement* support in any embedder. This feature is restricted to embedders with merged UI and platform thread due to the need to inform the embedder of the updated view size synchronously with presenting the content. With some effort, we could implement synchronisation logic that supports non-thread-merged embedders. See ResizeSynchronizer in the macOS embedder for details of what's involved. When Flutter applications call `FlutterView.render` with a non-null `size` parameter, the size will be compared to the existing view size (if any), and if different, a call to `PlatformView::ResizeView` will be triggered. Embedders can respond to this call by resizing the underlying platform-specific FlutterView to the appropriate size. Extracts a resize_view_callback to the embedder API that custom embedders can register to receive the updated size from the engine, and adapt their views accordingly. Related patches: * `dart:ui`: flutter/engine#48090 * framework: flutter#138648 * framework reland: flutter#140918 * Web: flutter/engine#50271 Issue: flutter#169147 Issue: flutter#149033
This enables support for dynamic view resizing in non-web embedders. While this patch enables support and exposes API for dynamic view resizing in non-web embedders and in the embedder API, it does not *implement* support in any embedder. This feature is restricted to embedders with merged UI and platform thread due to the need to inform the embedder of the updated view size synchronously with presenting the content. With some effort, we could implement synchronisation logic that supports non-thread-merged embedders. See ResizeSynchronizer in the macOS embedder for details of what's involved. When Flutter applications call `FlutterView.render` with a non-null `size` parameter, the size will be compared to the existing view size (if any), and if different, a call to `PlatformView::ResizeView` will be triggered. Embedders can respond to this call by resizing the underlying platform-specific FlutterView to the appropriate size. Extracts a resize_view_callback to the embedder API that custom embedders can register to receive the updated size from the engine, and adapt their views accordingly. Related patches: * `dart:ui`: flutter/engine#48090 * framework: flutter#138648 * framework reland: flutter#140918 * Web: flutter/engine#50271 Issue: flutter#169147 Issue: flutter#149033
This enables support for dynamic view resizing in non-web embedders. While this patch enables support and exposes API for dynamic view resizing in non-web embedders and in the embedder API, it does not *implement* support in any embedder. This feature is restricted to embedders with merged UI and platform thread due to the need to inform the embedder of the updated view size synchronously with presenting the content. With some effort, we could implement synchronisation logic that supports non-thread-merged embedders. See ResizeSynchronizer in the macOS embedder for details of what's involved. When Flutter applications call `FlutterView.render` with a non-null `size` parameter, the size will be compared to the existing view size (if any), and if different, a call to `PlatformView::ResizeView` will be triggered. Embedders can respond to this call by resizing the underlying platform-specific FlutterView to the appropriate size. Extracts a resize_view_callback to the embedder API that custom embedders can register to receive the updated size from the engine, and adapt their views accordingly. Related patches: * `dart:ui`: flutter/engine#48090 * framework: flutter#138648 * framework reland: flutter#140918 * Web: flutter/engine#50271 Issue: flutter#169147 Issue: flutter#149033
This enables support for dynamic view resizing in non-web embedders. While this patch enables support and exposes API for dynamic view resizing in non-web embedders and in the embedder API, it does not *implement* support in any embedder. This feature is restricted to embedders with merged UI and platform thread due to the need to inform the embedder of the updated view size synchronously with presenting the content. With some effort, we could implement synchronisation logic that supports non-thread-merged embedders. See ResizeSynchronizer in the macOS embedder for details of what's involved. When Flutter applications call `FlutterView.render` with a non-null `size` parameter, the size will be compared to the existing view size (if any), and if different, a call to `PlatformView::ResizeView` will be triggered. Embedders can respond to this call by resizing the underlying platform-specific FlutterView to the appropriate size. Extracts a resize_view_callback to the embedder API that custom embedders can register to receive the updated size from the engine, and adapt their views accordingly. Related patches: * `dart:ui`: flutter/engine#48090 * framework: flutter#138648 * framework reland: flutter#140918 * Web: flutter/engine#50271 Issue: flutter#169147 Issue: flutter#149033
This enables support for dynamic view resizing in non-web embedders. While this patch enables support and exposes API for dynamic view resizing in non-web embedders and in the embedder API, it does not *implement* support in any embedder. This feature is restricted to embedders with merged UI and platform thread due to the need to inform the embedder of the updated view size synchronously with presenting the content. With some effort, we could implement synchronisation logic that supports non-thread-merged embedders. See ResizeSynchronizer in the macOS embedder for details of what's involved. When Flutter applications call `FlutterView.render` with a non-null `size` parameter, the size will be compared to the existing view size (if any), and if different, a call to `PlatformView::ResizeView` will be triggered. Embedders can respond to this call by resizing the underlying platform-specific FlutterView to the appropriate size. Extracts a resize_view_callback to the embedder API that custom embedders can register to receive the updated size from the engine, and adapt their views accordingly. Related patches: * `dart:ui`: flutter/engine#48090 * framework: flutter#138648 * framework reland: flutter#140918 * Web: flutter/engine#50271 Issue: flutter#169147 Issue: flutter#149033
This enables support for dynamic view resizing in non-web embedders. While this patch enables support and exposes API for dynamic view resizing in non-web embedders and in the embedder API, it does not *implement* support in any embedder. This feature is restricted to embedders with merged UI and platform thread due to the need to inform the embedder of the updated view size synchronously with presenting the content. With some effort, we could implement synchronisation logic that supports non-thread-merged embedders. See ResizeSynchronizer in the macOS embedder for details of what's involved. When Flutter applications call `FlutterView.render` with a non-null `size` parameter, the size will be compared to the existing view size (if any), and if different, a call to `PlatformView::ResizeView` will be triggered. Embedders can respond to this call by resizing the underlying platform-specific FlutterView to the appropriate size. Extracts a resize_view_callback to the embedder API that custom embedders can register to receive the updated size from the engine, and adapt their views accordingly. Related patches: * `dart:ui`: flutter/engine#48090 * framework: flutter#138648 * framework reland: flutter#140918 * Web: flutter/engine#50271 Issue: flutter#169147 Issue: flutter#149033
This enables support for dynamic view resizing in non-web embedders. While this patch enables support and exposes API for dynamic view resizing in non-web embedders and in the embedder API, it does not *implement* support in any embedder. This feature is restricted to embedders with merged UI and platform thread due to the need to inform the embedder of the updated view size synchronously with presenting the content. With some effort, we could implement synchronisation logic that supports non-thread-merged embedders. See ResizeSynchronizer in the macOS embedder for details of what's involved. When Flutter applications call `FlutterView.render` with a non-null `size` parameter, the size will be compared to the existing view size (if any), and if different, a call to `PlatformView::ResizeView` will be triggered. Embedders can respond to this call by resizing the underlying platform-specific FlutterView to the appropriate size. Extracts a resize_view_callback to the embedder API that custom embedders can register to receive the updated size from the engine, and adapt their views accordingly. Related patches: * `dart:ui`: flutter/engine#48090 * framework: flutter#138648 * framework reland: flutter#140918 * Web: flutter/engine#50271 Issue: flutter#169147 Issue: flutter#149033
This enables support for dynamic view resizing in non-web embedders. While this patch enables support and exposes API for dynamic view resizing in non-web embedders and in the embedder API, it does not *implement* support in any embedder. This feature is restricted to embedders with merged UI and platform thread due to the need to inform the embedder of the updated view size synchronously with presenting the content. With some effort, we could implement synchronisation logic that supports non-thread-merged embedders. See ResizeSynchronizer in the macOS embedder for details of what's involved. When Flutter applications call `FlutterView.render` with a non-null `size` parameter, the size will be compared to the existing view size (if any), and if different, a call to `PlatformView::ResizeView` will be triggered. Embedders can respond to this call by resizing the underlying platform-specific FlutterView to the appropriate size. Extracts a resize_view_callback to the embedder API that custom embedders can register to receive the updated size from the engine, and adapt their views accordingly. Related patches: * `dart:ui`: flutter/engine#48090 * framework: flutter#138648 * framework reland: flutter#140918 * Web: flutter/engine#50271 Issue: flutter#169147 Issue: flutter#149033
This enables support for dynamic view resizing in non-web embedders. While this patch enables support and exposes API for dynamic view resizing in non-web embedders and in the embedder API, it does not *implement* support in any embedder. This feature is restricted to embedders with merged UI and platform thread due to the need to inform the embedder of the updated view size synchronously with presenting the content. With some effort, we could implement synchronisation logic that supports non-thread-merged embedders. See ResizeSynchronizer in the macOS embedder for details of what's involved. When Flutter applications call `FlutterView.render` with a non-null `size` parameter, the size will be compared to the existing view size (if any), and if different, a call to `PlatformView::ResizeView` will be triggered. Embedders can respond to this call by resizing the underlying platform-specific FlutterView to the appropriate size. Extracts a resize_view_callback to the embedder API that custom embedders can register to receive the updated size from the engine, and adapt their views accordingly. Related patches: * `dart:ui`: flutter/engine#48090 * framework: flutter#138648 * framework reland: flutter#140918 * Web: flutter/engine#50271 Issue: flutter#169147 Issue: flutter#149033
Part of #169147 (iOS) and #149033 (Android). Implementation PRs coming up! This enables support for dynamic view resizing in non-web embedders. While this PR enables support, it does not _implement_ support. Specifically, this creates the pipes (in viewport metrics) for min/max width/height constraints that tell the engine and framework that when rendering the frame it should adjust the width/height as needed for the content. The engine should also discard layer trees that do not fit the constraints. Since the engine now relies on BoxConstraints, geometry.h has now been moved out of embedder specific codepath so that both embedder and engine can depend on it. Related PRs: `dart:ui`: flutter/engine#48090 `framework`: #138648 `framework reland`: #140918 `Web`: flutter/engine#50271 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. --------- Co-authored-by: Matt Boetger <[email protected]> Co-authored-by: Matt Boetger <[email protected]>
Part of flutter#169147 (iOS) and flutter#149033 (Android). Implementation PRs coming up! This enables support for dynamic view resizing in non-web embedders. While this PR enables support, it does not _implement_ support. Specifically, this creates the pipes (in viewport metrics) for min/max width/height constraints that tell the engine and framework that when rendering the frame it should adjust the width/height as needed for the content. The engine should also discard layer trees that do not fit the constraints. Since the engine now relies on BoxConstraints, geometry.h has now been moved out of embedder specific codepath so that both embedder and engine can depend on it. Related PRs: `dart:ui`: flutter/engine#48090 `framework`: flutter#138648 `framework reland`: flutter#140918 `Web`: flutter/engine#50271 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. --------- Co-authored-by: Matt Boetger <[email protected]> Co-authored-by: Matt Boetger <[email protected]>
Part of flutter#169147 (iOS) and flutter#149033 (Android). Implementation PRs coming up! This enables support for dynamic view resizing in non-web embedders. While this PR enables support, it does not _implement_ support. Specifically, this creates the pipes (in viewport metrics) for min/max width/height constraints that tell the engine and framework that when rendering the frame it should adjust the width/height as needed for the content. The engine should also discard layer trees that do not fit the constraints. Since the engine now relies on BoxConstraints, geometry.h has now been moved out of embedder specific codepath so that both embedder and engine can depend on it. Related PRs: `dart:ui`: flutter/engine#48090 `framework`: flutter#138648 `framework reland`: flutter#140918 `Web`: flutter/engine#50271 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. --------- Co-authored-by: Matt Boetger <[email protected]> Co-authored-by: Matt Boetger <[email protected]>
Part of flutter#169147 (iOS) and flutter#149033 (Android). Implementation PRs coming up! This enables support for dynamic view resizing in non-web embedders. While this PR enables support, it does not _implement_ support. Specifically, this creates the pipes (in viewport metrics) for min/max width/height constraints that tell the engine and framework that when rendering the frame it should adjust the width/height as needed for the content. The engine should also discard layer trees that do not fit the constraints. Since the engine now relies on BoxConstraints, geometry.h has now been moved out of embedder specific codepath so that both embedder and engine can depend on it. Related PRs: `dart:ui`: flutter/engine#48090 `framework`: flutter#138648 `framework reland`: flutter#140918 `Web`: flutter/engine#50271 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. --------- Co-authored-by: Matt Boetger <[email protected]> Co-authored-by: Matt Boetger <[email protected]>

This reverts commit d24c01b.
The original change was reverted because it caused some apps to get stuck on the splash screen on some phones.
An investigation determined that this was due to a rounding error. Example: The device reports a physical size of 1008.0 x 2198.0 with a dpr of 1.912500023841858. Flutter would translate that to a logical size of 527.0588169589221 x 1149.2810314243163 and use that as the input for its layout algorithm. Since the constraints here are tight, the layout algorithm would determine that the resulting logical size of the root render object must be 527.0588169589221 x 1149.2810314243163. Translating this back to physical pixels by applying the dpr resulted in a physical size of 1007.9999999999999 x 2198.0 for the frame. Android now rejected that frame because it didn't match the expected size of 1008.0 x 2198.0 and since no frame had been rendered would never take down the splash screen.
Prior to dynamically sized views, this wasn't an issue because we would hard-code the frame size to whatever the requested size was.
Changes in this PR over the original PR:
ViewConfigurationwas refactored to use the slightly more convenientBoxConstraintsover theViewConstraintsto represent constraints. Both essentially represent the same thing, butBoxConstraintsare more powerful and we avoid a couple of translations between the two by translating theViewConstraintsfrom theFlutterViewtoBoxConstraintsdirectly when theViewConfigurationis created.All changes over the original PR are contained in the second commit of this PR.
Fixes b/316813075
Part of #134501.