mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Auto merge of #17653 - hiikezoe:drop-AllowResolveStaleStyles, r=emilio
Drop allow resolve stale styles flag <!-- Please describe your changes on the following line: --> https://bugzilla.mozilla.org/show_bug.cgi?id=1379529 --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors
This commit is contained in:
commit
4b91014b14
4 changed files with 8 additions and 15 deletions
|
@ -2695,8 +2695,8 @@ extern "C" {
|
|||
}
|
||||
extern "C" {
|
||||
pub fn Servo_ResolveStyle(element: RawGeckoElementBorrowed,
|
||||
set: RawServoStyleSetBorrowed,
|
||||
allow_stale: bool) -> ServoComputedValuesStrong;
|
||||
set: RawServoStyleSetBorrowed)
|
||||
-> ServoComputedValuesStrong;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_ResolvePseudoStyle(element: RawGeckoElementBorrowed,
|
||||
|
|
|
@ -38444,7 +38444,7 @@ pub mod root {
|
|||
root::nsCharTraits ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout__bindgen_ty_id_214707_instantiation_100() {
|
||||
fn __bindgen_test_layout__bindgen_ty_id_214705_instantiation_100() {
|
||||
assert_eq!(::std::mem::size_of::<u8>() , 1usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! ( u8 )
|
||||
));
|
||||
|
@ -38453,7 +38453,7 @@ pub mod root {
|
|||
) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout__bindgen_ty_id_214743_instantiation_101() {
|
||||
fn __bindgen_test_layout__bindgen_ty_id_214741_instantiation_101() {
|
||||
assert_eq!(::std::mem::size_of::<u8>() , 1usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! ( u8 )
|
||||
));
|
||||
|
|
|
@ -37769,7 +37769,7 @@ pub mod root {
|
|||
root::nsCharTraits ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout__bindgen_ty_id_210969_instantiation_98() {
|
||||
fn __bindgen_test_layout__bindgen_ty_id_210967_instantiation_98() {
|
||||
assert_eq!(::std::mem::size_of::<u8>() , 1usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! ( u8 )
|
||||
));
|
||||
|
@ -37778,7 +37778,7 @@ pub mod root {
|
|||
) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout__bindgen_ty_id_211005_instantiation_99() {
|
||||
fn __bindgen_test_layout__bindgen_ty_id_211003_instantiation_99() {
|
||||
assert_eq!(::std::mem::size_of::<u8>() , 1usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! ( u8 )
|
||||
));
|
||||
|
|
|
@ -2692,21 +2692,14 @@ pub extern "C" fn Servo_TakeChangeHint(element: RawGeckoElementBorrowed) -> nsCh
|
|||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Servo_ResolveStyle(element: RawGeckoElementBorrowed,
|
||||
raw_data: RawServoStyleSetBorrowed,
|
||||
allow_stale: bool)
|
||||
raw_data: RawServoStyleSetBorrowed)
|
||||
-> ServoComputedValuesStrong
|
||||
{
|
||||
let element = GeckoElement(element);
|
||||
debug!("Servo_ResolveStyle: {:?}", element);
|
||||
let data = unsafe { element.ensure_data() }.borrow();
|
||||
|
||||
let valid_styles = if allow_stale {
|
||||
data.has_styles()
|
||||
} else {
|
||||
element.has_current_styles(&*data)
|
||||
};
|
||||
|
||||
if !valid_styles {
|
||||
if !element.has_current_styles(&*data) {
|
||||
debug_assert!(false, "Resolving style on element without current styles with lazy \
|
||||
computation forbidden.");
|
||||
let per_doc_data = PerDocumentStyleData::from_ffi(raw_data).borrow();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue