Skip to content

Conversation

@LongCatIsLooong
Copy link
Contributor

@LongCatIsLooong LongCatIsLooong commented Sep 5, 2024

Prompted by #154060: widgets should always rebuild even when off-screen. The ancestor widget could be trying to pass down information that is not related to the UI state, or trying to pause video playback. Widgets with global keys should also always rebuild to make sure the widget tree is consistent in terms of global keys.

Also prevents unnecessary repaints: #106306 (comment)

This works by adding _RenderLayoutBuilder as a relayout boundary in the dirtly layout list so the layout callback always gets a chance to run if marked dirty.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: scrolling Viewports, list views, slivers, etc. labels Sep 5, 2024
@LongCatIsLooong LongCatIsLooong force-pushed the layout-builder-always-rebuild branch from f264ff6 to 1adbbda Compare September 5, 2024 23:02
@LongCatIsLooong

This comment was marked as off-topic.

@LongCatIsLooong LongCatIsLooong marked this pull request as ready for review September 6, 2024 00:20
// This ensures that the layout callback will be run even if an ancestor
// chooses to not lay out this subtree (for example, OverlayEntries with
// `maintainState` set to true).
owner?._nodesNeedingLayout.add(this);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For my own understanding: Wouldn't this case child nodes to potentially also get layed out unnecessary?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or is the idea that since the contrains haven't changed, the layout builder is pretty much guaranteed to pass the same constraints to its child and layout would short-circuit right there?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah the render children may also do layout now which can be unnecessary. But I think (at least for RenderTheater) if you rebuild a widget subtree in an inactive maintainState OverlayEntry, relayout boundaries in the render subtree are still operational and call performLayout as usual?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the reason that we don't want to find the closest boundary because we are not sure whether between that and here may skips the layout?

Is it possible to short circuit the layout pass and directly marksNeedsBuild of the subtree if this is in active route? I am a little concern about removing the check that layout can start at non layout boundary.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to short circuit the layout pass and directly marksNeedsBuild of the subtree if this is in active route? I am a little concern about removing the check that layout can start at non layout boundary.

I am not aware of any other ways to detect whether a LayoutBuilders layout has been skipped, other than adding its node to the dirtly layout list.

If the parent skips layout, then it doesn't care about the size of this render object so this render object is effectively a relayout boundary.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I can't think of a better way to do this. especially we only want to rebuild during layout phase .

Comment on lines 4211 to 4212
// The initial value of this flag must be set to true to prevent the layout
// callback from being called when the tree has never been laid out.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this comment: _needsRebuild doesn't seem to be used as a guard for runLayoutCallback. And also, why do we not want to run the callback during the first time the tree is laid out?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This RenderObject will be added to the PipelineOwner's dirty list, but if its ancestors were never laid out we can't run the layout callback because the constraints are not known yet. Changed the class documentation to

/// A mixin for [RenderObject] subclasses with a layout callback. The mixin
/// guarantees the layout callback will be called even if this [RenderObject]
/// skips doing layout, unless the [RenderObject] has never been laid out and
/// does not have valid [constraints].

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new explanation sounds good to me, but you may have forgotten to push the change up to github.

expect(mostRecentOffset, const Offset(60, 60));
});

testWidgets('LayoutBuilder in a subtree that skips layout does not rebuild during the initial treewalk', (WidgetTester tester) async {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain why this is?

auto-submit bot pushed a commit that referenced this pull request Sep 13, 2024
Fixes #154060

The error message doesn't make sense to me since one can call `setState` during the idle phase, and I'm not sure what this is guarding against without the right error message.

In the case of #154060 the layout builder was never laid out:
```
��child 1: _RenderLayoutBuilder#7c319 NEEDS-LAYOUT NEEDS-PAINT
�   creator: LayoutBuilder � _BodyBuilder � MediaQuery �
�     LayoutId-[<_ScaffoldSlot.body>] � CustomMultiChildLayout �
�     _ActionsScope � Actions � AnimatedBuilder � DefaultTextStyle �
�     AnimatedDefaultTextStyle � _InkFeatures-[GlobalKey#1f6eb ink
�     renderer] � NotificationListener<LayoutChangedNotification> � �
�   parentData: offset=Offset(0.0, 0.0); id=_ScaffoldSlot.body
�   constraints: MISSING
�   size: MISSING
```
So #154681 doesn't really fix #154060 since the layout callback cannot be run without a set of valid constraints. 

Before the `BuildScope` change all `_inDirtyList` flags were unset after the `BuildOwner` finishes rebuilding the widget tree, so `LayoutBuilder._inDirtyLst` is always set to false after a frame even for layout builders that were never laid out.
With the `BuildScope` change, `LayoutBuilder` has its own `BuildScope` which is only flushed after LayoutBuilder gets its constraints.
@Piinks
Copy link
Contributor

Piinks commented Sep 24, 2024

(PR Triage): FYI there are some merge conflicts here. :)

@chunhtai chunhtai self-requested a review October 1, 2024 22:14
Copy link
Contributor

@chunhtai chunhtai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pragma('vm:notify-debugger-on-exception')
void _layoutWithoutResize() {
assert(_needsLayout);
assert(_relayoutBoundary == this);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of remove this, can it add a || this is RenderObjectWithLayoutCallbackMixin

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I didn't like the type check, but since we're basically making RenderObjectWithLayoutCallbackMixin special in the PR, I guess that makes sense.

// This ensures that the layout callback will be run even if an ancestor
// chooses to not lay out this subtree (for example, OverlayEntries with
// `maintainState` set to true).
owner?._nodesNeedingLayout.add(this);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I can't think of a better way to do this. especially we only want to rebuild during layout phase .

@Piinks
Copy link
Contributor

Piinks commented Oct 15, 2024

(Flyby comment from triage) This has some merge conflicts now.

@chunhtai
Copy link
Contributor

@LongCatIsLooong said they will come back to this pr once they finished Full keyboard access pr

@LongCatIsLooong LongCatIsLooong force-pushed the layout-builder-always-rebuild branch from b3f906c to 5786841 Compare December 12, 2024 23:46
@LongCatIsLooong
Copy link
Contributor Author

(requested another review since I remember I spoke with @goderbauer about the issue).

@flutter-dashboard
Copy link

This pull request executed golden file tests, but it has not been updated in a while (20+ days). Test results from Gold expire after as many days, so this pull request will need to be updated with a fresh commit in order to get results from Gold.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 30, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 31, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 31, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 31, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 31, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 31, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 31, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 31, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 1, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 1, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 1, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 1, 2025
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Apr 1, 2025
Manual roll Flutter from 1d954f4 to 05b5e79 (225 revisions)

Manual roll requested by [email protected]

flutter/flutter@1d954f4...05b5e79

2025-03-29 [email protected] Roll Dart SDK from bcb7649e965a to b9c35e05feb5 (1 revision) (flutter/flutter#166202)
2025-03-29 [email protected] Roll Dart SDK from a7701559f616 to bcb7649e965a (1 revision) (flutter/flutter#166189)
2025-03-29 [email protected] Roll Dart SDK from 30ea8c4e622f to a7701559f616 (1 revision) (flutter/flutter#166185)
2025-03-29 [email protected] [fuchsia][sysmem2] switch to sysmem2 tokens (flutter/flutter#166120)
2025-03-29 [email protected] Roll Dart SDK from 65fe9906a916 to 30ea8c4e622f (2 revisions) (flutter/flutter#166181)
2025-03-29 [email protected] move around shaders in vertices uber 1/2 (flutter/flutter#166180)
2025-03-29 [email protected] [Impeller] optimize drawImageRect with blend and matrix color filter. (flutter/flutter#165998)
2025-03-28 [email protected] Add drawRSuperellipse support to mock_canvas. (flutter/flutter#165744)
2025-03-28 [email protected] Started clamping scaled antialias lines size (flutter/flutter#166149)
2025-03-28 [email protected] Roll Dart SDK from 4494ffead9af to 65fe9906a916 (7 revisions) (flutter/flutter#166162)
2025-03-28 [email protected] Remove bringup flag for customer tests (flutter/flutter#166161)
2025-03-28 [email protected] Add the ios-reviewers review team (flutter/flutter#166034)
2025-03-28 [email protected] [impeller] refactored LineContents to make it more testable, added tests (flutter/flutter#166035)
2025-03-28 [email protected] [Widget Inspector] Jump to source code of implementation widgets from Flutter Inspector (flutter/flutter#165924)
2025-03-28 [email protected] Make sure `LayoutBuilder` rebuild in an inactive route (flutter/flutter#154681)
2025-03-28 [email protected] [Impeller] allow newer powervr gpu to use Vulkan. (flutter/flutter#165520)
2025-03-28 [email protected] [web] Remove package:js in favor of dart:js_interop (flutter/flutter#165324)
2025-03-28 [email protected] [ Widget Previews ] Default to using Flutter Web for the widget preview environment (flutter/flutter#166091)
2025-03-28 [email protected] Mark Linux coverage as bringup (flutter/flutter#166144)
2025-03-28 [email protected] Roll Fuchsia Linux SDK from djUjSTaAtl0ETQSBR... to v7PGvypiiWLO8PbsZ... (flutter/flutter#166136)
2025-03-28 [email protected] [Impeller] split vertices uber into 2 shaders. (flutter/flutter#165938)
2025-03-28 [email protected] [flutter_tools] Fix VS Code package.json path on macOS with case-sensitive file system (flutter/flutter#163409)
2025-03-28 [email protected] Delete some verbose vm service logging (flutter/flutter#162709)
2025-03-28 [email protected] Get analytics welcome message under test (flutter/flutter#162627)
2025-03-28 [email protected] [ios][pv]fully revert the UIScreen.main deprecated API change (flutter/flutter#166080)
2025-03-28 [email protected] Roll Skia from b5b6f29d690f to 10f4cf9a817d (8 revisions) (flutter/flutter#166111)
2025-03-28 [email protected] [CI] remove check for exact golden files. (flutter/flutter#166031)
2025-03-28 [email protected] Move OpenGL context management to FlOpenGLManager (flutter/flutter#166025)
2025-03-27 [email protected] [android] only release background image readers on Android 14. (flutter/flutter#165942)
2025-03-27 [email protected] Refactor: Migrate Date picker from MaterialState and MaterialStateProperty (flutter/flutter#164972)
2025-03-27 [email protected] Mark Linux customer tests as flaky (flutter/flutter#166103)
2025-03-27 [email protected] Move app link settings task configuration to kotlin (flutter/flutter#165819)
2025-03-27 [email protected] Make iOS Flutter framework extension-safe (flutter/flutter#165346)
2025-03-27 [email protected] [ Widget Preview ] Display an error widget when an exception is thrown while defining the widget tree (flutter/flutter#166005)
2025-03-27 [email protected] Removed not working hyperlinks to ScriptCategory values (flutter/flutter#165395)
2025-03-27 [email protected] add PointerDeviceKind to ScaleStartDetails (flutter/flutter#165096)
2025-03-27 [email protected] Fix build_android_host_app_with_module_source device lab tests (flutter/flutter#166077)
2025-03-27 [email protected] Roll Skia from 11375a498f6b to b5b6f29d690f (4 revisions) (flutter/flutter#166060)
2025-03-27 [email protected] [Impeller] Move to the new location before rendering a stroke path contour containing only one point (flutter/flutter#165940)
2025-03-27 [email protected] Scale aa lines (flutter/flutter#165917)
2025-03-27 [email protected] Reapply "[ Device Lab ] Upgrade Device Lab projects to Java 18" (#166016) (flutter/flutter#166059)
2025-03-27 [email protected] Roll Fuchsia Linux SDK from iScQOaYHg2aJcF1LX... to djUjSTaAtl0ETQSBR... (flutter/flutter#166055)
2025-03-27 [email protected] Roll Skia from 67a236832d64 to 11375a498f6b (2 revisions) (flutter/flutter#166046)
2025-03-27 [email protected] [flutter_tool] Handle RPCErrorKind.kConnectionDisposed (flutter/flutter#164299)
...
CodixNinja pushed a commit to CodixNinja/packages that referenced this pull request May 15, 2025
… (#8960)

Manual roll Flutter from 1d954f4e96bd to 05b5e7910544 (225 revisions)

Manual roll requested by [email protected]

flutter/flutter@1d954f4...05b5e79

2025-03-29 [email protected] Roll Dart SDK from bcb7649e965a to b9c35e05feb5 (1 revision) (flutter/flutter#166202)
2025-03-29 [email protected] Roll Dart SDK from a7701559f616 to bcb7649e965a (1 revision) (flutter/flutter#166189)
2025-03-29 [email protected] Roll Dart SDK from 30ea8c4e622f to a7701559f616 (1 revision) (flutter/flutter#166185)
2025-03-29 [email protected] [fuchsia][sysmem2] switch to sysmem2 tokens (flutter/flutter#166120)
2025-03-29 [email protected] Roll Dart SDK from 65fe9906a916 to 30ea8c4e622f (2 revisions) (flutter/flutter#166181)
2025-03-29 [email protected] move around shaders in vertices uber 1/2 (flutter/flutter#166180)
2025-03-29 [email protected] [Impeller] optimize drawImageRect with blend and matrix color filter. (flutter/flutter#165998)
2025-03-28 [email protected] Add drawRSuperellipse support to mock_canvas. (flutter/flutter#165744)
2025-03-28 [email protected] Started clamping scaled antialias lines size (flutter/flutter#166149)
2025-03-28 [email protected] Roll Dart SDK from 4494ffead9af to 65fe9906a916 (7 revisions) (flutter/flutter#166162)
2025-03-28 [email protected] Remove bringup flag for customer tests (flutter/flutter#166161)
2025-03-28 [email protected] Add the ios-reviewers review team (flutter/flutter#166034)
2025-03-28 [email protected] [impeller] refactored LineContents to make it more testable, added tests (flutter/flutter#166035)
2025-03-28 [email protected] [Widget Inspector] Jump to source code of implementation widgets from Flutter Inspector (flutter/flutter#165924)
2025-03-28 [email protected] Make sure `LayoutBuilder` rebuild in an inactive route (flutter/flutter#154681)
2025-03-28 [email protected] [Impeller] allow newer powervr gpu to use Vulkan. (flutter/flutter#165520)
2025-03-28 [email protected] [web] Remove package:js in favor of dart:js_interop (flutter/flutter#165324)
2025-03-28 [email protected] [ Widget Previews ] Default to using Flutter Web for the widget preview environment (flutter/flutter#166091)
2025-03-28 [email protected] Mark Linux coverage as bringup (flutter/flutter#166144)
2025-03-28 [email protected] Roll Fuchsia Linux SDK from djUjSTaAtl0ETQSBR... to v7PGvypiiWLO8PbsZ... (flutter/flutter#166136)
2025-03-28 [email protected] [Impeller] split vertices uber into 2 shaders. (flutter/flutter#165938)
2025-03-28 [email protected] [flutter_tools] Fix VS Code package.json path on macOS with case-sensitive file system (flutter/flutter#163409)
2025-03-28 [email protected] Delete some verbose vm service logging (flutter/flutter#162709)
2025-03-28 [email protected] Get analytics welcome message under test (flutter/flutter#162627)
2025-03-28 [email protected] [ios][pv]fully revert the UIScreen.main deprecated API change (flutter/flutter#166080)
2025-03-28 [email protected] Roll Skia from b5b6f29d690f to 10f4cf9a817d (8 revisions) (flutter/flutter#166111)
2025-03-28 [email protected] [CI] remove check for exact golden files. (flutter/flutter#166031)
2025-03-28 [email protected] Move OpenGL context management to FlOpenGLManager (flutter/flutter#166025)
2025-03-27 [email protected] [android] only release background image readers on Android 14. (flutter/flutter#165942)
2025-03-27 [email protected] Refactor: Migrate Date picker from MaterialState and MaterialStateProperty (flutter/flutter#164972)
2025-03-27 [email protected] Mark Linux customer tests as flaky (flutter/flutter#166103)
2025-03-27 [email protected] Move app link settings task configuration to kotlin (flutter/flutter#165819)
2025-03-27 [email protected] Make iOS Flutter framework extension-safe (flutter/flutter#165346)
2025-03-27 [email protected] [ Widget Preview ] Display an error widget when an exception is thrown while defining the widget tree (flutter/flutter#166005)
2025-03-27 [email protected] Removed not working hyperlinks to ScriptCategory values (flutter/flutter#165395)
2025-03-27 [email protected] add PointerDeviceKind to ScaleStartDetails (flutter/flutter#165096)
2025-03-27 [email protected] Fix build_android_host_app_with_module_source device lab tests (flutter/flutter#166077)
2025-03-27 [email protected] Roll Skia from 11375a498f6b to b5b6f29d690f (4 revisions) (flutter/flutter#166060)
2025-03-27 [email protected] [Impeller] Move to the new location before rendering a stroke path contour containing only one point (flutter/flutter#165940)
2025-03-27 [email protected] Scale aa lines (flutter/flutter#165917)
2025-03-27 [email protected] Reapply "[ Device Lab ] Upgrade Device Lab projects to Java 18" (#166016) (flutter/flutter#166059)
2025-03-27 [email protected] Roll Fuchsia Linux SDK from iScQOaYHg2aJcF1LX... to djUjSTaAtl0ETQSBR... (flutter/flutter#166055)
2025-03-27 [email protected] Roll Skia from 67a236832d64 to 11375a498f6b (2 revisions) (flutter/flutter#166046)
2025-03-27 [email protected] [flutter_tool] Handle RPCErrorKind.kConnectionDisposed (flutter/flutter#164299)
...
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 21, 2025
androidseb pushed a commit to androidseb/packages that referenced this pull request Jun 8, 2025
…8960)

Manual roll Flutter from 1d954f4 to 05b5e79 (225 revisions)

Manual roll requested by [email protected]

flutter/flutter@1d954f4...05b5e79

2025-03-29 [email protected] Roll Dart SDK from bcb7649e965a to b9c35e05feb5 (1 revision) (flutter/flutter#166202)
2025-03-29 [email protected] Roll Dart SDK from a7701559f616 to bcb7649e965a (1 revision) (flutter/flutter#166189)
2025-03-29 [email protected] Roll Dart SDK from 30ea8c4e622f to a7701559f616 (1 revision) (flutter/flutter#166185)
2025-03-29 [email protected] [fuchsia][sysmem2] switch to sysmem2 tokens (flutter/flutter#166120)
2025-03-29 [email protected] Roll Dart SDK from 65fe9906a916 to 30ea8c4e622f (2 revisions) (flutter/flutter#166181)
2025-03-29 [email protected] move around shaders in vertices uber 1/2 (flutter/flutter#166180)
2025-03-29 [email protected] [Impeller] optimize drawImageRect with blend and matrix color filter. (flutter/flutter#165998)
2025-03-28 [email protected] Add drawRSuperellipse support to mock_canvas. (flutter/flutter#165744)
2025-03-28 [email protected] Started clamping scaled antialias lines size (flutter/flutter#166149)
2025-03-28 [email protected] Roll Dart SDK from 4494ffead9af to 65fe9906a916 (7 revisions) (flutter/flutter#166162)
2025-03-28 [email protected] Remove bringup flag for customer tests (flutter/flutter#166161)
2025-03-28 [email protected] Add the ios-reviewers review team (flutter/flutter#166034)
2025-03-28 [email protected] [impeller] refactored LineContents to make it more testable, added tests (flutter/flutter#166035)
2025-03-28 [email protected] [Widget Inspector] Jump to source code of implementation widgets from Flutter Inspector (flutter/flutter#165924)
2025-03-28 [email protected] Make sure `LayoutBuilder` rebuild in an inactive route (flutter/flutter#154681)
2025-03-28 [email protected] [Impeller] allow newer powervr gpu to use Vulkan. (flutter/flutter#165520)
2025-03-28 [email protected] [web] Remove package:js in favor of dart:js_interop (flutter/flutter#165324)
2025-03-28 [email protected] [ Widget Previews ] Default to using Flutter Web for the widget preview environment (flutter/flutter#166091)
2025-03-28 [email protected] Mark Linux coverage as bringup (flutter/flutter#166144)
2025-03-28 [email protected] Roll Fuchsia Linux SDK from djUjSTaAtl0ETQSBR... to v7PGvypiiWLO8PbsZ... (flutter/flutter#166136)
2025-03-28 [email protected] [Impeller] split vertices uber into 2 shaders. (flutter/flutter#165938)
2025-03-28 [email protected] [flutter_tools] Fix VS Code package.json path on macOS with case-sensitive file system (flutter/flutter#163409)
2025-03-28 [email protected] Delete some verbose vm service logging (flutter/flutter#162709)
2025-03-28 [email protected] Get analytics welcome message under test (flutter/flutter#162627)
2025-03-28 [email protected] [ios][pv]fully revert the UIScreen.main deprecated API change (flutter/flutter#166080)
2025-03-28 [email protected] Roll Skia from b5b6f29d690f to 10f4cf9a817d (8 revisions) (flutter/flutter#166111)
2025-03-28 [email protected] [CI] remove check for exact golden files. (flutter/flutter#166031)
2025-03-28 [email protected] Move OpenGL context management to FlOpenGLManager (flutter/flutter#166025)
2025-03-27 [email protected] [android] only release background image readers on Android 14. (flutter/flutter#165942)
2025-03-27 [email protected] Refactor: Migrate Date picker from MaterialState and MaterialStateProperty (flutter/flutter#164972)
2025-03-27 [email protected] Mark Linux customer tests as flaky (flutter/flutter#166103)
2025-03-27 [email protected] Move app link settings task configuration to kotlin (flutter/flutter#165819)
2025-03-27 [email protected] Make iOS Flutter framework extension-safe (flutter/flutter#165346)
2025-03-27 [email protected] [ Widget Preview ] Display an error widget when an exception is thrown while defining the widget tree (flutter/flutter#166005)
2025-03-27 [email protected] Removed not working hyperlinks to ScriptCategory values (flutter/flutter#165395)
2025-03-27 [email protected] add PointerDeviceKind to ScaleStartDetails (flutter/flutter#165096)
2025-03-27 [email protected] Fix build_android_host_app_with_module_source device lab tests (flutter/flutter#166077)
2025-03-27 [email protected] Roll Skia from 11375a498f6b to b5b6f29d690f (4 revisions) (flutter/flutter#166060)
2025-03-27 [email protected] [Impeller] Move to the new location before rendering a stroke path contour containing only one point (flutter/flutter#165940)
2025-03-27 [email protected] Scale aa lines (flutter/flutter#165917)
2025-03-27 [email protected] Reapply "[ Device Lab ] Upgrade Device Lab projects to Java 18" (#166016) (flutter/flutter#166059)
2025-03-27 [email protected] Roll Fuchsia Linux SDK from iScQOaYHg2aJcF1LX... to djUjSTaAtl0ETQSBR... (flutter/flutter#166055)
2025-03-27 [email protected] Roll Skia from 67a236832d64 to 11375a498f6b (2 revisions) (flutter/flutter#166046)
2025-03-27 [email protected] [flutter_tool] Handle RPCErrorKind.kConnectionDisposed (flutter/flutter#164299)
...
zhangyuang pushed a commit to zhangyuang/flutter-fork that referenced this pull request Jun 9, 2025
Prompted by flutter#154060: widgets
should always rebuild even when off-screen. The ancestor widget could be
trying to pass down information that is not related to the UI state, or
trying to pause video playback. Widgets with global keys should also
always rebuild to make sure the widget tree is consistent in terms of
global keys.

~Also prevents unnecessary repaints:
flutter#106306 (comment)

This works by adding `_RenderLayoutBuilder` as a relayout boundary in
the dirtly layout list so the layout callback always gets a chance to
run if marked dirty.

## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
FMorschel pushed a commit to FMorschel/packages that referenced this pull request Jun 9, 2025
…8960)

Manual roll Flutter from 1d954f4 to 05b5e79 (225 revisions)

Manual roll requested by [email protected]

flutter/flutter@1d954f4...05b5e79

2025-03-29 [email protected] Roll Dart SDK from bcb7649e965a to b9c35e05feb5 (1 revision) (flutter/flutter#166202)
2025-03-29 [email protected] Roll Dart SDK from a7701559f616 to bcb7649e965a (1 revision) (flutter/flutter#166189)
2025-03-29 [email protected] Roll Dart SDK from 30ea8c4e622f to a7701559f616 (1 revision) (flutter/flutter#166185)
2025-03-29 [email protected] [fuchsia][sysmem2] switch to sysmem2 tokens (flutter/flutter#166120)
2025-03-29 [email protected] Roll Dart SDK from 65fe9906a916 to 30ea8c4e622f (2 revisions) (flutter/flutter#166181)
2025-03-29 [email protected] move around shaders in vertices uber 1/2 (flutter/flutter#166180)
2025-03-29 [email protected] [Impeller] optimize drawImageRect with blend and matrix color filter. (flutter/flutter#165998)
2025-03-28 [email protected] Add drawRSuperellipse support to mock_canvas. (flutter/flutter#165744)
2025-03-28 [email protected] Started clamping scaled antialias lines size (flutter/flutter#166149)
2025-03-28 [email protected] Roll Dart SDK from 4494ffead9af to 65fe9906a916 (7 revisions) (flutter/flutter#166162)
2025-03-28 [email protected] Remove bringup flag for customer tests (flutter/flutter#166161)
2025-03-28 [email protected] Add the ios-reviewers review team (flutter/flutter#166034)
2025-03-28 [email protected] [impeller] refactored LineContents to make it more testable, added tests (flutter/flutter#166035)
2025-03-28 [email protected] [Widget Inspector] Jump to source code of implementation widgets from Flutter Inspector (flutter/flutter#165924)
2025-03-28 [email protected] Make sure `LayoutBuilder` rebuild in an inactive route (flutter/flutter#154681)
2025-03-28 [email protected] [Impeller] allow newer powervr gpu to use Vulkan. (flutter/flutter#165520)
2025-03-28 [email protected] [web] Remove package:js in favor of dart:js_interop (flutter/flutter#165324)
2025-03-28 [email protected] [ Widget Previews ] Default to using Flutter Web for the widget preview environment (flutter/flutter#166091)
2025-03-28 [email protected] Mark Linux coverage as bringup (flutter/flutter#166144)
2025-03-28 [email protected] Roll Fuchsia Linux SDK from djUjSTaAtl0ETQSBR... to v7PGvypiiWLO8PbsZ... (flutter/flutter#166136)
2025-03-28 [email protected] [Impeller] split vertices uber into 2 shaders. (flutter/flutter#165938)
2025-03-28 [email protected] [flutter_tools] Fix VS Code package.json path on macOS with case-sensitive file system (flutter/flutter#163409)
2025-03-28 [email protected] Delete some verbose vm service logging (flutter/flutter#162709)
2025-03-28 [email protected] Get analytics welcome message under test (flutter/flutter#162627)
2025-03-28 [email protected] [ios][pv]fully revert the UIScreen.main deprecated API change (flutter/flutter#166080)
2025-03-28 [email protected] Roll Skia from b5b6f29d690f to 10f4cf9a817d (8 revisions) (flutter/flutter#166111)
2025-03-28 [email protected] [CI] remove check for exact golden files. (flutter/flutter#166031)
2025-03-28 [email protected] Move OpenGL context management to FlOpenGLManager (flutter/flutter#166025)
2025-03-27 [email protected] [android] only release background image readers on Android 14. (flutter/flutter#165942)
2025-03-27 [email protected] Refactor: Migrate Date picker from MaterialState and MaterialStateProperty (flutter/flutter#164972)
2025-03-27 [email protected] Mark Linux customer tests as flaky (flutter/flutter#166103)
2025-03-27 [email protected] Move app link settings task configuration to kotlin (flutter/flutter#165819)
2025-03-27 [email protected] Make iOS Flutter framework extension-safe (flutter/flutter#165346)
2025-03-27 [email protected] [ Widget Preview ] Display an error widget when an exception is thrown while defining the widget tree (flutter/flutter#166005)
2025-03-27 [email protected] Removed not working hyperlinks to ScriptCategory values (flutter/flutter#165395)
2025-03-27 [email protected] add PointerDeviceKind to ScaleStartDetails (flutter/flutter#165096)
2025-03-27 [email protected] Fix build_android_host_app_with_module_source device lab tests (flutter/flutter#166077)
2025-03-27 [email protected] Roll Skia from 11375a498f6b to b5b6f29d690f (4 revisions) (flutter/flutter#166060)
2025-03-27 [email protected] [Impeller] Move to the new location before rendering a stroke path contour containing only one point (flutter/flutter#165940)
2025-03-27 [email protected] Scale aa lines (flutter/flutter#165917)
2025-03-27 [email protected] Reapply "[ Device Lab ] Upgrade Device Lab projects to Java 18" (#166016) (flutter/flutter#166059)
2025-03-27 [email protected] Roll Fuchsia Linux SDK from iScQOaYHg2aJcF1LX... to djUjSTaAtl0ETQSBR... (flutter/flutter#166055)
2025-03-27 [email protected] Roll Skia from 67a236832d64 to 11375a498f6b (2 revisions) (flutter/flutter#166046)
2025-03-27 [email protected] [flutter_tool] Handle RPCErrorKind.kConnectionDisposed (flutter/flutter#164299)
...
romanejaquez pushed a commit to romanejaquez/flutter that referenced this pull request Aug 14, 2025
Prompted by flutter#154060: widgets
should always rebuild even when off-screen. The ancestor widget could be
trying to pass down information that is not related to the UI state, or
trying to pause video playback. Widgets with global keys should also
always rebuild to make sure the widget tree is consistent in terms of
global keys.

~Also prevents unnecessary repaints:
flutter#106306 (comment)

This works by adding `_RenderLayoutBuilder` as a relayout boundary in
the dirtly layout list so the layout callback always gets a chance to
run if marked dirty.

## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants