Bug 641393 patch 2: Make namespacing style consistent across SVG List classes, and replace some Length==0 checks with IsEmpty(). r=jwatt

This commit is contained in:
Daniel Holbert 2011-04-14 11:47:27 -07:00
parent a42c167887
commit 8628380e49
9 changed files with 26 additions and 12 deletions

View File

@ -43,7 +43,7 @@
#include "SVGNumberListSMILType.h"
#endif // MOZ_SMIL
using namespace mozilla;
namespace mozilla {
nsresult
SVGAnimatedNumberList::SetBaseValueString(const nsAString& aValue)
@ -214,3 +214,5 @@ SVGAnimatedNumberList::SMILAnimatedNumberList::ClearAnimValue()
}
}
#endif // MOZ_SMIL
} // namespace mozilla

View File

@ -45,7 +45,7 @@
// See the comments in this file's header!
using namespace mozilla;
namespace mozilla {
nsresult
SVGAnimatedPathSegList::SetBaseValueString(const nsAString& aValue)
@ -238,3 +238,4 @@ SVGAnimatedPathSegList::SMILAnimatedPathSegList::ClearAnimValue()
}
#endif // MOZ_SMIL
} // namespace mozilla

View File

@ -45,7 +45,7 @@
// See the comments in this file's header!
using namespace mozilla;
namespace mozilla {
nsresult
SVGAnimatedPointList::SetBaseValueString(const nsAString& aValue)
@ -241,3 +241,4 @@ SVGAnimatedPointList::SMILAnimatedPointList::ClearAnimValue()
}
#endif // MOZ_SMIL
} // namespace mozilla

View File

@ -181,8 +181,8 @@ SVGLengthListSMILType::ComputeDistance(const nsSMILValue& aFrom,
// and documenting SVGLengthListAndInfo::CanZeroPadList().
NS_ASSERTION((from.CanZeroPadList() == to.CanZeroPadList()) ||
(from.CanZeroPadList() && from.Length() == 0) ||
(to.CanZeroPadList() && to.Length() == 0),
(from.CanZeroPadList() && from.IsEmpty()) ||
(to.CanZeroPadList() && to.IsEmpty()),
"Only \"zero\" nsSMILValues from the SMIL engine should "
"return PR_TRUE for CanZeroPadList() when the attribute "
"being animated can't be zero padded");
@ -256,8 +256,8 @@ SVGLengthListSMILType::Interpolate(const nsSMILValue& aStartVal,
// and documenting SVGLengthListAndInfo::CanZeroPadList().
NS_ASSERTION((start.CanZeroPadList() == end.CanZeroPadList()) ||
(start.CanZeroPadList() && start.Length() == 0) ||
(end.CanZeroPadList() && end.Length() == 0),
(start.CanZeroPadList() && start.IsEmpty()) ||
(end.CanZeroPadList() && end.IsEmpty()),
"Only \"zero\" nsSMILValues from the SMIL engine should "
"return PR_TRUE for CanZeroPadList() when the attribute "
"being animated can't be zero padded");

View File

@ -47,7 +47,7 @@
#include "nsTextFormatter.h"
#include "nsCharSeparatedTokenizer.h"
using namespace mozilla;
namespace mozilla {
nsresult
SVGNumberList::CopyFrom(const SVGNumberList& rhs)
@ -108,3 +108,5 @@ SVGNumberList::SetValueFromString(const nsAString& aValue)
}
return CopyFrom(temp);
}
} // namespace mozilla

View File

@ -56,7 +56,7 @@
# SVGNumberListAndInfo has not been given an element yet.
*/
using namespace mozilla;
namespace mozilla {
/*static*/ SVGNumberListSMILType SVGNumberListSMILType::sSingleton;
@ -240,3 +240,5 @@ SVGNumberListSMILType::Interpolate(const nsSMILValue& aStartVal,
}
return NS_OK;
}
} // namespace mozilla

View File

@ -39,7 +39,7 @@
#include "SVGPathData.h"
#include <math.h>
using namespace mozilla;
namespace mozilla {
/*static*/ SVGPathSegListSMILType SVGPathSegListSMILType::sSingleton;
@ -469,3 +469,5 @@ SVGPathSegListSMILType::Interpolate(const nsSMILValue& aStartVal,
return NS_OK;
}
} // namespace mozilla

View File

@ -47,7 +47,7 @@
#include "nsTextFormatter.h"
#include "nsCharSeparatedTokenizer.h"
using namespace mozilla;
namespace mozilla {
nsresult
SVGPointList::CopyFrom(const SVGPointList& rhs)
@ -152,3 +152,5 @@ SVGPointList::SetValueFromString(const nsAString& aValue)
}
return rv;
}
} // namespace mozilla

View File

@ -40,7 +40,7 @@
#include "nsMathUtils.h"
#include <math.h>
using namespace mozilla;
namespace mozilla {
/*static*/ SVGPointListSMILType SVGPointListSMILType::sSingleton;
@ -225,3 +225,5 @@ SVGPointListSMILType::Interpolate(const nsSMILValue& aStartVal,
}
return NS_OK;
}
} // namespace mozilla