From c10998a42b46ce59e111b2f0ca4caeee85a72e5d Mon Sep 17 00:00:00 2001 From: Ting-Yu Lin Date: Tue, 9 Aug 2016 00:15:05 +0800 Subject: [PATCH] Bug 1288626 Part 4 - Rename nsStyleClipPath to StyleClipPath. r=heycam MozReview-Commit-ID: 2iT4elvtTGd --- layout/style/StyleAnimationValue.cpp | 4 ++-- layout/style/nsRuleNode.cpp | 8 ++++---- layout/style/nsStyleStruct.cpp | 26 +++++++++++++------------- layout/style/nsStyleStruct.h | 18 +++++++++--------- layout/svg/nsCSSClipPathInstance.h | 4 ++-- 5 files changed, 30 insertions(+), 30 deletions(-) diff --git a/layout/style/StyleAnimationValue.cpp b/layout/style/StyleAnimationValue.cpp index 80d9ea32d7f7..f6cd09076115 100644 --- a/layout/style/StyleAnimationValue.cpp +++ b/layout/style/StyleAnimationValue.cpp @@ -3493,7 +3493,7 @@ ExtractImageLayerSizePairList(const nsStyleImageLayers& aLayer, } static bool -StyleClipBasicShapeToCSSArray(const nsStyleClipPath& aClipPath, +StyleClipBasicShapeToCSSArray(const StyleClipPath& aClipPath, nsCSSValue::Array* aResult) { MOZ_ASSERT(aResult->Count() == 2, @@ -3953,7 +3953,7 @@ StyleAnimationValue::ExtractComputedValue(nsCSSProperty aProperty, case eCSSProperty_clip_path: { const nsStyleSVGReset* svgReset = static_cast(styleStruct); - const nsStyleClipPath& clipPath = svgReset->mClipPath; + const StyleClipPath& clipPath = svgReset->mClipPath; const StyleClipPathType type = clipPath.GetType(); if (type == StyleClipPathType::URL) { diff --git a/layout/style/nsRuleNode.cpp b/layout/style/nsRuleNode.cpp index 29539bf42310..e70626c35e7d 100644 --- a/layout/style/nsRuleNode.cpp +++ b/layout/style/nsRuleNode.cpp @@ -9731,7 +9731,7 @@ GetStyleBasicShapeFromCSSValue(const nsCSSValue& aValue, } static void -SetStyleClipPathToCSSValue(nsStyleClipPath* aStyleClipPath, +SetStyleClipPathToCSSValue(StyleClipPath* aStyleClipPath, const nsCSSValue* aValue, nsStyleContext* aStyleContext, nsPresContext* aPresContext, @@ -9879,19 +9879,19 @@ nsRuleNode::ComputeSVGResetData(void* aStartStruct, case eCSSUnit_None: case eCSSUnit_Initial: case eCSSUnit_Unset: - svgReset->mClipPath = nsStyleClipPath(); + svgReset->mClipPath = StyleClipPath(); break; case eCSSUnit_Inherit: conditions.SetUncacheable(); svgReset->mClipPath = parentSVGReset->mClipPath; break; case eCSSUnit_URL: { - svgReset->mClipPath = nsStyleClipPath(); + svgReset->mClipPath = StyleClipPath(); svgReset->mClipPath.SetURL(clipPathValue); break; } case eCSSUnit_Array: { - svgReset->mClipPath = nsStyleClipPath(); + svgReset->mClipPath = StyleClipPath(); SetStyleClipPathToCSSValue(&svgReset->mClipPath, clipPathValue, aContext, mPresContext, conditions); break; diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp index bc940a38b806..25e80a35da7b 100644 --- a/layout/style/nsStyleStruct.cpp +++ b/layout/style/nsStyleStruct.cpp @@ -1107,16 +1107,16 @@ FragmentOrURL::Resolve(nsIContent* aContent) const } // -------------------- -// nsStyleClipPath +// StyleClipPath // -nsStyleClipPath::nsStyleClipPath() +StyleClipPath::StyleClipPath() : mURL(nullptr) , mType(StyleClipPathType::None_) , mSizingBox(StyleClipShapeSizing::NoBox) { } -nsStyleClipPath::nsStyleClipPath(const nsStyleClipPath& aSource) +StyleClipPath::StyleClipPath(const StyleClipPath& aSource) : mURL(nullptr) , mType(StyleClipPathType::None_) , mSizingBox(StyleClipShapeSizing::NoBox) @@ -1130,13 +1130,13 @@ nsStyleClipPath::nsStyleClipPath(const nsStyleClipPath& aSource) } } -nsStyleClipPath::~nsStyleClipPath() +StyleClipPath::~StyleClipPath() { ReleaseRef(); } -nsStyleClipPath& -nsStyleClipPath::operator=(const nsStyleClipPath& aOther) +StyleClipPath& +StyleClipPath::operator=(const StyleClipPath& aOther) { if (this == &aOther) { return *this; @@ -1157,7 +1157,7 @@ nsStyleClipPath::operator=(const nsStyleClipPath& aOther) } bool -nsStyleClipPath::operator==(const nsStyleClipPath& aOther) const +StyleClipPath::operator==(const StyleClipPath& aOther) const { if (mType != aOther.mType) { return false; @@ -1176,7 +1176,7 @@ nsStyleClipPath::operator==(const nsStyleClipPath& aOther) const } void -nsStyleClipPath::ReleaseRef() +StyleClipPath::ReleaseRef() { if (mType == StyleClipPathType::Shape) { NS_ASSERTION(mBasicShape, "expected pointer"); @@ -1191,7 +1191,7 @@ nsStyleClipPath::ReleaseRef() } void -nsStyleClipPath::CopyURL(const nsStyleClipPath& aOther) +StyleClipPath::CopyURL(const StyleClipPath& aOther) { ReleaseRef(); @@ -1200,7 +1200,7 @@ nsStyleClipPath::CopyURL(const nsStyleClipPath& aOther) } bool -nsStyleClipPath::SetURL(const nsCSSValue* aValue) +StyleClipPath::SetURL(const nsCSSValue* aValue) { if (!aValue->GetURLValue()) { return false; @@ -1215,8 +1215,8 @@ nsStyleClipPath::SetURL(const nsCSSValue* aValue) } void -nsStyleClipPath::SetBasicShape(StyleBasicShape* aBasicShape, - StyleClipShapeSizing aSizingBox) +StyleClipPath::SetBasicShape(StyleBasicShape* aBasicShape, + StyleClipShapeSizing aSizingBox) { NS_ASSERTION(aBasicShape, "expected pointer"); ReleaseRef(); @@ -1227,7 +1227,7 @@ nsStyleClipPath::SetBasicShape(StyleBasicShape* aBasicShape, } void -nsStyleClipPath::SetSizingBox(StyleClipShapeSizing aSizingBox) +StyleClipPath::SetSizingBox(StyleClipShapeSizing aSizingBox) { ReleaseRef(); mSizingBox = aSizingBox; diff --git a/layout/style/nsStyleStruct.h b/layout/style/nsStyleStruct.h index 76fab4c8c192..9487ff74a91a 100644 --- a/layout/style/nsStyleStruct.h +++ b/layout/style/nsStyleStruct.h @@ -3531,16 +3531,16 @@ private: nsStyleCorners mRadius; }; -struct nsStyleClipPath +struct StyleClipPath { - nsStyleClipPath(); - nsStyleClipPath(const nsStyleClipPath& aSource); - ~nsStyleClipPath(); + StyleClipPath(); + StyleClipPath(const StyleClipPath& aSource); + ~StyleClipPath(); - nsStyleClipPath& operator=(const nsStyleClipPath& aOther); + StyleClipPath& operator=(const StyleClipPath& aOther); - bool operator==(const nsStyleClipPath& aOther) const; - bool operator!=(const nsStyleClipPath& aOther) const { + bool operator==(const StyleClipPath& aOther) const; + bool operator!=(const StyleClipPath& aOther) const { return !(*this == aOther); } @@ -3568,7 +3568,7 @@ struct nsStyleClipPath private: void ReleaseRef(); - void CopyURL(const nsStyleClipPath& aOther); + void CopyURL(const StyleClipPath& aOther); void* operator new(size_t) = delete; @@ -3677,7 +3677,7 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleSVGReset } nsStyleImageLayers mMask; - mozilla::nsStyleClipPath mClipPath; // [reset] + mozilla::StyleClipPath mClipPath; // [reset] nscolor mStopColor; // [reset] nscolor mFloodColor; // [reset] nscolor mLightingColor; // [reset] diff --git a/layout/svg/nsCSSClipPathInstance.h b/layout/svg/nsCSSClipPathInstance.h index 9277ccf535a1..a44e459781d8 100644 --- a/layout/svg/nsCSSClipPathInstance.h +++ b/layout/svg/nsCSSClipPathInstance.h @@ -28,7 +28,7 @@ public: const gfxPoint& aPoint); private: explicit nsCSSClipPathInstance(nsIFrame* aFrame, - const nsStyleClipPath aClipPathStyle) + const StyleClipPath aClipPathStyle) : mTargetFrame(aFrame) , mClipPathStyle(aClipPathStyle) { @@ -49,7 +49,7 @@ private: * The frame for the element that is currently being clipped. */ nsIFrame* mTargetFrame; - nsStyleClipPath mClipPathStyle; + StyleClipPath mClipPathStyle; }; } // namespace mozilla