Bug 1238846 (part 1) - Remove some dead code in nsLayoutUtils. r=mattwoodrow.

This commit is contained in:
Nicholas Nethercote 2016-01-12 13:42:01 -08:00
parent af4ba44646
commit 8196b4fc3a

View File

@ -1400,40 +1400,6 @@ public:
static nscoord ComputeCBDependentValue(nscoord aPercentBasis,
const nsStyleCoord& aCoord);
/*
* Convert nsStyleCoord to nscoord when percentages depend on the
* containing block width, and enumerated values are for width,
* min-width, or max-width. Returns the content-box width value based
* on aContentEdgeToBoxSizing and aBoxSizingToMarginEdge (which are
* also used for the enumerated values for width. This function does
* not handle 'auto'. It ensures that the result is nonnegative.
*
* @param aRenderingContext Rendering context for font measurement/metrics.
* @param aFrame Frame whose (min-/max-/)width is being computed.
* @param aContainingBlockWidth Width of aFrame's containing block.
* @param aContentEdgeToBoxSizing The sum of any left/right padding and
* border that goes inside the rect chosen by box-sizing.
* @param aBoxSizingToMarginEdge The sum of any left/right padding, border,
* and margin that goes outside the rect chosen by box-sizing.
* @param aCoord The width value to compute.
*/
// XXX to be removed
static nscoord ComputeWidthValue(
nsRenderingContext* aRenderingContext,
nsIFrame* aFrame,
nscoord aContainingBlockWidth,
nscoord aContentEdgeToBoxSizing,
nscoord aBoxSizingToMarginEdge,
const nsStyleCoord& aCoord)
{
return ComputeISizeValue(aRenderingContext,
aFrame,
aContainingBlockWidth,
aContentEdgeToBoxSizing,
aBoxSizingToMarginEdge,
aCoord);
}
static nscoord ComputeISizeValue(
nsRenderingContext* aRenderingContext,
nsIFrame* aFrame,
@ -1442,35 +1408,10 @@ public:
nscoord aBoxSizingToMarginEdge,
const nsStyleCoord& aCoord);
/*
* Convert nsStyleCoord to nscoord when percentages depend on the
* containing block height.
*/
// XXX to be removed
static nscoord ComputeHeightDependentValue(
nscoord aContainingBlockHeight,
const nsStyleCoord& aCoord)
{
return ComputeBSizeDependentValue(aContainingBlockHeight, aCoord);
}
static nscoord ComputeBSizeDependentValue(
nscoord aContainingBlockBSize,
const nsStyleCoord& aCoord);
/*
* Likewise, but for 'height', 'min-height', or 'max-height'.
*/
// XXX to be removed
static nscoord ComputeHeightValue(nscoord aContainingBlockHeight,
nscoord aContentEdgeToBoxSizingBoxEdge,
const nsStyleCoord& aCoord)
{
return ComputeBSizeValue(aContainingBlockHeight,
aContentEdgeToBoxSizingBoxEdge,
aCoord);
}
static nscoord ComputeBSizeValue(nscoord aContainingBlockBSize,
nscoord aContentEdgeToBoxSizingBoxEdge,
const nsStyleCoord& aCoord)