Bug 1310123 - Move values of static constants in nsStyleStruct to the header. r=mats

MozReview-Commit-ID: J5Fp0iAEnkg

--HG--
extra : rebase_source : b8366ff6b14493f53c0aa8880850adcad7495983
This commit is contained in:
Xidorn Quan 2016-10-25 17:25:10 +11:00
Родитель 144c0a5d23
Коммит 1fa27577d0
2 изменённых файлов: 8 добавлений и 8 удалений

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

@ -45,10 +45,8 @@ static_assert((((1 << nsStyleStructID_Length) - 1) &
~(NS_STYLE_INHERIT_MASK)) == 0,
"Not enough bits in NS_STYLE_INHERIT_MASK");
// These are the limits that we choose to clamp grid line numbers to.
// http://dev.w3.org/csswg/css-grid/#overlarge-grids
const int32_t nsStyleGridLine::kMinLine = -10000;
const int32_t nsStyleGridLine::kMaxLine = 10000;
/* static */ const int32_t nsStyleGridLine::kMinLine;
/* static */ const int32_t nsStyleGridLine::kMaxLine;
static bool
EqualURIs(nsIURI *aURI1, nsIURI *aURI2)
@ -822,7 +820,7 @@ nsStyleXUL::CalcDifference(const nsStyleXUL& aNewData) const
// --------------------
// nsStyleColumn
//
/* static */ const uint32_t nsStyleColumn::kMaxColumnCount = 1000;
/* static */ const uint32_t nsStyleColumn::kMaxColumnCount;
nsStyleColumn::nsStyleColumn(StyleStructContext aContext)
: mColumnCount(NS_STYLE_COLUMN_COUNT_AUTO)

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

@ -1593,9 +1593,11 @@ struct nsStyleGridLine
int32_t mInteger; // 0 means not provided
nsString mLineName; // Empty string means not provided.
// These are the limits that we choose to clamp grid line numbers to.
// http://dev.w3.org/csswg/css-grid/#overlarge-grids
// mInteger is clamped to this range:
static const int32_t kMinLine;
static const int32_t kMaxLine;
static const int32_t kMinLine = -10000;
static const int32_t kMaxLine = 10000;
nsStyleGridLine()
: mHasSpan(false)
@ -3467,7 +3469,7 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleColumn
* This is the maximum number of columns we can process. It's used in both
* nsColumnSetFrame and nsRuleNode.
*/
static const uint32_t kMaxColumnCount;
static const uint32_t kMaxColumnCount = 1000;
uint32_t mColumnCount; // [reset] see nsStyleConsts.h
nsStyleCoord mColumnWidth; // [reset] coord, auto