Convert tabs to spaces.

This commit is contained in:
L. David Baron 2008-10-20 14:07:09 +02:00
parent 12fe22cbdd
commit ed02e34f0a
4 changed files with 47 additions and 47 deletions

View File

@ -6882,7 +6882,7 @@ CSSParserImpl::ParseFunction(const nsString &aFunction,
PRUint16 numElements = (foundValues.Length() <= MAX_ALLOWED_ELEMS ?
foundValues.Length() + 1 : MAX_ALLOWED_ELEMS);
nsRefPtr<nsCSSValue::Array> convertedArray =
nsCSSValue::Array::Create(numElements);
nsCSSValue::Array::Create(numElements);
if (!convertedArray) {
mScanner.SetLowLevelError(NS_ERROR_OUT_OF_MEMORY);
return PR_FALSE;
@ -7042,7 +7042,7 @@ static PRBool GetFunctionParseInformation(nsCSSKeyword aToken,
PRBool CSSParserImpl::ReadSingleTransform(nsCSSValueList **& aTail)
{
typedef nsTArray<nsCSSValue>::size_type arrlen_t;
if (!GetToken(PR_TRUE))
return PR_FALSE;

View File

@ -234,20 +234,20 @@ nsStyleTransformMatrix::operator *(const nsStyleTransformMatrix &aOther) const
/* Helper function to fill in an nscoord with the specified nsCSSValue. */
static void SetCoordToValue(const nsCSSValue &aValue,
nsStyleContext* aContext,
nsPresContext* aPresContext,
PRBool &aInherited, nscoord &aOut)
nsStyleContext* aContext,
nsPresContext* aPresContext,
PRBool &aInherited, nscoord &aOut)
{
aOut = nsRuleNode::CalcLength(aValue, aContext, aPresContext, aInherited);
}
/* Helper function to process a matrix entry. */
static void ProcessMatrix(float aMain[4], nscoord aDelta[2],
float aX[2], float aY[2],
const nsCSSValue::Array* aData,
nsStyleContext* aContext,
nsPresContext* aPresContext,
PRBool& aInherited)
float aX[2], float aY[2],
const nsCSSValue::Array* aData,
nsStyleContext* aContext,
nsPresContext* aPresContext,
PRBool& aInherited)
{
NS_PRECONDITION(aData->Count() == 7, "Invalid array!");
@ -278,10 +278,10 @@ static void ProcessMatrix(float aMain[4], nscoord aDelta[2],
/* Helper function to process a translatex function. */
static void ProcessTranslateX(nscoord aDelta[2], float aX[2],
const nsCSSValue::Array* aData,
nsStyleContext* aContext,
nsPresContext* aPresContext
PRBool& aInherited)
const nsCSSValue::Array* aData,
nsStyleContext* aContext,
nsPresContext* aPresContext
PRBool& aInherited)
{
NS_PRECONDITION(aData->Count() == 2, "Invalid array!");
@ -305,10 +305,10 @@ static void ProcessTranslateX(nscoord aDelta[2], float aX[2],
/* Helper function to process a translatey function. */
static void ProcessTranslateY(nscoord aDelta[2], float aY[2],
const nsCSSValue::Array* aData,
nsStyleContext* aContext,
nsPresContext* aPresContext,
PRBool& aInherited)
const nsCSSValue::Array* aData,
nsStyleContext* aContext,
nsPresContext* aPresContext,
PRBool& aInherited)
{
NS_PRECONDITION(aData->Count() == 2, "Invalid array!");
@ -332,10 +332,10 @@ static void ProcessTranslateY(nscoord aDelta[2], float aY[2],
/* Helper function to process a translate function. */
static void ProcessTranslate(nscoord aDelta[2], float aX[2], float aY[2],
const nsCSSValue::Array* aData,
nsStyleContext* aContext,
nsPresContext* aPresContext,
PRBool& aInherited)
const nsCSSValue::Array* aData,
nsStyleContext* aContext,
nsPresContext* aPresContext,
PRBool& aInherited)
{
NS_PRECONDITION(aData->Count() == 2 || aData->Count() == 3, "Invalid array!");
@ -399,10 +399,10 @@ static void ProcessScale(float aMain[4], const nsCSSValue::Array* aData)
*/
const nsCSSValue& scaleX = aData->Item(1);
const nsCSSValue& scaleY = (aData->Count() == 2 ? scaleX :
aData->Item(2));
aData->Item(2));
ProcessScaleHelper(scaleX.GetFloatValue(),
scaleY.GetFloatValue(), aMain);
scaleY.GetFloatValue(), aMain);
}
/* Helper function that, given a set of angles, constructs the appropriate
@ -542,8 +542,8 @@ nsStyleTransformMatrix::operator ==(const nsStyleTransformMatrix &aOther) const
for (PRInt32 index = 0; index < 2; ++index)
if (mDelta[index] != aOther.mDelta[index] ||
mX[index] != aOther.mX[index] ||
mY[index] != aOther.mY[index])
mX[index] != aOther.mX[index] ||
mY[index] != aOther.mY[index])
return PR_FALSE;
return PR_TRUE;

View File

@ -225,11 +225,11 @@ nsStyleUtil::CalcFontPointSize(PRInt32 aHTMLSize, PRInt32 aBasePointSize,
{
PRInt32 row = fontSize - sFontSizeTableMin;
if (aPresContext->CompatibilityMode() == eCompatibility_NavQuirks) {
dFontSize = nsPresContext::CSSPixelsToAppUnits(sQuirksFontSizeTable[row][column[aHTMLSize]]);
} else {
dFontSize = nsPresContext::CSSPixelsToAppUnits(sStrictFontSizeTable[row][column[aHTMLSize]]);
}
if (aPresContext->CompatibilityMode() == eCompatibility_NavQuirks) {
dFontSize = nsPresContext::CSSPixelsToAppUnits(sQuirksFontSizeTable[row][column[aHTMLSize]]);
} else {
dFontSize = nsPresContext::CSSPixelsToAppUnits(sStrictFontSizeTable[row][column[aHTMLSize]]);
}
}
else
{
@ -267,13 +267,13 @@ nscoord nsStyleUtil::FindNextSmallerFontSize(nscoord aFontSize, PRInt32 aBasePoi
nscoord onePx = nsPresContext::CSSPixelsToAppUnits(1);
if (aFontSizeType == eFontSize_HTML) {
indexMin = 1;
indexMax = 7;
} else {
indexMin = 0;
indexMax = 6;
}
if (aFontSizeType == eFontSize_HTML) {
indexMin = 1;
indexMax = 7;
} else {
indexMin = 0;
indexMax = 6;
}
smallestIndexFontSize = CalcFontPointSize(indexMin, aBasePointSize, aScalingFactor, aPresContext, aFontSizeType);
largestIndexFontSize = CalcFontPointSize(indexMax, aBasePointSize, aScalingFactor, aPresContext, aFontSizeType);
@ -332,13 +332,13 @@ nscoord nsStyleUtil::FindNextLargerFontSize(nscoord aFontSize, PRInt32 aBasePoin
nscoord onePx = nsPresContext::CSSPixelsToAppUnits(1);
if (aFontSizeType == eFontSize_HTML) {
indexMin = 1;
indexMax = 7;
} else {
indexMin = 0;
indexMax = 6;
}
if (aFontSizeType == eFontSize_HTML) {
indexMin = 1;
indexMax = 7;
} else {
indexMin = 0;
indexMax = 6;
}
smallestIndexFontSize = CalcFontPointSize(indexMin, aBasePointSize, aScalingFactor, aPresContext, aFontSizeType);
largestIndexFontSize = CalcFontPointSize(indexMax, aBasePointSize, aScalingFactor, aPresContext, aFontSizeType);

View File

@ -44,8 +44,8 @@
struct nsStyleBackground;
enum nsFontSizeType {
eFontSize_HTML = 1,
eFontSize_CSS = 2
eFontSize_HTML = 1,
eFontSize_CSS = 2
};