mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 619967 - Resolve percentage filter primitive attributes correctly. r=roc
This commit is contained in:
parent
970ebd503e
commit
0c4e2bbd70
@ -43,11 +43,6 @@
|
||||
#include "nsLayoutUtils.h"
|
||||
#include "gfxUtils.h"
|
||||
|
||||
static double Square(double aX)
|
||||
{
|
||||
return aX*aX;
|
||||
}
|
||||
|
||||
float
|
||||
nsSVGFilterInstance::GetPrimitiveNumber(PRUint8 aCtxType, float aValue) const
|
||||
{
|
||||
@ -69,9 +64,9 @@ nsSVGFilterInstance::GetPrimitiveNumber(PRUint8 aCtxType, float aValue) const
|
||||
return value * mFilterSpaceSize.height / mFilterRect.Height();
|
||||
case nsSVGUtils::XY:
|
||||
default:
|
||||
return value *
|
||||
sqrt(Square(mFilterSpaceSize.width) + Square(mFilterSpaceSize.height)) /
|
||||
sqrt(Square(mFilterRect.Width()) + Square(mFilterRect.Height()));
|
||||
return value * nsSVGUtils::ComputeNormalizedHypotenuse(
|
||||
mFilterSpaceSize.width / mFilterRect.Width(),
|
||||
mFilterSpaceSize.height / mFilterRect.Height());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user