mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
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 -->
This commit is contained in:
commit
61393b08a9
2 changed files with 2 additions and 40 deletions
|
@ -1271,14 +1271,6 @@ extern "C" {
|
|||
principal: *mut ThreadSafePrincipalHolder)
|
||||
-> RawServoDeclarationBlockStrong;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_RestyleWithAddedDeclaration(set: RawServoStyleSetBorrowed,
|
||||
declarations:
|
||||
RawServoDeclarationBlockBorrowed,
|
||||
previous_style:
|
||||
ServoComputedValuesBorrowed)
|
||||
-> ServoComputedValuesStrong;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_AnimationValues_Populate(arg1:
|
||||
RawGeckoAnimationValueListBorrowedMut,
|
||||
|
|
|
@ -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;
|
||||
|
@ -331,36 +331,6 @@ pub extern "C" fn Servo_AnimationValue_Release(anim: RawServoAnimationValueBorro
|
|||
unsafe { AnimationValue::release(anim) };
|
||||
}
|
||||
|
||||
#[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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue