Revert "Issue #3153 - Make sure buttons report a definite size for flex containers."

This reverts commit 3e223cbfb4.
This commit is contained in:
Moonchild committed 2026-07-27 17:59:43 +02:00
1 parent abddee43b4
commit b909fccc92
1 file changed
+1 -13
+1 -13
View File
@@ -234,13 +234,7 @@ nsHTMLButtonControlFrame::ReflowButtonContents(nsPresContext* aPresContext,
{
WritingMode wm = GetWritingMode();
LogicalSize availSize = aButtonReflowInput.ComputedSize(wm);
// Preserve the button's definite BSize so that flex/grid children inside
// see a definite containing block main size. Only clobber to intrinsic
// when the button itself has an indefinite BSize.
if (aButtonReflowInput.ComputedBSize() == NS_INTRINSICSIZE) {
availSize.BSize(wm) = NS_INTRINSICSIZE;
}
availSize.BSize(wm) = NS_INTRINSICSIZE;
// shorthand for a value we need to use in a bunch of places
const LogicalMargin& clbp = aButtonReflowInput.ComputedLogicalBorderPadding();
@@ -254,12 +248,6 @@ nsHTMLButtonControlFrame::ReflowButtonContents(nsPresContext* aPresContext,
aFirstKid,
availSize);
// Also set the computed BSize directly on the inner reflow input so it
// gets used as-is by the anonymous flex container:
if (aButtonReflowInput.ComputedBSize() != NS_INTRINSICSIZE) {
contentsReflowInput.SetComputedBSize(aButtonReflowInput.ComputedBSize());
}
nsReflowStatus contentsReflowStatus;
ReflowOutput contentsDesiredSize(aButtonReflowInput);
childPos.B(wm) = 0; // This will be set properly later, after reflowing the