зеркало из https://github.com/mozilla/pjs.git
Fixing bug 381447. nsSVGLengthList::mCtxType is always set to nsSVGUtils::X. r+sr=tor@acm.org
This commit is contained in:
Родитель
99dbf924c3
Коммит
1325e74daa
|
@ -57,9 +57,10 @@ class nsSVGLengthList : public nsIDOMSVGLengthList,
|
|||
{
|
||||
protected:
|
||||
friend nsresult NS_NewSVGLengthList(nsIDOMSVGLengthList** result,
|
||||
nsSVGElement *aContext);
|
||||
nsSVGElement *aContext,
|
||||
PRUint8 aCtxType);
|
||||
|
||||
nsSVGLengthList(nsSVGElement *aContext);
|
||||
nsSVGLengthList(nsSVGElement *aContext, PRUint8 aCtxType);
|
||||
~nsSVGLengthList();
|
||||
// void Init();
|
||||
|
||||
|
@ -101,8 +102,8 @@ protected:
|
|||
//----------------------------------------------------------------------
|
||||
// Implementation
|
||||
|
||||
nsSVGLengthList::nsSVGLengthList(nsSVGElement *aContext)
|
||||
: mCtxType(0)
|
||||
nsSVGLengthList::nsSVGLengthList(nsSVGElement *aContext, PRUint8 aCtxType)
|
||||
: mCtxType(aCtxType)
|
||||
{
|
||||
mContext = do_GetWeakReference(NS_STATIC_CAST(nsGenericElement*, aContext));
|
||||
}
|
||||
|
@ -389,11 +390,11 @@ nsSVGLengthList::InsertElementAt(nsISVGLength* aElement, PRInt32 index)
|
|||
// Exported creation functions:
|
||||
|
||||
nsresult
|
||||
NS_NewSVGLengthList(nsIDOMSVGLengthList** result, nsSVGElement *aContext)
|
||||
NS_NewSVGLengthList(nsIDOMSVGLengthList** result, nsSVGElement *aContext, PRUint8 aCtxType)
|
||||
{
|
||||
*result = nsnull;
|
||||
|
||||
nsSVGLengthList* lengthList = new nsSVGLengthList(aContext);
|
||||
nsSVGLengthList* lengthList = new nsSVGLengthList(aContext, aCtxType);
|
||||
if (!lengthList) return NS_ERROR_OUT_OF_MEMORY;
|
||||
NS_ADDREF(lengthList);
|
||||
|
||||
|
|
|
@ -44,6 +44,6 @@
|
|||
class nsSVGElement;
|
||||
|
||||
nsresult
|
||||
NS_NewSVGLengthList(nsIDOMSVGLengthList** result, nsSVGElement *aContext);
|
||||
NS_NewSVGLengthList(nsIDOMSVGLengthList** result, nsSVGElement *aContext, PRUint8 aCtxType);
|
||||
|
||||
#endif //__NS_SVGLENGTHLIST_H__
|
||||
|
|
|
@ -134,7 +134,7 @@ nsSVGTSpanElement::Init()
|
|||
// DOM property: nsIDOMSVGTextPositioningElement::x, #IMPLIED attrib: x
|
||||
{
|
||||
nsCOMPtr<nsIDOMSVGLengthList> lengthList;
|
||||
rv = NS_NewSVGLengthList(getter_AddRefs(lengthList), this);
|
||||
rv = NS_NewSVGLengthList(getter_AddRefs(lengthList), this, nsSVGUtils::X);
|
||||
NS_ENSURE_SUCCESS(rv,rv);
|
||||
rv = NS_NewSVGAnimatedLengthList(getter_AddRefs(mX),
|
||||
lengthList);
|
||||
|
@ -146,7 +146,7 @@ nsSVGTSpanElement::Init()
|
|||
// DOM property: nsIDOMSVGTextPositioningElement::y, #IMPLIED attrib: y
|
||||
{
|
||||
nsCOMPtr<nsIDOMSVGLengthList> lengthList;
|
||||
rv = NS_NewSVGLengthList(getter_AddRefs(lengthList), this);
|
||||
rv = NS_NewSVGLengthList(getter_AddRefs(lengthList), this, nsSVGUtils::Y);
|
||||
NS_ENSURE_SUCCESS(rv,rv);
|
||||
rv = NS_NewSVGAnimatedLengthList(getter_AddRefs(mY),
|
||||
lengthList);
|
||||
|
@ -158,7 +158,7 @@ nsSVGTSpanElement::Init()
|
|||
// DOM property: nsIDOMSVGTextPositioningElement::dx, #IMPLIED attrib: dx
|
||||
{
|
||||
nsCOMPtr<nsIDOMSVGLengthList> lengthList;
|
||||
rv = NS_NewSVGLengthList(getter_AddRefs(lengthList), this);
|
||||
rv = NS_NewSVGLengthList(getter_AddRefs(lengthList), this, nsSVGUtils::X);
|
||||
NS_ENSURE_SUCCESS(rv,rv);
|
||||
rv = NS_NewSVGAnimatedLengthList(getter_AddRefs(mdX),
|
||||
lengthList);
|
||||
|
@ -170,7 +170,7 @@ nsSVGTSpanElement::Init()
|
|||
// DOM property: nsIDOMSVGTextPositioningElement::dy, #IMPLIED attrib: dy
|
||||
{
|
||||
nsCOMPtr<nsIDOMSVGLengthList> lengthList;
|
||||
rv = NS_NewSVGLengthList(getter_AddRefs(lengthList), this);
|
||||
rv = NS_NewSVGLengthList(getter_AddRefs(lengthList), this, nsSVGUtils::Y);
|
||||
NS_ENSURE_SUCCESS(rv,rv);
|
||||
rv = NS_NewSVGAnimatedLengthList(getter_AddRefs(mdY),
|
||||
lengthList);
|
||||
|
|
|
@ -131,7 +131,7 @@ nsSVGTextElement::Init()
|
|||
// DOM property: nsIDOMSVGTextPositioningElement::x, #IMPLIED attrib: x
|
||||
{
|
||||
nsCOMPtr<nsIDOMSVGLengthList> lengthList;
|
||||
rv = NS_NewSVGLengthList(getter_AddRefs(lengthList), this);
|
||||
rv = NS_NewSVGLengthList(getter_AddRefs(lengthList), this, nsSVGUtils::X);
|
||||
NS_ENSURE_SUCCESS(rv,rv);
|
||||
rv = NS_NewSVGAnimatedLengthList(getter_AddRefs(mX),
|
||||
lengthList);
|
||||
|
@ -143,7 +143,7 @@ nsSVGTextElement::Init()
|
|||
// DOM property: nsIDOMSVGTextPositioningElement::y, #IMPLIED attrib: y
|
||||
{
|
||||
nsCOMPtr<nsIDOMSVGLengthList> lengthList;
|
||||
rv = NS_NewSVGLengthList(getter_AddRefs(lengthList), this);
|
||||
rv = NS_NewSVGLengthList(getter_AddRefs(lengthList), this, nsSVGUtils::Y);
|
||||
NS_ENSURE_SUCCESS(rv,rv);
|
||||
rv = NS_NewSVGAnimatedLengthList(getter_AddRefs(mY),
|
||||
lengthList);
|
||||
|
@ -155,7 +155,7 @@ nsSVGTextElement::Init()
|
|||
// DOM property: nsIDOMSVGTextPositioningElement::dx, #IMPLIED attrib: dx
|
||||
{
|
||||
nsCOMPtr<nsIDOMSVGLengthList> lengthList;
|
||||
rv = NS_NewSVGLengthList(getter_AddRefs(lengthList), this);
|
||||
rv = NS_NewSVGLengthList(getter_AddRefs(lengthList), this, nsSVGUtils::X);
|
||||
NS_ENSURE_SUCCESS(rv,rv);
|
||||
rv = NS_NewSVGAnimatedLengthList(getter_AddRefs(mdX),
|
||||
lengthList);
|
||||
|
@ -167,7 +167,7 @@ nsSVGTextElement::Init()
|
|||
// DOM property: nsIDOMSVGTextPositioningElement::dy, #IMPLIED attrib: dy
|
||||
{
|
||||
nsCOMPtr<nsIDOMSVGLengthList> lengthList;
|
||||
rv = NS_NewSVGLengthList(getter_AddRefs(lengthList), this);
|
||||
rv = NS_NewSVGLengthList(getter_AddRefs(lengthList), this, nsSVGUtils::Y);
|
||||
NS_ENSURE_SUCCESS(rv,rv);
|
||||
rv = NS_NewSVGAnimatedLengthList(getter_AddRefs(mdY),
|
||||
lengthList);
|
||||
|
|
|
@ -129,7 +129,8 @@ nsSVGTextPathFrame::Init(nsIContent* aContent,
|
|||
return NS_ERROR_FAILURE;
|
||||
|
||||
NS_NewSVGLengthList(getter_AddRefs(mX),
|
||||
NS_STATIC_CAST(nsSVGElement*, mContent));
|
||||
NS_STATIC_CAST(nsSVGElement*, mContent),
|
||||
nsSVGUtils::X);
|
||||
if (mX) {
|
||||
nsCOMPtr<nsIDOMSVGLength> length;
|
||||
mX->AppendItem(mStartOffset, getter_AddRefs(length));
|
||||
|
|
Загрузка…
Ссылка в новой задаче