diff --git a/mozilla/content/html/style/src/nsCSSParser.cpp b/mozilla/content/html/style/src/nsCSSParser.cpp
index b103db78fcd..ee50ba7e3d4 100644
--- a/mozilla/content/html/style/src/nsCSSParser.cpp
+++ b/mozilla/content/html/style/src/nsCSSParser.cpp
@@ -3738,8 +3738,8 @@ PRBool CSSParserImpl::ParseSingleValueProperty(PRInt32& aErrorCode,
case eCSSProperty_border_left_width:
case eCSSProperty_border_right_width:
case eCSSProperty_border_top_width:
- return ParseVariant(aErrorCode, aValue, VARIANT_HKL,
- nsCSSProps::kBorderWidthKTable);
+ return ParsePositiveVariant(aErrorCode, aValue, VARIANT_HKL,
+ nsCSSProps::kBorderWidthKTable);
case eCSSProperty__moz_border_radius_topLeft:
case eCSSProperty__moz_border_radius_topRight:
case eCSSProperty__moz_border_radius_bottomRight:
diff --git a/mozilla/layout/style/nsCSSParser.cpp b/mozilla/layout/style/nsCSSParser.cpp
index b103db78fcd..ee50ba7e3d4 100644
--- a/mozilla/layout/style/nsCSSParser.cpp
+++ b/mozilla/layout/style/nsCSSParser.cpp
@@ -3738,8 +3738,8 @@ PRBool CSSParserImpl::ParseSingleValueProperty(PRInt32& aErrorCode,
case eCSSProperty_border_left_width:
case eCSSProperty_border_right_width:
case eCSSProperty_border_top_width:
- return ParseVariant(aErrorCode, aValue, VARIANT_HKL,
- nsCSSProps::kBorderWidthKTable);
+ return ParsePositiveVariant(aErrorCode, aValue, VARIANT_HKL,
+ nsCSSProps::kBorderWidthKTable);
case eCSSProperty__moz_border_radius_topLeft:
case eCSSProperty__moz_border_radius_topRight:
case eCSSProperty__moz_border_radius_bottomRight: