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:
bors-servo 2017-07-10 14:57:07 -07:00 committed by GitHub
commit 4b91014b14
4 changed files with 8 additions and 15 deletions

View file

@ -2695,8 +2695,8 @@ extern "C" {
} }
extern "C" { extern "C" {
pub fn Servo_ResolveStyle(element: RawGeckoElementBorrowed, pub fn Servo_ResolveStyle(element: RawGeckoElementBorrowed,
set: RawServoStyleSetBorrowed, set: RawServoStyleSetBorrowed)
allow_stale: bool) -> ServoComputedValuesStrong; -> ServoComputedValuesStrong;
} }
extern "C" { extern "C" {
pub fn Servo_ResolvePseudoStyle(element: RawGeckoElementBorrowed, pub fn Servo_ResolvePseudoStyle(element: RawGeckoElementBorrowed,

View file

@ -38444,7 +38444,7 @@ pub mod root {
root::nsCharTraits ) )); root::nsCharTraits ) ));
} }
#[test] #[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 ! ( assert_eq!(::std::mem::size_of::<u8>() , 1usize , concat ! (
"Size of template specialization: " , stringify ! ( u8 ) "Size of template specialization: " , stringify ! ( u8 )
)); ));
@ -38453,7 +38453,7 @@ pub mod root {
) )); ) ));
} }
#[test] #[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 ! ( assert_eq!(::std::mem::size_of::<u8>() , 1usize , concat ! (
"Size of template specialization: " , stringify ! ( u8 ) "Size of template specialization: " , stringify ! ( u8 )
)); ));

View file

@ -37769,7 +37769,7 @@ pub mod root {
root::nsCharTraits ) )); root::nsCharTraits ) ));
} }
#[test] #[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 ! ( assert_eq!(::std::mem::size_of::<u8>() , 1usize , concat ! (
"Size of template specialization: " , stringify ! ( u8 ) "Size of template specialization: " , stringify ! ( u8 )
)); ));
@ -37778,7 +37778,7 @@ pub mod root {
) )); ) ));
} }
#[test] #[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 ! ( assert_eq!(::std::mem::size_of::<u8>() , 1usize , concat ! (
"Size of template specialization: " , stringify ! ( u8 ) "Size of template specialization: " , stringify ! ( u8 )
)); ));

View file

@ -2692,21 +2692,14 @@ pub extern "C" fn Servo_TakeChangeHint(element: RawGeckoElementBorrowed) -> nsCh
#[no_mangle] #[no_mangle]
pub extern "C" fn Servo_ResolveStyle(element: RawGeckoElementBorrowed, pub extern "C" fn Servo_ResolveStyle(element: RawGeckoElementBorrowed,
raw_data: RawServoStyleSetBorrowed, raw_data: RawServoStyleSetBorrowed)
allow_stale: bool)
-> ServoComputedValuesStrong -> ServoComputedValuesStrong
{ {
let element = GeckoElement(element); let element = GeckoElement(element);
debug!("Servo_ResolveStyle: {:?}", element); debug!("Servo_ResolveStyle: {:?}", element);
let data = unsafe { element.ensure_data() }.borrow(); let data = unsafe { element.ensure_data() }.borrow();
let valid_styles = if allow_stale { if !element.has_current_styles(&*data) {
data.has_styles()
} else {
element.has_current_styles(&*data)
};
if !valid_styles {
debug_assert!(false, "Resolving style on element without current styles with lazy \ debug_assert!(false, "Resolving style on element without current styles with lazy \
computation forbidden."); computation forbidden.");
let per_doc_data = PerDocumentStyleData::from_ffi(raw_data).borrow(); let per_doc_data = PerDocumentStyleData::from_ffi(raw_data).borrow();