Bug 1406265 - use Set* and Is* instead of changing/getting the member directly. r=dbaron

MozReview-Commit-ID: 8l2MzjFGci4
This commit is contained in:
Ya-Chieh Wu 2017-10-08 20:06:00 -04:00
parent fb167c6fbf
commit 90add213ed

View File

@ -194,14 +194,25 @@ public:
mozilla::LogicalSide aOwner,
bool aBevel);
bool IsIStartStart() const;
inline bool IsIStartStart() const
{
return (bool)mIStartStart;
}
void SetIStartStart(bool aValue);
inline void SetIStartStart(bool aValue)
{
mIStartStart = aValue;
}
bool IsBStartStart() const;
void SetBStartStart(bool aValue);
inline bool IsBStartStart() const
{
return (bool)mBStartStart;
}
inline void SetBStartStart(bool aValue)
{
mBStartStart = aValue;
}
protected:
BCPixelSize mIStartSize; // size in pixels of iStart border
@ -371,7 +382,8 @@ inline void CellData::SetOverlap(bool aOverlap)
inline BCData::BCData()
{
mIStartOwner = mBStartOwner = eCellOwner;
mIStartStart = mBStartStart = 1;
SetBStartStart(true);
SetIStartStart(true);
mIStartSize = mCornerSubSize = mBStartSize = 0;
mCornerSide = mozilla::eLogicalSideBStart;
mCornerBevel = false;
@ -385,7 +397,7 @@ inline nscoord BCData::GetIStartEdge(BCBorderOwner& aOwner,
bool& aStart) const
{
aOwner = (BCBorderOwner)mIStartOwner;
aStart = (bool)mIStartStart;
aStart = IsIStartStart();
return (nscoord)mIStartSize;
}
@ -396,14 +408,14 @@ inline void BCData::SetIStartEdge(BCBorderOwner aOwner,
{
mIStartOwner = aOwner;
mIStartSize = (aSize > MAX_BORDER_WIDTH) ? MAX_BORDER_WIDTH : aSize;
mIStartStart = aStart;
SetIStartStart(aStart);
}
inline nscoord BCData::GetBStartEdge(BCBorderOwner& aOwner,
bool& aStart) const
{
aOwner = (BCBorderOwner)mBStartOwner;
aStart = (bool)mBStartStart;
aStart = IsBStartStart();
return (nscoord)mBStartSize;
}
@ -414,7 +426,7 @@ inline void BCData::SetBStartEdge(BCBorderOwner aOwner,
{
mBStartOwner = aOwner;
mBStartSize = (aSize > MAX_BORDER_WIDTH) ? MAX_BORDER_WIDTH : aSize;
mBStartStart = aStart;
SetBStartStart(aStart);
}
inline BCPixelSize BCData::GetCorner(mozilla::LogicalSide& aOwnerSide,
@ -434,24 +446,4 @@ inline void BCData::SetCorner(BCPixelSize aSubSize,
mCornerBevel = aBevel;
}
inline bool BCData::IsIStartStart() const
{
return (bool)mIStartStart;
}
inline void BCData::SetIStartStart(bool aValue)
{
mIStartStart = aValue;
}
inline bool BCData::IsBStartStart() const
{
return (bool)mBStartStart;
}
inline void BCData::SetBStartStart(bool aValue)
{
mBStartStart = aValue;
}
#endif