зеркало из https://github.com/mozilla/gecko-dev.git
Bug 773500 Part 1:Store z-component of transform-origin as 0 rather than null when it is omitted. r=dbaron
This commit is contained in:
Родитель
d54b168bf0
Коммит
71ad884431
|
@ -8362,7 +8362,7 @@ bool CSSParserImpl::ParseTransformOrigin(bool aPerspective)
|
|||
nsCSSValue depth;
|
||||
if (!ParseVariant(depth, VARIANT_LENGTH | VARIANT_CALC, nsnull) ||
|
||||
!nsLayoutUtils::Are3DTransformsEnabled()) {
|
||||
depth.Reset();
|
||||
depth.SetFloatValue(0.0f, eCSSUnit_Pixel);
|
||||
}
|
||||
value.SetTripletValue(position.mXValue, position.mYValue, depth);
|
||||
}
|
||||
|
|
|
@ -423,10 +423,10 @@ void nsCSSValue::SetPairValue(const nsCSSValue& xValue,
|
|||
void nsCSSValue::SetTripletValue(const nsCSSValueTriplet* aValue)
|
||||
{
|
||||
// triplet should not be used for null/inherit/initial values
|
||||
// Only allow Null for the z component
|
||||
NS_ABORT_IF_FALSE(aValue &&
|
||||
aValue->mXValue.GetUnit() != eCSSUnit_Null &&
|
||||
aValue->mYValue.GetUnit() != eCSSUnit_Null &&
|
||||
aValue->mZValue.GetUnit() != eCSSUnit_Null &&
|
||||
aValue->mXValue.GetUnit() != eCSSUnit_Inherit &&
|
||||
aValue->mYValue.GetUnit() != eCSSUnit_Inherit &&
|
||||
aValue->mZValue.GetUnit() != eCSSUnit_Inherit &&
|
||||
|
|
|
@ -1781,13 +1781,6 @@ nsStyleAnimation::AddWeighted(nsCSSProperty aProperty,
|
|||
nsCSSValueTriplet triplet1(*aValue1.GetCSSValueTripletValue());
|
||||
nsCSSValueTriplet triplet2(*aValue2.GetCSSValueTripletValue());
|
||||
|
||||
if (triplet1.mZValue.GetUnit() == eCSSUnit_Null) {
|
||||
triplet1.mZValue.SetFloatValue(0.0, eCSSUnit_Pixel);
|
||||
}
|
||||
if (triplet2.mZValue.GetUnit() == eCSSUnit_Null) {
|
||||
triplet2.mZValue.SetFloatValue(0.0, eCSSUnit_Pixel);
|
||||
}
|
||||
|
||||
nsCSSUnit unit[3];
|
||||
unit[0] = GetCommonUnit(aProperty, triplet1.mXValue.GetUnit(),
|
||||
triplet2.mXValue.GetUnit());
|
||||
|
@ -1816,11 +1809,6 @@ nsStyleAnimation::AddWeighted(nsCSSProperty aProperty,
|
|||
}
|
||||
}
|
||||
|
||||
if (result->mZValue.GetUnit() == eCSSUnit_Pixel &&
|
||||
result->mZValue.GetFloatValue() == 0.0f) {
|
||||
result->mZValue.Reset();
|
||||
}
|
||||
|
||||
aResultValue.SetAndAdoptCSSValueTripletValue(result.forget(),
|
||||
eUnit_CSSValueTriplet);
|
||||
return true;
|
||||
|
@ -2673,10 +2661,6 @@ nsStyleAnimation::ExtractComputedValue(nsCSSProperty aProperty,
|
|||
triplet->mZValue)) {
|
||||
return false;
|
||||
}
|
||||
if (triplet->mZValue.GetUnit() == eCSSUnit_Pixel &&
|
||||
triplet->mZValue.GetFloatValue() == 0.0f) {
|
||||
triplet->mZValue.Reset();
|
||||
}
|
||||
aComputedValue.SetAndAdoptCSSValueTripletValue(triplet.forget(),
|
||||
eUnit_CSSValueTriplet);
|
||||
break;
|
||||
|
|
Загрузка…
Ссылка в новой задаче