Bug 1288626 Part 1 - Move nsBasicShape and nsStyleClipPath into mozilla namespace. r=heycam

MozReview-Commit-ID: D9wwa1rLUNa
This commit is contained in:
Ting-Yu Lin 2016-08-09 00:15:04 +08:00
Родитель 047fb141e9
Коммит 9eec95b855
2 изменённых файлов: 16 добавлений и 12 удалений

Просмотреть файл

@ -644,12 +644,12 @@ private:
const nsStyleFilter& aStyleFilter);
already_AddRefed<CSSValue> CreatePrimitiveValueForClipPath(
const nsStyleBasicShape* aStyleBasicShape,
const mozilla::nsStyleBasicShape* aStyleBasicShape,
mozilla::StyleClipShapeSizing aSizingBox);
// Helper function for computing basic shape styles.
already_AddRefed<CSSValue> CreatePrimitiveValueForBasicShape(
const nsStyleBasicShape* aStyleBasicShape);
const mozilla::nsStyleBasicShape* aStyleBasicShape);
void BoxValuesToString(nsAString& aString,
const nsTArray<nsStyleCoord>& aBoxValues);
void BasicShapeRadiiToString(nsAString& aCssText,

Просмотреть файл

@ -3436,6 +3436,8 @@ private:
uint8_t mContextFlags; // [inherited]
};
namespace mozilla {
class nsStyleBasicShape final
{
public:
@ -3547,27 +3549,27 @@ struct nsStyleClipPath
return !(*this == aOther);
}
mozilla::StyleClipPathType GetType() const {
StyleClipPathType GetType() const {
return mType;
}
FragmentOrURL* GetURL() const {
NS_ASSERTION(mType == mozilla::StyleClipPathType::URL, "wrong clip-path type");
NS_ASSERTION(mType == StyleClipPathType::URL, "wrong clip-path type");
return mURL;
}
bool SetURL(const nsCSSValue* aValue);
nsStyleBasicShape* GetBasicShape() const {
NS_ASSERTION(mType == mozilla::StyleClipPathType::Shape, "wrong clip-path type");
NS_ASSERTION(mType == StyleClipPathType::Shape, "wrong clip-path type");
return mBasicShape;
}
void SetBasicShape(nsStyleBasicShape* mBasicShape,
mozilla::StyleClipShapeSizing aSizingBox =
mozilla::StyleClipShapeSizing::NoBox);
StyleClipShapeSizing aSizingBox =
StyleClipShapeSizing::NoBox);
mozilla::StyleClipShapeSizing GetSizingBox() const { return mSizingBox; }
void SetSizingBox(mozilla::StyleClipShapeSizing aSizingBox);
StyleClipShapeSizing GetSizingBox() const { return mSizingBox; }
void SetSizingBox(StyleClipShapeSizing aSizingBox);
private:
void ReleaseRef();
@ -3579,10 +3581,12 @@ private:
nsStyleBasicShape* mBasicShape;
FragmentOrURL* mURL;
};
mozilla::StyleClipPathType mType;
mozilla::StyleClipShapeSizing mSizingBox;
StyleClipPathType mType;
StyleClipShapeSizing mSizingBox;
};
} // namespace mozilla
struct nsStyleFilter
{
nsStyleFilter();
@ -3678,7 +3682,7 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleSVGReset
}
nsStyleImageLayers mMask;
nsStyleClipPath mClipPath; // [reset]
mozilla::nsStyleClipPath mClipPath; // [reset]
nscolor mStopColor; // [reset]
nscolor mFloodColor; // [reset]
nscolor mLightingColor; // [reset]