зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1266621 part 4 - Remove constructors of StyleComplexColor. r=heycam
So that they can be put inside anonymous structs and unions. MozReview-Commit-ID: 8OMxkSZJEOz --HG-- extra : rebase_source : 9626d350649f4ba6dba597e3df05fe1829307610
This commit is contained in:
Родитель
6972756593
Коммит
ea44b70aba
|
@ -25,14 +25,8 @@ struct StyleComplexColor
|
|||
nscolor mColor;
|
||||
uint8_t mForegroundRatio;
|
||||
|
||||
StyleComplexColor() {}
|
||||
StyleComplexColor(nscolor aColor, uint_fast8_t aForegroundRatio)
|
||||
: mColor(aColor), mForegroundRatio(aForegroundRatio) {}
|
||||
|
||||
static StyleComplexColor FromColor(nscolor aColor)
|
||||
{ return StyleComplexColor(aColor, 0); }
|
||||
static StyleComplexColor CurrentColor()
|
||||
{ return StyleComplexColor(NS_RGBA(0, 0, 0, 0), 255); }
|
||||
static StyleComplexColor FromColor(nscolor aColor) { return {aColor, 0}; }
|
||||
static StyleComplexColor CurrentColor() { return {NS_RGBA(0, 0, 0, 0), 255}; }
|
||||
|
||||
bool IsNumericColor() const { return mForegroundRatio == 0; }
|
||||
bool IsCurrentColor() const { return mForegroundRatio == 255; }
|
||||
|
|
|
@ -375,8 +375,7 @@ struct ComplexColorData
|
|||
|
||||
StyleComplexColor ToComplexColor() const
|
||||
{
|
||||
return StyleComplexColor(
|
||||
mColor.ToColor(), ClampColor(mForegroundRatio * 255.0f));
|
||||
return {mColor.ToColor(), ClampColor(mForegroundRatio * 255.0f)};
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче