Bug 585185: Parse font-sizes as non-negative, in 'font' shorthand. r=dbaron

This commit is contained in:
Daniel Holbert 2013-05-24 09:39:03 +08:00
parent 0ec82ac402
commit 5423d3fe0d
4 changed files with 5 additions and 2 deletions

View File

@ -0,0 +1 @@
<a style="font: -2px Verdana;">

View File

@ -64,6 +64,7 @@ load 558943-1.xhtml
load 571105-1.xhtml
load 573127-1.html
load 580685.html
load 585185-1.html
load 592698-1.html
load 601437-1.html
load 601439-1.html

View File

@ -8610,7 +8610,8 @@ CSSParserImpl::ParseFont()
// Get mandatory font-size
nsCSSValue size;
if (! ParseVariant(size, VARIANT_KEYWORD | VARIANT_LP, nsCSSProps::kFontSizeKTable)) {
if (! ParseNonNegativeVariant(size, VARIANT_KEYWORD | VARIANT_LP,
nsCSSProps::kFontSizeKTable)) {
return false;
}

View File

@ -2403,7 +2403,7 @@ var gCSSProperties = {
// Gecko-specific system fonts
"-moz-window", "-moz-document", "-moz-desktop", "-moz-info", "-moz-dialog", "-moz-button", "-moz-pull-down-menu", "-moz-list", "-moz-field", "-moz-workspace",
],
invalid_values: [ "9 fantasy" ]
invalid_values: [ "9 fantasy", "-2px fantasy" ]
},
"font-family": {
domProp: "fontFamily",