Bug 1370802: Fix style issues in GenericSpecifiedValue subclasses. r?heycam
MozReview-Commit-ID: EsqfWL3AmH6
--- a/layout/style/ServoSpecifiedValues.h
+++ b/layout/style/ServoSpecifiedValues.h
@@ -21,87 +21,78 @@ class ServoSpecifiedValues final: public
{
public:
ServoSpecifiedValues(nsPresContext* aContext, RawServoDeclarationBlock* aDecl);
// GenericSpecifiedValues overrides
bool PropertyIsSet(nsCSSPropertyID aId);
- void SetIdentStringValue(nsCSSPropertyID aId,
- const nsString& aValue);
+ void SetIdentStringValue(nsCSSPropertyID aId, const nsString& aValue);
- void SetIdentStringValueIfUnset(nsCSSPropertyID aId,
- const nsString& aValue) {
+ void SetIdentStringValueIfUnset(nsCSSPropertyID aId, const nsString& aValue)
+ {
if (!PropertyIsSet(aId)) {
SetIdentStringValue(aId, aValue);
}
}
- void SetKeywordValue(nsCSSPropertyID aId,
- int32_t aValue);
+ void SetKeywordValue(nsCSSPropertyID aId, int32_t aValue);
- void SetKeywordValueIfUnset(nsCSSPropertyID aId,
- int32_t aValue) {
+ void SetKeywordValueIfUnset(nsCSSPropertyID aId, int32_t aValue)
+ {
if (!PropertyIsSet(aId)) {
SetKeywordValue(aId, aValue);
}
}
-
- void SetIntValue(nsCSSPropertyID aId,
- int32_t aValue);
+ void SetIntValue(nsCSSPropertyID aId, int32_t aValue);
- void SetPixelValue(nsCSSPropertyID aId,
- float aValue);
+ void SetPixelValue(nsCSSPropertyID aId, float aValue);
- void SetPixelValueIfUnset(nsCSSPropertyID aId,
- float aValue) {
+ void SetPixelValueIfUnset(nsCSSPropertyID aId, float aValue)
+ {
if (!PropertyIsSet(aId)) {
SetPixelValue(aId, aValue);
}
}
- void SetLengthValue(nsCSSPropertyID aId,
- nsCSSValue aValue);
+ void SetLengthValue(nsCSSPropertyID aId, nsCSSValue aValue);
- void SetNumberValue(nsCSSPropertyID aId,
- float aValue);
+ void SetNumberValue(nsCSSPropertyID aId, float aValue);
- void SetPercentValue(nsCSSPropertyID aId,
- float aValue);
+ void SetPercentValue(nsCSSPropertyID aId, float aValue);
void SetAutoValue(nsCSSPropertyID aId);
void SetAutoValueIfUnset(nsCSSPropertyID aId) {
if (!PropertyIsSet(aId)) {
SetAutoValue(aId);
}
}
- void SetPercentValueIfUnset(nsCSSPropertyID aId,
- float aValue) {
+ void SetPercentValueIfUnset(nsCSSPropertyID aId, float aValue)
+ {
if (!PropertyIsSet(aId)) {
SetPercentValue(aId, aValue);
}
}
void SetCurrentColor(nsCSSPropertyID aId);
void SetCurrentColorIfUnset(nsCSSPropertyID aId) {
if (!PropertyIsSet(aId)) {
SetCurrentColor(aId);
}
}
- void SetColorValue(nsCSSPropertyID aId,
- nscolor aValue);
+ void SetColorValue(nsCSSPropertyID aId, nscolor aValue);
- void SetColorValueIfUnset(nsCSSPropertyID aId,
- nscolor aValue) {
+ void SetColorValueIfUnset(nsCSSPropertyID aId, nscolor aValue)
+ {
if (!PropertyIsSet(aId)) {
SetColorValue(aId, aValue);
}
}
void SetFontFamily(const nsString& aValue);
void SetTextDecorationColorOverride();
void SetBackgroundImage(nsAttrValue& aValue);
--- a/layout/style/nsRuleData.h
+++ b/layout/style/nsRuleData.h
@@ -119,108 +119,107 @@ struct nsRuleData final: mozilla::Generi
#undef CSS_PROP
#undef CSS_PROP_PUBLIC_OR_PRIVATE
// GenericSpecifiedValues overrides
bool PropertyIsSet(nsCSSPropertyID aId) {
return ValueFor(aId)->GetUnit() != eCSSUnit_Null;
}
- void SetIdentStringValue(nsCSSPropertyID aId,
- const nsString& aValue) {
+ void SetIdentStringValue(nsCSSPropertyID aId, const nsString& aValue)
+ {
ValueFor(aId)->SetStringValue(aValue, eCSSUnit_Ident);
}
- void SetIdentStringValueIfUnset(nsCSSPropertyID aId,
- const nsString& aValue) {
+ void SetIdentStringValueIfUnset(nsCSSPropertyID aId, const nsString& aValue)
+ {
if (!PropertyIsSet(aId)) {
SetIdentStringValue(aId, aValue);
}
}
- void SetKeywordValue(nsCSSPropertyID aId,
- int32_t aValue) {
+ void SetKeywordValue(nsCSSPropertyID aId, int32_t aValue)
+ {
ValueFor(aId)->SetIntValue(aValue, eCSSUnit_Enumerated);
}
- void SetKeywordValueIfUnset(nsCSSPropertyID aId,
- int32_t aValue) {
+ void SetKeywordValueIfUnset(nsCSSPropertyID aId, int32_t aValue)
+ {
if (!PropertyIsSet(aId)) {
SetKeywordValue(aId, aValue);
}
}
-
- void SetIntValue(nsCSSPropertyID aId,
- int32_t aValue) {
+ void SetIntValue(nsCSSPropertyID aId, int32_t aValue)
+ {
ValueFor(aId)->SetIntValue(aValue, eCSSUnit_Integer);
}
- void SetPixelValue(nsCSSPropertyID aId,
- float aValue) {
+ void SetPixelValue(nsCSSPropertyID aId, float aValue)
+ {
ValueFor(aId)->SetFloatValue(aValue, eCSSUnit_Pixel);
}
- void SetPixelValueIfUnset(nsCSSPropertyID aId,
- float aValue) {
+ void SetPixelValueIfUnset(nsCSSPropertyID aId, float aValue)
+ {
if (!PropertyIsSet(aId)) {
SetPixelValue(aId, aValue);
}
}
- void SetLengthValue(nsCSSPropertyID aId,
- nsCSSValue aValue) {
+ void SetLengthValue(nsCSSPropertyID aId, nsCSSValue aValue)
+ {
nsCSSValue* val = ValueFor(aId);
*val = aValue;
}
- void SetNumberValue(nsCSSPropertyID aId,
- float aValue) {
+ void SetNumberValue(nsCSSPropertyID aId, float aValue)
+ {
ValueFor(aId)->SetFloatValue(aValue, eCSSUnit_Number);
}
- void SetPercentValue(nsCSSPropertyID aId,
- float aValue) {
+ void SetPercentValue(nsCSSPropertyID aId, float aValue)
+ {
ValueFor(aId)->SetPercentValue(aValue);
}
void SetAutoValue(nsCSSPropertyID aId) {
ValueFor(aId)->SetAutoValue();
}
void SetAutoValueIfUnset(nsCSSPropertyID aId) {
if (!PropertyIsSet(aId)) {
SetAutoValue(aId);
}
}
- void SetPercentValueIfUnset(nsCSSPropertyID aId,
- float aValue) {
+ void SetPercentValueIfUnset(nsCSSPropertyID aId, float aValue)
+ {
if (!PropertyIsSet(aId)) {
SetPercentValue(aId, aValue);
}
}
void SetCurrentColor(nsCSSPropertyID aId) {
ValueFor(aId)->SetIntValue(NS_COLOR_CURRENTCOLOR, eCSSUnit_EnumColor);
}
void SetCurrentColorIfUnset(nsCSSPropertyID aId) {
if (!PropertyIsSet(aId)) {
SetCurrentColor(aId);
}
}
- void SetColorValue(nsCSSPropertyID aId,
- nscolor aValue) {
+ void SetColorValue(nsCSSPropertyID aId, nscolor aValue)
+ {
ValueFor(aId)->SetColorValue(aValue);
}
- void SetColorValueIfUnset(nsCSSPropertyID aId,
- nscolor aValue) {
+ void SetColorValueIfUnset(nsCSSPropertyID aId, nscolor aValue)
+ {
if (!PropertyIsSet(aId)) {
SetColorValue(aId, aValue);
}
}
void SetFontFamily(const nsString& aValue);
void SetTextDecorationColorOverride();
void SetBackgroundImage(nsAttrValue& aValue);