diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-07-20 09:13:56 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-07-20 09:13:56 +0200 |
commit | 83459c927715bd6d2be1e339ff723b4feb3e5fe7 (patch) | |
tree | 9188193a4a5c4d3591ffee3e5b2bcaedc77e4ea1 /layout/generic/ReflowInput.h | |
parent | b12973bc9aa26f548549306eaec4146bf60d65d5 (diff) | |
download | uxp-83459c927715bd6d2be1e339ff723b4feb3e5fe7.tar.gz |
Bug 958714 Simplify percent-margin/padding resolution code to pass around a single length as the percent basis
Diffstat (limited to 'layout/generic/ReflowInput.h')
-rw-r--r-- | layout/generic/ReflowInput.h | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/layout/generic/ReflowInput.h b/layout/generic/ReflowInput.h index 09c980b728..1d2df6af68 100644 --- a/layout/generic/ReflowInput.h +++ b/layout/generic/ReflowInput.h @@ -245,7 +245,7 @@ public: static void* DisplayInitOffsetsEnter( nsIFrame* aFrame, SizeComputationInput* aState, - const mozilla::LogicalSize& aPercentBasis, + nscoord aPercentBasis, const nsMargin* aBorder, const nsMargin* aPadding); static void DisplayInitOffsetsExit(nsIFrame* aFrame, @@ -260,19 +260,12 @@ private: * * @param aWM Writing mode of the containing block * @param aPercentBasis - * Logical size in the writing mode of the containing block to use - * for resolving percentage margin values in the inline and block - * axes. - * The inline size is usually the containing block inline-size - * (width if writing mode is horizontal, and height if vertical). - * The block size is usually the containing block inline-size, per - * CSS21 sec 8.3 (read in conjunction with CSS Writing Modes sec - * 7.2), but may be the containing block block-size, e.g. in CSS3 - * Flexbox and Grid. + * Inline size of the containing block (in its own writing mode), to use + * for resolving percentage margin values in the inline and block axes. * @return true if the margin is dependent on the containing block size. */ bool ComputeMargin(mozilla::WritingMode aWM, - const mozilla::LogicalSize& aPercentBasis); + nscoord aPercentBasis); /** * Computes padding values from the specified padding style information, and @@ -280,25 +273,18 @@ private: * * @param aWM Writing mode of the containing block * @param aPercentBasis - * Logical size in the writing mode of the containing block to use - * for resolving percentage padding values in the inline and block - * axes. - * The inline size is usually the containing block inline-size - * (width if writing mode is horizontal, and height if vertical). - * The block size is usually the containing block inline-size, per - * CSS21 sec 8.3 (read in conjunction with CSS Writing Modes sec - * 7.2), but may be the containing block block-size, e.g. in CSS3 - * Flexbox and Grid. + * Inline size of the containing block (in its own writing mode), to use + * for resolving percentage padding values in the inline and block axes. * @return true if the padding is dependent on the containing block size. */ bool ComputePadding(mozilla::WritingMode aWM, - const mozilla::LogicalSize& aPercentBasis, + nscoord aPercentBasis, nsIAtom* aFrameType); protected: void InitOffsets(mozilla::WritingMode aWM, - const mozilla::LogicalSize& aPercentBasis, + nscoord aPercentBasis, nsIAtom* aFrameType, ReflowInputFlags aFlags, const nsMargin* aBorder = nullptr, |