Skip to content

Commit

Permalink
Pass element or pseudo element to Servo_StyleSet_GetBaseComputedValue…
Browse files Browse the repository at this point in the history
…sForElement()
  • Loading branch information
Hiroyuki Ikezoe committed Nov 22, 2017
1 parent 37fa711 commit dcedf11
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions ports/geckolib/glue.rs
Expand Up @@ -789,7 +789,6 @@ pub extern "C" fn Servo_StyleSet_GetBaseComputedValuesForElement(
element: RawGeckoElementBorrowed,
computed_values: ServoStyleContextBorrowed,
snapshots: *const ServoElementSnapshotTable,
pseudo_type: CSSPseudoElementType
) -> ServoStyleContextStrong {
debug_assert!(!snapshots.is_null());
let computed_values = unsafe { ArcBorrow::from_ref(computed_values) };
Expand All @@ -807,21 +806,6 @@ pub extern "C" fn Servo_StyleSet_GetBaseComputedValuesForElement(

let element = GeckoElement(element);

let element_data = match element.borrow_data() {
Some(data) => data,
None => return computed_values.clone_arc().into(),
};

if let Some(pseudo) = PseudoElement::from_pseudo_type(pseudo_type) {
let styles = &element_data.styles;
// This style already doesn't have animations.
return styles
.pseudos
.get(&pseudo)
.expect("GetBaseComputedValuesForElement for an unexisting pseudo?")
.clone().into();
}

let global_style_data = &*GLOBAL_STYLE_DATA;
let guard = global_style_data.shared_lock.read();
let shared = create_shared_context(&global_style_data,
Expand Down

0 comments on commit dcedf11

Please sign in to comment.