From 6043acc3adfd1bb5a16f1553001622f74c7238fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Tue, 18 Apr 2023 15:24:09 +0000 Subject: [PATCH] Bug 1825709 - Remove DEBUG-only override of nsTextControlFrame::MarkIntrinsicISizesDirty. r=dshin This seems to be here since nsTextControlFrame has a meaningful baseline, but it doesn't make much sense to me: * Baseline is a block axis, not inline axis measurement. * It doesn't call into the base class which seems clearly a bug (though the intrinsic isize of the input is ~fixed, doesn't depend on font metrics, so it's probably ok). My guess is that it was intended to be a debug-only check so that we could detect stale baseline values. Just remove this, and replace it by a non-fatal assert as it's done elsewhere. Differential Revision: https://phabricator.services.mozilla.com/D175745 --- layout/forms/nsTextControlFrame.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/layout/forms/nsTextControlFrame.h b/layout/forms/nsTextControlFrame.h index b74ab98c9ca0..5a76fd64e2a2 100644 --- a/layout/forms/nsTextControlFrame.h +++ b/layout/forms/nsTextControlFrame.h @@ -83,6 +83,7 @@ class nsTextControlFrame : public nsContainerFrame, if (!IsSingleLineTextControl()) { return Nothing{}; } + NS_ASSERTION(!IsSubtreeDirty(), "frame must not be dirty"); return GetSingleLineTextControlBaseline(this, mFirstBaseline, aWM, aBaselineGroup); } @@ -116,13 +117,6 @@ class nsTextControlFrame : public nsContainerFrame, aFlags & ~(nsIFrame::eReplaced | nsIFrame::eReplacedContainsBlock)); } -#ifdef DEBUG - void MarkIntrinsicISizesDirty() override { - // Need another Reflow to have a correct baseline value again. - mFirstBaseline = NS_INTRINSIC_ISIZE_UNKNOWN; - } -#endif - // nsIAnonymousContentCreator nsresult CreateAnonymousContent(nsTArray& aElements) override; void AppendAnonymousContentTo(nsTArray& aElements,