8000 _markNeedsClip() when clipper type has changed. by amirh · Pull Request #18248 · flutter/flutter · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

_markNeedsClip() when clipper type has changed. #18248

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

Merged
merged 2 commits into from
Jun 6, 2018

Conversation

amirh
Copy link
Contributor
@amirh amirh commented Jun 6, 2018

A bug in _RenderCustomClip was compaeing the type of oldClipper to
itself instead to the type of newClipper.

This was the root cause for the crash #14937 worked around.
This also reverts the workaround introduced in #14937.

A bug in _RenderCustomClip was compaeing the type of oldClipper to
itself instead to the type of newClipper.

This was the root cause for the crash flutter#14937 worked around.
This also reverts the workaround introduced in flutter#14937.
@@ -155,9 +155,6 @@ class _BottomAppBarClipper extends CustomClipper<Path> {

@override
bool shouldReclip(CustomClipper<Path> oldClipper) {
Copy link
Contributor

Choose a reason for hiding this comment

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

you can make the argument type _BottomAppBarClipper here, I believe the superclass explicitly makes it covariant.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -155,9 +155,6 @@ class _BottomAppBarClipper extends CustomClipper<Path> {

@override
bool shouldReclip(CustomClipper<Path> oldClipper) {
if (oldClipper.runtimeType != _BottomAppBarClipper)
return true;

final _BottomAppBarClipper typedOldClipper = oldClipper;
Copy link
Contributor

Choose a reason for hiding this comment

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

that would also let you get rid of this line, and could indeed turn the whole method into a one-liner.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@Hixie
Copy link
Contributor
Hixie commented Jun 6, 2018

LGTM

test?

@amirh
Copy link
Contributor Author
amirh commented Jun 6, 2018

'toggle has notch' in bottom_app_bar_test is covering the bug

@amirh amirh merged commit 0a26ac0 into flutter:master Jun 6, 2018
@amirh amirh deleted the rendercustomclip_bugfix branch June 6, 2018 22:28
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0