Skip to content

Commit e938d62

Browse files
committedJan 25, 2021
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
1 parent 093704d commit e938d62

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+245
-168
lines changed
 

‎layout/forms/nsCheckboxRadioFrame.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,17 @@ nscoord nsCheckboxRadioFrame::GetPrefISize(gfxContext* aRenderingContext) {
6767
LogicalSize nsCheckboxRadioFrame::ComputeAutoSize(
6868
gfxContext* aRC, WritingMode aWM, const LogicalSize& aCBSize,
6969
nscoord aAvailableISize, const LogicalSize& aMargin,
70-
const LogicalSize& aBorderPadding, ComputeSizeFlags aFlags) {
70+
const LogicalSize& aBorderPadding, const StyleSizeOverrides& aSizeOverrides,
71+
ComputeSizeFlags aFlags) {
7172
LogicalSize size(aWM, 0, 0);
7273
if (!StyleDisplay()->HasAppearance()) {
7374
return size;
7475
}
7576

7677
// Note: this call always set the BSize to NS_UNCONSTRAINEDSIZE.
7778
size = nsAtomicContainerFrame::ComputeAutoSize(
78-
aRC, aWM, aCBSize, aAvailableISize, aMargin, aBorderPadding, aFlags);
79+
aRC, aWM, aCBSize, aAvailableISize, aMargin, aBorderPadding,
80+
aSizeOverrides, aFlags);
7981
size.BSize(aWM) = DefaultSize();
8082
return size;
8183
}

‎layout/forms/nsCheckboxRadioFrame.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,12 @@ class nsCheckboxRadioFrame final : public nsAtomicContainerFrame,
4848
/**
4949
* Our auto size is just intrinsic width and intrinsic height.
5050
*/
51-
virtual mozilla::LogicalSize ComputeAutoSize(
51+
mozilla::LogicalSize ComputeAutoSize(
5252
gfxContext* aRenderingContext, mozilla::WritingMode aWM,
5353
const mozilla::LogicalSize& aCBSize, nscoord aAvailableISize,
5454
const mozilla::LogicalSize& aMargin,
5555
const mozilla::LogicalSize& aBorderPadding,
56+
const mozilla::StyleSizeOverrides& aSizeOverrides,
5657
mozilla::ComputeSizeFlags aFlags) override;
5758

5859
/**

0 commit comments

Comments
 (0)
Failed to load comments.