A bunch of one-liners to fix bugs found by CSS mochitests. b=377731 r+sr=bzbarsky

This commit is contained in:
dbaron%dbaron.org 2007-04-21 00:16:52 +00:00
Родитель b00fed5d90
Коммит 904dd421f8
6 изменённых файлов: 8 добавлений и 28 удалений

Просмотреть файл

@ -629,9 +629,9 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty,
break;
}
case eCSSProperty_cue: {
if (AppendValueToString(eCSSProperty_cue_after, aValue)) {
if (AppendValueToString(eCSSProperty_cue_before, aValue)) {
aValue.Append(PRUnichar(' '));
if (!AppendValueToString(eCSSProperty_cue_before, aValue))
if (!AppendValueToString(eCSSProperty_cue_after, aValue))
aValue.Truncate();
}
break;
@ -673,9 +673,9 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty,
break;
}
case eCSSProperty_pause: {
if (AppendValueToString(eCSSProperty_pause_after, aValue)) {
if (AppendValueToString(eCSSProperty_pause_before, aValue)) {
aValue.Append(PRUnichar(' '));
if (!AppendValueToString(eCSSProperty_pause_before, aValue))
if (!AppendValueToString(eCSSProperty_pause_after, aValue))
aValue.Truncate();
}
break;

Просмотреть файл

@ -4725,7 +4725,7 @@ PRBool CSSParserImpl::ParseSingleValueProperty(nsresult& aErrorCode,
return ParseVariant(aErrorCode, aValue, VARIANT_HK,
nsCSSProps::kSpeakNumeralKTable);
case eCSSProperty_speak_punctuation:
return ParseVariant(aErrorCode, aValue, VARIANT_HK,
return ParseVariant(aErrorCode, aValue, VARIANT_HOK,
nsCSSProps::kSpeakPunctuationKTable);
case eCSSProperty_speech_rate:
return ParseVariant(aErrorCode, aValue, VARIANT_HN | VARIANT_KEYWORD,
@ -5447,7 +5447,8 @@ PRBool CSSParserImpl::ParseCue(nsresult& aErrorCode)
{
nsCSSValue before;
if (ParseSingleValueProperty(aErrorCode, before, eCSSProperty_cue_before)) {
if (eCSSUnit_URL == before.GetUnit()) {
if (eCSSUnit_Inherit != before.GetUnit() &&
eCSSUnit_Initial != before.GetUnit()) {
nsCSSValue after;
if (ParseSingleValueProperty(aErrorCode, after, eCSSProperty_cue_after)) {
if (ExpectEndProperty(aErrorCode, PR_TRUE)) {

Просмотреть файл

@ -3983,7 +3983,7 @@ nsRuleNode::ComputeXULData(nsStyleStruct* aStartStruct,
if (eCSSUnit_Number == xulData.mBoxFlex.GetUnit()) {
xul->mBoxFlex = xulData.mBoxFlex.GetFloatValue();
}
else if (eCSSUnit_Inherit == xulData.mBoxOrient.GetUnit()) {
else if (eCSSUnit_Inherit == xulData.mBoxFlex.GetUnit()) {
inherited = PR_TRUE;
xul->mBoxFlex = parentXUL->mBoxFlex;
}

Просмотреть файл

@ -70,9 +70,6 @@ function xfail_diffcomputed(property) {
}
var gBrokenInherit = {
// The nsRuleNode code uses the 'inherit' value for -moz-box-orient
"-moz-box-flex": true,
// Not implemented in nsRuleNode
"-moz-border-bottom-colors": true,
"-moz-border-left-colors": true,
@ -85,11 +82,6 @@ var gBrokenInherit = {
};
function xfail_inherit(property, matching_initial) {
if (property == "-moz-box-flex" && matching_initial) {
// It inherits from the wrong property, but that ends up right in
// this case.
return false;
}
return property in gBrokenInherit;
}

Просмотреть файл

@ -86,9 +86,7 @@ var gNotAccepted = {
"-moz-user-select": [ "auto" ],
"background-color": [ "rgb(255.0,0.387,3489)" ],
"content": [ "none" ],
"cue": [ "none none", "none url(404.wav)" ],
"list-style": [ "none disc outside" ],
"speak-punctuation": [ "none" ],
};
var gBackgroundValuesWithOnlyPosition = {

Просмотреть файл

@ -66,9 +66,7 @@ var gNotAccepted = {
"-moz-user-select": [ "auto" ],
"background-color": [ "rgb(255.0,0.387,3489)" ],
"content": [ "none" ],
"cue": [ "none none", "none url(404.wav)" ],
"list-style": [ "none disc outside" ],
"speak-punctuation": [ "none" ],
};
var gSpecialFont = [
@ -145,15 +143,6 @@ function xfail_idparseser(property, value)
// one.
return false;
// parse-serialize reverses pause and cue
if ((property == "cue" || property == "pause") &&
value.match(/ /) && !value.match(/^(.*) \1$/))
return true;
// Can't parse "cue: none none"
if (property == "cue" && value == "none")
return true;
return false;
}