зеркало из https://github.com/mozilla/gecko-dev.git
Bug 984261 - NS_NewSVGRect to Moz2D. r=heycam
This commit is contained in:
Родитель
d120042dd3
Коммит
29d9aabef8
|
@ -6,6 +6,8 @@
|
|||
#include "mozilla/dom/SVGRect.h"
|
||||
#include "nsSVGElement.h"
|
||||
|
||||
using namespace mozilla::gfx;
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
|
@ -47,9 +49,9 @@ NS_NewSVGRect(nsIContent* aParent, float aX, float aY, float aWidth,
|
|||
}
|
||||
|
||||
already_AddRefed<mozilla::dom::SVGRect>
|
||||
NS_NewSVGRect(nsIContent* aParent, const gfxRect& aRect)
|
||||
NS_NewSVGRect(nsIContent* aParent, const Rect& aRect)
|
||||
{
|
||||
return NS_NewSVGRect(aParent, aRect.X(), aRect.Y(),
|
||||
aRect.Width(), aRect.Height());
|
||||
return NS_NewSVGRect(aParent, aRect.x, aRect.y,
|
||||
aRect.width, aRect.height);
|
||||
}
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
#ifndef mozilla_dom_SVGRect_h
|
||||
#define mozilla_dom_SVGRect_h
|
||||
|
||||
#include "gfxRect.h"
|
||||
#include "mozilla/dom/SVGIRect.h"
|
||||
#include "mozilla/gfx/Rect.h"
|
||||
#include "nsSVGElement.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
@ -84,6 +84,6 @@ NS_NewSVGRect(nsIContent* aParent, float x=0.0f, float y=0.0f,
|
|||
float width=0.0f, float height=0.0f);
|
||||
|
||||
already_AddRefed<mozilla::dom::SVGRect>
|
||||
NS_NewSVGRect(nsIContent* aParent, const gfxRect& rect);
|
||||
NS_NewSVGRect(nsIContent* aParent, const mozilla::gfx::Rect& rect);
|
||||
|
||||
#endif //mozilla_dom_SVGRect_h
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "gfx2DGlue.h"
|
||||
#include "mozilla/dom/SVGAnimatedTransformList.h"
|
||||
#include "mozilla/dom/SVGTransformableElement.h"
|
||||
#include "mozilla/dom/SVGMatrix.h"
|
||||
|
@ -15,6 +16,8 @@
|
|||
#include "nsSVGUtils.h"
|
||||
#include "SVGContentUtils.h"
|
||||
|
||||
using namespace mozilla::gfx;
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
|
@ -183,7 +186,7 @@ SVGTransformableElement::GetBBox(ErrorResult& rv)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
return NS_NewSVGRect(this, nsSVGUtils::GetBBox(frame));
|
||||
return NS_NewSVGRect(this, ToRect(nsSVGUtils::GetBBox(frame)));
|
||||
}
|
||||
|
||||
already_AddRefed<SVGMatrix>
|
||||
|
|
Загрузка…
Ссылка в новой задаче