-
Notifications
You must be signed in to change notification settings - Fork 6k
Makes scrollable to use main screen if the flutter view is not attached #28110
Conversation
|
This sounds plausible. I'd add comments to the early outs in those methods. Also, it seems like you have an internal partner that is able to test fixes for you and has reproduction steps. I didn't see where they said this will fix there issues, did you have them try it out? |
e106bb6 to
b0023c3
Compare
|
@gaaclarke The root cause the the screen scale, I update this pr to include the real fix, I keep the hidden logic here as well because i think it is probably the right thing to do anyway |
| UIScreen* screen = [[[reference bridge]->view() window] screen]; | ||
| // Screen can be nil if the FlutterView is covered by another native view. | ||
| CGFloat scale = screen == nil ? 1 : screen.scale; |
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.
Nice catch! I'd say if you can't get the screen I'd use [UIScreen mainScreen] instead of using 1.
| if ([_semanticsObject node].HasFlag(flutter::SemanticsFlags::kIsHidden)) { | ||
| return CGSizeZero; | ||
| } |
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.
Do we still want to do this then if we don't think this was the actual problem?
| CGPointMake(0, scrollPosition * effectivelyScale))); | ||
| } | ||
|
|
||
| - (void)testVerticalFlutterScrollableSemanticsObjectNoWindow { |
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.
lgtm
gaaclarke
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.
LGTM
4de4a26 to
022e216
Compare
…t attached to a screen (flutter/engine#28110)
…t attached to a screen (flutter/engine#28110) (#88488)
…t attached to a screen (flutter/engine#28110) (flutter#88488)
) * 'Update Dart SDK to aa7d19d' * [web] Don't reset history on hot restart (#27872) * Makes scrollable to use main screen if the flutter view is not attached to a screen (#28110) * Fix regression in system UI colors (#28206) * update licenses golden Co-authored-by: Mouad Debbar <mouad.debbar@gmail.com> Co-authored-by: chunhtai <47866232+chunhtai@users.noreply.github.com> Co-authored-by: Kate Lovett <katelovett@google.com>
…tter#28415) * 'Update Dart SDK to aa7d19d' * [web] Don't reset history on hot restart (flutter#27872) * Makes scrollable to use main screen if the flutter view is not attached to a screen (flutter#28110) * Fix regression in system UI colors (flutter#28206) * update licenses golden Co-authored-by: Mouad Debbar <mouad.debbar@gmail.com> Co-authored-by: chunhtai <47866232+chunhtai@users.noreply.github.com> Co-authored-by: Kate Lovett <katelovett@google.com>
fix b/194026347
The screen can be nil if the flutterview is covered by another view which causes the scale to be 0. This pr fixes it
Pre-launch Checklist
writing and running engine tests.
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.