Remove unnecessary (and the only) RenderObject.markParentNeedsLayout
override (#144466)
Nobody calls it except for `markNeedsLayout`, and the render object is a guaranteed relayout boundary.
This commit is contained in:
parent
16d122dbe2
commit
de0ccf39c6
@ -2188,8 +2188,8 @@ class _DeferredLayout extends SingleChildRenderObjectWidget {
|
|||||||
//
|
//
|
||||||
// This `RenderObject` must be a child of a `_RenderTheater`. It guarantees that:
|
// This `RenderObject` must be a child of a `_RenderTheater`. It guarantees that:
|
||||||
//
|
//
|
||||||
// 1. It's a relayout boundary, and `markParentNeedsLayout` is overridden such
|
// 1. It's a relayout boundary, so calling `markNeedsLayout` on it never dirties
|
||||||
// that it never dirties its `_RenderTheater`.
|
// its `_RenderTheater`.
|
||||||
//
|
//
|
||||||
// 2. Its `layout` implementation is overridden such that `performLayout` does
|
// 2. Its `layout` implementation is overridden such that `performLayout` does
|
||||||
// not do anything when its called from `layout`, preventing the parent
|
// not do anything when its called from `layout`, preventing the parent
|
||||||
@ -2231,19 +2231,6 @@ final class _RenderDeferredLayoutBox extends RenderProxyBox with _RenderTheaterM
|
|||||||
super.redepthChildren();
|
super.redepthChildren();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool _callingMarkParentNeedsLayout = false;
|
|
||||||
@override
|
|
||||||
void markParentNeedsLayout() {
|
|
||||||
// No re-entrant calls.
|
|
||||||
if (_callingMarkParentNeedsLayout) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
_callingMarkParentNeedsLayout = true;
|
|
||||||
markNeedsLayout();
|
|
||||||
_layoutSurrogate.markNeedsLayout();
|
|
||||||
_callingMarkParentNeedsLayout = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool get sizedByParent => true;
|
bool get sizedByParent => true;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user