diff --git a/mozilla/content/html/style/src/nsCSSValue.cpp b/mozilla/content/html/style/src/nsCSSValue.cpp
index 5daf818f679..ff3367f3ae3 100644
--- a/mozilla/content/html/style/src/nsCSSValue.cpp
+++ b/mozilla/content/html/style/src/nsCSSValue.cpp
@@ -17,9 +17,7 @@
*/
#include "nsCSSValue.h"
#include "nsString.h"
-//#include "nsCRT.h"
#include "nsCSSProps.h"
-#include "nsCSSPropIDs.h"
#include "nsUnitConversion.h"
//#include "nsStyleConsts.h"
@@ -186,6 +184,9 @@ nscoord nsCSSValue::GetLengthTwips(void) const
return NS_DIDOTS_TO_TWIPS(mValue.mFloat);
case eCSSUnit_Cicero:
return NS_CICEROS_TO_TWIPS(mValue.mFloat);
+ default:
+ NS_ERROR("should never get here");
+ break;
}
}
return 0;
@@ -271,14 +272,14 @@ void nsCSSValue::SetNormalValue(void)
mUnit = eCSSUnit_Normal;
}
-void nsCSSValue::AppendToString(nsString& aBuffer, PRInt32 aPropID) const
+void nsCSSValue::AppendToString(nsString& aBuffer, nsCSSProperty aPropID) const
{
if (eCSSUnit_Null == mUnit) {
return;
}
if (-1 < aPropID) {
- aBuffer.Append(nsCSSProps::kNameTable[aPropID].name);
+ aBuffer.Append(nsCSSProps::GetStringValue(aPropID));
aBuffer.Append(": ");
}
@@ -366,7 +367,7 @@ void nsCSSValue::AppendToString(nsString& aBuffer, PRInt32 aPropID) const
aBuffer.Append(' ');
}
-void nsCSSValue::ToString(nsString& aBuffer, PRInt32 aPropID) const
+void nsCSSValue::ToString(nsString& aBuffer, nsCSSProperty aPropID) const
{
aBuffer.Truncate();
AppendToString(aBuffer, aPropID);
diff --git a/mozilla/content/html/style/src/nsCSSValue.h b/mozilla/content/html/style/src/nsCSSValue.h
index 470742fe393..83324ebfe4a 100644
--- a/mozilla/content/html/style/src/nsCSSValue.h
+++ b/mozilla/content/html/style/src/nsCSSValue.h
@@ -22,6 +22,7 @@
#include "nsColor.h"
#include "nsString.h"
#include "nsCoord.h"
+#include "nsCSSProps.h"
enum nsCSSUnit {
@@ -67,6 +68,7 @@ enum nsCSSUnit {
eCSSUnit_EN = 801, // (float) .5 em
eCSSUnit_XHeight = 802, // (float) distance from top of lower case x to baseline
eCSSUnit_CapHeight = 803, // (float) distance from top of uppercase case H to baseline
+ eCSSUnit_Char = 804, // (float) number of characters, used for width with monospace font
// Screen relative measure
eCSSUnit_Pixel = 900, // (float)
@@ -131,8 +133,8 @@ public:
void SetNormalValue(void);
// debugging methods only
- void AppendToString(nsString& aBuffer, PRInt32 aPropID = -1) const;
- void ToString(nsString& aBuffer, PRInt32 aPropID = -1) const;
+ void AppendToString(nsString& aBuffer, nsCSSProperty aPropID = eCSSProperty_UNKNOWN) const;
+ void ToString(nsString& aBuffer, nsCSSProperty aPropID = eCSSProperty_UNKNOWN) const;
protected:
nsCSSUnit mUnit;
diff --git a/mozilla/layout/html/style/src/nsCSSValue.cpp b/mozilla/layout/html/style/src/nsCSSValue.cpp
index 5daf818f679..ff3367f3ae3 100644
--- a/mozilla/layout/html/style/src/nsCSSValue.cpp
+++ b/mozilla/layout/html/style/src/nsCSSValue.cpp
@@ -17,9 +17,7 @@
*/
#include "nsCSSValue.h"
#include "nsString.h"
-//#include "nsCRT.h"
#include "nsCSSProps.h"
-#include "nsCSSPropIDs.h"
#include "nsUnitConversion.h"
//#include "nsStyleConsts.h"
@@ -186,6 +184,9 @@ nscoord nsCSSValue::GetLengthTwips(void) const
return NS_DIDOTS_TO_TWIPS(mValue.mFloat);
case eCSSUnit_Cicero:
return NS_CICEROS_TO_TWIPS(mValue.mFloat);
+ default:
+ NS_ERROR("should never get here");
+ break;
}
}
return 0;
@@ -271,14 +272,14 @@ void nsCSSValue::SetNormalValue(void)
mUnit = eCSSUnit_Normal;
}
-void nsCSSValue::AppendToString(nsString& aBuffer, PRInt32 aPropID) const
+void nsCSSValue::AppendToString(nsString& aBuffer, nsCSSProperty aPropID) const
{
if (eCSSUnit_Null == mUnit) {
return;
}
if (-1 < aPropID) {
- aBuffer.Append(nsCSSProps::kNameTable[aPropID].name);
+ aBuffer.Append(nsCSSProps::GetStringValue(aPropID));
aBuffer.Append(": ");
}
@@ -366,7 +367,7 @@ void nsCSSValue::AppendToString(nsString& aBuffer, PRInt32 aPropID) const
aBuffer.Append(' ');
}
-void nsCSSValue::ToString(nsString& aBuffer, PRInt32 aPropID) const
+void nsCSSValue::ToString(nsString& aBuffer, nsCSSProperty aPropID) const
{
aBuffer.Truncate();
AppendToString(aBuffer, aPropID);
diff --git a/mozilla/layout/html/style/src/nsCSSValue.h b/mozilla/layout/html/style/src/nsCSSValue.h
index 470742fe393..83324ebfe4a 100644
--- a/mozilla/layout/html/style/src/nsCSSValue.h
+++ b/mozilla/layout/html/style/src/nsCSSValue.h
@@ -22,6 +22,7 @@
#include "nsColor.h"
#include "nsString.h"
#include "nsCoord.h"
+#include "nsCSSProps.h"
enum nsCSSUnit {
@@ -67,6 +68,7 @@ enum nsCSSUnit {
eCSSUnit_EN = 801, // (float) .5 em
eCSSUnit_XHeight = 802, // (float) distance from top of lower case x to baseline
eCSSUnit_CapHeight = 803, // (float) distance from top of uppercase case H to baseline
+ eCSSUnit_Char = 804, // (float) number of characters, used for width with monospace font
// Screen relative measure
eCSSUnit_Pixel = 900, // (float)
@@ -131,8 +133,8 @@ public:
void SetNormalValue(void);
// debugging methods only
- void AppendToString(nsString& aBuffer, PRInt32 aPropID = -1) const;
- void ToString(nsString& aBuffer, PRInt32 aPropID = -1) const;
+ void AppendToString(nsString& aBuffer, nsCSSProperty aPropID = eCSSProperty_UNKNOWN) const;
+ void ToString(nsString& aBuffer, nsCSSProperty aPropID = eCSSProperty_UNKNOWN) const;
protected:
nsCSSUnit mUnit;
diff --git a/mozilla/layout/style/nsCSSValue.cpp b/mozilla/layout/style/nsCSSValue.cpp
index 5daf818f679..ff3367f3ae3 100644
--- a/mozilla/layout/style/nsCSSValue.cpp
+++ b/mozilla/layout/style/nsCSSValue.cpp
@@ -17,9 +17,7 @@
*/
#include "nsCSSValue.h"
#include "nsString.h"
-//#include "nsCRT.h"
#include "nsCSSProps.h"
-#include "nsCSSPropIDs.h"
#include "nsUnitConversion.h"
//#include "nsStyleConsts.h"
@@ -186,6 +184,9 @@ nscoord nsCSSValue::GetLengthTwips(void) const
return NS_DIDOTS_TO_TWIPS(mValue.mFloat);
case eCSSUnit_Cicero:
return NS_CICEROS_TO_TWIPS(mValue.mFloat);
+ default:
+ NS_ERROR("should never get here");
+ break;
}
}
return 0;
@@ -271,14 +272,14 @@ void nsCSSValue::SetNormalValue(void)
mUnit = eCSSUnit_Normal;
}
-void nsCSSValue::AppendToString(nsString& aBuffer, PRInt32 aPropID) const
+void nsCSSValue::AppendToString(nsString& aBuffer, nsCSSProperty aPropID) const
{
if (eCSSUnit_Null == mUnit) {
return;
}
if (-1 < aPropID) {
- aBuffer.Append(nsCSSProps::kNameTable[aPropID].name);
+ aBuffer.Append(nsCSSProps::GetStringValue(aPropID));
aBuffer.Append(": ");
}
@@ -366,7 +367,7 @@ void nsCSSValue::AppendToString(nsString& aBuffer, PRInt32 aPropID) const
aBuffer.Append(' ');
}
-void nsCSSValue::ToString(nsString& aBuffer, PRInt32 aPropID) const
+void nsCSSValue::ToString(nsString& aBuffer, nsCSSProperty aPropID) const
{
aBuffer.Truncate();
AppendToString(aBuffer, aPropID);
diff --git a/mozilla/layout/style/nsCSSValue.h b/mozilla/layout/style/nsCSSValue.h
index 470742fe393..83324ebfe4a 100644
--- a/mozilla/layout/style/nsCSSValue.h
+++ b/mozilla/layout/style/nsCSSValue.h
@@ -22,6 +22,7 @@
#include "nsColor.h"
#include "nsString.h"
#include "nsCoord.h"
+#include "nsCSSProps.h"
enum nsCSSUnit {
@@ -67,6 +68,7 @@ enum nsCSSUnit {
eCSSUnit_EN = 801, // (float) .5 em
eCSSUnit_XHeight = 802, // (float) distance from top of lower case x to baseline
eCSSUnit_CapHeight = 803, // (float) distance from top of uppercase case H to baseline
+ eCSSUnit_Char = 804, // (float) number of characters, used for width with monospace font
// Screen relative measure
eCSSUnit_Pixel = 900, // (float)
@@ -131,8 +133,8 @@ public:
void SetNormalValue(void);
// debugging methods only
- void AppendToString(nsString& aBuffer, PRInt32 aPropID = -1) const;
- void ToString(nsString& aBuffer, PRInt32 aPropID = -1) const;
+ void AppendToString(nsString& aBuffer, nsCSSProperty aPropID = eCSSProperty_UNKNOWN) const;
+ void ToString(nsString& aBuffer, nsCSSProperty aPropID = eCSSProperty_UNKNOWN) const;
protected:
nsCSSUnit mUnit;