Bug 1458814: Remove code that is no longer called. r?hiro
Au revoir!
MozReview-Commit-ID: DjqszUSIzXs
--- a/dom/smil/nsSMILCSSValueType.cpp
+++ b/dom/smil/nsSMILCSSValueType.cpp
@@ -574,43 +574,16 @@ nsSMILCSSValueType::ValueFromAnimationVa
sSingleton.Init(result);
result.mU.mPtr = new ValueWrapper(aPropID, aValue);
return result;
}
// static
-void
-nsSMILCSSValueType::ValueToString(const nsSMILValue& aValue,
- nsAString& aString)
-{
- MOZ_ASSERT(aValue.mType == &nsSMILCSSValueType::sSingleton,
- "Unexpected SMIL value type");
- const ValueWrapper* wrapper = ExtractValueWrapper(aValue);
- if (!wrapper) {
- return;
- }
-
- if (nsCSSProps::IsShorthand(wrapper->mPropID)) {
- // In case of shorthand on servo, we iterate over all mServoValues array
- // since we have multiple AnimationValues in the array for each longhand
- // component.
- Servo_Shorthand_AnimationValues_Serialize(wrapper->mPropID,
- &wrapper->mServoValues,
- &aString);
- return;
- }
-
- Servo_AnimationValue_Serialize(wrapper->mServoValues[0],
- wrapper->mPropID,
- &aString);
-}
-
-// static
bool
nsSMILCSSValueType::SetPropertyValues(const nsSMILValue& aValue,
DeclarationBlock& aDecl)
{
MOZ_ASSERT(aValue.mType == &nsSMILCSSValueType::sSingleton,
"Unexpected SMIL value type");
const ValueWrapper* wrapper = ExtractValueWrapper(aValue);
if (!wrapper) {
--- a/dom/smil/nsSMILCSSValueType.h
+++ b/dom/smil/nsSMILCSSValueType.h
@@ -99,28 +99,16 @@ public:
* nsSMILValue with the null type (i.e. rv.IsNull()
* returns true).
*/
static nsSMILValue ValueFromAnimationValue(nsCSSPropertyID aPropID,
Element* aTargetElement,
const AnimationValue& aValue);
/**
- * Creates a string representation of the given nsSMILValue.
- *
- * Note: aValue is expected to be of this type (that is, it's expected to
- * have been initialized by nsSMILCSSValueType::sSingleton). If aValue is a
- * freshly-initialized value the resulting string will be empty.
- *
- * @param aValue The nsSMILValue to be converted into a string.
- * @param [out] aString The string to be populated with the given value.
- */
- static void ValueToString(const nsSMILValue& aValue, nsAString& aString);
-
- /**
* Sets the relevant property values in the declaration block.
*
* Returns whether the declaration changed.
*/
static bool SetPropertyValues(const nsSMILValue&, mozilla::DeclarationBlock&);
/**
* Return the CSS property animated by the specified value.
--- a/layout/style/ServoBindingList.h
+++ b/layout/style/ServoBindingList.h
@@ -481,20 +481,16 @@ SERVO_BINDING_FUNC(Servo_AnimationValues
RawServoAnimationValueBorrowed value_to_match)
SERVO_BINDING_FUNC(Servo_AnimationValues_ComputeDistance, double,
RawServoAnimationValueBorrowed from,
RawServoAnimationValueBorrowed to)
SERVO_BINDING_FUNC(Servo_AnimationValue_Serialize, void,
RawServoAnimationValueBorrowed value,
nsCSSPropertyID property,
nsAString* buffer)
-SERVO_BINDING_FUNC(Servo_Shorthand_AnimationValues_Serialize, void,
- nsCSSPropertyID shorthand_property,
- RawGeckoServoAnimationValueListBorrowed values,
- nsAString* buffer)
SERVO_BINDING_FUNC(Servo_AnimationValue_GetOpacity, float,
RawServoAnimationValueBorrowed value)
SERVO_BINDING_FUNC(Servo_AnimationValue_Opacity,
RawServoAnimationValueStrong,
float)
SERVO_BINDING_FUNC(Servo_AnimationValue_GetTransform, void,
RawServoAnimationValueBorrowed value,
RefPtr<nsCSSValueSharedList>* list)
--- a/servo/ports/geckolib/glue.rs
+++ b/servo/ports/geckolib/glue.rs
@@ -704,41 +704,16 @@ pub extern "C" fn Servo_AnimationValue_S
let buffer = unsafe { buffer.as_mut().unwrap() };
let rv = PropertyDeclarationBlock::with_one(uncomputed_value, Importance::Normal)
.single_value_to_css(&get_property_id_from_nscsspropertyid!(property, ()), buffer,
None, None /* No extra custom properties */);
debug_assert!(rv.is_ok());
}
#[no_mangle]
-pub unsafe extern "C" fn Servo_Shorthand_AnimationValues_Serialize(
- shorthand_property: nsCSSPropertyID,
- values: RawGeckoServoAnimationValueListBorrowed,
- buffer: *mut nsAString,
-) {
- let property_id = get_property_id_from_nscsspropertyid!(shorthand_property, ());
- let shorthand = match property_id.as_shorthand() {
- Ok(shorthand) => shorthand,
- _ => return,
- };
-
- // Convert RawServoAnimationValue(s) into a vector of PropertyDeclaration
- // so that we can use reference of the PropertyDeclaration without worrying
- // about its lifetime. (longhands_to_css() expects &PropertyDeclaration
- // iterator.)
- let declarations: Vec<PropertyDeclaration> =
- values.iter().map(|v| AnimationValue::as_arc(&&*v.mRawPtr).uncompute()).collect();
-
- let _ = shorthand.longhands_to_css(
- declarations.iter(),
- &mut CssWriter::new(&mut *buffer),
- );
-}
-
-#[no_mangle]
pub extern "C" fn Servo_AnimationValue_GetOpacity(
value: RawServoAnimationValueBorrowed,
) -> f32 {
let value = AnimationValue::as_arc(&value);
if let AnimationValue::Opacity(opacity) = **value {
opacity
} else {
panic!("The AnimationValue should be Opacity");