aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/style/gecko_bindings/bindings.rs4
-rw-r--r--ports/geckolib/glue.rs7
2 files changed, 11 insertions, 0 deletions
diff --git a/components/style/gecko_bindings/bindings.rs b/components/style/gecko_bindings/bindings.rs
index 348f27fc878..c00e7149da6 100644
--- a/components/style/gecko_bindings/bindings.rs
+++ b/components/style/gecko_bindings/bindings.rs
@@ -1011,6 +1011,10 @@ extern "C" {
-> RawServoStyleRuleStrong;
}
extern "C" {
+ pub fn Servo_StyleRule_Debug(rule: RawServoStyleRuleBorrowed,
+ result: *mut nsACString_internal);
+}
+extern "C" {
pub fn Servo_StyleRule_GetStyle(rule: RawServoStyleRuleBorrowed)
-> RawServoDeclarationBlockStrong;
}
diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs
index 103f680507c..e65c8cbd5bd 100644
--- a/ports/geckolib/glue.rs
+++ b/ports/geckolib/glue.rs
@@ -325,6 +325,13 @@ pub extern "C" fn Servo_StyleRule_Release(rule: RawServoStyleRuleBorrowed) -> ()
}
#[no_mangle]
+pub extern "C" fn Servo_StyleRule_Debug(rule: RawServoStyleRuleBorrowed, result: *mut nsACString) -> () {
+ let rule = RwLock::<StyleRule>::as_arc(&rule);
+ let result = unsafe { result.as_mut().unwrap() };
+ write!(result, "{:?}", *rule.read()).unwrap();
+}
+
+#[no_mangle]
pub extern "C" fn Servo_StyleRule_GetStyle(rule: RawServoStyleRuleBorrowed) -> RawServoDeclarationBlockStrong {
let rule = RwLock::<StyleRule>::as_arc(&rule);
rule.read().block.clone().into_strong()