mirror of
https://github.com/servo/servo.git
synced 2025-08-17 03:15:34 +01:00
Add FFI for debug info of CSSStyleRule
This commit is contained in:
parent
9ee2ec5a35
commit
3c5871f83a
2 changed files with 11 additions and 0 deletions
|
@ -324,6 +324,13 @@ pub extern "C" fn Servo_StyleRule_Release(rule: RawServoStyleRuleBorrowed) -> ()
|
|||
unsafe { RwLock::<StyleRule>::release(rule) };
|
||||
}
|
||||
|
||||
#[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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue