mirror of
https://github.com/ManchildProductions/UXP-Fixed.git
synced 2026-05-27 18:48:31 +00:00
8ff295747e
List of relevant patches applied: 1398537 part 2 - [css-multicol] Implement percentages for 'column-gap' (Gecko part). 1434478 part 1 - [css-grid] Stop back-computing percentage grid gaps when the percentage basis is indefinite. Treat them as zero sized instead. 1434478 part 2 - Stop back-computing percentage padding/margin when the percentage basis is indefinite. Treat them as zero sized instead. 1434478 part 3 - Remove IntrinsicISizeOffsetData::hPctPadding/hPctMargin members since they are now unused. 1434478 part 4 - Factor out constants like NS_UNCONSTRAINEDSIZE so they can be used in headers without needing nsIFrame.h (idempotent patch). 1434478 part 5 - Create nsLayoutUtils::ResolveToLength for resolving CSS <length-percentage> (idempotent patch). 1434478 part 6 - Propagate a percentage basis to nsIFrame::IntrinsicISizeOffsets for resolving padding/margin. This is needed only for CSS Grid since in other cases we're only using IntrinsicISizeOffsets in the inline-axis and the percentage basis is always indefinite for *intrinsic sizing*. When calculating the intrinsic size of grid items in the grid container's block axis however, we do have a definite size for the grid area in the inline-axis and it should be used per: https://drafts.csswg.org/css-grid/#algo-overview "2. Next, the track sizing algorithm resolves the sizes of the grid rows, using the grid column sizes calculated in the previous step." (Percentage padding/margin for grid items is always resolved against the grid area's inline-size nowadays.)
32 lines
1.0 KiB
C
32 lines
1.0 KiB
C
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
/* constants used throughout the Layout module */
|
|
|
|
#ifndef LayoutConstants_h___
|
|
#define LayoutConstants_h___
|
|
|
|
#include "nsSize.h" // for NS_MAXSIZE
|
|
|
|
/**
|
|
* Constant used to indicate an unconstrained size.
|
|
*/
|
|
#define NS_UNCONSTRAINEDSIZE NS_MAXSIZE
|
|
|
|
// NOTE: There are assumptions all over that these have the same value,
|
|
// namely NS_UNCONSTRAINEDSIZE.
|
|
#define NS_INTRINSICSIZE NS_UNCONSTRAINEDSIZE
|
|
#define NS_AUTOHEIGHT NS_UNCONSTRAINEDSIZE
|
|
#define NS_AUTOOFFSET NS_UNCONSTRAINEDSIZE
|
|
|
|
// +1 is to avoid clamped huge margin values being processed as auto margins
|
|
#define NS_AUTOMARGIN (NS_UNCONSTRAINEDSIZE + 1)
|
|
|
|
#define NS_INTRINSIC_WIDTH_UNKNOWN nscoord_MIN
|
|
|
|
|
|
#endif // LayoutConstants_h___
|