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
This commit is contained in:
Emilio Cobos Álvarez 2023-04-18 15:24:09 +00:00
parent 6b96db2587
commit 6043acc3ad

View File

@ -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<ContentInfo>& aElements) override;
void AppendAnonymousContentTo(nsTArray<nsIContent*>& aElements,