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:
LongCatIsLooong 2024-03-04 13:58:17 -08:00 committed by GitHub
parent 16d122dbe2
commit de0ccf39c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;