зеркало из https://github.com/mozilla/gecko-dev.git
Bug 975741: Store the initial value of 'perspective' as 'none' rather than the (invalid value) '0' to make storage of 'none' consistent, and remove workaround from nsComputedDOMStyle computed value implementation. r=heycam
This commit is contained in:
Родитель
0026a0fe5d
Коммит
4fd06dded6
|
@ -1233,12 +1233,7 @@ CSSValue*
|
|||
nsComputedDOMStyle::DoGetPerspective()
|
||||
{
|
||||
nsROCSSPrimitiveValue* val = new nsROCSSPrimitiveValue;
|
||||
if (StyleDisplay()->mChildPerspective.GetUnit() == eStyleUnit_Coord &&
|
||||
StyleDisplay()->mChildPerspective.GetCoordValue() == 0.0) {
|
||||
val->SetIdent(eCSSKeyword_none);
|
||||
} else {
|
||||
SetValueToCoord(val, StyleDisplay()->mChildPerspective, false);
|
||||
}
|
||||
SetValueToCoord(val, StyleDisplay()->mChildPerspective, false);
|
||||
return val;
|
||||
}
|
||||
|
||||
|
|
|
@ -5589,7 +5589,7 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct,
|
|||
|
||||
SetCoord(*aRuleData->ValueForPerspective(),
|
||||
display->mChildPerspective, parentDisplay->mChildPerspective,
|
||||
SETCOORD_LAH | SETCOORD_INITIAL_ZERO | SETCOORD_NONE |
|
||||
SETCOORD_LAH | SETCOORD_INITIAL_NONE | SETCOORD_NONE |
|
||||
SETCOORD_UNSET_INITIAL,
|
||||
aContext, mPresContext, canStoreInRuleTree);
|
||||
|
||||
|
|
|
@ -2289,7 +2289,7 @@ nsStyleDisplay::nsStyleDisplay()
|
|||
mTransformOrigin[2].SetCoordValue(0);
|
||||
mPerspectiveOrigin[0].SetPercentValue(0.5f);
|
||||
mPerspectiveOrigin[1].SetPercentValue(0.5f);
|
||||
mChildPerspective.SetCoordValue(0);
|
||||
mChildPerspective.SetNoneValue();
|
||||
mBackfaceVisibility = NS_STYLE_BACKFACE_VISIBILITY_VISIBLE;
|
||||
mTransformStyle = NS_STYLE_TRANSFORM_STYLE_FLAT;
|
||||
mOrient = NS_STYLE_ORIENT_AUTO;
|
||||
|
|
|
@ -1732,7 +1732,7 @@ var gCSSProperties = {
|
|||
type: CSS_TYPE_LONGHAND,
|
||||
initial_values: [ "none" ],
|
||||
other_values: [ "1000px", "500.2px" ],
|
||||
invalid_values: [ "pants", "200", "0", "-100px", "-27.2em" ]
|
||||
invalid_values: [ "pants", "200", "0", "-100px", "-27.2em", "0px" ]
|
||||
},
|
||||
"backface-visibility": {
|
||||
domProp: "backfaceVisibility",
|
||||
|
|
Загрузка…
Ссылка в новой задаче