зеркало из https://github.com/mozilla/pjs.git
A bunch of one-liners to fix bugs found by CSS mochitests. b=377731 r+sr=bzbarsky
This commit is contained in:
Родитель
b00fed5d90
Коммит
904dd421f8
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче