зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1515187 - Part 3 move SVGContentUtils into the mozilla namespace r=dholbert
This commit is contained in:
Родитель
4d21c5dd06
Коммит
323a94ea24
|
@ -34,11 +34,12 @@
|
|||
#include "SVGPathData.h"
|
||||
#include "SVGPathElement.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
using namespace mozilla::dom::SVGPreserveAspectRatio_Binding;
|
||||
using namespace mozilla::gfx;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
SVGSVGElement* SVGContentUtils::GetOuterSVGElement(nsSVGElement* aSVGElement) {
|
||||
Element* element = nullptr;
|
||||
Element* ancestor = aSVGElement->GetParentElementCrossingShadowRoot();
|
||||
|
@ -803,3 +804,5 @@ bool SVGContentUtils::ShapeTypeHasNoCorners(const nsIContent* aContent) {
|
|||
return aContent &&
|
||||
aContent->IsAnyOfSVGElements(nsGkAtoms::circle, nsGkAtoms::ellipse);
|
||||
}
|
||||
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -36,8 +36,6 @@ class SVGSVGElement;
|
|||
class SVGViewportElement;
|
||||
} // namespace dom
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
#define SVG_ZERO_LENGTH_PATH_FIX_FACTOR 512
|
||||
|
||||
/**
|
||||
|
@ -75,20 +73,15 @@ enum SVGTransformTypes {
|
|||
*/
|
||||
class SVGContentUtils {
|
||||
public:
|
||||
typedef mozilla::ComputedStyle ComputedStyle;
|
||||
typedef mozilla::gfx::Float Float;
|
||||
typedef mozilla::gfx::Matrix Matrix;
|
||||
typedef mozilla::gfx::Rect Rect;
|
||||
typedef mozilla::gfx::StrokeOptions StrokeOptions;
|
||||
typedef mozilla::SVGAnimatedPreserveAspectRatio
|
||||
SVGAnimatedPreserveAspectRatio;
|
||||
typedef mozilla::SVGPreserveAspectRatio SVGPreserveAspectRatio;
|
||||
|
||||
/*
|
||||
* Get the outer SVG element of an nsIContent
|
||||
*/
|
||||
static mozilla::dom::SVGSVGElement* GetOuterSVGElement(
|
||||
nsSVGElement* aSVGElement);
|
||||
static dom::SVGSVGElement* GetOuterSVGElement(nsSVGElement* aSVGElement);
|
||||
|
||||
/**
|
||||
* Activates the animation element aContent as a result of navigation to the
|
||||
|
@ -344,4 +337,6 @@ class SVGContentUtils {
|
|||
static bool ShapeTypeHasNoCorners(const nsIContent* aContent);
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
#endif
|
||||
|
|
|
@ -157,7 +157,7 @@ class nsSVGElement : public nsSVGElementBase // nsIContent
|
|||
*/
|
||||
virtual gfxMatrix PrependLocalTransformsTo(
|
||||
const gfxMatrix& aMatrix,
|
||||
SVGTransformTypes aWhich = eAllTransforms) const;
|
||||
mozilla::SVGTransformTypes aWhich = mozilla::eAllTransforms) const;
|
||||
|
||||
// Setter for to set the current <animateMotion> transformation
|
||||
// Only visible for nsSVGGraphicElement, so it's a no-op here, and that
|
||||
|
|
|
@ -89,8 +89,8 @@ class nsSVGLength2 {
|
|||
typedef mozilla::dom::SVGViewportElement SVGViewportElement;
|
||||
|
||||
public:
|
||||
void Init(uint8_t aCtxType = SVGContentUtils::XY, uint8_t aAttrEnum = 0xff,
|
||||
float aValue = 0,
|
||||
void Init(uint8_t aCtxType = mozilla::SVGContentUtils::XY,
|
||||
uint8_t aAttrEnum = 0xff, float aValue = 0,
|
||||
uint8_t aUnitType =
|
||||
mozilla::dom::SVGLength_Binding::SVG_LENGTHTYPE_NUMBER) {
|
||||
mAnimVal = mBaseVal = aValue;
|
||||
|
|
Загрузка…
Ссылка в новой задаче