mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-16 20:27:31 +09:00
Bug 958714 Simplify percent-margin/padding resolution code to pass around a single length as the percent basis
This commit is contained in:
parent
a99820e3ab
commit
661e649fe5
4 changed files with 30 additions and 66 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue