Bug 1295084 Part 1 - Move FragmentOrURL into mozilla namespace.
--- a/layout/style/nsComputedDOMStyle.h
+++ b/layout/style/nsComputedDOMStyle.h
@@ -585,17 +585,17 @@ private:
void SetToRGBAColor(nsROCSSPrimitiveValue* aValue, nscolor aColor);
void SetValueToStyleImage(const nsStyleImage& aStyleImage,
nsROCSSPrimitiveValue* aValue);
void SetValueToPositionCoord(
const nsStyleImageLayers::Position::PositionCoord& aCoord,
nsROCSSPrimitiveValue* aValue);
void SetValueToPosition(const nsStyleImageLayers::Position& aPosition,
nsDOMCSSValueList* aValueList);
- void SetValueToFragmentOrURL(const FragmentOrURL* aFragmentOrURL,
+ void SetValueToFragmentOrURL(const mozilla::FragmentOrURL* aFragmentOrURL,
nsROCSSPrimitiveValue* aValue);
/**
* A method to get a percentage base for a percentage value. Returns true
* if a percentage base value was determined, false otherwise.
*/
typedef bool (nsComputedDOMStyle::*PercentageBaseGetter)(nscoord&);
--- a/layout/style/nsStyleStruct.h
+++ b/layout/style/nsStyleStruct.h
@@ -105,16 +105,18 @@ static_assert(int(mozilla::SheetType::Co
"NS_RULE_NODE_LEVEL_MASK cannot fit SheetType");
static_assert(NS_STYLE_INHERIT_MASK == (1 << nsStyleStructID_Length) - 1,
"NS_STYLE_INHERIT_MASK is not correct");
static_assert((NS_RULE_NODE_IS_ANIMATION_RULE & NS_STYLE_INHERIT_MASK) == 0,
"NS_RULE_NODE_IS_ANIMATION_RULE must not overlap the style struct bits.");
+namespace mozilla {
+
struct FragmentOrURL
{
FragmentOrURL() : mIsLocalRef(false) {}
FragmentOrURL(const FragmentOrURL& aSource)
: mIsLocalRef(false)
{ *this = aSource; }
void SetValue(const nsCSSValue* aValue);
@@ -138,16 +140,18 @@ struct FragmentOrURL
bool IsLocalRef() const { return mIsLocalRef; }
private:
nsCOMPtr<nsIURI> mURL;
bool mIsLocalRef;
};
+} // namespace mozilla
+
// The lifetime of these objects is managed by the presshell's arena.
struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleFont
{
nsStyleFont(const nsFont& aFont, StyleStructContext aContext);
nsStyleFont(const nsStyleFont& aStyleFont);
explicit nsStyleFont(StyleStructContext aContext);
~nsStyleFont() {
MOZ_COUNT_DTOR(nsStyleFont);
@@ -684,17 +688,17 @@ struct nsStyleImageLayers {
return !(*this == aOther);
}
};
struct Layer;
friend struct Layer;
struct Layer {
nsStyleImage mImage; // [reset]
- FragmentOrURL mSourceURI; // [reset]
+ mozilla::FragmentOrURL mSourceURI; // [reset]
// mask-only property
// This property is used for mask layer only.
// For a background layer, it should always
// be the initial value, which is nullptr.
// Store mask-image URI so that we can resolve
// SVG mask path later.
Position mPosition; // [reset] See nsStyleConsts.h
Size mSize; // [reset]
@@ -3518,17 +3522,17 @@ enum nsStyleSVGOpacitySource : uint8_t {
eStyleSVGOpacitySource_ContextFillOpacity,
eStyleSVGOpacitySource_ContextStrokeOpacity
};
struct nsStyleSVGPaint
{
union {
nscolor mColor;
- FragmentOrURL* mPaintServer;
+ mozilla::FragmentOrURL* mPaintServer;
} mPaint;
nsStyleSVGPaintType mType;
nscolor mFallbackColor;
explicit nsStyleSVGPaint(nsStyleSVGPaintType aType = nsStyleSVGPaintType(0));
nsStyleSVGPaint(const nsStyleSVGPaint& aSource);
~nsStyleSVGPaint();
void Reset();
@@ -3569,19 +3573,19 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
// CalcDifference never returns nsChangeHint_NeedReflow as a hint
// not handled for descendants, and never returns
// nsChangeHint_ClearAncestorIntrinsics at all.
return nsChangeHint_NeedReflow;
}
nsStyleSVGPaint mFill; // [inherited]
nsStyleSVGPaint mStroke; // [inherited]
- FragmentOrURL mMarkerEnd; // [inherited]
- FragmentOrURL mMarkerMid; // [inherited]
- FragmentOrURL mMarkerStart; // [inherited]
+ mozilla::FragmentOrURL mMarkerEnd; // [inherited]
+ mozilla::FragmentOrURL mMarkerMid; // [inherited]
+ mozilla::FragmentOrURL mMarkerStart; // [inherited]
nsTArray<nsStyleCoord> mStrokeDasharray; // [inherited] coord, percent, factor
nsStyleCoord mStrokeDashoffset; // [inherited] coord, percent, factor
nsStyleCoord mStrokeWidth; // [inherited] coord, percent, factor
float mFillOpacity; // [inherited]
float mStrokeMiterlimit; // [inherited]
float mStrokeOpacity; // [inherited]
@@ -3696,17 +3700,17 @@ struct nsStyleFilter
NS_ASSERTION(mType != NS_STYLE_FILTER_DROP_SHADOW &&
mType != NS_STYLE_FILTER_URL &&
mType != NS_STYLE_FILTER_NONE, "wrong filter type");
return mFilterParameter;
}
void SetFilterParameter(const nsStyleCoord& aFilterParameter,
int32_t aType);
- FragmentOrURL* GetURL() const {
+ mozilla::FragmentOrURL* GetURL() const {
NS_ASSERTION(mType == NS_STYLE_FILTER_URL, "wrong filter type");
return mURL;
}
bool SetURL(const nsCSSValue* aValue);
nsCSSShadowArray* GetDropShadow() const {
NS_ASSERTION(mType == NS_STYLE_FILTER_DROP_SHADOW, "wrong filter type");
@@ -3716,17 +3720,17 @@ struct nsStyleFilter
private:
void ReleaseRef();
void CopyURL(const nsStyleFilter& aOther);
int32_t mType; // see NS_STYLE_FILTER_* constants in nsStyleConsts.h
nsStyleCoord mFilterParameter; // coord, percent, factor, angle
union {
- FragmentOrURL* mURL;
+ mozilla::FragmentOrURL* mURL;
nsCSSShadowArray* mDropShadow;
};
};
template<>
struct nsTArray_CopyChooser<nsStyleFilter>
{
typedef nsTArray_CopyWithConstructors<nsStyleFilter> Type;
--- a/layout/svg/nsSVGEffects.h
+++ b/layout/svg/nsSVGEffects.h
@@ -594,17 +594,17 @@ public:
static nsSVGPaintingProperty*
GetPaintingPropertyForURI(nsIURI* aURI, nsIFrame* aFrame,
URIObserverHashtablePropertyDescriptor aProp);
/**
* A helper function to resolve marker's URL.
*/
static already_AddRefed<nsIURI>
- GetMarkerURI(nsIFrame* aFrame, FragmentOrURL nsStyleSVG::* aMarker);
+ GetMarkerURI(nsIFrame* aFrame, mozilla::FragmentOrURL nsStyleSVG::* aMarker);
/**
* A helper function to resolve clip-path URL.
*/
static already_AddRefed<nsIURI>
GetClipPathURI(nsIFrame* aFrame);
/**