Bug 1686603 Part 2 - Add StyleSizeOverrides parameter to ReflowInput's constructor & co. to override data from style system data. r=dholbert
This patch adds the struct as a parameter to various functions. The struct is cached in ReflowInput so that we don't need to pass it down to the internal method where nsIFrame::ComputeSize() is called. In the subsequent patches, we'll use it to revise the implementation of flex container's flex base size resolution, and size overrides. Differential Revision: https://phabricator.services.mozilla.com/D101793
This commit is contained in:
@@ -560,7 +560,8 @@ nscoord nsTextControlFrame::GetMinISize(gfxContext* aRenderingContext) {
|
||||
LogicalSize nsTextControlFrame::ComputeAutoSize(
|
||||
gfxContext* aRenderingContext, WritingMode aWM, const LogicalSize& aCBSize,
|
||||
nscoord aAvailableISize, const LogicalSize& aMargin,
|
||||
const LogicalSize& aBorderPadding, ComputeSizeFlags aFlags) {
|
||||
const LogicalSize& aBorderPadding, const StyleSizeOverrides& aSizeOverrides,
|
||||
ComputeSizeFlags aFlags) {
|
||||
float inflation = nsLayoutUtils::FontSizeInflationFor(this);
|
||||
LogicalSize autoSize = CalcIntrinsicSize(aRenderingContext, aWM, inflation);
|
||||
|
||||
@@ -573,16 +574,16 @@ LogicalSize nsTextControlFrame::ComputeAutoSize(
|
||||
// fall back to nsContainerFrame's ComputeAutoSize to handle that.
|
||||
// XXX maybe a font-inflation issue here? (per the assertion below).
|
||||
autoSize.ISize(aWM) =
|
||||
nsContainerFrame::ComputeAutoSize(aRenderingContext, aWM, aCBSize,
|
||||
aAvailableISize, aMargin,
|
||||
aBorderPadding, aFlags)
|
||||
nsContainerFrame::ComputeAutoSize(
|
||||
aRenderingContext, aWM, aCBSize, aAvailableISize, aMargin,
|
||||
aBorderPadding, aSizeOverrides, aFlags)
|
||||
.ISize(aWM);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else {
|
||||
LogicalSize ancestorAutoSize = nsContainerFrame::ComputeAutoSize(
|
||||
aRenderingContext, aWM, aCBSize, aAvailableISize, aMargin,
|
||||
aBorderPadding, aFlags);
|
||||
aBorderPadding, aSizeOverrides, aFlags);
|
||||
// Disabled when there's inflation; see comment in GetXULPrefSize.
|
||||
MOZ_ASSERT(inflation != 1.0f ||
|
||||
ancestorAutoSize.ISize(aWM) == autoSize.ISize(aWM),
|
||||
|
||||
Reference in New Issue
Block a user