diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-02-12 23:17:59 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-12 23:17:59 -0800 |
commit | 61393b08a9a754b6833fc724bd023ce723eae5aa (patch) | |
tree | 0be845c921adc9d0eaaf838b00db427dcf629102 | |
parent | dd6d7ae59d869594a35e84c467e7547cfccb5d46 (diff) | |
parent | 7ed37d27d8dbb7c674ef6cf5546393510857c180 (diff) | |
download | servo-61393b08a9a754b6833fc724bd023ce723eae5aa.tar.gz servo-61393b08a9a754b6833fc724bd023ce723eae5aa.zip |
Auto merge of #15524 - BorisChiou:animation/drop_RestyleWithAddedDeclaration, r=Manishearth
stylo: Drop Servo_RestyleWithAddedDeclaration
This is the servo-side change for [bug 1338087](https://bugzilla.mozilla.org/show_bug.cgi?id=1338087). r=@Manishearth
---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] `./mach test-stylo` does not report any errors
- [X] These changes fix [bug 1338087](https://bugzilla.mozilla.org/show_bug.cgi?id=1338087).
- [X] These changes do not require tests because there are existing tests for this in mozilla-central
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15524)
<!-- Reviewable:end -->
-rw-r--r-- | components/style/gecko_bindings/bindings.rs | 8 | ||||
-rw-r--r-- | ports/geckolib/glue.rs | 34 |
2 files changed, 2 insertions, 40 deletions
diff --git a/components/style/gecko_bindings/bindings.rs b/components/style/gecko_bindings/bindings.rs index eb691fafedc..4f414b5316d 100644 --- a/components/style/gecko_bindings/bindings.rs +++ b/components/style/gecko_bindings/bindings.rs @@ -1272,14 +1272,6 @@ extern "C" { -> RawServoDeclarationBlockStrong; } extern "C" { - pub fn Servo_RestyleWithAddedDeclaration(set: RawServoStyleSetBorrowed, - declarations: - RawServoDeclarationBlockBorrowed, - previous_style: - ServoComputedValuesBorrowed) - -> ServoComputedValuesStrong; -} -extern "C" { pub fn Servo_AnimationValues_Populate(arg1: RawGeckoAnimationValueListBorrowedMut, arg2: diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs index e7db6b9f4a2..7a3fb5832ae 100644 --- a/ports/geckolib/glue.rs +++ b/ports/geckolib/glue.rs @@ -64,10 +64,10 @@ use style::gecko_properties::style_structs; use style::keyframes::KeyframesStepValue; use style::parallel; use style::parser::{ParserContext, ParserContextExtraData}; -use style::properties::{CascadeFlags, ComputedValues, Importance, PropertyDeclaration}; +use style::properties::{ComputedValues, Importance, PropertyDeclaration}; use style::properties::{PropertyDeclarationParseResult, PropertyDeclarationBlock, PropertyId}; -use style::properties::{apply_declarations, parse_one_declaration}; use style::properties::animated_properties::{AnimationValue, Interpolate, TransitionProperty}; +use style::properties::parse_one_declaration; use style::restyle_hints::RestyleHint; use style::selector_parser::PseudoElementCascadeType; use style::sequential; @@ -332,36 +332,6 @@ pub extern "C" fn Servo_AnimationValue_Release(anim: RawServoAnimationValueBorro } #[no_mangle] -pub extern "C" fn Servo_RestyleWithAddedDeclaration(raw_data: RawServoStyleSetBorrowed, - declarations: RawServoDeclarationBlockBorrowed, - previous_style: ServoComputedValuesBorrowed) - -> ServoComputedValuesStrong -{ - let previous_style = ComputedValues::as_arc(&previous_style); - let declarations = RwLock::<PropertyDeclarationBlock>::as_arc(&declarations); - - let guard = declarations.read(); - - let declarations = || { - guard.declarations.iter().rev().map(|&(ref decl, _importance)| decl) - }; - - let data = PerDocumentStyleData::from_ffi(raw_data).borrow(); - - // FIXME (bug 1303229): Use the actual viewport size here - let computed = apply_declarations(Size2D::new(Au(0), Au(0)), - /* is_root_element = */ false, - declarations, - previous_style, - data.default_computed_values(), - None, - Box::new(StdoutErrorReporter), - None, - CascadeFlags::empty()); - Arc::new(computed).into_strong() -} - -#[no_mangle] pub extern "C" fn Servo_StyleWorkerThreadCount() -> u32 { *NUM_THREADS as u32 } |