Bug 1288626 Part 4 - Rename nsStyleClipPath to StyleClipPath. r=heycam

MozReview-Commit-ID: 2iT4elvtTGd
This commit is contained in:
Ting-Yu Lin 2016-08-09 00:15:05 +08:00
Родитель cdfcb937ce
Коммит c10998a42b
5 изменённых файлов: 30 добавлений и 30 удалений

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

@ -3493,7 +3493,7 @@ ExtractImageLayerSizePairList(const nsStyleImageLayers& aLayer,
} }
static bool static bool
StyleClipBasicShapeToCSSArray(const nsStyleClipPath& aClipPath, StyleClipBasicShapeToCSSArray(const StyleClipPath& aClipPath,
nsCSSValue::Array* aResult) nsCSSValue::Array* aResult)
{ {
MOZ_ASSERT(aResult->Count() == 2, MOZ_ASSERT(aResult->Count() == 2,
@ -3953,7 +3953,7 @@ StyleAnimationValue::ExtractComputedValue(nsCSSProperty aProperty,
case eCSSProperty_clip_path: { case eCSSProperty_clip_path: {
const nsStyleSVGReset* svgReset = const nsStyleSVGReset* svgReset =
static_cast<const nsStyleSVGReset*>(styleStruct); static_cast<const nsStyleSVGReset*>(styleStruct);
const nsStyleClipPath& clipPath = svgReset->mClipPath; const StyleClipPath& clipPath = svgReset->mClipPath;
const StyleClipPathType type = clipPath.GetType(); const StyleClipPathType type = clipPath.GetType();
if (type == StyleClipPathType::URL) { if (type == StyleClipPathType::URL) {

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

@ -9731,7 +9731,7 @@ GetStyleBasicShapeFromCSSValue(const nsCSSValue& aValue,
} }
static void static void
SetStyleClipPathToCSSValue(nsStyleClipPath* aStyleClipPath, SetStyleClipPathToCSSValue(StyleClipPath* aStyleClipPath,
const nsCSSValue* aValue, const nsCSSValue* aValue,
nsStyleContext* aStyleContext, nsStyleContext* aStyleContext,
nsPresContext* aPresContext, nsPresContext* aPresContext,
@ -9879,19 +9879,19 @@ nsRuleNode::ComputeSVGResetData(void* aStartStruct,
case eCSSUnit_None: case eCSSUnit_None:
case eCSSUnit_Initial: case eCSSUnit_Initial:
case eCSSUnit_Unset: case eCSSUnit_Unset:
svgReset->mClipPath = nsStyleClipPath(); svgReset->mClipPath = StyleClipPath();
break; break;
case eCSSUnit_Inherit: case eCSSUnit_Inherit:
conditions.SetUncacheable(); conditions.SetUncacheable();
svgReset->mClipPath = parentSVGReset->mClipPath; svgReset->mClipPath = parentSVGReset->mClipPath;
break; break;
case eCSSUnit_URL: { case eCSSUnit_URL: {
svgReset->mClipPath = nsStyleClipPath(); svgReset->mClipPath = StyleClipPath();
svgReset->mClipPath.SetURL(clipPathValue); svgReset->mClipPath.SetURL(clipPathValue);
break; break;
} }
case eCSSUnit_Array: { case eCSSUnit_Array: {
svgReset->mClipPath = nsStyleClipPath(); svgReset->mClipPath = StyleClipPath();
SetStyleClipPathToCSSValue(&svgReset->mClipPath, clipPathValue, aContext, SetStyleClipPathToCSSValue(&svgReset->mClipPath, clipPathValue, aContext,
mPresContext, conditions); mPresContext, conditions);
break; break;

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

@ -1107,16 +1107,16 @@ FragmentOrURL::Resolve(nsIContent* aContent) const
} }
// -------------------- // --------------------
// nsStyleClipPath // StyleClipPath
// //
nsStyleClipPath::nsStyleClipPath() StyleClipPath::StyleClipPath()
: mURL(nullptr) : mURL(nullptr)
, mType(StyleClipPathType::None_) , mType(StyleClipPathType::None_)
, mSizingBox(StyleClipShapeSizing::NoBox) , mSizingBox(StyleClipShapeSizing::NoBox)
{ {
} }
nsStyleClipPath::nsStyleClipPath(const nsStyleClipPath& aSource) StyleClipPath::StyleClipPath(const StyleClipPath& aSource)
: mURL(nullptr) : mURL(nullptr)
, mType(StyleClipPathType::None_) , mType(StyleClipPathType::None_)
, mSizingBox(StyleClipShapeSizing::NoBox) , mSizingBox(StyleClipShapeSizing::NoBox)
@ -1130,13 +1130,13 @@ nsStyleClipPath::nsStyleClipPath(const nsStyleClipPath& aSource)
} }
} }
nsStyleClipPath::~nsStyleClipPath() StyleClipPath::~StyleClipPath()
{ {
ReleaseRef(); ReleaseRef();
} }
nsStyleClipPath& StyleClipPath&
nsStyleClipPath::operator=(const nsStyleClipPath& aOther) StyleClipPath::operator=(const StyleClipPath& aOther)
{ {
if (this == &aOther) { if (this == &aOther) {
return *this; return *this;
@ -1157,7 +1157,7 @@ nsStyleClipPath::operator=(const nsStyleClipPath& aOther)
} }
bool bool
nsStyleClipPath::operator==(const nsStyleClipPath& aOther) const StyleClipPath::operator==(const StyleClipPath& aOther) const
{ {
if (mType != aOther.mType) { if (mType != aOther.mType) {
return false; return false;
@ -1176,7 +1176,7 @@ nsStyleClipPath::operator==(const nsStyleClipPath& aOther) const
} }
void void
nsStyleClipPath::ReleaseRef() StyleClipPath::ReleaseRef()
{ {
if (mType == StyleClipPathType::Shape) { if (mType == StyleClipPathType::Shape) {
NS_ASSERTION(mBasicShape, "expected pointer"); NS_ASSERTION(mBasicShape, "expected pointer");
@ -1191,7 +1191,7 @@ nsStyleClipPath::ReleaseRef()
} }
void void
nsStyleClipPath::CopyURL(const nsStyleClipPath& aOther) StyleClipPath::CopyURL(const StyleClipPath& aOther)
{ {
ReleaseRef(); ReleaseRef();
@ -1200,7 +1200,7 @@ nsStyleClipPath::CopyURL(const nsStyleClipPath& aOther)
} }
bool bool
nsStyleClipPath::SetURL(const nsCSSValue* aValue) StyleClipPath::SetURL(const nsCSSValue* aValue)
{ {
if (!aValue->GetURLValue()) { if (!aValue->GetURLValue()) {
return false; return false;
@ -1215,7 +1215,7 @@ nsStyleClipPath::SetURL(const nsCSSValue* aValue)
} }
void void
nsStyleClipPath::SetBasicShape(StyleBasicShape* aBasicShape, StyleClipPath::SetBasicShape(StyleBasicShape* aBasicShape,
StyleClipShapeSizing aSizingBox) StyleClipShapeSizing aSizingBox)
{ {
NS_ASSERTION(aBasicShape, "expected pointer"); NS_ASSERTION(aBasicShape, "expected pointer");
@ -1227,7 +1227,7 @@ nsStyleClipPath::SetBasicShape(StyleBasicShape* aBasicShape,
} }
void void
nsStyleClipPath::SetSizingBox(StyleClipShapeSizing aSizingBox) StyleClipPath::SetSizingBox(StyleClipShapeSizing aSizingBox)
{ {
ReleaseRef(); ReleaseRef();
mSizingBox = aSizingBox; mSizingBox = aSizingBox;

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

@ -3531,16 +3531,16 @@ private:
nsStyleCorners mRadius; nsStyleCorners mRadius;
}; };
struct nsStyleClipPath struct StyleClipPath
{ {
nsStyleClipPath(); StyleClipPath();
nsStyleClipPath(const nsStyleClipPath& aSource); StyleClipPath(const StyleClipPath& aSource);
~nsStyleClipPath(); ~StyleClipPath();
nsStyleClipPath& operator=(const nsStyleClipPath& aOther); StyleClipPath& operator=(const StyleClipPath& aOther);
bool operator==(const nsStyleClipPath& aOther) const; bool operator==(const StyleClipPath& aOther) const;
bool operator!=(const nsStyleClipPath& aOther) const { bool operator!=(const StyleClipPath& aOther) const {
return !(*this == aOther); return !(*this == aOther);
} }
@ -3568,7 +3568,7 @@ struct nsStyleClipPath
private: private:
void ReleaseRef(); void ReleaseRef();
void CopyURL(const nsStyleClipPath& aOther); void CopyURL(const StyleClipPath& aOther);
void* operator new(size_t) = delete; void* operator new(size_t) = delete;
@ -3677,7 +3677,7 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleSVGReset
} }
nsStyleImageLayers mMask; nsStyleImageLayers mMask;
mozilla::nsStyleClipPath mClipPath; // [reset] mozilla::StyleClipPath mClipPath; // [reset]
nscolor mStopColor; // [reset] nscolor mStopColor; // [reset]
nscolor mFloodColor; // [reset] nscolor mFloodColor; // [reset]
nscolor mLightingColor; // [reset] nscolor mLightingColor; // [reset]

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

@ -28,7 +28,7 @@ public:
const gfxPoint& aPoint); const gfxPoint& aPoint);
private: private:
explicit nsCSSClipPathInstance(nsIFrame* aFrame, explicit nsCSSClipPathInstance(nsIFrame* aFrame,
const nsStyleClipPath aClipPathStyle) const StyleClipPath aClipPathStyle)
: mTargetFrame(aFrame) : mTargetFrame(aFrame)
, mClipPathStyle(aClipPathStyle) , mClipPathStyle(aClipPathStyle)
{ {
@ -49,7 +49,7 @@ private:
* The frame for the element that is currently being clipped. * The frame for the element that is currently being clipped.
*/ */
nsIFrame* mTargetFrame; nsIFrame* mTargetFrame;
nsStyleClipPath mClipPathStyle; StyleClipPath mClipPathStyle;
}; };
} // namespace mozilla } // namespace mozilla