diff options
-rw-r--r-- | ports/geckolib/bindings.rs | 2 | ||||
-rw-r--r-- | ports/geckolib/glue.rs | 6 | ||||
-rw-r--r-- | ports/geckolib/wrapper.rs | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/ports/geckolib/bindings.rs b/ports/geckolib/bindings.rs index 037d55477ca..06c604ce68a 100644 --- a/ports/geckolib/bindings.rs +++ b/ports/geckolib/bindings.rs @@ -81,7 +81,7 @@ extern "C" { pub fn Servo_StyleSheetHasRules(sheet: *mut RawServoStyleSheet) -> bool; pub fn Servo_InitStyleSet() -> *mut RawServoStyleSet; pub fn Servo_DropStyleSet(set: *mut RawServoStyleSet); - pub fn Servo_GetComputedValues(element: *mut RawGeckoElement) + pub fn Servo_GetComputedValues(node: *mut RawGeckoNode) -> *mut ServoComputedValues; pub fn Servo_GetComputedValuesForAnonymousBox(parentStyleOrNull: *mut ServoComputedValues, diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs index 8a3294afc55..aba206abb59 100644 --- a/ports/geckolib/glue.rs +++ b/ports/geckolib/glue.rs @@ -5,7 +5,7 @@ #![allow(unsafe_code)] use app_units::Au; -use bindings::{RawGeckoDocument, RawGeckoElement}; +use bindings::{RawGeckoDocument, RawGeckoNode}; use bindings::{RawServoStyleSet, RawServoStyleSheet, ServoComputedValues, ServoNodeData}; use bindings::{nsIAtom}; use data::PerDocumentStyleData; @@ -173,9 +173,9 @@ pub extern "C" fn Servo_ReleaseStyleSheet(sheet: *mut RawServoStyleSheet) -> () } #[no_mangle] -pub extern "C" fn Servo_GetComputedValues(element: *mut RawGeckoElement) +pub extern "C" fn Servo_GetComputedValues(node: *mut RawGeckoNode) -> *mut ServoComputedValues { - let node = unsafe { GeckoElement::from_raw(element).as_node() }; + let node = unsafe { GeckoNode::from_raw(node) }; let arc_cv = node.borrow_data().map(|data| data.style.clone()); arc_cv.map_or(ptr::null_mut(), |arc| unsafe { transmute(arc) }) } diff --git a/ports/geckolib/wrapper.rs b/ports/geckolib/wrapper.rs index 7262f91e47e..3c008d9d686 100644 --- a/ports/geckolib/wrapper.rs +++ b/ports/geckolib/wrapper.rs @@ -58,7 +58,7 @@ pub struct GeckoNode<'ln> { } impl<'ln> GeckoNode<'ln> { - unsafe fn from_raw(n: *mut RawGeckoNode) -> GeckoNode<'ln> { + pub unsafe fn from_raw(n: *mut RawGeckoNode) -> GeckoNode<'ln> { GeckoNode { node: n, chain: PhantomData, |