drop AllowResolveStaleStyles flag

It's no longer used since bug 1357142.
This commit is contained in:
Hiroyuki Ikezoe 2017-07-10 18:10:51 +09:00
parent 5010df627d
commit fa95c8513b

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();