mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1029140 - Make the destructor of nsROCSSPrimitiveValue private. r=bz
This commit is contained in:
parent
c4c724ffd1
commit
78f144a4d1
@ -1808,7 +1808,7 @@ nsComputedDOMStyle::GetCSSGradientString(const nsStyleGradient* aGradient,
|
||||
|
||||
bool needSep = false;
|
||||
nsAutoString tokenString;
|
||||
nsROCSSPrimitiveValue *tmpVal = new nsROCSSPrimitiveValue;
|
||||
nsRefPtr<nsROCSSPrimitiveValue> tmpVal = new nsROCSSPrimitiveValue;
|
||||
|
||||
if (isRadial && !aGradient->mLegacySyntax) {
|
||||
if (aGradient->mSize != NS_STYLE_GRADIENT_SIZE_EXPLICIT_SIZE) {
|
||||
@ -1908,7 +1908,6 @@ nsComputedDOMStyle::GetCSSGradientString(const nsStyleGradient* aGradient,
|
||||
needSep = true;
|
||||
}
|
||||
|
||||
delete tmpVal;
|
||||
aString.Append(')');
|
||||
}
|
||||
|
||||
@ -5081,11 +5080,10 @@ void
|
||||
nsComputedDOMStyle::SetCssTextToCoord(nsAString& aCssText,
|
||||
const nsStyleCoord& aCoord)
|
||||
{
|
||||
nsROCSSPrimitiveValue* value = new nsROCSSPrimitiveValue;
|
||||
nsRefPtr<nsROCSSPrimitiveValue> value = new nsROCSSPrimitiveValue;
|
||||
bool clampNegativeCalc = true;
|
||||
SetValueToCoord(value, aCoord, clampNegativeCalc);
|
||||
value->GetCssText(aCssText);
|
||||
delete value;
|
||||
}
|
||||
|
||||
CSSValue*
|
||||
|
@ -33,8 +33,6 @@ nsROCSSPrimitiveValue::~nsROCSSPrimitiveValue()
|
||||
NS_IMPL_CYCLE_COLLECTING_ADDREF(nsROCSSPrimitiveValue)
|
||||
NS_IMPL_CYCLE_COLLECTING_RELEASE(nsROCSSPrimitiveValue)
|
||||
|
||||
|
||||
// QueryInterface implementation for nsROCSSPrimitiveValue
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsROCSSPrimitiveValue)
|
||||
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMCSSPrimitiveValue)
|
||||
|
@ -77,7 +77,6 @@ public:
|
||||
|
||||
// nsROCSSPrimitiveValue
|
||||
nsROCSSPrimitiveValue();
|
||||
~nsROCSSPrimitiveValue();
|
||||
|
||||
void SetNumber(float aValue);
|
||||
void SetNumber(int32_t aValue);
|
||||
@ -108,6 +107,8 @@ public:
|
||||
virtual JSObject *WrapObject(JSContext *cx) MOZ_OVERRIDE;
|
||||
|
||||
private:
|
||||
~nsROCSSPrimitiveValue();
|
||||
|
||||
uint16_t mType;
|
||||
|
||||
union {
|
||||
@ -123,14 +124,6 @@ private:
|
||||
} mValue;
|
||||
};
|
||||
|
||||
namespace mozilla {
|
||||
template<>
|
||||
struct HasDangerousPublicDestructor<nsROCSSPrimitiveValue>
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
}
|
||||
|
||||
inline nsROCSSPrimitiveValue *mozilla::dom::CSSValue::AsPrimitiveValue()
|
||||
{
|
||||
return CssValueType() == nsIDOMCSSValue::CSS_PRIMITIVE_VALUE ?
|
||||
|
Loading…
Reference in New Issue
Block a user