-
Notifications
You must be signed in to change notification settings - Fork 29.7k
OverlayPortal.overlayChild contributes semantics to OverlayPortal instead of Overlay
#134921
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
OverlayPortal.overlayChild contributes semantics to OverlayPortal instead of Overlay
#134921
Conversation
OverlayPortal.overlayChild contributes semantics to OverlayPortal instead of Overlay/OverlayPortal.overlayChild contributes semantics to OverlayPortal instead of Overlay
951f09a to
7279a5d
Compare
|
Looks like google testing is unhappy. |
|
Looks like an infra thing I'll squash the commits. |
709d8c2 to
546ccb0
Compare
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.
semanticsParent/semanticsChild are confusing names. maybe something like parentWithInterestingFragment or childWithInterestingFragment
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.
I think even if a render object generated a ContainerFragment it is still going to be in this list.
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.
what about parentInSemanticsFragmentOrder and childInSemanticsFragmentOrder
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.
renamed to parent/childFragmentOwner
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.
It took me awhile to understand this only traverse child added from overlayportal. Can you add some doc to visitChildrenOfOverlayEntry or maybe rename it to something like visitOverlayPortalChildren?
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.
I thought it would still come to this case if there are rendering object that creates _ContainerSemanticsFragment inbetween semanticsChild and semanticsParent ?
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.
I ran existing tests with a print statement and it seems that isn't happening in tests. In _getSemanticsForParent, every fragment in the sibling merge/merge up groups calls addAncestor(this).
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.
what happen if this loop past semanticsParent?
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.
At least in the case of OverlayPortal, the final ancestor will be an ancestor of semanticsParent. Unfortunately we don't cache the clipping results from semanticsParent and semanticsChild's common ancestor so we can't utilize the previously computed clipping rects.
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.
yes I understood the logic now, makes sense
69bfcbd to
d8352f1
Compare
chunhtai
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, thanks for fixing this!
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.
nits: format
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.
yes I understood the logic now, makes sense
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.
what about parentInSemanticsFragmentOrder and childInSemanticsFragmentOrder
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.
| // A convenience method for accessing `paintOrderIterator` using a | |
| // A convenience method for accessing `paintOrderIterator` with a |
|
Added a |
455813a to
e3b7e19
Compare
|
Hi @gspencergoog does the semantics tree change in menu_anchor_tests.dart make sense to you?
|
|
Honestly, I don't see any difference in those two trees. |
Oops sorry copied the wrong tree. Updated the comment. |
|
Okay, if I understand that correctly, it sounds OK to me. |
… instead of `Overlay`
d8ce12e to
c59fe2c
Compare
…yPortal` instead of `Overlay` (flutter/flutter#134921)
flutter/flutter@823e083...5e8b5f4 2023-10-23 [email protected] Update `ColorScheme.fromSwatch` docs for Material 3 (flutter/flutter#136816) 2023-10-23 [email protected] Reland "Fixes ability to call nextFocus() on a node to focus its desc� (flutter/flutter#136898) 2023-10-23 [email protected] `OverlayPortal.overlayChild` contributes semantics to `OverlayPortal` instead of `Overlay` (flutter/flutter#134921) 2023-10-23 [email protected] Roll Packages from be915be to 4bf5114 (12 revisions) (flutter/flutter#137062) 2023-10-23 [email protected] Roll Flutter Engine from 8820a419c800 to 1dc66e8f2fba (1 revision) (flutter/flutter#137055) 2023-10-23 [email protected] Roll Flutter Engine from e2abdeb650f8 to 8820a419c800 (1 revision) (flutter/flutter#137051) 2023-10-23 [email protected] Roll Flutter Engine from 39f78ce1884d to e2abdeb650f8 (1 revision) (flutter/flutter#137050) 2023-10-23 [email protected] Roll Flutter Engine from 4899344c34d9 to 39f78ce1884d (1 revision) (flutter/flutter#137048) 2023-10-23 [email protected] Roll Flutter Engine from 9d05b061e245 to 4899344c34d9 (1 revision) (flutter/flutter#137046) 2023-10-23 [email protected] Roll Flutter Engine from cde34b8182b1 to 9d05b061e245 (1 revision) (flutter/flutter#137044) 2023-10-22 [email protected] Add timeline events for post frame callbacks (flutter/flutter#136435) 2023-10-22 [email protected] Roll Flutter Engine from b8d702c0e0d7 to cde34b8182b1 (1 revision) (flutter/flutter#137038) 2023-10-22 [email protected] Roll Flutter Engine from f3c7a50bc83f to b8d702c0e0d7 (1 revision) (flutter/flutter#137035) 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
Breaking change announcement for flutter/flutter#134921 --------- Co-authored-by: Parker Lougheed <[email protected]>
Fixes #134456
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.