aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/style/gecko_bindings/bindings.rs10
-rw-r--r--ports/geckolib/glue.rs60
2 files changed, 0 insertions, 70 deletions
diff --git a/components/style/gecko_bindings/bindings.rs b/components/style/gecko_bindings/bindings.rs
index 4ed708759a4..e2c723f5e65 100644
--- a/components/style/gecko_bindings/bindings.rs
+++ b/components/style/gecko_bindings/bindings.rs
@@ -1352,16 +1352,6 @@ extern "C" {
RawGeckoComputedKeyframeValuesListBorrowedMut);
}
extern "C" {
- pub fn Servo_AnimationValues_Populate(arg1:
- RawGeckoAnimationValueListBorrowedMut,
- arg2:
- RawServoDeclarationBlockBorrowed,
- arg3: ServoComputedValuesBorrowed,
- arg4:
- ServoComputedValuesBorrowedOrNull,
- arg5: RawGeckoPresContextBorrowed);
-}
-extern "C" {
pub fn Servo_AnimationValues_Interpolate(from:
RawServoAnimationValueBorrowed,
to:
diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs
index 79611a881f6..9791ff7837d 100644
--- a/ports/geckolib/glue.rs
+++ b/ports/geckolib/glue.rs
@@ -41,7 +41,6 @@ use style::gecko_bindings::bindings::{RawServoStyleSheetStrong, ServoComputedVal
use style::gecko_bindings::bindings::{ServoCssRulesBorrowed, ServoCssRulesStrong};
use style::gecko_bindings::bindings::{nsACString, nsAString};
use style::gecko_bindings::bindings::Gecko_AnimationAppendKeyframe;
-use style::gecko_bindings::bindings::RawGeckoAnimationValueListBorrowedMut;
use style::gecko_bindings::bindings::RawGeckoComputedKeyframeValuesListBorrowedMut;
use style::gecko_bindings::bindings::RawGeckoElementBorrowed;
use style::gecko_bindings::bindings::RawGeckoPresContextBorrowed;
@@ -327,65 +326,6 @@ pub extern "C" fn Servo_AnimationValue_DeepEqual(this: RawServoAnimationValueBor
this_value == other_value
}
-/// Takes a ServoAnimationValues and populates it with the animation values corresponding
-/// to a given property declaration block
-#[no_mangle]
-pub extern "C" fn Servo_AnimationValues_Populate(anim: RawGeckoAnimationValueListBorrowedMut,
- declarations: RawServoDeclarationBlockBorrowed,
- style: ServoComputedValuesBorrowed,
- parent_style: ServoComputedValuesBorrowedOrNull,
- pres_context: RawGeckoPresContextBorrowed)
-{
- use style::properties::declaration_block::Importance;
- use style::values::computed::Context;
-
- let parent_style = parent_style.as_ref().map(|r| &**ComputedValues::as_arc(&r));
- // FIXME this might not be efficient since Populate
- // is called multiple times. We should precalculate the Context
- // and share it across Populate calls
- let style = ComputedValues::as_arc(&style);
- let declarations = RwLock::<PropertyDeclarationBlock>::as_arc(&declarations);
- let guard = declarations.read();
-
- let init = ComputedValues::default_values(pres_context);
-
- let context = Context {
- is_root_element: false,
- // FIXME (bug 1303229): Use the actual viewport size here
- viewport_size: Size2D::new(Au(0), Au(0)),
- inherited_style: parent_style.unwrap_or(&init),
- style: (**style).clone(),
- font_metrics_provider: None,
- };
-
- let mut iter = guard.declarations
- .iter()
- .filter_map(|&(ref decl, imp)| {
- if imp == Importance::Normal {
- AnimationValue::from_declaration(decl, &context, &init)
- } else {
- None
- }
- });
-
- let mut geckoiter = anim.iter_mut();
- {
- // we reborrow to scope the consumed mutable borrow
- // we need to be able to ensure geckoiter is empty later on
- // and thus can't directly use `geckoiter`
- let local_geckoiter = &mut geckoiter;
- for (gecko, servo) in local_geckoiter.zip(&mut iter) {
- gecko.mValue.mServo.set_arc_leaky(Arc::new(servo));
- }
- }
-
- // we should have gone through both iterators
- if iter.next().is_some() || geckoiter.next().is_some() {
- warn!("stylo: Mismatched sizes of Gecko and Servo \
- array during animation value construction");
- }
-}
-
#[no_mangle]
pub extern "C" fn Servo_StyleWorkerThreadCount() -> u32 {
GLOBAL_STYLE_DATA.num_threads as u32