mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-03 04:27:41 +00:00
Bug 789390 - Fix crash when using -moz-objectStroke paint value with transitions r=dbaron
This commit is contained in:
parent
3b4df9464f
commit
0c9f80a9ea
@ -487,7 +487,7 @@ nsStyleAnimation::ComputeDistance(nsCSSProperty aProperty,
|
||||
unit[1] = GetCommonUnit(aProperty, pair1->mYValue.GetUnit(),
|
||||
pair2->mYValue.GetUnit());
|
||||
if (unit[0] == eCSSUnit_Null || unit[1] == eCSSUnit_Null ||
|
||||
unit[0] == eCSSUnit_URL) {
|
||||
unit[0] == eCSSUnit_URL || unit[0] == eCSSUnit_Enumerated) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1827,7 +1827,7 @@ nsStyleAnimation::AddWeighted(nsCSSProperty aProperty,
|
||||
unit[1] = GetCommonUnit(aProperty, pair1->mYValue.GetUnit(),
|
||||
pair2->mYValue.GetUnit());
|
||||
if (unit[0] == eCSSUnit_Null || unit[1] == eCSSUnit_Null ||
|
||||
unit[0] == eCSSUnit_URL) {
|
||||
unit[0] == eCSSUnit_URL || unit[0] == eCSSUnit_Enumerated) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -3125,6 +3125,17 @@ nsStyleAnimation::ExtractComputedValue(nsCSSProperty aProperty,
|
||||
eUnit_CSSValuePair);
|
||||
return true;
|
||||
}
|
||||
if (paint.mType == eStyleSVGPaintType_ObjectFill ||
|
||||
paint.mType == eStyleSVGPaintType_ObjectStroke) {
|
||||
nsAutoPtr<nsCSSValuePair> pair(new nsCSSValuePair);
|
||||
pair->mXValue.SetIntValue(paint.mType == eStyleSVGPaintType_ObjectFill ?
|
||||
NS_COLOR_OBJECTFILL : NS_COLOR_OBJECTSTROKE,
|
||||
eCSSUnit_Enumerated);
|
||||
pair->mYValue.SetColorValue(paint.mFallbackColor);
|
||||
aComputedValue.SetAndAdoptCSSValuePairValue(pair.forget(),
|
||||
eUnit_CSSValuePair);
|
||||
return true;
|
||||
}
|
||||
NS_ABORT_IF_FALSE(paint.mType == eStyleSVGPaintType_None,
|
||||
"Unexpected SVG paint type");
|
||||
aComputedValue.SetNoneValue();
|
||||
|
1
layout/svg/crashtests/789390-1.html
Normal file
1
layout/svg/crashtests/789390-1.html
Normal file
@ -0,0 +1 @@
|
||||
<html style="transition: 1s;"><body onload="document.documentElement.style.stroke = '-moz-objectStroke';"></body></html>
|
@ -144,3 +144,4 @@ load 782141-1.svg
|
||||
load 784061-1.svg
|
||||
load 790072.svg
|
||||
load 791826-1.svg
|
||||
load 789390-1.html
|
||||
|
Loading…
x
Reference in New Issue
Block a user