mirror of
https://github.com/flutter/flutter
synced 2024-07-16 10:29:14 +00:00
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:
|
||||
//
|
||||
// 1. It's a relayout boundary, and `markParentNeedsLayout` is overridden such
|
||||
// that it never dirties its `_RenderTheater`.
|
||||
// 1. It's a relayout boundary, so calling `markNeedsLayout` on it never dirties
|
||||
// its `_RenderTheater`.
|
||||
//
|
||||
// 2. Its `layout` implementation is overridden such that `performLayout` does
|
||||
// not do anything when its called from `layout`, preventing the parent
|
||||
|
@ -2231,19 +2231,6 @@ final class _RenderDeferredLayoutBox extends RenderProxyBox with _RenderTheaterM
|
|||
super.redepthChildren();
|
||||
}
|
||||
|
||||
bool _callingMarkParentNeedsLayout = false;
|
||||
@override
|
||||
void markParentNeedsLayout() {
|
||||
// No re-entrant calls.
|
||||
if (_callingMarkParentNeedsLayout) {
|
||||
return;
|
||||
}
|
||||
_callingMarkParentNeedsLayout = true;
|
||||
markNeedsLayout();
|
||||
_layoutSurrogate.markNeedsLayout();
|
||||
_callingMarkParentNeedsLayout = false;
|
||||
}
|
||||
|
||||
@override
|
||||
bool get sizedByParent => true;
|
||||
|
||||
|
|
Loading…
Reference in a new issue