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
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<const nsStyleSVGReset*>(styleStruct);
const nsStyleClipPath& clipPath = svgReset->mClipPath;
const StyleClipPath& clipPath = svgReset->mClipPath;
const StyleClipPathType type = clipPath.GetType();
if (type == StyleClipPathType::URL) {

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

@ -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;

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

@ -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;

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

@ -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]

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

@ -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