mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 601131 - Hang with feTurbulence with huge numOctaves. r=roc
This commit is contained in:
parent
e438b2ce3d
commit
fd050c27d1
@ -23,6 +23,8 @@ static const unsigned short SVG_STITCHTYPE_UNKNOWN = 0;
|
||||
static const unsigned short SVG_STITCHTYPE_STITCH = 1;
|
||||
static const unsigned short SVG_STITCHTYPE_NOSTITCH = 2;
|
||||
|
||||
static const int32_t MAX_OCTAVES = 10;
|
||||
|
||||
JSObject*
|
||||
SVGFETurbulenceElement::WrapNode(JSContext* aCx, JS::Handle<JSObject*> aScope)
|
||||
{
|
||||
@ -137,7 +139,7 @@ SVGFETurbulenceElement::Filter(nsSVGFilterInstance* instance,
|
||||
float fX = mNumberPairAttributes[BASE_FREQ].GetAnimValue(nsSVGNumberPair::eFirst);
|
||||
float fY = mNumberPairAttributes[BASE_FREQ].GetAnimValue(nsSVGNumberPair::eSecond);
|
||||
float seed = mNumberAttributes[OCTAVES].GetAnimValue();
|
||||
int32_t octaves = mIntegerAttributes[OCTAVES].GetAnimValue();
|
||||
int32_t octaves = std::min(mIntegerAttributes[OCTAVES].GetAnimValue(), MAX_OCTAVES);
|
||||
uint16_t type = mEnumAttributes[TYPE].GetAnimValue();
|
||||
uint16_t stitch = mEnumAttributes[STITCHTILES].GetAnimValue();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user