Unverified Commit 0a26ac09 authored by amirh's avatar amirh Committed by GitHub

_markNeedsClip() when clipper type has changed. (#18248)

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.
parent fc5d44d7
...@@ -154,11 +154,5 @@ class _BottomAppBarClipper extends CustomClipper<Path> { ...@@ -154,11 +154,5 @@ class _BottomAppBarClipper extends CustomClipper<Path> {
} }
@override @override
bool shouldReclip(CustomClipper<Path> oldClipper) { bool shouldReclip(_BottomAppBarClipper oldClipper) => oldClipper.geometry != geometry;
if (oldClipper.runtimeType != _BottomAppBarClipper)
return true;
final _BottomAppBarClipper typedOldClipper = oldClipper;
return typedOldClipper.geometry != geometry;
}
} }
...@@ -1106,7 +1106,7 @@ abstract class _RenderCustomClip<T> extends RenderProxyBox { ...@@ -1106,7 +1106,7 @@ abstract class _RenderCustomClip<T> extends RenderProxyBox {
_clipper = newClipper; _clipper = newClipper;
assert(newClipper != null || oldClipper != null); assert(newClipper != null || oldClipper != null);
if (newClipper == null || oldClipper == null || if (newClipper == null || oldClipper == null ||
oldClipper.runtimeType != oldClipper.runtimeType || newClipper.runtimeType != oldClipper.runtimeType ||
newClipper.shouldReclip(oldClipper)) { newClipper.shouldReclip(oldClipper)) {
_markNeedsClip(); _markNeedsClip();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment