Bug 1402246 - Remove "friend struct" declarations in nsStyleStruct.h.
Those structs do not have any private section, so those "friend struct"
declarations are not needed.
MozReview-Commit-ID: BYPPPLAdiEQ
--- a/layout/style/nsStyleStruct.h
+++ b/layout/style/nsStyleStruct.h
@@ -635,18 +635,16 @@ struct nsStyleImageLayers {
explicit nsStyleImageLayers(LayerType aType);
nsStyleImageLayers(const nsStyleImageLayers &aSource);
~nsStyleImageLayers() {
MOZ_COUNT_DTOR(nsStyleImageLayers);
}
static bool IsInitialPositionForLayerType(mozilla::Position aPosition, LayerType aType);
- struct Size;
- friend struct Size;
struct Size {
struct Dimension : public nsStyleCoord::CalcValue {
nscoord ResolveLengthPercentage(nscoord aAvailable) const {
double d = double(mPercent) * double(aAvailable) + double(mLength);
if (d < 0.0) {
return 0;
}
return NSToCoordRoundWithClamp(float(d));
@@ -698,18 +696,16 @@ struct nsStyleImageLayers {
void SetInitialValues();
bool operator==(const Size& aOther) const;
bool operator!=(const Size& aOther) const {
return !(*this == aOther);
}
};
- struct Repeat;
- friend struct Repeat;
struct Repeat {
mozilla::StyleImageLayerRepeat mXRepeat, mYRepeat;
// Initialize nothing
Repeat() {}
bool IsInitialValue() const {
return mXRepeat == mozilla::StyleImageLayerRepeat::Repeat &&
@@ -731,18 +727,16 @@ struct nsStyleImageLayers {
return mXRepeat == aOther.mXRepeat &&
mYRepeat == aOther.mYRepeat;
}
bool operator!=(const Repeat& aOther) const {
return !(*this == aOther);
}
};
- struct Layer;
- friend struct Layer;
struct Layer {
typedef mozilla::StyleGeometryBox StyleGeometryBox;
nsStyleImage mImage; // [reset]
mozilla::Position mPosition; // [reset]
Size mSize; // [reset]
StyleGeometryBox mClip; // [reset] See nsStyleConsts.h
MOZ_INIT_OUTSIDE_CTOR